diff options
author | Gregory Montoir | 2005-02-24 20:20:35 +0000 |
---|---|---|
committer | Gregory Montoir | 2005-02-24 20:20:35 +0000 |
commit | cc5e406cb533fb4552adc18382ef9ffcdbeb10c6 (patch) | |
tree | d3d00f3a640dc14552ef1524fd26b256424f7b3b /scumm | |
parent | 976b988448ad91d2fa0987593f9b6994c305eef0 (diff) | |
download | scummvm-rg350-cc5e406cb533fb4552adc18382ef9ffcdbeb10c6.tar.gz scummvm-rg350-cc5e406cb533fb4552adc18382ef9ffcdbeb10c6.tar.bz2 scummvm-rg350-cc5e406cb533fb4552adc18382ef9ffcdbeb10c6.zip |
defined some flags for HE wiz ; it should make the code more readable
svn-id: r16901
Diffstat (limited to 'scumm')
-rw-r--r-- | scumm/script_v72he.cpp | 2 | ||||
-rw-r--r-- | scumm/script_v80he.cpp | 2 | ||||
-rw-r--r-- | scumm/script_v90he.cpp | 18 | ||||
-rw-r--r-- | scumm/sprite_he.cpp | 16 | ||||
-rw-r--r-- | scumm/sprite_he.h | 4 | ||||
-rw-r--r-- | scumm/wiz_he.cpp | 2 | ||||
-rw-r--r-- | scumm/wiz_he.h | 27 |
7 files changed, 42 insertions, 29 deletions
diff --git a/scumm/script_v72he.cpp b/scumm/script_v72he.cpp index 732ee176d2..7a686e6028 100644 --- a/scumm/script_v72he.cpp +++ b/scumm/script_v72he.cpp @@ -808,7 +808,7 @@ void ScummEngine_v72he::o72_printWizImage() { wi.resNum = pop(); wi.x1 = wi.y1 = 0; wi.state = 0; - wi.flags = 4; + wi.flags = kWIFPrint; drawWizImage(rtImage, &wi); } diff --git a/scumm/script_v80he.cpp b/scumm/script_v80he.cpp index 25590b3518..9d41d20449 100644 --- a/scumm/script_v80he.cpp +++ b/scumm/script_v80he.cpp @@ -588,7 +588,7 @@ void ScummEngine_v80he::o80_drawWizPolygon() { wi.x1 = wi.y1 = pop(); wi.resNum = pop(); wi.state = 0; - wi.flags = 0x40; + wi.flags = kWIFIsPolygon; displayWizImage(&wi); } diff --git a/scumm/script_v90he.cpp b/scumm/script_v90he.cpp index 8e693e1155..54b57aa9b5 100644 --- a/scumm/script_v90he.cpp +++ b/scumm/script_v90he.cpp @@ -500,12 +500,12 @@ void ScummEngine_v90he::o90_wizImageOps() { _wizParams.processMode = 1; break; case 3: - _wizParams.processFlags |= 0x800; + _wizParams.processFlags |= kWPFUseFile; _wizParams.processMode = 3; copyScriptString(_wizParams.filename); break; case 4: - _wizParams.processFlags |= 0x800; + _wizParams.processFlags |= kWPFUseFile; _wizParams.processMode = 4; copyScriptString(_wizParams.filename); _wizParams.unk_14C = pop(); @@ -520,15 +520,15 @@ void ScummEngine_v90he::o90_wizImageOps() { _wizParams.compType = pop(); break; case 6: - _wizParams.processFlags |= 0x400; + _wizParams.processFlags |= kWPFNewState; _wizParams.img.state = pop(); break; case 7: - _wizParams.processFlags |= 0x10; + _wizParams.processFlags |= kWPFRotate; _wizParams.angle = pop(); break; case 8: - _wizParams.processFlags |= 0x20; + _wizParams.processFlags |= kWPFNewFlags; _wizParams.img.flags = pop(); break; case 10: @@ -571,7 +571,7 @@ void ScummEngine_v90he::o90_wizImageOps() { } break; case 21: - _wizParams.processFlags |= 0x200; + _wizParams.processFlags |= kWPFClipBox; _wizParams.box.bottom = pop(); _wizParams.box.right = pop(); _wizParams.box.top = pop(); @@ -582,7 +582,7 @@ void ScummEngine_v90he::o90_wizImageOps() { pop(); break; case 46: - _wizParams.processFlags |= 8; + _wizParams.processFlags |= kWPFZoom; _wizParams.zoom = pop(); break; case 52: @@ -641,8 +641,8 @@ void ScummEngine_v90he::o90_wizImageOps() { _wizParams.processMode = 8; break; case 200: - _wizParams.processFlags |= 0x23; - _wizParams.img.flags |= 0x40; + _wizParams.processFlags |= kWPFNewFlags | kWPFSetPos | 2; + _wizParams.img.flags |= kWIFIsPolygon; _wizParams.unk_160 = _wizParams.img.y1 = _wizParams.img.x1 = pop(); break; case 209: diff --git a/scumm/sprite_he.cpp b/scumm/sprite_he.cpp index 877013d5bd..f95a74a816 100644 --- a/scumm/sprite_he.cpp +++ b/scumm/sprite_he.cpp @@ -1194,7 +1194,7 @@ void ScummEngine_v90he::spritesProcessWiz(bool arg) { spi->field_48 = wiz.img.state = res_state; spi->field_4C = wiz.img.resNum = res_id; - wiz.processFlags = 0x401; + wiz.processFlags = kWPFNewState | kWPFSetPos; spi->field_68 = spi->rot_angle; spi->field_6C = spi->zoom; spi->field_34 = wiz.img.x1; @@ -1222,6 +1222,8 @@ void ScummEngine_v90he::spritesProcessWiz(bool arg) { // sar eax, 1 // mov ecx, eax // neg ecx + + // => ecx = - something / 2 ebx = -1234; } @@ -1236,12 +1238,12 @@ void ScummEngine_v90he::spritesProcessWiz(bool arg) { wiz.img.flags = 0x10; if (spr_flags & kSF23) - wiz.img.flags = 0x410; + wiz.img.flags |= kWIFFlipX; if (spr_flags & kSF22) - wiz.img.flags |= 0x800; + wiz.img.flags |= kWIFFlipY; if (spr_flags & kSF21) { wiz.img.flags &= ~(0x11); - wiz.img.flags |= 8; + wiz.img.flags |= kWIFBlitToFrontVideoBuffer; } if (spi->field_54) { wiz.img.flags |= 0x200; @@ -1254,14 +1256,14 @@ void ScummEngine_v90he::spritesProcessWiz(bool arg) { wiz.processFlags |= 0x80000; //wiz.field_178 = spi->field_7C; // FIXME } - wiz.processFlags |= 0x20; + wiz.processFlags |= kWPFNewFlags; if (spr_flags & kSFRotated) { - wiz.processFlags |= 0x10; + wiz.processFlags |= kWPFRotate; wiz.angle = spi->rot_angle; } if (spr_flags & kSFZoomed) { - wiz.processFlags |= 0x08; + wiz.processFlags |= kWPFZoom; wiz.zoom = spi->zoom; } spi->imgFlags = wiz.img.flags; diff --git a/scumm/sprite_he.h b/scumm/sprite_he.h index be1dda9969..f3c19066b5 100644 --- a/scumm/sprite_he.h +++ b/scumm/sprite_he.h @@ -47,8 +47,8 @@ enum SpriteFlags { kSF19 = (1 << 18), kSF20 = (1 << 19), kSF21 = (1 << 20), - kSF22 = (1 << 21), - kSF23 = (1 << 22), + kSF22 = (1 << 21), // kSFYFlipped + kSF23 = (1 << 22), // kSFXFlipped kSF24 = (1 << 23), kSF25 = (1 << 24), kSFBlitDirectly = (1 << 25), diff --git a/scumm/wiz_he.cpp b/scumm/wiz_he.cpp index d1d77e9440..000a094c38 100644 --- a/scumm/wiz_he.cpp +++ b/scumm/wiz_he.cpp @@ -1252,7 +1252,7 @@ void ScummEngine_v90he::processWizImage(const WizParameters *params) { displayWizComplexImage(params); break; case 2: - captureWizImage(rtImage, params->img.resNum, params->box, (params->img.flags & 8) == 8, params->compType); + captureWizImage(rtImage, params->img.resNum, params->box, (params->img.flags & kWIFBlitToFrontVideoBuffer) == kWIFBlitToFrontVideoBuffer, params->compType); break; case 3: if (params->processFlags & 0x800) { diff --git a/scumm/wiz_he.h b/scumm/wiz_he.h index 8fde4e8bc2..99027ad7ea 100644 --- a/scumm/wiz_he.h +++ b/scumm/wiz_he.h @@ -69,16 +69,27 @@ struct WizParameters { WizImage img; }; +enum WizImageFlags { + kWIFPrint = 0x4, + kWIFBlitToFrontVideoBuffer = 0x8, + kWIFBlitToMemBuffer = 0x20, + kWIFIsPolygon = 0x40, + kWIFFlipX = 0x400, + kWIFFlipY = 0x800 +}; + +enum WizProcessFlags { + kWPFSetPos = 0x1, + kWPFZoom = 0x8, + kWPFRotate = 0x10, + kWPFNewFlags = 0x20, + kWPFClipBox = 0x200, + kWPFNewState = 0x400, + kWPFUseFile = 0x800 +}; + struct Wiz { enum { - FW_PRINT = 0x4, - FW_MEM = 0x20, - FW_POLYGON = 0x40, - FW_XFLIP = 0x400, - FW_YFLIP = 0x800 - }; - - enum { NUM_POLYGONS = 200, NUM_IMAGES = 255 }; |