Mercurial > mm7
comparison Sprites.cpp @ 2420:0313c761d203
memory problems, Mouse
author | Ritor1 |
---|---|
date | Wed, 23 Jul 2014 01:12:55 +0600 |
parents | f4af3b203f65 |
children | ed1e4cff79a2 |
comparison
equal
deleted
inserted
replaced
2417:15440e9ae7b6 | 2420:0313c761d203 |
---|---|
405 uint mm8_frames_size = num_mm8_frames * sizeof(SpriteFrame); | 405 uint mm8_frames_size = num_mm8_frames * sizeof(SpriteFrame); |
406 memcpy(pSpriteSFrames + num_mm6_frames + num_mm7_frames, (char *)data_mm8 + 8, mm8_frames_size); | 406 memcpy(pSpriteSFrames + num_mm6_frames + num_mm7_frames, (char *)data_mm8 + 8, mm8_frames_size); |
407 memcpy(pSpriteEFrames + num_mm6_frames + num_mm7_frames, (char *)data_mm8 + 8 + mm8_frames_size, 2 * num_mm8_eframes); | 407 memcpy(pSpriteEFrames + num_mm6_frames + num_mm7_frames, (char *)data_mm8 + 8 + mm8_frames_size, 2 * num_mm8_eframes); |
408 | 408 |
409 for (uint i = 0; i < num_mm7_frames; ++i) | 409 for (uint i = 0; i < num_mm7_frames; ++i) |
410 pSpritePFrames[i] = &pSpriteSFrames[pSpriteEFrames[i]]; | 410 pSpritePFrames[i] = &pSpriteSFrames[pSpriteEFrames[i]];//Uninitialized memory access |
411 | 411 |
412 for (uint i = num_mm7_frames; i < num_mm6_frames + num_mm7_frames; ++i) | 412 for (uint i = num_mm7_frames; i < num_mm6_frames + num_mm7_frames; ++i) |
413 pSpritePFrames[i] = &pSpriteSFrames[pSpriteEFrames[i] + num_mm7_frames]; | 413 pSpritePFrames[i] = &pSpriteSFrames[pSpriteEFrames[i] + num_mm7_frames]; |
414 | 414 |
415 for (uint i = num_mm6_frames + num_mm7_frames; i < num_mm6_frames + num_mm7_frames + num_mm8_frames; ++i) | 415 for (uint i = num_mm6_frames + num_mm7_frames; i < num_mm6_frames + num_mm7_frames + num_mm8_frames; ++i) |