CHEWY: Remove the CustomInfo struct

This commit is contained in:
Filippos Karapetis 2022-07-07 13:07:23 +03:00
parent 6b670fba62
commit 905253b0c6
4 changed files with 8 additions and 12 deletions

View File

@ -203,7 +203,7 @@ public:
RaumBlk _room_blk;
Flags _flags = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0 };
CustomInfo _Ci;
byte *_tempArea = nullptr;
GotoPkt _gpkt;
bool _disableScreen = false;

View File

@ -72,8 +72,8 @@ void game_main() {
void alloc_buffers() {
_G(workpage) = (byte *)MALLOC(64004l);
_G(pal) = (byte *)MALLOC(768l);
_G(Ci).tempArea = (byte *)MALLOC(64004l);
_G(det)->set_taf_ani_mem(_G(Ci).tempArea);
_G(tempArea) = (byte *)MALLOC(64004l);
_G(det)->set_taf_ani_mem(_G(tempArea));
}
void free_buffers() {
@ -85,7 +85,7 @@ void free_buffers() {
free(_G(menutaf));
free(_G(chewy));
free(_G(Ci).tempArea);
free(_G(tempArea));
free(_G(pal));
free(_G(workpage));
}

View File

@ -52,10 +52,6 @@ struct MusicInfo {
char *cur_pattern = nullptr;
};
struct CustomInfo {
byte *tempArea = 0;
};
} // namespace Chewy
#endif

View File

@ -95,13 +95,13 @@ void Room89::entry() {
// Squash screen into a single point at the center
int edi = -20;
int var24 = 0;
_G(out)->spriteSave(_G(Ci).tempArea, 0, 0, 320, 200);
_G(out)->spriteSave(_G(tempArea), 0, 0, 320, 200);
for (int esi = 0; esi < 100; ++esi) {
edi -= 3;
var24 -= 2;
_G(out)->setPointer(_G(workptr));
_G(out)->cls();
_G(out)->scale_set(_G(Ci).tempArea, ABS(edi) / 2, ABS(var24) / 2, edi, var24, _G(scr_width));
_G(out)->scale_set(_G(tempArea), ABS(edi) / 2, ABS(var24) / 2, edi, var24, _G(scr_width));
_G(out)->setPointer(nullptr);
_G(out)->copyToScreen();
g_events->delay(30);
@ -114,7 +114,7 @@ void Room89::entry() {
// Those strings are also displayed in the the German version
_G(out)->printxy(70, 80, 15, 0, 0, "Thank you for playing");
_G(out)->printxy(70, 100, 15, 0, 0, " CHEWY Esc from F5");
_G(out)->spriteSave(_G(Ci).tempArea, 0, 0, 320, 200);
_G(out)->spriteSave(_G(tempArea), 0, 0, 320, 200);
edi = -300;
int var30 = -200;
@ -123,7 +123,7 @@ void Room89::entry() {
var30 += 2;
_G(out)->setPointer(_G(workptr));
_G(out)->cls();
_G(out)->scale_set(_G(Ci).tempArea, ABS(edi) / 2, ABS(var30) / 2, edi, var30, _G(scr_width));
_G(out)->scale_set(_G(tempArea), ABS(edi) / 2, ABS(var30) / 2, edi, var30, _G(scr_width));
_G(out)->setPointer(nullptr);
_G(out)->copyToScreen();
g_events->delay(30);