From 8a4196fe76852324874f0dec7bad4d7cefb941a0 Mon Sep 17 00:00:00 2001 From: galaxyhaxz Date: Mon, 27 Aug 2018 00:28:23 -0500 Subject: [PATCH] render.cpp -> remove all garbage vars --- Source/render.cpp | 693 +++++++++++++++------------------------------- 1 file changed, 220 insertions(+), 473 deletions(-) diff --git a/Source/render.cpp b/Source/render.cpp index 15f511aeb..b681f9ecd 100644 --- a/Source/render.cpp +++ b/Source/render.cpp @@ -86,23 +86,15 @@ void __fastcall drawTopArchesUpperScreen(unsigned char *pbDst) char *l_tbl; // ebx char *pdung_cels; // esi MAPDST short cel_type_16; // ax MAPDST - unsigned int cel_type_16_tmp; // eax MAPDST - int cel_type_32; // eax signed int xx_32; // ebp MAPDST signed int yy_32; // edx MAPDST unsigned int dung_and80; // eax MAPDST - char l_index; // edx MAPDST unsigned int chk_sh_and; // ecx MAPDST - unsigned char chk_andone; // cf unsigned int n_draw_shift; // ecx MAPDST unsigned int x_minus; // ecx MAPDST unsigned int y_minus; // ecx MAPDST - signed int junk_v134; // ebp - char junk_minus; // bp - int junk_v180; // ebp signed int i; // edx MAPDST signed int j; // ecx MAPDST - int y32_temp; // [esp-14h] [ebp-18h] MAPDST gpCelFrame = (unsigned char *)speed_cel_frame_num_from_light_index_frame_num; tmp_pbDst = (char *)pbDst; @@ -112,9 +104,7 @@ void __fastcall drawTopArchesUpperScreen(unsigned char *pbDst) level_cel_block = *(_DWORD *)&gpCelFrame[64 * (level_cel_block & 0xFFF)] + (unsigned short)(level_cel_block & 0xF000); pdung_cels = (char *)pDungeonCels + *((_DWORD *)pDungeonCels + (level_cel_block & 0xFFF)); - cel_type_16_tmp = level_cel_block; - _LOBYTE(cel_type_16_tmp) = BYTE1(cel_type_16_tmp); - cel_type_16 = ((cel_type_16_tmp >> 4) & 7) + 8; + cel_type_16 = ((level_cel_block >> 12) & 7) + 8; goto LABEL_11; } if ( (_BYTE)light_table_index != lightmax ) @@ -123,7 +113,7 @@ void __fastcall drawTopArchesUpperScreen(unsigned char *pbDst) { pdung_cels = (char *)pDungeonCels + *((_DWORD *)pDungeonCels + (level_cel_block & 0xFFF)); l_tbl = &pLightTbl[256 * light_table_index]; - cel_type_16 = (unsigned char)(BYTE1(level_cel_block) >> 4); + cel_type_16 = (unsigned char)(level_cel_block >> 12); switch ( cel_type_16 ) { case 0: // upper (top transparent), with lighting @@ -189,20 +179,17 @@ void __fastcall drawTopArchesUpperScreen(unsigned char *pbDst) if ( !yy_32 ) goto LABEL_67; } - l_index = yy_32 - dung_and80; if ( (unsigned int)tmp_pbDst < screen_buf_end ) return; if ( ((unsigned char)tmp_pbDst & 1) == WorldBoolFlag ) { - y32_temp = l_index; chk_sh_and = dung_and80 >> 1; if ( dung_and80 & 1 ) { ++pdung_cels; ++tmp_pbDst; - chk_andone = chk_sh_and & 1; n_draw_shift = dung_and80 >> 2; - if ( chk_andone ) + if ( chk_sh_and & 1 ) { tmp_pbDst[0] = l_tbl[pdung_cels[0]]; pdung_cels += 2; @@ -223,9 +210,8 @@ void __fastcall drawTopArchesUpperScreen(unsigned char *pbDst) } else { - chk_andone = chk_sh_and & 1; n_draw_shift = dung_and80 >> 2; - if ( chk_andone ) + if ( chk_sh_and & 1 ) { tmp_pbDst[1] = l_tbl[pdung_cels[1]]; pdung_cels += 2; @@ -244,19 +230,15 @@ void __fastcall drawTopArchesUpperScreen(unsigned char *pbDst) while ( n_draw_shift ); } } - yy_32 = y32_temp; } else { - y32_temp = l_index; chk_sh_and = dung_and80 >> 1; if ( dung_and80 & 1 ) { - l_index = *pdung_cels++; - *tmp_pbDst++ = l_tbl[l_index]; - chk_andone = chk_sh_and & 1; + *tmp_pbDst++ = l_tbl[*pdung_cels++]; n_draw_shift = dung_and80 >> 2; - if ( chk_andone ) + if ( chk_sh_and & 1 ) { tmp_pbDst[1] = l_tbl[pdung_cels[1]]; pdung_cels += 2; @@ -277,9 +259,8 @@ void __fastcall drawTopArchesUpperScreen(unsigned char *pbDst) } else { - chk_andone = chk_sh_and & 1; n_draw_shift = dung_and80 >> 2; - if ( chk_andone ) + if ( chk_sh_and & 1 ) { tmp_pbDst[0] = l_tbl[pdung_cels[0]]; pdung_cels += 2; @@ -298,8 +279,8 @@ void __fastcall drawTopArchesUpperScreen(unsigned char *pbDst) while ( n_draw_shift ); } } - yy_32 = y32_temp; } + yy_32 -= dung_and80; } while ( yy_32 ); LABEL_67: @@ -324,17 +305,14 @@ LABEL_67: WorldBoolFlag = ((_BYTE)WorldBoolFlag + 1) & 1; if ( WorldBoolFlag ) { - l_index = x_minus & 2; - pdung_cels += l_index; - chk_andone = x_minus & 1; + pdung_cels += x_minus & 2; chk_sh_and = x_minus >> 1; - if ( chk_andone ) + if ( x_minus & 1 ) { ++pdung_cels; ++tmp_pbDst; - chk_andone = chk_sh_and & 1; n_draw_shift = chk_sh_and >> 1; - if ( chk_andone ) + if ( chk_sh_and & 1 ) { tmp_pbDst[0] = l_tbl[pdung_cels[0]]; pdung_cels += 2; @@ -355,9 +333,8 @@ LABEL_67: } else { - chk_andone = chk_sh_and & 1; n_draw_shift = chk_sh_and >> 1; - if ( chk_andone ) + if ( chk_sh_and & 1 ) { tmp_pbDst[1] = l_tbl[pdung_cels[1]]; pdung_cels += 2; @@ -379,17 +356,13 @@ LABEL_67: } else { - l_index = x_minus & 2; - pdung_cels += l_index; - chk_andone = x_minus & 1; + pdung_cels += x_minus & 2; chk_sh_and = x_minus >> 1; - if ( chk_andone ) + if ( x_minus & 1 ) { - l_index = *pdung_cels++; - *tmp_pbDst++ = l_tbl[l_index]; - chk_andone = chk_sh_and & 1; + *tmp_pbDst++ = l_tbl[*pdung_cels++]; n_draw_shift = chk_sh_and >> 1; - if ( chk_andone ) + if ( chk_sh_and & 1 ) { tmp_pbDst[1] = l_tbl[pdung_cels[1]]; pdung_cels += 2; @@ -410,9 +383,8 @@ LABEL_67: } else { - chk_andone = chk_sh_and & 1; n_draw_shift = chk_sh_and >> 1; - if ( chk_andone ) + if ( chk_sh_and & 1 ) { tmp_pbDst[0] = l_tbl[pdung_cels[0]]; pdung_cels += 2; @@ -446,17 +418,14 @@ LABEL_67: WorldBoolFlag = ((_BYTE)WorldBoolFlag + 1) & 1; if ( WorldBoolFlag ) { - l_index = y_minus & 2; - pdung_cels += l_index; - chk_andone = y_minus & 1; + pdung_cels += y_minus & 2; chk_sh_and = y_minus >> 1; - if ( chk_andone ) + if ( y_minus & 1 ) { ++pdung_cels; ++tmp_pbDst; - chk_andone = chk_sh_and & 1; n_draw_shift = chk_sh_and >> 1; - if ( chk_andone ) + if ( chk_sh_and & 1 ) { tmp_pbDst[0] = l_tbl[pdung_cels[0]]; pdung_cels += 2; @@ -477,9 +446,8 @@ LABEL_67: } else { - chk_andone = chk_sh_and & 1; n_draw_shift = chk_sh_and >> 1; - if ( chk_andone ) + if ( chk_sh_and & 1 ) { tmp_pbDst[1] = l_tbl[pdung_cels[1]]; pdung_cels += 2; @@ -501,17 +469,13 @@ LABEL_67: } else { - l_index = y_minus & 2; - pdung_cels += l_index; - chk_andone = y_minus & 1; + pdung_cels += y_minus & 2; chk_sh_and = y_minus >> 1; - if ( chk_andone ) + if ( y_minus & 1 ) { - l_index = *pdung_cels++; - *tmp_pbDst++ = l_tbl[l_index]; - chk_andone = chk_sh_and & 1; + *tmp_pbDst++ = l_tbl[*pdung_cels++]; n_draw_shift = chk_sh_and >> 1; - if ( chk_andone ) + if ( chk_sh_and & 1 ) { tmp_pbDst[1] = l_tbl[pdung_cels[1]]; pdung_cels += 2; @@ -532,9 +496,8 @@ LABEL_67: } else { - chk_andone = chk_sh_and & 1; n_draw_shift = chk_sh_and >> 1; - if ( chk_andone ) + if ( chk_sh_and & 1 ) { tmp_pbDst[0] = l_tbl[pdung_cels[0]]; pdung_cels += 2; @@ -576,15 +539,13 @@ LABEL_67: WorldBoolFlag = ((_BYTE)WorldBoolFlag + 1) & 1; if ( WorldBoolFlag ) { - chk_andone = x_minus & 1; chk_sh_and = x_minus >> 1; - if ( chk_andone ) + if ( x_minus & 1 ) { ++pdung_cels; ++tmp_pbDst; - chk_andone = chk_sh_and & 1; n_draw_shift = chk_sh_and >> 1; - if ( chk_andone ) + if ( chk_sh_and & 1 ) { tmp_pbDst[0] = l_tbl[pdung_cels[0]]; pdung_cels += 2; @@ -605,9 +566,8 @@ LABEL_67: } else { - chk_andone = chk_sh_and & 1; n_draw_shift = chk_sh_and >> 1; - if ( chk_andone ) + if ( chk_sh_and & 1 ) { tmp_pbDst[1] = l_tbl[pdung_cels[1]]; pdung_cels += 2; @@ -626,20 +586,16 @@ LABEL_67: while ( n_draw_shift ); } } - l_index = (unsigned char)pdung_cels & 2; - pdung_cels += l_index; + pdung_cels += (unsigned char)pdung_cels & 2; } else { - chk_andone = x_minus & 1; chk_sh_and = x_minus >> 1; - if ( chk_andone ) + if ( x_minus & 1 ) { - l_index = *pdung_cels++; - *tmp_pbDst++ = l_tbl[l_index]; - chk_andone = chk_sh_and & 1; + *tmp_pbDst++ = l_tbl[*pdung_cels++]; n_draw_shift = chk_sh_and >> 1; - if ( chk_andone ) + if ( chk_sh_and & 1 ) { tmp_pbDst[1] = l_tbl[pdung_cels[1]]; pdung_cels += 2; @@ -660,9 +616,8 @@ LABEL_67: } else { - chk_andone = chk_sh_and & 1; n_draw_shift = chk_sh_and >> 1; - if ( chk_andone ) + if ( chk_sh_and & 1 ) { tmp_pbDst[0] = l_tbl[pdung_cels[0]]; pdung_cels += 2; @@ -681,8 +636,7 @@ LABEL_67: while ( n_draw_shift ); } } - l_index = (unsigned char)pdung_cels & 2; - pdung_cels += l_index; + pdung_cels += (unsigned char)pdung_cels & 2; } tmp_pbDst = &tmp_pbDst[xx_32 - 800]; xx_32 -= 2; @@ -697,15 +651,13 @@ LABEL_67: WorldBoolFlag = ((_BYTE)WorldBoolFlag + 1) & 1; if ( WorldBoolFlag ) { - chk_andone = y_minus & 1; chk_sh_and = y_minus >> 1; - if ( chk_andone ) + if ( y_minus & 1 ) { ++pdung_cels; ++tmp_pbDst; - chk_andone = chk_sh_and & 1; n_draw_shift = chk_sh_and >> 1; - if ( chk_andone ) + if ( chk_sh_and & 1 ) { tmp_pbDst[0] = l_tbl[pdung_cels[0]]; pdung_cels += 2; @@ -726,9 +678,8 @@ LABEL_67: } else { - chk_andone = chk_sh_and & 1; n_draw_shift = chk_sh_and >> 1; - if ( chk_andone ) + if ( chk_sh_and & 1 ) { tmp_pbDst[1] = l_tbl[pdung_cels[1]]; pdung_cels += 2; @@ -747,20 +698,16 @@ LABEL_67: while ( n_draw_shift ); } } - l_index = (unsigned char)pdung_cels & 2; - pdung_cels += l_index; + pdung_cels += (unsigned char)pdung_cels & 2; } else { - chk_andone = y_minus & 1; chk_sh_and = y_minus >> 1; - if ( chk_andone ) + if ( y_minus & 1 ) { - l_index = *pdung_cels++; - *tmp_pbDst++ = l_tbl[l_index]; - chk_andone = chk_sh_and & 1; + *tmp_pbDst++ = l_tbl[*pdung_cels++]; n_draw_shift = chk_sh_and >> 1; - if ( chk_andone ) + if ( chk_sh_and & 1 ) { tmp_pbDst[1] = l_tbl[pdung_cels[1]]; pdung_cels += 2; @@ -781,9 +728,8 @@ LABEL_67: } else { - chk_andone = chk_sh_and & 1; n_draw_shift = chk_sh_and >> 1; - if ( chk_andone ) + if ( chk_sh_and & 1 ) { tmp_pbDst[0] = l_tbl[pdung_cels[0]]; pdung_cels += 2; @@ -802,8 +748,7 @@ LABEL_67: while ( n_draw_shift ); } } - l_index = (unsigned char)pdung_cels & 2; - pdung_cels += l_index; + pdung_cels += (unsigned char)pdung_cels & 2; } tmp_pbDst = &tmp_pbDst[yy_32 - 800]; yy_32 += 2; @@ -828,17 +773,14 @@ LABEL_67: WorldBoolFlag = ((_BYTE)WorldBoolFlag + 1) & 1; if ( WorldBoolFlag ) { - l_index = x_minus & 2; - pdung_cels += l_index; - chk_andone = x_minus & 1; + pdung_cels += x_minus & 2; chk_sh_and = x_minus >> 1; - if ( chk_andone ) + if ( x_minus & 1 ) { ++pdung_cels; ++tmp_pbDst; - chk_andone = chk_sh_and & 1; n_draw_shift = chk_sh_and >> 1; - if ( chk_andone ) + if ( chk_sh_and & 1 ) { tmp_pbDst[0] = l_tbl[pdung_cels[0]]; pdung_cels += 2; @@ -859,9 +801,8 @@ LABEL_67: } else { - chk_andone = chk_sh_and & 1; n_draw_shift = chk_sh_and >> 1; - if ( chk_andone ) + if ( chk_sh_and & 1 ) { tmp_pbDst[1] = l_tbl[pdung_cels[1]]; pdung_cels += 2; @@ -883,17 +824,13 @@ LABEL_67: } else { - l_index = x_minus & 2; - pdung_cels += l_index; - chk_andone = x_minus & 1; + pdung_cels += x_minus & 2; chk_sh_and = x_minus >> 1; - if ( chk_andone ) + if ( x_minus & 1 ) { - l_index = *pdung_cels++; - *tmp_pbDst++ = l_tbl[l_index]; - chk_andone = chk_sh_and & 1; + *tmp_pbDst++ = l_tbl[*pdung_cels++]; n_draw_shift = chk_sh_and >> 1; - if ( chk_andone ) + if ( chk_sh_and & 1 ) { tmp_pbDst[1] = l_tbl[pdung_cels[1]]; pdung_cels += 2; @@ -914,9 +851,8 @@ LABEL_67: } else { - chk_andone = chk_sh_and & 1; n_draw_shift = chk_sh_and >> 1; - if ( chk_andone ) + if ( chk_sh_and & 1 ) { tmp_pbDst[0] = l_tbl[pdung_cels[0]]; pdung_cels += 2; @@ -990,15 +926,13 @@ LABEL_67: WorldBoolFlag = ((_BYTE)WorldBoolFlag + 1) & 1; if ( WorldBoolFlag ) { - chk_andone = x_minus & 1; chk_sh_and = x_minus >> 1; - if ( chk_andone ) + if ( x_minus & 1 ) { ++pdung_cels; ++tmp_pbDst; - chk_andone = chk_sh_and & 1; n_draw_shift = chk_sh_and >> 1; - if ( chk_andone ) + if ( chk_sh_and & 1 ) { tmp_pbDst[0] = l_tbl[pdung_cels[0]]; pdung_cels += 2; @@ -1019,9 +953,8 @@ LABEL_67: } else { - chk_andone = chk_sh_and & 1; n_draw_shift = chk_sh_and >> 1; - if ( chk_andone ) + if ( chk_sh_and & 1 ) { tmp_pbDst[1] = l_tbl[pdung_cels[1]]; pdung_cels += 2; @@ -1040,20 +973,16 @@ LABEL_67: while ( n_draw_shift ); } } - l_index = (unsigned char)pdung_cels & 2; - pdung_cels += l_index; + pdung_cels += (unsigned char)pdung_cels & 2; } else { - chk_andone = x_minus & 1; chk_sh_and = x_minus >> 1; - if ( chk_andone ) + if ( x_minus & 1 ) { - l_index = *pdung_cels++; - *tmp_pbDst++ = l_tbl[l_index]; - chk_andone = chk_sh_and & 1; + *tmp_pbDst++ = l_tbl[*pdung_cels++]; n_draw_shift = chk_sh_and >> 1; - if ( chk_andone ) + if ( chk_sh_and & 1 ) { tmp_pbDst[1] = l_tbl[pdung_cels[1]]; pdung_cels += 2; @@ -1074,9 +1003,8 @@ LABEL_67: } else { - chk_andone = chk_sh_and & 1; n_draw_shift = chk_sh_and >> 1; - if ( chk_andone ) + if ( chk_sh_and & 1 ) { tmp_pbDst[0] = l_tbl[pdung_cels[0]]; pdung_cels += 2; @@ -1095,8 +1023,7 @@ LABEL_67: while ( n_draw_shift ); } } - l_index = (unsigned char)pdung_cels & 2; - pdung_cels += l_index; + pdung_cels += (unsigned char)pdung_cels & 2; } tmp_pbDst = &tmp_pbDst[xx_32 - 800]; xx_32 -= 2; @@ -1143,7 +1070,7 @@ LABEL_67: } pdung_cels = (char *)pSpeedCels + *(_DWORD *)&gpCelFrame[4 * (light_table_index + 16 * (level_cel_block & 0xFFF))]; - cel_type_16 = (unsigned char)(BYTE1(level_cel_block) >> 4); + cel_type_16 = (unsigned char)(level_cel_block >> 12); LABEL_11: switch ( cel_type_16 ) @@ -1194,7 +1121,7 @@ LABEL_11: \/ */ WorldBoolFlag = (unsigned char)pbDst & 1; - junk_v134 = 32; + yy_32 = 32; LABEL_251: xx_32 = 32; while ( 1 ) @@ -1212,7 +1139,7 @@ LABEL_251: LABEL_271: WorldBoolFlag = ((_BYTE)WorldBoolFlag + 1) & 1; tmp_pbDst -= 800; - if ( !--junk_v134 ) + if ( !--yy_32 ) return; goto LABEL_251; } @@ -1420,7 +1347,6 @@ LABEL_268: while ( (unsigned int)tmp_pbDst >= screen_buf_end ) { x_minus = 32 - xx_32; - junk_minus = 32 - xx_32; WorldBoolFlag = ((_BYTE)WorldBoolFlag + 1) & 1; if ( WorldBoolFlag ) { @@ -1431,8 +1357,7 @@ LABEL_268: pdung_cels += 4; tmp_pbDst += 4; } - junk_v180 = junk_minus & 2; - if ( junk_v180 ) + if ( x_minus & 2 ) { tmp_pbDst[1] = pdung_cels[1]; pdung_cels += 4; @@ -1448,8 +1373,7 @@ LABEL_268: pdung_cels += 4; tmp_pbDst += 4; } - junk_v180 = junk_minus & 2; - if ( junk_v180 ) + if ( x_minus & 2 ) { tmp_pbDst[0] = pdung_cels[0]; pdung_cels += 4; @@ -1476,8 +1400,7 @@ LABEL_268: pdung_cels += 4; tmp_pbDst += 4; } - junk_v180 &= 2u; - if ( junk_v180 ) + if ( x_minus & 2 ) /* should be y_minus */ { tmp_pbDst[1] = pdung_cels[1]; pdung_cels += 4; @@ -1493,8 +1416,7 @@ LABEL_268: pdung_cels += 4; tmp_pbDst += 4; } - junk_v180 &= 2u; - if ( junk_v180 ) + if ( x_minus & 2 ) /* should be y_minus */ { tmp_pbDst[0] = pdung_cels[0]; pdung_cels += 4; @@ -1697,10 +1619,8 @@ LABEL_268: level_cel_block = *(_DWORD *)&gpCelFrame[64 * (level_cel_block & 0xFFF)] + (unsigned short)(level_cel_block & 0xF000); pdung_cels = (char *)pDungeonCels + *((_DWORD *)pDungeonCels + (level_cel_block & 0xFFF)); - cel_type_16_tmp = level_cel_block; - _LOBYTE(cel_type_16_tmp) = BYTE1(cel_type_16_tmp); - cel_type_32 = (cel_type_16_tmp >> 4) & 7; - switch ( (_WORD)cel_type_32 ) + cel_type_16 = (level_cel_block >> 12) & 7; + switch ( cel_type_16 ) { case 0: // upper (top transparent), black /* @@ -2241,18 +2161,13 @@ void __fastcall drawBottomArchesUpperScreen(unsigned char *pbDst, unsigned int * char *tmp_pbDst; // edi MAPDST char *pdung_cels; // esi MAPDST short cel_type_16; // ax MAPDST - unsigned int cel_type_16_tmp; // eax MAPDST - int cel_type_32; // eax int xx_32; // edx MAPDST unsigned int left_shift; // edx MAPDST int yy_32; // edx MAPDST int dung_and80; // eax MAPDST - int y_minus; // edx MAPDST int and80_i; // ecx MAPDST unsigned int n_draw_shift; // ecx MAPDST signed int i; // ecx MAPDST - int y32_temp; // [esp-8h] [ebp-14h] MAPDST - int x32_temp; // [esp-4h] [ebp-10h] MAPDST char *_EBX; gpCelFrame = (unsigned char *)speed_cel_frame_num_from_light_index_frame_num; @@ -2264,9 +2179,7 @@ void __fastcall drawBottomArchesUpperScreen(unsigned char *pbDst, unsigned int * level_cel_block = *(_DWORD *)&gpCelFrame[64 * (level_cel_block & 0xFFF)] + (unsigned short)(level_cel_block & 0xF000); pdung_cels = (char *)pDungeonCels + *((_DWORD *)pDungeonCels + (level_cel_block & 0xFFF)); - cel_type_16_tmp = level_cel_block; - _LOBYTE(cel_type_16_tmp) = BYTE1(cel_type_16_tmp); - cel_type_16 = ((cel_type_16_tmp >> 4) & 7) + 8; + cel_type_16 = ((level_cel_block >> 12) & 7) + 8; LABEL_12: switch ( cel_type_16 ) { @@ -2281,7 +2194,6 @@ LABEL_12: { if ( (unsigned int)tmp_pbDst < screen_buf_end ) break; - x32_temp = xx_32; left_shift = *gpDrawMask; i = 32; do @@ -2296,9 +2208,9 @@ LABEL_12: while ( i ); tmp_pbDst -= 800; --gpDrawMask; - xx_32 = x32_temp - 1; + --xx_32; } - while ( x32_temp != 1 ); + while ( xx_32 ); break; case 9: // upper (bottom transparent), without lighting /* @@ -2309,7 +2221,6 @@ LABEL_12: xx_32 = 32; do { - x32_temp = xx_32; gdwCurrentMask = *gpDrawMask; yy_32 = 32; do @@ -2327,10 +2238,9 @@ LABEL_12: if ( !yy_32 ) goto LABEL_129; } - y_minus = yy_32 - dung_and80; + yy_32 -= dung_and80; if ( (unsigned int)tmp_pbDst < screen_buf_end ) return; - y32_temp = y_minus; left_shift = gdwCurrentMask; and80_i = dung_and80; do @@ -2344,15 +2254,14 @@ LABEL_12: } while ( and80_i ); gdwCurrentMask = left_shift; - yy_32 = y32_temp; } - while ( y32_temp ); + while ( yy_32 ); LABEL_129: tmp_pbDst -= 800; --gpDrawMask; - xx_32 = x32_temp - 1; + --xx_32; } - while ( x32_temp != 1 ); + while ( xx_32 ); break; case 10: // upper (bottom transparent), without lighting /* @@ -2506,7 +2415,6 @@ LABEL_129: { if ( (unsigned int)tmp_pbDst < screen_buf_end ) break; - y32_temp = yy_32; left_shift = *gpDrawMask; i = 32; do @@ -2521,9 +2429,9 @@ LABEL_129: while ( i ); tmp_pbDst -= 800; --gpDrawMask; - yy_32 = y32_temp - 1; + --yy_32; } - while ( y32_temp != 1 ); + while ( yy_32 ); return; } } @@ -2559,7 +2467,6 @@ LABEL_129: { if ( (unsigned int)tmp_pbDst < screen_buf_end ) break; - y32_temp = yy_32; left_shift = *gpDrawMask; i = 32; do @@ -2575,9 +2482,9 @@ LABEL_129: pdung_cels += (unsigned char)pdung_cels & 2; tmp_pbDst -= 800; --gpDrawMask; - yy_32 = y32_temp - 1; + --yy_32; } - while ( y32_temp != 1 ); + while ( yy_32 ); return; } } @@ -2591,7 +2498,7 @@ LABEL_129: { pdung_cels = (char *)pDungeonCels + *((_DWORD *)pDungeonCels + (level_cel_block & 0xFFF)); _EBX = &pLightTbl[256 * light_table_index]; - cel_type_16 = (unsigned char)(BYTE1(level_cel_block) >> 4); + cel_type_16 = (unsigned char)(level_cel_block >> 12); switch ( cel_type_16 ) { case 0: // upper (bottom transparent), with lighting @@ -2605,7 +2512,6 @@ LABEL_129: { if ( (unsigned int)tmp_pbDst < screen_buf_end ) break; - x32_temp = xx_32; left_shift = *gpDrawMask; i = 32; do @@ -2620,9 +2526,9 @@ LABEL_129: while ( i ); tmp_pbDst -= 800; --gpDrawMask; - xx_32 = x32_temp - 1; + --xx_32; } - while ( x32_temp != 1 ); + while ( xx_32 ); break; case 1: // upper (bottom transparent), with lighting /* @@ -2633,7 +2539,6 @@ LABEL_129: xx_32 = 32; do { - x32_temp = xx_32; gdwCurrentMask = *gpDrawMask; yy_32 = 32; do @@ -2651,11 +2556,10 @@ LABEL_129: if ( !yy_32 ) goto LABEL_50; } - y_minus = yy_32 - dung_and80; + yy_32 -= dung_and80; if ( (unsigned int)tmp_pbDst < screen_buf_end ) return; and80_i = dung_and80; - y32_temp = y_minus; left_shift = gdwCurrentMask; do { @@ -2668,15 +2572,14 @@ LABEL_129: } while ( and80_i ); gdwCurrentMask = left_shift; - yy_32 = y32_temp; } - while ( y32_temp ); + while ( yy_32 ); LABEL_50: tmp_pbDst -= 800; --gpDrawMask; - xx_32 = x32_temp - 1; + --xx_32; } - while ( x32_temp != 1 ); + while ( xx_32 ); break; case 2: // upper (bottom transparent), with lighting /* @@ -2850,7 +2753,6 @@ LABEL_50: { if ( (unsigned int)tmp_pbDst < screen_buf_end ) break; - y32_temp = yy_32; left_shift = *gpDrawMask; i = 32; pdung_cels += (unsigned char)pdung_cels & 2; @@ -2866,9 +2768,9 @@ LABEL_50: while ( i ); tmp_pbDst -= 800; --gpDrawMask; - yy_32 = y32_temp - 1; + --yy_32; } - while ( y32_temp != 1 ); + while ( yy_32 ); return; } } @@ -2908,7 +2810,6 @@ LABEL_50: { if ( (unsigned int)tmp_pbDst < screen_buf_end ) break; - y32_temp = yy_32; left_shift = *gpDrawMask; i = 32; do @@ -2924,9 +2825,9 @@ LABEL_50: pdung_cels += (unsigned char)pdung_cels & 2; tmp_pbDst -= 800; --gpDrawMask; - yy_32 = y32_temp - 1; + --yy_32; } - while ( y32_temp != 1 ); + while ( yy_32 ); return; } } @@ -2936,17 +2837,15 @@ LABEL_50: } pdung_cels = (char *)pSpeedCels + *(_DWORD *)&gpCelFrame[4 * (light_table_index + 16 * (level_cel_block & 0xFFF))]; - cel_type_16 = (unsigned char)(BYTE1(level_cel_block) >> 4); + cel_type_16 = (unsigned char)(level_cel_block >> 12); goto LABEL_12; } if ( level_cel_block & 0x8000 ) level_cel_block = *(_DWORD *)&gpCelFrame[64 * (level_cel_block & 0xFFF)] + (unsigned short)(level_cel_block & 0xF000); pdung_cels = (char *)pDungeonCels + *((_DWORD *)pDungeonCels + (level_cel_block & 0xFFF)); - cel_type_16_tmp = level_cel_block; - _LOBYTE(cel_type_16_tmp) = BYTE1(cel_type_16_tmp); - cel_type_32 = (cel_type_16_tmp >> 4) & 7; - switch ( (_WORD)cel_type_32 ) + cel_type_16 = (level_cel_block >> 12) & 7; + switch ( cel_type_16 ) { case 0: // upper (bottom transparent), black /* @@ -2959,7 +2858,6 @@ LABEL_50: { if ( (unsigned int)tmp_pbDst < screen_buf_end ) break; - x32_temp = xx_32; left_shift = *gpDrawMask; i = 32; do @@ -2973,9 +2871,9 @@ LABEL_50: while ( i ); tmp_pbDst -= 800; --gpDrawMask; - xx_32 = x32_temp - 1; + --xx_32; } - while ( x32_temp != 1 ); + while ( xx_32 ); break; case 1: // upper (bottom transparent), black /* @@ -2986,7 +2884,6 @@ LABEL_50: xx_32 = 32; do { - x32_temp = xx_32; gdwCurrentMask = *gpDrawMask; yy_32 = 32; do @@ -3004,10 +2901,9 @@ LABEL_50: if ( !yy_32 ) goto LABEL_208; } - y_minus = yy_32 - dung_and80; + yy_32 -= dung_and80; if ( (unsigned int)tmp_pbDst < screen_buf_end ) return; - y32_temp = y_minus; left_shift = gdwCurrentMask; and80_i = dung_and80; pdung_cels += dung_and80; @@ -3021,15 +2917,14 @@ LABEL_50: } while ( and80_i ); gdwCurrentMask = left_shift; - yy_32 = y32_temp; } - while ( y32_temp ); + while ( yy_32 ); LABEL_208: tmp_pbDst -= 800; --gpDrawMask; - xx_32 = x32_temp - 1; + --xx_32; } - while ( x32_temp != 1 ); + while ( xx_32 ); break; case 2: // upper (bottom transparent), black /* @@ -3185,7 +3080,6 @@ LABEL_208: { if ( (unsigned int)tmp_pbDst < screen_buf_end ) break; - y32_temp = yy_32; left_shift = *gpDrawMask; i = 32; do @@ -3199,9 +3093,9 @@ LABEL_208: while ( i ); tmp_pbDst -= 800; --gpDrawMask; - yy_32 = y32_temp - 1; + --yy_32; } - while ( y32_temp != 1 ); + while ( yy_32 ); return; } xx_32 -= 2; @@ -3241,7 +3135,6 @@ LABEL_208: { if ( (unsigned int)tmp_pbDst < screen_buf_end ) break; - y32_temp = yy_32; left_shift = *gpDrawMask; i = 32; do @@ -3255,9 +3148,9 @@ LABEL_208: while ( i ); tmp_pbDst -= 800; --gpDrawMask; - yy_32 = y32_temp - 1; + --yy_32; } - while ( y32_temp != 1 ); + while ( yy_32 ); return; } tmp_pbDst += xx_32; @@ -3269,14 +3162,10 @@ LABEL_208: void __fastcall drawUpperScreen(unsigned char *pbDst) { - char junk_v2; // al MAPDST unsigned char *tmp_pbDst; // edi MAPDST char *l_tbl; // ebx unsigned char *pdung_cels; // esi MAPDST short cel_type_16; // ax MAPDST - unsigned int cel_type_16_tmp; // eax - unsigned int cel_type_32; // eax - char l_index; // edx MAPDST char base_4; // cl MAPDST char x_minus; // cl MAPDST char y_minus; // cl @@ -3287,9 +3176,7 @@ void __fastcall drawUpperScreen(unsigned char *pbDst) unsigned int n_draw_shift; // ecx MAPDST signed int i; // edx MAPDST signed int j; // ecx MAPDST - int y32_temp; // [esp-14h] [ebp-18h] MAPDST - l_index = cel_transparency_active; if ( cel_transparency_active ) { if ( !arch_draw_type ) @@ -3299,8 +3186,7 @@ void __fastcall drawUpperScreen(unsigned char *pbDst) } if ( arch_draw_type == 1 ) { - junk_v2 = block_lvid[level_piece_id]; - if ( junk_v2 == 1 || junk_v2 == 3 ) + if ( block_lvid[level_piece_id] == 1 || block_lvid[level_piece_id] == 3 ) { drawBottomArchesUpperScreen(pbDst, &LeftMask[31]); return; @@ -3308,8 +3194,7 @@ void __fastcall drawUpperScreen(unsigned char *pbDst) } if ( arch_draw_type == 2 ) { - junk_v2 = block_lvid[level_piece_id]; - if ( junk_v2 == 2 || junk_v2 == 3 ) + if ( block_lvid[level_piece_id] == 2 || block_lvid[level_piece_id] == 3 ) { drawBottomArchesUpperScreen(pbDst, &RightMask[31]); return; @@ -3324,9 +3209,7 @@ void __fastcall drawUpperScreen(unsigned char *pbDst) level_cel_block = *(_DWORD *)&gpCelFrame[64 * (level_cel_block & 0xFFF)] + (unsigned short)(level_cel_block & 0xF000); pdung_cels = (unsigned char *)pDungeonCels + *((_DWORD *)pDungeonCels + (level_cel_block & 0xFFF)); - cel_type_16_tmp = level_cel_block; - _LOBYTE(cel_type_16_tmp) = BYTE1(cel_type_16_tmp); - cel_type_16 = ((cel_type_16_tmp >> 4) & 7) + 8; + cel_type_16 = ((level_cel_block >> 12) & 7) + 8; LABEL_22: switch ( cel_type_16 ) { @@ -3646,13 +3529,12 @@ LABEL_133: | | |--| */ - l_index = 32; + xx_32 = 32; do { if ( (unsigned int)tmp_pbDst < screen_buf_end ) break; base_4 = 32; - y32_temp = l_index; do { tmp_pbDst[0] = l_tbl[pdung_cels[0]]; @@ -3665,9 +3547,9 @@ LABEL_133: } while ( base_4 >= 4 ); tmp_pbDst -= 800; - l_index = y32_temp - 1; + --xx_32; } - while ( y32_temp != 1 ); + while ( xx_32 ); break; case 1: // upper (solid), with lighting /* @@ -3692,11 +3574,10 @@ LABEL_133: if ( !yy_32 ) goto LABEL_58; } - l_index = yy_32 - dung_and80; + yy_32 -= dung_and80; if ( (unsigned int)tmp_pbDst < screen_buf_end ) return; - base_4 = dung_and80; - for ( y32_temp = l_index; base_4 >= 4; base_4 -= 4 ) + for ( base_4 = dung_and80; base_4 >= 4; base_4 -= 4 ) { tmp_pbDst[0] = l_tbl[pdung_cels[0]]; tmp_pbDst[1] = l_tbl[pdung_cels[1]]; @@ -3716,9 +3597,8 @@ LABEL_133: { *tmp_pbDst++ = l_tbl[*pdung_cels++]; } - yy_32 = y32_temp; } - while ( y32_temp ); + while ( yy_32 ); LABEL_58: tmp_pbDst -= 800; --xx_32; @@ -3736,8 +3616,7 @@ LABEL_58: { tmp_pbDst += xx_32; x_minus = 32 - xx_32; - l_index = (32 - (_BYTE)xx_32) & 2; - pdung_cels += l_index; + pdung_cels += (32 - (_BYTE)xx_32) & 2; if ( (char)(32 - xx_32) >= 4 ) { do @@ -3770,8 +3649,7 @@ LABEL_58: break; tmp_pbDst += yy_32; y_minus = 32 - yy_32; - l_index = (32 - (_BYTE)yy_32) & 2; - pdung_cels += l_index; + pdung_cels += (32 - (_BYTE)yy_32) & 2; if ( (char)(32 - yy_32) >= 4 ) { do @@ -3826,8 +3704,7 @@ LABEL_58: pdung_cels += 2; tmp_pbDst += 2; } - l_index = (unsigned char)pdung_cels & 2; - pdung_cels += l_index; + pdung_cels += (unsigned char)pdung_cels & 2; tmp_pbDst = &tmp_pbDst[xx_32 - 800]; xx_32 -= 2; if ( xx_32 < 0 ) @@ -3853,8 +3730,7 @@ LABEL_58: pdung_cels += 2; tmp_pbDst += 2; } - l_index = (unsigned char)pdung_cels & 2; - pdung_cels += l_index; + pdung_cels += (unsigned char)pdung_cels & 2; tmp_pbDst = &tmp_pbDst[yy_32 - 800]; yy_32 += 2; } @@ -3874,8 +3750,7 @@ LABEL_58: { tmp_pbDst += xx_32; x_minus = 32 - xx_32; - l_index = (32 - (_BYTE)xx_32) & 2; - pdung_cels += l_index; + pdung_cels += (32 - (_BYTE)xx_32) & 2; if ( (char)(32 - xx_32) >= 4 ) { do @@ -3951,8 +3826,7 @@ LABEL_58: pdung_cels += 2; tmp_pbDst += 2; } - l_index = (unsigned char)pdung_cels & 2; - pdung_cels += l_index; + pdung_cels += (unsigned char)pdung_cels & 2; tmp_pbDst = &tmp_pbDst[xx_32 - 800]; xx_32 -= 2; if ( xx_32 < 0 ) @@ -3994,8 +3868,8 @@ LABEL_58: level_cel_block = *(_DWORD *)&gpCelFrame[64 * (level_cel_block & 0xFFF)] + (unsigned short)(level_cel_block & 0xF000); pdung_cels = (unsigned char *)pDungeonCels + *((_DWORD *)pDungeonCels + (level_cel_block & 0xFFF)); - cel_type_32 = ((unsigned int)level_cel_block >> 12) & 7; - switch ( (_WORD)cel_type_32 ) + cel_type_16 = ((unsigned int)level_cel_block >> 12) & 7; + switch ( cel_type_16 ) { case 0: // upper (solid), black /* @@ -4304,14 +4178,10 @@ LABEL_205: void __fastcall drawTopArchesLowerScreen(unsigned char *pbDst) { - char l_index; // edx MAPDST char *tmp_pbDst; // edi MAPDST char *l_tbl; // ebx char *pdung_cels; // esi MAPDST short cel_type_16; // ax MAPDST - unsigned int cel_type_16_tmp; // eax MAPDST - int cel_type_32; // eax - unsigned char junk_ror; // cf signed int tile_42_45; // eax MAPDST unsigned int world_tbl; // ecx MAPDST int world_192; // eax MAPDST @@ -4324,7 +4194,6 @@ void __fastcall drawTopArchesLowerScreen(unsigned char *pbDst) unsigned int y_minus; // ecx MAPDST signed int i; // edx MAPDST signed int j; // ecx MAPDST - int x32_temp; // [esp-14h] [ebp-18h] MAPDST gpCelFrame = (unsigned char *)speed_cel_frame_num_from_light_index_frame_num; tmp_pbDst = (char *)pbDst; @@ -4334,9 +4203,7 @@ void __fastcall drawTopArchesLowerScreen(unsigned char *pbDst) level_cel_block = *(_DWORD *)&gpCelFrame[64 * (level_cel_block & 0xFFF)] + (unsigned short)(level_cel_block & 0xF000); pdung_cels = (char *)pDungeonCels + *((_DWORD *)pDungeonCels + (level_cel_block & 0xFFF)); - cel_type_16_tmp = level_cel_block; - _LOBYTE(cel_type_16_tmp) = BYTE1(cel_type_16_tmp); - cel_type_16 = ((cel_type_16_tmp >> 4) & 7) + 8; + cel_type_16 = ((level_cel_block >> 12) & 7) + 8; goto LABEL_11; } if ( (_BYTE)light_table_index == lightmax ) @@ -4345,10 +4212,8 @@ void __fastcall drawTopArchesLowerScreen(unsigned char *pbDst) level_cel_block = *(_DWORD *)&gpCelFrame[64 * (level_cel_block & 0xFFF)] + (unsigned short)(level_cel_block & 0xF000); pdung_cels = (char *)pDungeonCels + *((_DWORD *)pDungeonCels + (level_cel_block & 0xFFF)); - cel_type_16_tmp = level_cel_block; - _LOBYTE(cel_type_16_tmp) = BYTE1(cel_type_16_tmp); - cel_type_32 = (cel_type_16_tmp >> 4) & 7; - switch ( (_WORD)cel_type_32 ) + cel_type_16 = (level_cel_block >> 12) & 7; + switch ( cel_type_16 ) { case 0: // lower (top transparent), black /* @@ -4408,7 +4273,6 @@ void __fastcall drawTopArchesLowerScreen(unsigned char *pbDst) WorldBoolFlag = (unsigned char)pbDst & 1; xx_32 = 32; LABEL_412: - x32_temp = xx_32; yy_32 = 32; while ( 1 ) { @@ -4425,8 +4289,7 @@ LABEL_412: LABEL_433: WorldBoolFlag = ((_BYTE)WorldBoolFlag + 1) & 1; tmp_pbDst -= 800; - xx_32 = x32_temp - 1; - if ( x32_temp == 1 ) + if ( !--xx_32 ) return; goto LABEL_412; } @@ -4970,7 +4833,7 @@ LABEL_430: { pdung_cels = (char *)pDungeonCels + *((_DWORD *)pDungeonCels + (level_cel_block & 0xFFF)); l_tbl = &pLightTbl[256 * light_table_index]; - cel_type_16 = (unsigned char)(BYTE1(level_cel_block) >> 4); + cel_type_16 = (unsigned char)(level_cel_block >> 12); switch ( cel_type_16 ) { case 0: // lower (top transparent), with lighting @@ -5034,7 +4897,6 @@ LABEL_430: xx_32 = 32; do { - x32_temp = xx_32; yy_32 = 32; do { @@ -5059,9 +4921,8 @@ LABEL_430: { ++pdung_cels; ++tmp_pbDst; - junk_ror = chk_sh_and & 1; n_draw_shift = dung_and80 >> 2; - if ( junk_ror ) + if ( chk_sh_and & 1 ) { tmp_pbDst[0] = l_tbl[pdung_cels[0]]; pdung_cels += 2; @@ -5082,9 +4943,8 @@ LABEL_430: } else { - junk_ror = chk_sh_and & 1; n_draw_shift = dung_and80 >> 2; - if ( junk_ror ) + if ( chk_sh_and & 1 ) { tmp_pbDst[1] = l_tbl[pdung_cels[1]]; pdung_cels += 2; @@ -5109,11 +4969,9 @@ LABEL_430: chk_sh_and = dung_and80 >> 1; if ( dung_and80 & 1 ) { - l_index = *pdung_cels++; - *tmp_pbDst++ = l_tbl[l_index]; - junk_ror = chk_sh_and & 1; + *tmp_pbDst++ = l_tbl[*pdung_cels++]; n_draw_shift = dung_and80 >> 2; - if ( junk_ror ) + if ( chk_sh_and & 1 ) { tmp_pbDst[1] = l_tbl[pdung_cels[1]]; pdung_cels += 2; @@ -5134,9 +4992,8 @@ LABEL_430: } else { - junk_ror = chk_sh_and & 1; n_draw_shift = dung_and80 >> 2; - if ( junk_ror ) + if ( chk_sh_and & 1 ) { tmp_pbDst[0] = l_tbl[pdung_cels[0]]; pdung_cels += 2; @@ -5167,9 +5024,9 @@ LABEL_430: LABEL_69: WorldBoolFlag = ((_BYTE)WorldBoolFlag + 1) & 1; tmp_pbDst -= 800; - xx_32 = x32_temp - 1; + --xx_32; } - while ( x32_temp != 1 ); + while ( xx_32 ); break; case 2: // lower (top transparent), with lighting /* @@ -5208,17 +5065,14 @@ LABEL_98: WorldBoolFlag = ((_BYTE)WorldBoolFlag + 1) & 1; if ( WorldBoolFlag ) { - l_index = y_minus & 2; - pdung_cels += l_index; - junk_ror = y_minus & 1; + pdung_cels += y_minus & 2; chk_sh_and = y_minus >> 1; - if ( junk_ror ) + if ( y_minus & 1 ) { ++pdung_cels; ++tmp_pbDst; - junk_ror = chk_sh_and & 1; n_draw_shift = chk_sh_and >> 1; - if ( junk_ror ) + if ( chk_sh_and & 1 ) { tmp_pbDst[0] = l_tbl[pdung_cels[0]]; pdung_cels += 2; @@ -5239,9 +5093,8 @@ LABEL_98: } else { - junk_ror = chk_sh_and & 1; n_draw_shift = chk_sh_and >> 1; - if ( junk_ror ) + if ( chk_sh_and & 1 ) { tmp_pbDst[1] = l_tbl[pdung_cels[1]]; pdung_cels += 2; @@ -5263,17 +5116,13 @@ LABEL_98: } else { - l_index = y_minus & 2; - pdung_cels += l_index; - junk_ror = y_minus & 1; + pdung_cels += y_minus & 2; chk_sh_and = y_minus >> 1; - if ( junk_ror ) + if ( y_minus & 1 ) { - l_index = *pdung_cels++; - *tmp_pbDst++ = l_tbl[l_index]; - junk_ror = chk_sh_and & 1; + *tmp_pbDst++ = l_tbl[*pdung_cels++]; n_draw_shift = chk_sh_and >> 1; - if ( junk_ror ) + if ( chk_sh_and & 1 ) { tmp_pbDst[1] = l_tbl[pdung_cels[1]]; pdung_cels += 2; @@ -5294,9 +5143,8 @@ LABEL_98: } else { - junk_ror = chk_sh_and & 1; n_draw_shift = chk_sh_and >> 1; - if ( junk_ror ) + if ( chk_sh_and & 1 ) { tmp_pbDst[0] = l_tbl[pdung_cels[0]]; pdung_cels += 2; @@ -5337,17 +5185,14 @@ LABEL_98: WorldBoolFlag = ((_BYTE)WorldBoolFlag + 1) & 1; if ( WorldBoolFlag ) { - l_index = x_minus & 2; - pdung_cels += l_index; - junk_ror = x_minus & 1; + pdung_cels += x_minus & 2; chk_sh_and = x_minus >> 1; - if ( junk_ror ) + if ( x_minus & 1 ) { ++pdung_cels; ++tmp_pbDst; - junk_ror = chk_sh_and & 1; n_draw_shift = chk_sh_and >> 1; - if ( junk_ror ) + if ( chk_sh_and & 1 ) { tmp_pbDst[0] = l_tbl[pdung_cels[0]]; pdung_cels += 2; @@ -5368,9 +5213,8 @@ LABEL_98: } else { - junk_ror = chk_sh_and & 1; n_draw_shift = chk_sh_and >> 1; - if ( junk_ror ) + if ( chk_sh_and & 1 ) { tmp_pbDst[1] = l_tbl[pdung_cels[1]]; pdung_cels += 2; @@ -5392,17 +5236,13 @@ LABEL_98: } else { - l_index = x_minus & 2; - pdung_cels += l_index; - junk_ror = x_minus & 1; + pdung_cels += x_minus & 2; chk_sh_and = x_minus >> 1; - if ( junk_ror ) + if ( x_minus & 1 ) { - l_index = *pdung_cels++; - *tmp_pbDst++ = l_tbl[l_index]; - junk_ror = chk_sh_and & 1; + *tmp_pbDst++ = l_tbl[*pdung_cels++]; n_draw_shift = chk_sh_and >> 1; - if ( junk_ror ) + if ( chk_sh_and & 1 ) { tmp_pbDst[1] = l_tbl[pdung_cels[1]]; pdung_cels += 2; @@ -5423,9 +5263,8 @@ LABEL_98: } else { - junk_ror = chk_sh_and & 1; n_draw_shift = chk_sh_and >> 1; - if ( junk_ror ) + if ( chk_sh_and & 1 ) { tmp_pbDst[0] = l_tbl[pdung_cels[0]]; pdung_cels += 2; @@ -5486,15 +5325,13 @@ LABEL_154: WorldBoolFlag = ((_BYTE)WorldBoolFlag + 1) & 1; if ( WorldBoolFlag ) { - junk_ror = y_minus & 1; chk_sh_and = y_minus >> 1; - if ( junk_ror ) + if ( y_minus & 1 ) { ++pdung_cels; ++tmp_pbDst; - junk_ror = chk_sh_and & 1; n_draw_shift = chk_sh_and >> 1; - if ( junk_ror ) + if ( chk_sh_and & 1 ) { tmp_pbDst[0] = l_tbl[pdung_cels[0]]; pdung_cels += 2; @@ -5515,9 +5352,8 @@ LABEL_154: } else { - junk_ror = chk_sh_and & 1; n_draw_shift = chk_sh_and >> 1; - if ( junk_ror ) + if ( chk_sh_and & 1 ) { tmp_pbDst[1] = l_tbl[pdung_cels[1]]; pdung_cels += 2; @@ -5536,20 +5372,16 @@ LABEL_154: while ( n_draw_shift ); } } - l_index = (unsigned char)pdung_cels & 2; - pdung_cels += l_index; + pdung_cels += (unsigned char)pdung_cels & 2; } else { - junk_ror = y_minus & 1; chk_sh_and = y_minus >> 1; - if ( junk_ror ) + if ( y_minus & 1 ) { - l_index = *pdung_cels++; - *tmp_pbDst++ = l_tbl[l_index]; - junk_ror = chk_sh_and & 1; + *tmp_pbDst++ = l_tbl[*pdung_cels++]; n_draw_shift = chk_sh_and >> 1; - if ( junk_ror ) + if ( chk_sh_and & 1 ) { tmp_pbDst[1] = l_tbl[pdung_cels[1]]; pdung_cels += 2; @@ -5570,9 +5402,8 @@ LABEL_154: } else { - junk_ror = chk_sh_and & 1; n_draw_shift = chk_sh_and >> 1; - if ( junk_ror ) + if ( chk_sh_and & 1 ) { tmp_pbDst[0] = l_tbl[pdung_cels[0]]; pdung_cels += 2; @@ -5591,8 +5422,7 @@ LABEL_154: while ( n_draw_shift ); } } - l_index = (unsigned char)pdung_cels & 2; - pdung_cels += l_index; + pdung_cels += (unsigned char)pdung_cels & 2; } tmp_pbDst = &tmp_pbDst[yy_32 - 800]; yy_32 += 2; @@ -5614,15 +5444,13 @@ LABEL_154: WorldBoolFlag = ((_BYTE)WorldBoolFlag + 1) & 1; if ( WorldBoolFlag ) { - junk_ror = x_minus & 1; chk_sh_and = x_minus >> 1; - if ( junk_ror ) + if ( x_minus & 1 ) { ++pdung_cels; ++tmp_pbDst; - junk_ror = chk_sh_and & 1; n_draw_shift = chk_sh_and >> 1; - if ( junk_ror ) + if ( chk_sh_and & 1 ) { tmp_pbDst[0] = l_tbl[pdung_cels[0]]; pdung_cels += 2; @@ -5643,9 +5471,8 @@ LABEL_154: } else { - junk_ror = chk_sh_and & 1; n_draw_shift = chk_sh_and >> 1; - if ( junk_ror ) + if ( chk_sh_and & 1 ) { tmp_pbDst[1] = l_tbl[pdung_cels[1]]; pdung_cels += 2; @@ -5664,20 +5491,16 @@ LABEL_154: while ( n_draw_shift ); } } - l_index = (unsigned char)pdung_cels & 2; - pdung_cels += l_index; + pdung_cels += (unsigned char)pdung_cels & 2; } else { - junk_ror = x_minus & 1; chk_sh_and = x_minus >> 1; - if ( junk_ror ) + if ( x_minus & 1 ) { - l_index = *pdung_cels++; - *tmp_pbDst++ = l_tbl[l_index]; - junk_ror = chk_sh_and & 1; + *tmp_pbDst++ = l_tbl[*pdung_cels++]; n_draw_shift = chk_sh_and >> 1; - if ( junk_ror ) + if ( chk_sh_and & 1 ) { tmp_pbDst[1] = l_tbl[pdung_cels[1]]; pdung_cels += 2; @@ -5698,9 +5521,8 @@ LABEL_154: } else { - junk_ror = chk_sh_and & 1; n_draw_shift = chk_sh_and >> 1; - if ( junk_ror ) + if ( chk_sh_and & 1 ) { tmp_pbDst[0] = l_tbl[pdung_cels[0]]; pdung_cels += 2; @@ -5719,8 +5541,7 @@ LABEL_154: while ( n_draw_shift ); } } - l_index = (unsigned char)pdung_cels & 2; - pdung_cels += l_index; + pdung_cels += (unsigned char)pdung_cels & 2; } tmp_pbDst = &tmp_pbDst[xx_32 - 800]; xx_32 -= 2; @@ -5804,17 +5625,14 @@ LABEL_210: WorldBoolFlag = ((_BYTE)WorldBoolFlag + 1) & 1; if ( WorldBoolFlag ) { - l_index = x_minus & 2; - pdung_cels += l_index; - junk_ror = x_minus & 1; + pdung_cels += x_minus & 2; chk_sh_and = x_minus >> 1; - if ( junk_ror ) + if ( x_minus & 1 ) { ++pdung_cels; ++tmp_pbDst; - junk_ror = chk_sh_and & 1; n_draw_shift = chk_sh_and >> 1; - if ( junk_ror ) + if ( chk_sh_and & 1 ) { tmp_pbDst[0] = l_tbl[pdung_cels[0]]; pdung_cels += 2; @@ -5835,9 +5653,8 @@ LABEL_210: } else { - junk_ror = chk_sh_and & 1; n_draw_shift = chk_sh_and >> 1; - if ( junk_ror ) + if ( chk_sh_and & 1 ) { tmp_pbDst[1] = l_tbl[pdung_cels[1]]; pdung_cels += 2; @@ -5859,17 +5676,13 @@ LABEL_210: } else { - l_index = x_minus & 2; - pdung_cels += l_index; - junk_ror = x_minus & 1; + pdung_cels += x_minus & 2; chk_sh_and = x_minus >> 1; - if ( junk_ror ) + if ( x_minus & 1 ) { - l_index = *pdung_cels++; - *tmp_pbDst++ = l_tbl[l_index]; - junk_ror = chk_sh_and & 1; + *tmp_pbDst++ = l_tbl[*pdung_cels++]; n_draw_shift = chk_sh_and >> 1; - if ( junk_ror ) + if ( chk_sh_and & 1 ) { tmp_pbDst[1] = l_tbl[pdung_cels[1]]; pdung_cels += 2; @@ -5890,9 +5703,8 @@ LABEL_210: } else { - junk_ror = chk_sh_and & 1; n_draw_shift = chk_sh_and >> 1; - if ( junk_ror ) + if ( chk_sh_and & 1 ) { tmp_pbDst[0] = l_tbl[pdung_cels[0]]; pdung_cels += 2; @@ -5993,15 +5805,13 @@ LABEL_249: WorldBoolFlag = ((_BYTE)WorldBoolFlag + 1) & 1; if ( WorldBoolFlag ) { - junk_ror = x_minus & 1; chk_sh_and = x_minus >> 1; - if ( junk_ror ) + if ( x_minus & 1 ) { ++pdung_cels; ++tmp_pbDst; - junk_ror = chk_sh_and & 1; n_draw_shift = chk_sh_and >> 1; - if ( junk_ror ) + if ( chk_sh_and & 1 ) { tmp_pbDst[0] = l_tbl[pdung_cels[0]]; pdung_cels += 2; @@ -6022,9 +5832,8 @@ LABEL_249: } else { - junk_ror = chk_sh_and & 1; n_draw_shift = chk_sh_and >> 1; - if ( junk_ror ) + if ( chk_sh_and & 1 ) { tmp_pbDst[1] = l_tbl[pdung_cels[1]]; pdung_cels += 2; @@ -6043,20 +5852,16 @@ LABEL_249: while ( n_draw_shift ); } } - l_index = (unsigned char)pdung_cels & 2; - pdung_cels += l_index; + pdung_cels += (unsigned char)pdung_cels & 2; } else { - junk_ror = x_minus & 1; chk_sh_and = x_minus >> 1; - if ( junk_ror ) + if ( x_minus & 1 ) { - l_index = *pdung_cels++; - *tmp_pbDst++ = l_tbl[l_index]; - junk_ror = chk_sh_and & 1; + *tmp_pbDst++ = l_tbl[*pdung_cels++]; n_draw_shift = chk_sh_and >> 1; - if ( junk_ror ) + if ( chk_sh_and & 1 ) { tmp_pbDst[1] = l_tbl[pdung_cels[1]]; pdung_cels += 2; @@ -6077,9 +5882,8 @@ LABEL_249: } else { - junk_ror = chk_sh_and & 1; n_draw_shift = chk_sh_and >> 1; - if ( junk_ror ) + if ( chk_sh_and & 1 ) { tmp_pbDst[0] = l_tbl[pdung_cels[0]]; pdung_cels += 2; @@ -6098,8 +5902,7 @@ LABEL_249: while ( n_draw_shift ); } } - l_index = (unsigned char)pdung_cels & 2; - pdung_cels += l_index; + pdung_cels += (unsigned char)pdung_cels & 2; } tmp_pbDst = &tmp_pbDst[xx_32 - 800]; xx_32 -= 2; @@ -6110,7 +5913,7 @@ LABEL_249: return; } pdung_cels = (char *)pSpeedCels + *(_DWORD *)&gpCelFrame[4 * (light_table_index + 16 * (level_cel_block & 0xFFF))]; - cel_type_16 = (unsigned char)(BYTE1(level_cel_block) >> 4); + cel_type_16 = (unsigned char)(level_cel_block >> 12); LABEL_11: switch ( cel_type_16 ) { @@ -6175,7 +5978,6 @@ LABEL_11: xx_32 = 32; while ( 1 ) { - x32_temp = xx_32; yy_32 = 32; do { @@ -6268,8 +6070,7 @@ LABEL_290: LABEL_293: WorldBoolFlag = ((_BYTE)WorldBoolFlag + 1) & 1; tmp_pbDst -= 800; - xx_32 = x32_temp - 1; - if ( x32_temp == 1 ) + if ( !--xx_32 ) return; } case 10: // lower (top transparent), without lighting @@ -6784,8 +6585,6 @@ void __fastcall drawBottomArchesLowerScreen(unsigned char *pbDst, unsigned int * char *tmp_pbDst; // edi MAPDST short cel_type_16; // ax MAPDST char *pdung_cels; // esi MAPDST - unsigned int cel_type_16_tmp; // eax MAPDST - int cel_type_32; // eax int and80_i; // ecx MAPDST signed int tile_42_45; // eax MAPDST unsigned int world_tbl; // ecx MAPDST @@ -6795,8 +6594,6 @@ void __fastcall drawBottomArchesLowerScreen(unsigned char *pbDst, unsigned int * unsigned int left_shift; // edx MAPDST signed int i; // edx MAPDST unsigned int n_draw_shift; // ecx MAPDST - int y32_temp; // [esp-8h] [ebp-14h] MAPDST - int x32_temp; // [esp-4h] [ebp-10h] MAPDST char *_EBX; gpCelFrame = (unsigned char *)speed_cel_frame_num_from_light_index_frame_num; @@ -6810,10 +6607,8 @@ void __fastcall drawBottomArchesLowerScreen(unsigned char *pbDst, unsigned int * level_cel_block = *(_DWORD *)&gpCelFrame[64 * (level_cel_block & 0xFFF)] + (unsigned short)(level_cel_block & 0xF000); pdung_cels = (char *)pDungeonCels + *((_DWORD *)pDungeonCels + (level_cel_block & 0xFFF)); - cel_type_16_tmp = level_cel_block; - _LOBYTE(cel_type_16_tmp) = BYTE1(cel_type_16_tmp); - cel_type_32 = (cel_type_16_tmp >> 4) & 7; - switch ( (_WORD)cel_type_32 ) + cel_type_16 = (level_cel_block >> 12) & 7; + switch ( cel_type_16 ) { case 0: // lower (bottom transparent), black /* @@ -6826,7 +6621,6 @@ void __fastcall drawBottomArchesLowerScreen(unsigned char *pbDst, unsigned int * { if ( (unsigned int)tmp_pbDst < screen_buf_end ) { - y32_temp = yy_32; left_shift = *gpDrawMask; i = 32; do @@ -6838,7 +6632,6 @@ void __fastcall drawBottomArchesLowerScreen(unsigned char *pbDst, unsigned int * --i; } while ( i ); - yy_32 = y32_temp; } else { @@ -6860,7 +6653,6 @@ void __fastcall drawBottomArchesLowerScreen(unsigned char *pbDst, unsigned int * xx_32 = 32; do { - x32_temp = xx_32; gdwCurrentMask = *gpDrawMask; yy_32 = 32; do @@ -6875,7 +6667,6 @@ void __fastcall drawBottomArchesLowerScreen(unsigned char *pbDst, unsigned int * { and80_i = dung_and80; pdung_cels += dung_and80; - y32_temp = yy_32; left_shift = gdwCurrentMask; do { @@ -6887,7 +6678,6 @@ void __fastcall drawBottomArchesLowerScreen(unsigned char *pbDst, unsigned int * } while ( and80_i ); gdwCurrentMask = left_shift; - yy_32 = y32_temp; } else { @@ -6907,9 +6697,9 @@ void __fastcall drawBottomArchesLowerScreen(unsigned char *pbDst, unsigned int * LABEL_252: tmp_pbDst -= 800; --gpDrawMask; - xx_32 = x32_temp - 1; + --xx_32; } - while ( x32_temp != 1 ); + while ( xx_32 ); break; case 2: // lower (bottom transparent), black /* @@ -7093,7 +6883,6 @@ LABEL_252: { if ( (unsigned int)tmp_pbDst < screen_buf_end ) { - y32_temp = yy_32; left_shift = *gpDrawMask; i = 32; do @@ -7105,7 +6894,6 @@ LABEL_252: --i; } while ( i ); - yy_32 = y32_temp; } else { @@ -7161,7 +6949,6 @@ LABEL_252: { if ( (unsigned int)tmp_pbDst < screen_buf_end ) { - y32_temp = yy_32; left_shift = *gpDrawMask; i = 32; do @@ -7173,7 +6960,6 @@ LABEL_252: --i; } while ( i ); - yy_32 = y32_temp; } else { @@ -7193,7 +6979,7 @@ LABEL_252: { pdung_cels = (char *)pDungeonCels + *((_DWORD *)pDungeonCels + (level_cel_block & 0xFFF)); _EBX = &pLightTbl[256 * light_table_index]; - cel_type_16 = (unsigned char)(BYTE1(level_cel_block) >> 4); + cel_type_16 = (unsigned char)(level_cel_block >> 12); switch ( cel_type_16 ) { case 0: // lower (bottom transparent), with lighting @@ -7240,7 +7026,6 @@ LABEL_252: xx_32 = 32; do { - x32_temp = xx_32; gdwCurrentMask = *gpDrawMask; yy_32 = 32; do @@ -7254,7 +7039,6 @@ LABEL_252: if ( (unsigned int)tmp_pbDst < screen_buf_end ) { and80_i = dung_and80; - y32_temp = yy_32; left_shift = gdwCurrentMask; do { @@ -7267,7 +7051,6 @@ LABEL_252: } while ( and80_i ); gdwCurrentMask = left_shift; - yy_32 = y32_temp; } else { @@ -7287,9 +7070,9 @@ LABEL_252: LABEL_52: tmp_pbDst -= 800; --gpDrawMask; - xx_32 = x32_temp - 1; + --xx_32; } - while ( x32_temp != 1 ); + while ( xx_32 ); break; case 2: // lower (bottom transparent), with lighting /* @@ -7482,7 +7265,6 @@ LABEL_98: { if ( (unsigned int)tmp_pbDst < screen_buf_end ) { - y32_temp = yy_32; left_shift = *gpDrawMask; i = 32; do @@ -7495,7 +7277,6 @@ LABEL_98: --i; } while ( i ); - yy_32 = y32_temp; } else { @@ -7565,7 +7346,6 @@ LABEL_117: { if ( (unsigned int)tmp_pbDst < screen_buf_end ) { - y32_temp = yy_32; left_shift = *gpDrawMask; i = 32; do @@ -7579,7 +7359,6 @@ LABEL_117: } while ( i ); pdung_cels += (unsigned char)pdung_cels & 2; - yy_32 = y32_temp; } else { @@ -7626,7 +7405,7 @@ LABEL_117: } pdung_cels = (char *)pSpeedCels + *(_DWORD *)&gpCelFrame[4 * (light_table_index + 16 * (level_cel_block & 0xFFF))]; - cel_type_16 = (unsigned char)(BYTE1(level_cel_block) >> 4); + cel_type_16 = (unsigned char)(level_cel_block >> 12); } else { @@ -7634,9 +7413,7 @@ LABEL_117: level_cel_block = *(_DWORD *)&gpCelFrame[64 * (level_cel_block & 0xFFF)] + (unsigned short)(level_cel_block & 0xF000); pdung_cels = (char *)pDungeonCels + *((_DWORD *)pDungeonCels + (level_cel_block & 0xFFF)); - cel_type_16_tmp = level_cel_block; - _LOBYTE(cel_type_16_tmp) = BYTE1(cel_type_16_tmp); - cel_type_16 = ((cel_type_16_tmp >> 4) & 7) + 8; + cel_type_16 = ((level_cel_block >> 12) & 7) + 8; } switch ( cel_type_16 ) { @@ -7651,7 +7428,6 @@ LABEL_117: { if ( (unsigned int)tmp_pbDst < screen_buf_end ) { - y32_temp = yy_32; left_shift = *gpDrawMask; i = 32; do @@ -7664,7 +7440,6 @@ LABEL_117: --i; } while ( i ); - yy_32 = y32_temp; } else { @@ -7686,7 +7461,6 @@ LABEL_117: xx_32 = 32; do { - x32_temp = xx_32; gdwCurrentMask = *gpDrawMask; yy_32 = 32; do @@ -7700,7 +7474,6 @@ LABEL_117: if ( (unsigned int)tmp_pbDst < screen_buf_end ) { and80_i = dung_and80; - y32_temp = yy_32; left_shift = gdwCurrentMask; do { @@ -7713,7 +7486,6 @@ LABEL_117: } while ( and80_i ); gdwCurrentMask = left_shift; - yy_32 = y32_temp; } else { @@ -7733,9 +7505,9 @@ LABEL_117: LABEL_152: tmp_pbDst -= 800; --gpDrawMask; - xx_32 = x32_temp - 1; + --xx_32; } - while ( x32_temp != 1 ); + while ( xx_32 ); break; case 10: // lower (bottom transparent), without lighting /* @@ -7912,7 +7684,6 @@ LABEL_198: { if ( (unsigned int)tmp_pbDst < screen_buf_end ) { - y32_temp = yy_32; left_shift = *gpDrawMask; i = 32; do @@ -7925,7 +7696,6 @@ LABEL_198: --i; } while ( i ); - yy_32 = y32_temp; } else { @@ -7991,7 +7761,6 @@ LABEL_217: { if ( (unsigned int)tmp_pbDst < screen_buf_end ) { - y32_temp = yy_32; left_shift = *gpDrawMask; i = 32; do @@ -8005,7 +7774,6 @@ LABEL_217: } while ( i ); pdung_cels += (unsigned char)pdung_cels & 2; - yy_32 = y32_temp; } else { @@ -8048,15 +7816,11 @@ LABEL_217: void __fastcall drawLowerScreen(unsigned char *pbDst) { - char junk_v2; // al MAPDST unsigned char *tmp_pbDst; // edi MAPDST char *pdung_cels; // esi MAPDST char *l_tbl; // ebx short cel_type_16; // ax MAPDST - unsigned int cel_type_16_tmp; // eax - int cel_type_32; // eax int xx_32; // edx MAPDST - char l_index; // edx MAPDST int yy_32; // ebp MAPDST char block_4; // cl MAPDST int x_minus; // ecx MAPDST @@ -8068,9 +7832,7 @@ void __fastcall drawLowerScreen(unsigned char *pbDst) unsigned int dung_and80; // eax MAPDST signed int i; // edx MAPDST signed int j; // ecx MAPDST - int x32_temp; // [esp-14h] [ebp-18h] MAPDST - l_index = cel_transparency_active; if ( cel_transparency_active ) { if ( !arch_draw_type ) @@ -8080,8 +7842,7 @@ void __fastcall drawLowerScreen(unsigned char *pbDst) } if ( arch_draw_type == 1 ) { - junk_v2 = block_lvid[level_piece_id]; - if ( junk_v2 == 1 || junk_v2 == 3 ) + if ( block_lvid[level_piece_id] == 1 || block_lvid[level_piece_id] == 3 ) { drawBottomArchesLowerScreen(pbDst, &LeftMask[31]); return; @@ -8089,8 +7850,7 @@ void __fastcall drawLowerScreen(unsigned char *pbDst) } if ( arch_draw_type == 2 ) { - junk_v2 = block_lvid[level_piece_id]; - if ( junk_v2 == 2 || junk_v2 == 3 ) + if ( block_lvid[level_piece_id] == 2 || block_lvid[level_piece_id] == 3 ) { drawBottomArchesLowerScreen(pbDst, &RightMask[31]); return; @@ -8107,10 +7867,8 @@ void __fastcall drawLowerScreen(unsigned char *pbDst) level_cel_block = *(_DWORD *)&gpCelFrame[64 * (level_cel_block & 0xFFF)] + (unsigned short)(level_cel_block & 0xF000); pdung_cels = (char *)pDungeonCels + *((_DWORD *)pDungeonCels + (level_cel_block & 0xFFF)); - cel_type_16_tmp = level_cel_block; - _LOBYTE(cel_type_16_tmp) = BYTE1(cel_type_16_tmp); - cel_type_32 = (cel_type_16_tmp >> 4) & 7; - switch ( (_WORD)cel_type_32 ) + cel_type_16 = (level_cel_block >> 12) & 7; + switch ( cel_type_16 ) { case 0: // lower (solid), black /* @@ -8151,7 +7909,6 @@ void __fastcall drawLowerScreen(unsigned char *pbDst) xx_32 = 32; do { - x32_temp = xx_32; yy_32 = 32; do { @@ -8205,9 +7962,9 @@ void __fastcall drawLowerScreen(unsigned char *pbDst) while ( yy_32 ); LABEL_232: tmp_pbDst -= 800; - xx_32 = x32_temp - 1; + --xx_32; } - while ( x32_temp != 1 ); + while ( xx_32 ); break; case 2: // lower (solid), black /* @@ -8489,10 +8246,8 @@ LABEL_232: xx_32 = 32; do { - x32_temp = xx_32; if ( (unsigned int)tmp_pbDst < screen_buf_end ) { - l_index = 0; /* remove */ j = 8; do { @@ -8512,9 +8267,9 @@ LABEL_232: tmp_pbDst += 32; } tmp_pbDst -= 800; - xx_32 = x32_temp - 1; + --xx_32; } - while ( x32_temp != 1 ); + while ( xx_32 ); break; case 1: // lower (solid), with lighting /* @@ -8525,7 +8280,6 @@ LABEL_232: xx_32 = 32; do { - x32_temp = xx_32; yy_32 = 32; do { @@ -8571,9 +8325,9 @@ LABEL_232: } while ( yy_32 ); tmp_pbDst -= 800; - xx_32 = x32_temp - 1; + --xx_32; } - while ( x32_temp != 1 ); + while ( xx_32 ); break; case 2: // lower (solid), with lighting /* @@ -8605,8 +8359,7 @@ LABEL_68: { tmp_pbDst += yy_32; y_minus = 32 - yy_32; - l_index = (32 - (_BYTE)yy_32) & 2; - pdung_cels += l_index; + pdung_cels += (32 - (_BYTE)yy_32) & 2; do { *tmp_pbDst++ = l_tbl[*pdung_cels++]; @@ -8628,8 +8381,7 @@ LABEL_68: { tmp_pbDst += xx_32; x_minus = 32 - xx_32; - l_index = (32 - (_BYTE)xx_32) & 2; - pdung_cels += l_index; + pdung_cels += (32 - (_BYTE)xx_32) & 2; do { *tmp_pbDst++ = l_tbl[*pdung_cels++]; @@ -8676,8 +8428,7 @@ LABEL_83: --y_minus; } while ( y_minus ); - l_index = (unsigned char)pdung_cels & 2; - pdung_cels += l_index; + pdung_cels += (unsigned char)pdung_cels & 2; tmp_pbDst = &tmp_pbDst[yy_32 - 800]; yy_32 += 2; } @@ -8698,8 +8449,7 @@ LABEL_83: --x_minus; } while ( x_minus ); - l_index = (unsigned char)pdung_cels & 2; - pdung_cels += l_index; + pdung_cels += (unsigned char)pdung_cels & 2; tmp_pbDst = &tmp_pbDst[xx_32 - 800]; xx_32 -= 2; } @@ -8758,8 +8508,7 @@ LABEL_100: { tmp_pbDst += xx_32; block_4 = 32 - xx_32; - l_index = (32 - (_BYTE)xx_32) & 2; - pdung_cels += l_index; + pdung_cels += (32 - (_BYTE)xx_32) & 2; if ( (char)(32 - xx_32) >= 4 ) { do @@ -8853,8 +8602,7 @@ LABEL_116: pdung_cels += 2; tmp_pbDst += 2; } - l_index = (unsigned char)pdung_cels & 2; - pdung_cels += l_index; + pdung_cels += (unsigned char)pdung_cels & 2; tmp_pbDst = &tmp_pbDst[xx_32 - 800]; xx_32 -= 2; } @@ -8917,7 +8665,6 @@ LABEL_116: xx_32 = 32; do { - x32_temp = xx_32; yy_32 = 32; do { @@ -8973,9 +8720,9 @@ LABEL_116: while ( yy_32 ); LABEL_143: tmp_pbDst -= 800; - xx_32 = x32_temp - 1; + --xx_32; } - while ( x32_temp != 1 ); + while ( xx_32 ); break; case 10: // lower (solid), without lighting /*