mirror of
https://github.com/libretro/scummvm.git
synced 2025-03-01 15:55:45 +00:00
Some more cleanup
svn-id: r17227
This commit is contained in:
parent
47ee0ce884
commit
df129b198c
@ -805,8 +805,6 @@ void ScummEngine::redrawBGStrip(int start, int num) {
|
||||
|
||||
int s = _screenStartStrip + start;
|
||||
|
||||
assert(s >= 0 && (size_t) s < sizeof(gfxUsageBits) / (3 * sizeof(gfxUsageBits[0])));
|
||||
|
||||
for (int i = 0; i < num; i++)
|
||||
setGfxUsageBit(s + i, USAGE_BIT_DIRTY);
|
||||
|
||||
|
@ -277,6 +277,7 @@ protected:
|
||||
|
||||
int getZPlanes(const byte *smap_ptr, const byte *zplane_list[9], bool bmapImage) const;
|
||||
|
||||
StripTable *generateStripTable(const byte *src, int width, int height, StripTable *table) const;
|
||||
void drawBitmapV2Helper(const byte *ptr, VirtScreen *vs, int x, int y, const int width, const int height,
|
||||
int stripnr, int numstrip);
|
||||
|
||||
@ -287,7 +288,6 @@ public:
|
||||
void drawBitmap(const byte *ptr, VirtScreen *vs, int x, int y, const int width, const int height,
|
||||
int stripnr, int numstrip, byte flag);
|
||||
|
||||
StripTable *generateStripTable(const byte *src, int width, int height, StripTable *table) const;
|
||||
void decodeC64Gfx(const byte *src, byte *dst, int size) const;
|
||||
void decodeNESGfx(const byte *room);
|
||||
void decodeNESObject(const byte *ptr, int xpos, int ypos, int width, int height);
|
||||
|
@ -806,8 +806,6 @@ ScummEngine::ScummEngine(GameDetector *detector, OSystem *syst, const ScummGameS
|
||||
|
||||
_doEffect = false;
|
||||
memset(&_flashlight, 0, sizeof(_flashlight));
|
||||
_compositeBuf = 0;
|
||||
_herculesBuf = 0;
|
||||
_bompActorPalettePtr = NULL;
|
||||
_shakeEnabled = false;
|
||||
_shakeFrame = 0;
|
||||
@ -1128,6 +1126,7 @@ ScummEngine::ScummEngine(GameDetector *detector, OSystem *syst, const ScummGameS
|
||||
|
||||
_compositeBuf = (byte *)malloc(_screenWidth * _screenHeight);
|
||||
|
||||
_herculesBuf = 0;
|
||||
if (_renderMode == Common::kRenderHercA || _renderMode == Common::kRenderHercG) {
|
||||
_herculesBuf = (byte *)malloc(Common::kHercW * Common::kHercH);
|
||||
}
|
||||
|
@ -41,18 +41,21 @@ void ScummEngine::upgradeGfxUsageBits() {
|
||||
}
|
||||
|
||||
void ScummEngine::setGfxUsageBit(int strip, int bit) {
|
||||
assert(strip >= 0 && strip < ARRAYSIZE(gfxUsageBits) / 3);
|
||||
assert(1 <= bit && bit <= 96);
|
||||
bit--;
|
||||
gfxUsageBits[3 * strip + bit / 32] |= (1 << (bit % 32));
|
||||
}
|
||||
|
||||
void ScummEngine::clearGfxUsageBit(int strip, int bit) {
|
||||
assert(strip >= 0 && strip < ARRAYSIZE(gfxUsageBits) / 3);
|
||||
assert(1 <= bit && bit <= 96);
|
||||
bit--;
|
||||
gfxUsageBits[3 * strip + bit / 32] &= ~(1 << (bit % 32));
|
||||
}
|
||||
|
||||
bool ScummEngine::testGfxUsageBit(int strip, int bit) {
|
||||
assert(strip >= 0 && strip < ARRAYSIZE(gfxUsageBits) / 3);
|
||||
assert(1 <= bit && bit <= 96);
|
||||
bit--;
|
||||
return (gfxUsageBits[3 * strip + bit / 32] & (1 << (bit % 32))) != 0;
|
||||
@ -63,6 +66,7 @@ bool ScummEngine::testGfxAnyUsageBits(int strip) {
|
||||
uint32 bitmask[3] = { 0xFFFFFFFF, 0xFFFFFFFF, 0x3FFFFFFF };
|
||||
int i;
|
||||
|
||||
assert(strip >= 0 && strip < ARRAYSIZE(gfxUsageBits) / 3);
|
||||
for (i = 0; i < 3; i++)
|
||||
if (gfxUsageBits[3 * strip + i] & bitmask[i])
|
||||
return true;
|
||||
@ -75,6 +79,7 @@ bool ScummEngine::testGfxOtherUsageBits(int strip, int bit) {
|
||||
uint32 bitmask[3] = { 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF };
|
||||
int i;
|
||||
|
||||
assert(strip >= 0 && strip < ARRAYSIZE(gfxUsageBits) / 3);
|
||||
assert(1 <= bit && bit <= 96);
|
||||
bit--;
|
||||
bitmask[bit / 32] &= ~(1 << (bit % 32));
|
||||
|
Loading…
x
Reference in New Issue
Block a user