From e7e1cbcaaf40a93202c6e0bc06aeb24c6f618720 Mon Sep 17 00:00:00 2001 From: nmlgc Date: Mon, 14 Oct 2019 22:30:54 +0200 Subject: [PATCH] [Decompilation] [th05] Marisa's shot control functions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Yeah… such fun pretending that the original code wasn't copy-pasted. And yes, Reimu will have to wait until the next one. Completes P0037, funded by zorg. --- Makefile.mak | 2 +- th04/shared.hpp | 6 +- th05/p_marisa.cpp | 227 +++++++++ th05/player/shot.h | 3 + th05/th05.hpp | 7 + th05_main.asm | 1094 +------------------------------------------- 6 files changed, 249 insertions(+), 1090 deletions(-) create mode 100644 th05/p_marisa.cpp diff --git a/Makefile.mak b/Makefile.mak index 3f82ce14..0811f5ad 100644 --- a/Makefile.mak +++ b/Makefile.mak @@ -95,7 +95,7 @@ $** bin\th05\player.obj: th05\player.asm bin\th05\hud_bar.obj: th05\hud_bar.asm bin\th05\scoreupd.obj: th04\scoreupd.asm -bin\th05\main.exe: bin\th05\main.obj th05\p_mima.cpp th05\p_yuuka.cpp bin\th05\player.obj bin\th05\hud_bar.obj bin\th05\scoreupd.obj th05\main012.cpp +bin\th05\main.exe: bin\th05\main.obj th05\p_marisa.cpp th05\p_mima.cpp th05\p_yuuka.cpp bin\th05\player.obj bin\th05\hud_bar.obj bin\th05\scoreupd.obj th05\main012.cpp $(CC) $(CFLAGS) -ml -3 -Z -DGAME=5 -nbin\th05\ -eMAIN.EXE @&&| $** | diff --git a/th04/shared.hpp b/th04/shared.hpp index 94c9acc2..be13a4c5 100644 --- a/th04/shared.hpp +++ b/th04/shared.hpp @@ -14,10 +14,10 @@ inline subpixel_t to_sp(float screen_v) { } class Subpixel { -private: - subpixel_t v; - public: + // Code generation will require direct access to v, if performing + // arithmetic with a local variable... + subpixel_t v; void operator +=(float screen_v) { this->v += to_sp(screen_v); diff --git a/th05/p_marisa.cpp b/th05/p_marisa.cpp new file mode 100644 index 00000000..46fd00e3 --- /dev/null +++ b/th05/p_marisa.cpp @@ -0,0 +1,227 @@ +/* ReC98 + * ----- + * Marisa's shot control functions + */ + +#pragma codeseg main_01_TEXT + +extern "C" { +#include "th05/th05.hpp" +#include "th05/player/shot.h" +#define cycle _AL + +#define STAR_DISTANCE (16) +#define STAR_OFFSET(count) (8 - ((count / 2) * STAR_DISTANCE)) + +#define MARISA_STARS(dmg) \ + shot->pos.cur.x.v += star_distance; \ + shot->damage = dmg; \ + VELOCITY_Y(-12); \ + star_distance += to_sp(STAR_DISTANCE); + +void pascal near shot_marisa_l2(void) +{ +#undef STAR_COUNT +#define STAR_COUNT 1 + SHOT_FUNC_INIT(STAR_COUNT, SC_3X, SC_1X, i += 2); + while(( shot = shots_add() ) != NULL) { + if(sai.i == STAR_COUNT) { + shot->set_random_angle_forwards(); + shot->damage = 8; + } else { + if(sai.i == 3) { OPT_L; MISSILE_L; VELOCITY_X(-1.625f); } + else/*i == 2*/ { OPT_R; MISSILE_R; VELOCITY_X( 1.625f); } + VELOCITY_Y(2); + shot->set_option_sprite_and_damage(16); + } + if(sai.next() <= 0) { + break; + } + } +} + +void pascal near shot_marisa_l3(void) +{ +#undef STAR_COUNT +#define STAR_COUNT 2 + SHOT_FUNC_INIT(STAR_COUNT, SC_3X, SC_1X, i += 4); + while(( shot = shots_add() ) != NULL) { + if(sai.i <= STAR_COUNT) { + if(sai.i == STAR_COUNT) { shot->pos.cur.x -= STAR_OFFSET(0); } + else /* sai_i == 1 */ { shot->pos.cur.x += STAR_OFFSET(0); } + shot->damage = 7; + } else { + switch(sai.i - 3u) { + case 0: OPT_L; MISSILE_L; VELOCITY_XY(-1.375f, 2.25f); break; + case 1: OPT_R; MISSILE_R; VELOCITY_XY( 1.375f, 2.25f); break; + case 2: OPT_L; MISSILE_S; VELOCITY_Y(-3); break; + case 3: OPT_R; MISSILE_S; VELOCITY_Y(-3); break; + } + shot->set_option_sprite_and_damage(13); + } + if(sai.next() <= 0) { + break; + } + } +} + +void pascal near shot_marisa_l4(void) +{ +#undef STAR_COUNT +#define STAR_COUNT 3 + SHOT_FUNC_INIT(STAR_COUNT, SC_3X, SC_1X, i += 6); + while(( shot = shots_add() ) != NULL) { + if(sai.i <= STAR_COUNT) { + if(sai.i == STAR_COUNT) { + sai.angle = 180; + } + shot->damage = 6; + sai.angle += 6; + shot_velocity_set(&shot->pos.velocity, sai.angle); + } else { + switch(sai.i - 4u) { + case 0: OPT_L; MISSILE_L; VELOCITY_XY(-1.375f, 2.25f); break; + case 1: OPT_R; MISSILE_R; VELOCITY_XY( 1.375f, 2.25f); break; + case 2: OPT_L; MISSILE_S; VELOCITY_XY(-1, -3); break; + case 3: OPT_R; MISSILE_S; VELOCITY_XY( 1, -3); break; + case 4: OPT_L; MISSILE_S; VELOCITY_XY(0, -4); break; + case 5: OPT_R; MISSILE_S; VELOCITY_XY(0, -4); break; + } + shot->set_option_sprite_and_damage(12); + } + if(sai.next() <= 0) { + break; + } + } +} + +void pascal near shot_marisa_l5(void) +{ +#undef STAR_COUNT +#define STAR_COUNT 3 + SHOT_FUNC_INIT(STAR_COUNT, SC_3X, SC_1X, i += 6); + while(( shot = shots_add() ) != NULL) { + if(sai.i <= STAR_COUNT) { + shot->damage = 6; + if(sai.i == STAR_COUNT) { + sai.angle = 178; + } + sai.angle += 7; + shot_velocity_set(&shot->pos.velocity, sai.angle); + } else { + switch(sai.i - 4u) { + case 0: OPT_L; MISSILE_L; VELOCITY_XY(-1.375f, 2.25f); break; + case 1: OPT_R; MISSILE_R; VELOCITY_XY( 1.375f, 2.25f); break; + case 2: OPT_L; MISSILE_S; VELOCITY_XY(-1, -3); break; + case 3: OPT_R; MISSILE_S; VELOCITY_XY( 1, -3); break; + case 4: OPT_L; MISSILE_S; VELOCITY_XY( 0.5f, -4); break; + case 5: OPT_R; MISSILE_S; VELOCITY_XY(-0.5f, -4); break; + } + shot->set_option_sprite_and_damage(11); + } + if(sai.next() <= 0) { + break; + } + } +} + +void pascal near shot_marisa_l6(void) +{ +#undef STAR_COUNT +#define STAR_COUNT 4 + SHOT_FUNC_INIT(STAR_COUNT, SC_3X, SC_1X, i += 8); + subpixel_t star_distance = to_sp(STAR_OFFSET(STAR_COUNT)); + while(( shot = shots_add() ) != NULL) { + if(sai.i <= STAR_COUNT) { + MARISA_STARS(5); + } else { + switch(sai.i - 5u) { + case 0: OPT_L; MISSILE_L; VELOCITY_XY(-1.375f, 2.25f); break; + case 1: OPT_R; MISSILE_R; VELOCITY_XY( 1.375f, 2.25f); break; + case 2: OPT_L; MISSILE_S; VELOCITY_XY(-1, -3); break; + case 3: OPT_R; MISSILE_S; VELOCITY_XY( 1, -3); break; + case 4: OPT_L; MISSILE_S; VELOCITY_Y(-5); break; + case 5: OPT_R; MISSILE_S; VELOCITY_Y(-5); break; + case 6: OPT_L; MISSILE_S; VELOCITY_Y(-2); break; + case 7: OPT_R; MISSILE_S; VELOCITY_Y(-2); break; + } + shot->set_option_sprite_and_damage(11); + } + if(sai.next() <= 0) { + break; + } + } +} + +#define MARISA_L7(star_count, star_damage, missile_count, missile_damage) \ + SHOT_FUNC_INIT(star_count, SC_3X, SC_1X, i += missile_count); \ + subpixel_t star_distance = to_sp(STAR_OFFSET(star_count)); \ + while(( shot = shots_add() ) != NULL) { \ + if(sai.i <= star_count) { \ + MARISA_STARS(star_damage); \ + } else { \ + switch(sai.i - 5u) { \ + case 0: OPT_L; MISSILE_L; VELOCITY_XY(-1.75f, 2.25f); break; \ + case 1: OPT_R; MISSILE_R; VELOCITY_XY( 1.75f, 2.25f); break; \ + case 2: OPT_L; MISSILE_R; VELOCITY_XY( 2, 2); break; \ + case 3: OPT_R; MISSILE_L; VELOCITY_XY(-2, 2); break; \ + case 4: OPT_L; MISSILE_S; VELOCITY_YX( 3, -1); break; \ + case 5: OPT_R; MISSILE_S; VELOCITY_YX( 3, 1); break; \ + case 6: OPT_L; MISSILE_S; VELOCITY_Y(-5); break; \ + case 7: OPT_R; MISSILE_S; VELOCITY_Y(-5); break; \ + case 8: OPT_L; MISSILE_S; VELOCITY_Y(-2); break; \ + case 9: OPT_R; MISSILE_S; VELOCITY_Y(-2); break; \ + } \ + shot->set_option_sprite_and_damage(missile_damage); \ + } \ + if(sai.next() <= 0) { \ + break; \ + } \ + } + +void pascal near shot_marisa_l7(void) +{ + MARISA_L7(4, 5, 10, 11); +} + +void pascal near shot_marisa_l8(void) +{ + MARISA_L7(4, 4, 10, 10); +} + +void pascal near shot_marisa_l9(void) +{ +#undef STAR_COUNT +#define STAR_COUNT 6 + + SHOT_FUNC_INIT(STAR_COUNT, SC_3X, SC_1X, i += 12); + subpixel_t star_distance = to_sp(STAR_OFFSET(STAR_COUNT)); + while(( shot = shots_add() ) != NULL) { + if(sai.i <= STAR_COUNT) { + MARISA_STARS(4); + } else { + switch(sai.i - 7u) { + case 0: OPT_L; MISSILE_L; VELOCITY_XY(-2, 2.25f); break; + case 1: OPT_R; MISSILE_R; VELOCITY_XY( 2, 2.25f); break; + case 2: OPT_L; MISSILE_R; VELOCITY_XY( 2, 2); break; + case 3: OPT_R; MISSILE_L; VELOCITY_XY(-2, 2); break; + case 4: OPT_L; MISSILE_S; VELOCITY_Y(3); break; + case 5: OPT_R; MISSILE_S; VELOCITY_Y(3); break; + case 6: OPT_L; MISSILE_S; VELOCITY_YX( 0, -1); break; + case 7: OPT_R; MISSILE_S; VELOCITY_YX( 0, 1); break; + case 8: OPT_L; MISSILE_S; VELOCITY_Y(-8); break; + case 9: OPT_R; MISSILE_S; VELOCITY_Y(-8); break; + case 10: OPT_L; MISSILE_S; VELOCITY_Y(-4); break; + case 11: OPT_R; MISSILE_S; VELOCITY_Y(-4); break; + case 12: OPT_L; MISSILE_S; VELOCITY_Y(-1); break; + case 13: OPT_R; MISSILE_S; VELOCITY_Y(-1); break; + } + shot->set_option_sprite_and_damage(9); + } + if(sai.next() <= 0) { + break; + } + } +} + +} diff --git a/th05/player/shot.h b/th05/player/shot.h index 5e27dae1..4a07c65d 100644 --- a/th05/player/shot.h +++ b/th05/player/shot.h @@ -1,6 +1,9 @@ // We *really* want to fit those on a line... #define OPT_L shot->from_option_l() #define OPT_R shot->from_option_r() +#define MISSILE_L shot->type = ST_MISSILE_LEFT +#define MISSILE_R shot->type = ST_MISSILE_RIGHT +#define MISSILE_S shot->type = ST_MISSILE_STRAIGHT #define VELOCITY_X(screen_x) shot->pos.velocity.x = screen_x; #define VELOCITY_Y(screen_y) shot->pos.velocity.y = screen_y; diff --git a/th05/th05.hpp b/th05/th05.hpp index f2da8c85..39646e5f 100644 --- a/th05/th05.hpp +++ b/th05/th05.hpp @@ -15,6 +15,13 @@ bb_seg_t pascal near bb_load(const char far *fn); /// ------ // Shots // ----- +// Shot types +#define ST_NORMAL 0 +#define ST_HOMING 1 +#define ST_MISSILE_LEFT 2 +#define ST_MISSILE_RIGHT 3 +#define ST_MISSILE_STRAIGHT 4 + // Shot cycle bitflags #define SC_1X 0x8 // Triggered 1× per cycle #define SC_2X 0x2 // Triggered 2× per cycle diff --git a/th05_main.asm b/th05_main.asm index 022bbb77..18e91a6c 100644 --- a/th05_main.asm +++ b/th05_main.asm @@ -14351,1092 +14351,14 @@ loc_12E5F: retn shot_reimu_l9 endp - -; =============== S U B R O U T I N E ======================================= - -; Attributes: bp-based frame - -shot_marisa_l2 proc near - -var_1 = byte ptr -1 - - enter 2, 0 - push si - mov [bp+var_1], 1 - call shot_cycle_init - test al, 9 - jz short loc_12EE1 - test al, 8 - jz short loc_12ED8 - mov al, [bp+var_1] - add al, 2 - mov [bp+var_1], al - jmp short loc_12ED8 -; --------------------------------------------------------------------------- - -loc_12E80: - cmp [bp+var_1], 1 - jnz short loc_12E9B - lea ax, [si+0Ah] - push ax - push 0Fh - call randring1_next16_and - add al, 0B8h - push ax - call shot_velocity_set - mov byte ptr [si+10h], 8 - jmp short loc_12ECC -; --------------------------------------------------------------------------- - -loc_12E9B: - cmp [bp+var_1], 3 - jnz short loc_12EB1 - sub word ptr [si+2], 180h - mov [si+shot_t.SHOT_type], ST_MISSILE_LEFT - mov word ptr [si+0Ah], 0FFE6h - jmp short loc_12EBF -; --------------------------------------------------------------------------- - -loc_12EB1: - add word ptr [si+2], 180h - mov [si+shot_t.SHOT_type], ST_MISSILE_RIGHT - mov word ptr [si+0Ah], 1Ah - -loc_12EBF: - mov word ptr [si+0Ch], 20h ; ' ' - mov byte ptr [si+0Eh], 16h - mov byte ptr [si+10h], 10h - -loc_12ECC: - mov al, [bp+var_1] - add al, 0FFh - mov [bp+var_1], al - or al, al - jbe short loc_12EE1 - -loc_12ED8: - call shots_add - mov si, ax - or ax, ax - jnz short loc_12E80 - -loc_12EE1: - pop si - leave - retn -shot_marisa_l2 endp - - -; =============== S U B R O U T I N E ======================================= - -; Attributes: bp-based frame - -shot_marisa_l3 proc near - -var_1 = byte ptr -1 - - enter 2, 0 - push si - mov [bp+var_1], 2 - call shot_cycle_init - test al, 9 - jz loc_12F94 - test al, 8 - jz loc_12F89 - mov al, [bp+var_1] - add al, 4 - mov [bp+var_1], al - jmp loc_12F89 -; --------------------------------------------------------------------------- - -loc_12F07: - cmp [bp+var_1], 2 - ja short loc_12F25 - cmp [bp+var_1], 2 - jnz short loc_12F1A - sub word ptr [si+2], 80h - jmp short loc_12F1F -; --------------------------------------------------------------------------- - -loc_12F1A: - add word ptr [si+2], 80h - -loc_12F1F: - mov byte ptr [si+10h], 7 - jmp short loc_12F7D -; --------------------------------------------------------------------------- - -loc_12F25: - mov al, [bp+var_1] - mov ah, 0 - sub ax, 3 - mov bx, ax - cmp bx, 3 - ja short loc_12F75 - add bx, bx - jmp word ptr cs:table_12F97[bx] - -loc_12F3B: - sub word ptr [si+2], 180h - mov [si+shot_t.SHOT_type], ST_MISSILE_LEFT - mov word ptr [si+0Ah], 0FFEAh - jmp short loc_12F59 -; --------------------------------------------------------------------------- - -loc_12F4B: - add word ptr [si+2], 180h - mov [si+shot_t.SHOT_type], ST_MISSILE_RIGHT - mov word ptr [si+0Ah], 16h - -loc_12F59: - mov word ptr [si+0Ch], 24h ; '$' - jmp short loc_12F75 -; --------------------------------------------------------------------------- - -loc_12F60: - sub word ptr [si+2], 180h - jmp short loc_12F6C -; --------------------------------------------------------------------------- - -loc_12F67: - add word ptr [si+2], 180h - -loc_12F6C: - mov [si+shot_t.SHOT_type], ST_MISSILE_STRAIGHT - mov word ptr [si+0Ch], 0FFD0h - -loc_12F75: - mov byte ptr [si+0Eh], 16h - mov byte ptr [si+10h], 0Dh - -loc_12F7D: - mov al, [bp+var_1] - add al, 0FFh - mov [bp+var_1], al - or al, al - jbe short loc_12F94 - -loc_12F89: - call shots_add - mov si, ax - or ax, ax - jnz loc_12F07 - -loc_12F94: - pop si - leave - retn -shot_marisa_l3 endp - -; --------------------------------------------------------------------------- -table_12F97 dw loc_12F3B - dw loc_12F4B - dw loc_12F60 - dw loc_12F67 - -; =============== S U B R O U T I N E ======================================= - -; Attributes: bp-based frame - -shot_marisa_l4 proc near - -var_2 = word ptr -2 - - enter 2, 0 - push si - mov byte ptr [bp+var_2+1], 3 - call shot_cycle_init - test al, 9 - jz loc_1308E - test al, 8 - jz loc_13083 - mov al, byte ptr [bp+var_2+1] - add al, 6 - mov byte ptr [bp+var_2+1], al - jmp loc_13083 -; --------------------------------------------------------------------------- - -loc_12FC2: - cmp byte ptr [bp+var_2+1], 3 - ja short loc_12FEB - cmp byte ptr [bp+var_2+1], 3 - jnz short loc_12FD2 - mov byte ptr [bp+var_2], 0B4h - -loc_12FD2: - mov byte ptr [si+10h], 6 - mov al, byte ptr [bp+var_2] - add al, 6 - mov byte ptr [bp+var_2], al - lea ax, [si+0Ah] - push ax - push [bp+var_2] - call shot_velocity_set - jmp loc_13077 -; --------------------------------------------------------------------------- - -loc_12FEB: - mov al, byte ptr [bp+var_2+1] - mov ah, 0 - sub ax, 4 - mov bx, ax - cmp bx, 5 - ja short loc_1306F - add bx, bx - jmp cs:table_13091[bx] - -loc_13001: - sub word ptr [si+2], 180h - mov [si+shot_t.SHOT_type], ST_MISSILE_LEFT - mov word ptr [si+0Ah], 0FFEAh - mov word ptr [si+0Ch], 24h ; '$' - jmp short loc_1306F -; --------------------------------------------------------------------------- - -loc_13016: - add word ptr [si+2], 180h - mov [si+shot_t.SHOT_type], ST_MISSILE_RIGHT - mov word ptr [si+0Ah], 16h - mov word ptr [si+0Ch], 24h ; '$' - jmp short loc_1306F -; --------------------------------------------------------------------------- - -loc_1302B: - sub word ptr [si+2], 180h - mov [si+shot_t.SHOT_type], ST_MISSILE_STRAIGHT - mov word ptr [si+0Ah], 0FFF0h - mov word ptr [si+0Ch], 0FFD0h - jmp short loc_1306F -; --------------------------------------------------------------------------- - -loc_13040: - add word ptr [si+2], 180h - mov [si+shot_t.SHOT_type], ST_MISSILE_STRAIGHT - mov word ptr [si+0Ah], 10h - mov word ptr [si+0Ch], 0FFD0h - jmp short loc_1306F -; --------------------------------------------------------------------------- - -loc_13055: - sub word ptr [si+2], 180h - jmp short loc_13061 -; --------------------------------------------------------------------------- - -loc_1305C: - add word ptr [si+2], 180h - -loc_13061: - mov [si+shot_t.SHOT_type], ST_MISSILE_STRAIGHT - mov word ptr [si+0Ah], 0 - mov word ptr [si+0Ch], 0FFC0h - -loc_1306F: - mov byte ptr [si+0Eh], 16h - mov byte ptr [si+10h], 0Ch - -loc_13077: - mov al, byte ptr [bp+var_2+1] - add al, 0FFh - mov byte ptr [bp+var_2+1], al - or al, al - jbe short loc_1308E - -loc_13083: - call shots_add - mov si, ax - or ax, ax - jnz loc_12FC2 - -loc_1308E: - pop si - leave - retn -shot_marisa_l4 endp - -; --------------------------------------------------------------------------- -table_13091 dw loc_13001 - dw loc_13016 - dw loc_1302B - dw loc_13040 - dw loc_13055 - dw loc_1305C - -; =============== S U B R O U T I N E ======================================= - -; Attributes: bp-based frame - -shot_marisa_l5 proc near - -var_2 = word ptr -2 - - enter 2, 0 - push si - mov byte ptr [bp+var_2+1], 3 - call shot_cycle_init - test al, 9 - jz loc_13195 - test al, 8 - jz loc_1318A - mov al, byte ptr [bp+var_2+1] - add al, 6 - mov byte ptr [bp+var_2+1], al - jmp loc_1318A -; --------------------------------------------------------------------------- - -loc_130C0: - cmp byte ptr [bp+var_2+1], 3 - ja short loc_130E9 - mov byte ptr [si+10h], 6 - cmp byte ptr [bp+var_2+1], 3 - jnz short loc_130D4 - mov byte ptr [bp+var_2], 0B2h - -loc_130D4: - mov al, byte ptr [bp+var_2] - add al, 7 - mov byte ptr [bp+var_2], al - lea ax, [si+0Ah] - push ax - push [bp+var_2] - call shot_velocity_set - jmp loc_1317E -; --------------------------------------------------------------------------- - -loc_130E9: - mov al, byte ptr [bp+var_2+1] - mov ah, 0 - sub ax, 4 - mov bx, ax - cmp bx, 5 - ja short loc_13176 - add bx, bx - jmp cs:table_13199[bx] - -loc_130FF: - sub word ptr [si+2], 180h - mov [si+shot_t.SHOT_type], ST_MISSILE_LEFT - mov word ptr [si+0Ah], 0FFEAh - mov word ptr [si+0Ch], 24h ; '$' - jmp short loc_13176 -; --------------------------------------------------------------------------- - -loc_13114: - add word ptr [si+2], 180h - mov [si+shot_t.SHOT_type], ST_MISSILE_RIGHT - mov word ptr [si+0Ah], 16h - mov word ptr [si+0Ch], 24h ; '$' - jmp short loc_13176 -; --------------------------------------------------------------------------- - -loc_13129: - sub word ptr [si+2], 180h - mov [si+shot_t.SHOT_type], ST_MISSILE_STRAIGHT - mov word ptr [si+0Ah], 0FFF0h - mov word ptr [si+0Ch], 0FFD0h - jmp short loc_13176 -; --------------------------------------------------------------------------- - -loc_1313E: - add word ptr [si+2], 180h - mov [si+shot_t.SHOT_type], ST_MISSILE_STRAIGHT - mov word ptr [si+0Ah], 10h - mov word ptr [si+0Ch], 0FFD0h - jmp short loc_13176 -; --------------------------------------------------------------------------- - -loc_13153: - sub word ptr [si+2], 180h - mov [si+shot_t.SHOT_type], ST_MISSILE_STRAIGHT - mov word ptr [si+0Ah], 8 - jmp short loc_13171 -; --------------------------------------------------------------------------- - -loc_13163: - add word ptr [si+2], 180h - mov [si+shot_t.SHOT_type], ST_MISSILE_STRAIGHT - mov word ptr [si+0Ah], 0FFF8h - -loc_13171: - mov word ptr [si+0Ch], 0FFC0h - -loc_13176: - mov byte ptr [si+0Eh], 16h - mov byte ptr [si+10h], 0Bh - -loc_1317E: - mov al, byte ptr [bp+var_2+1] - add al, 0FFh - mov byte ptr [bp+var_2+1], al - or al, al - jbe short loc_13195 - -loc_1318A: - call shots_add - mov si, ax - or ax, ax - jnz loc_130C0 - -loc_13195: - pop si - leave - retn -shot_marisa_l5 endp - -; --------------------------------------------------------------------------- - db 0 -table_13199 dw loc_130FF - dw loc_13114 - dw loc_13129 - dw loc_1313E - dw loc_13153 - dw loc_13163 - -; =============== S U B R O U T I N E ======================================= - -; Attributes: bp-based frame - -shot_marisa_l6 proc near - -var_1 = byte ptr -1 - - enter 2, 0 - push si - push di - mov [bp+var_1], 4 - call shot_cycle_init - test al, 9 - jz loc_1329E - test al, 8 - jz short loc_131C4 - mov al, [bp+var_1] - add al, 8 - mov [bp+var_1], al - -loc_131C4: - mov di, 0FE80h - jmp loc_13293 -; --------------------------------------------------------------------------- - -loc_131CA: - cmp [bp+var_1], 4 - ja short loc_131E3 - add [si+2], di - mov byte ptr [si+10h], 5 - mov word ptr [si+0Ch], 0FF40h - add di, 100h - jmp loc_13287 -; --------------------------------------------------------------------------- - -loc_131E3: - mov al, [bp+var_1] - mov ah, 0 - sub ax, 5 - mov bx, ax - cmp bx, 7 - ja loc_1327F - add bx, bx - jmp cs:table_132A3[bx] - -loc_131FB: - sub word ptr [si+2], 180h - mov [si+shot_t.SHOT_type], ST_MISSILE_LEFT - mov word ptr [si+0Ah], 0FFEAh - mov word ptr [si+0Ch], 24h ; '$' - jmp short loc_1327F -; --------------------------------------------------------------------------- - -loc_13210: - add word ptr [si+2], 180h - mov [si+shot_t.SHOT_type], ST_MISSILE_RIGHT - mov word ptr [si+0Ah], 16h - mov word ptr [si+0Ch], 24h ; '$' - jmp short loc_1327F -; --------------------------------------------------------------------------- - -loc_13225: - sub word ptr [si+2], 180h - mov [si+shot_t.SHOT_type], ST_MISSILE_STRAIGHT - mov word ptr [si+0Ah], 0FFF0h - jmp short loc_13243 -; --------------------------------------------------------------------------- - -loc_13235: - add word ptr [si+2], 180h - mov [si+shot_t.SHOT_type], ST_MISSILE_STRAIGHT - mov word ptr [si+0Ah], 10h - -loc_13243: - mov word ptr [si+0Ch], 0FFD0h - jmp short loc_1327F -; --------------------------------------------------------------------------- - -loc_1324A: - sub word ptr [si+2], 180h - mov [si+shot_t.SHOT_type], ST_MISSILE_STRAIGHT - mov word ptr [si+0Ch], 0FFB0h - jmp short loc_1327F -; --------------------------------------------------------------------------- - -loc_1325A: - add word ptr [si+2], 180h - mov [si+shot_t.SHOT_type], ST_MISSILE_STRAIGHT - mov word ptr [si+0Ch], 0FFB0h - jmp short loc_1327F -; --------------------------------------------------------------------------- - -loc_1326A: - sub word ptr [si+2], 180h - jmp short loc_13276 -; --------------------------------------------------------------------------- - -loc_13271: - add word ptr [si+2], 180h - -loc_13276: - mov [si+shot_t.SHOT_type], ST_MISSILE_STRAIGHT - mov word ptr [si+0Ch], 0FFE0h - -loc_1327F: - mov byte ptr [si+0Eh], 16h - mov byte ptr [si+10h], 0Bh - -loc_13287: - mov al, [bp+var_1] - add al, 0FFh - mov [bp+var_1], al - or al, al - jbe short loc_1329E - -loc_13293: - call shots_add - mov si, ax - or ax, ax - jnz loc_131CA - -loc_1329E: - pop di - pop si - leave - retn -shot_marisa_l6 endp - -; --------------------------------------------------------------------------- - db 0 -table_132A3 dw loc_131FB - dw loc_13210 - dw loc_13225 - dw loc_13235 - dw loc_1324A - dw loc_1325A - dw loc_1326A - dw loc_13271 - -; =============== S U B R O U T I N E ======================================= - -; Attributes: bp-based frame - -shot_marisa_l7 proc near - -var_1 = byte ptr -1 - - enter 2, 0 - push si - push di - mov [bp+var_1], 4 - call shot_cycle_init - test al, 9 - jz loc_133D8 - test al, 8 - jz short loc_132D2 - mov al, [bp+var_1] - add al, 0Ah - mov [bp+var_1], al - -loc_132D2: - mov di, 0FE80h - jmp loc_133CD -; --------------------------------------------------------------------------- - -loc_132D8: - cmp [bp+var_1], 4 - ja short loc_132F1 - add [si+2], di - mov byte ptr [si+10h], 5 - mov word ptr [si+0Ch], 0FF40h - add di, 100h - jmp loc_133C1 -; --------------------------------------------------------------------------- - -loc_132F1: - mov al, [bp+var_1] - mov ah, 0 - sub ax, 5 - mov bx, ax - cmp bx, 9 - ja loc_133B9 - add bx, bx - jmp cs:table_133DD[bx] - -loc_13309: - sub word ptr [si+2], 180h - mov [si+shot_t.SHOT_type], ST_MISSILE_LEFT - mov word ptr [si+0Ah], 0FFE4h - mov word ptr [si+0Ch], 24h ; '$' - jmp loc_133B9 -; --------------------------------------------------------------------------- - -loc_1331F: - add word ptr [si+2], 180h - mov [si+shot_t.SHOT_type], ST_MISSILE_RIGHT - mov word ptr [si+0Ah], 1Ch - mov word ptr [si+0Ch], 24h ; '$' - jmp loc_133B9 -; --------------------------------------------------------------------------- - -loc_13335: - sub word ptr [si+2], 180h - mov [si+shot_t.SHOT_type], ST_MISSILE_RIGHT - mov word ptr [si+0Ah], 20h ; ' ' - jmp short loc_13353 -; --------------------------------------------------------------------------- - -loc_13345: - add word ptr [si+2], 180h - mov [si+shot_t.SHOT_type], ST_MISSILE_LEFT - mov word ptr [si+0Ah], 0FFE0h - -loc_13353: - mov word ptr [si+0Ch], 20h ; ' ' - jmp short loc_133B9 -; --------------------------------------------------------------------------- - -loc_1335A: - sub word ptr [si+2], 180h - mov [si+shot_t.SHOT_type], ST_MISSILE_STRAIGHT - mov word ptr [si+0Ch], 30h ; '0' - mov word ptr [si+0Ah], 0FFF0h - jmp short loc_133B9 -; --------------------------------------------------------------------------- - -loc_1336F: - add word ptr [si+2], 180h - mov [si+shot_t.SHOT_type], ST_MISSILE_STRAIGHT - mov word ptr [si+0Ch], 30h ; '0' - mov word ptr [si+0Ah], 10h - jmp short loc_133B9 -; --------------------------------------------------------------------------- - -loc_13384: - sub word ptr [si+2], 180h - mov [si+shot_t.SHOT_type], ST_MISSILE_STRAIGHT - mov word ptr [si+0Ch], 0FFB0h - jmp short loc_133B9 -; --------------------------------------------------------------------------- - -loc_13394: - add word ptr [si+2], 180h - mov [si+shot_t.SHOT_type], ST_MISSILE_STRAIGHT - mov word ptr [si+0Ch], 0FFB0h - jmp short loc_133B9 -; --------------------------------------------------------------------------- - -loc_133A4: - sub word ptr [si+2], 180h - jmp short loc_133B0 -; --------------------------------------------------------------------------- - -loc_133AB: - add word ptr [si+2], 180h - -loc_133B0: - mov [si+shot_t.SHOT_type], ST_MISSILE_STRAIGHT - mov word ptr [si+0Ch], 0FFE0h - -loc_133B9: - mov byte ptr [si+0Eh], 16h - mov byte ptr [si+10h], 0Bh - -loc_133C1: - mov al, [bp+var_1] - add al, 0FFh - mov [bp+var_1], al - or al, al - jbe short loc_133D8 - -loc_133CD: - call shots_add - mov si, ax - or ax, ax - jnz loc_132D8 - -loc_133D8: - pop di - pop si - leave - retn -shot_marisa_l7 endp - -; --------------------------------------------------------------------------- - db 0 -table_133DD dw loc_13309 - dw loc_1331F - dw loc_13335 - dw loc_13345 - dw loc_1335A - dw loc_1336F - dw loc_13384 - dw loc_13394 - dw loc_133A4 - dw loc_133AB - -; =============== S U B R O U T I N E ======================================= - -; Attributes: bp-based frame - -shot_marisa_l8 proc near - -var_1 = byte ptr -1 - - enter 2, 0 - push si - push di - mov [bp+var_1], 4 - call shot_cycle_init - test al, 9 - jz loc_13516 - test al, 8 - jz short loc_13410 - mov al, [bp+var_1] - add al, 0Ah - mov [bp+var_1], al - -loc_13410: - mov di, 0FE80h - jmp loc_1350B -; --------------------------------------------------------------------------- - -loc_13416: - cmp [bp+var_1], 4 - ja short loc_1342F - add [si+2], di - mov byte ptr [si+10h], 4 - mov word ptr [si+0Ch], 0FF40h - add di, 100h - jmp loc_134FF -; --------------------------------------------------------------------------- - -loc_1342F: - mov al, [bp+var_1] - mov ah, 0 - sub ax, 5 - mov bx, ax - cmp bx, 9 - ja loc_134F7 - add bx, bx - jmp cs:table_1351B[bx] - -loc_13447: - sub word ptr [si+2], 180h - mov [si+shot_t.SHOT_type], ST_MISSILE_LEFT - mov word ptr [si+0Ah], 0FFE4h - mov word ptr [si+0Ch], 24h ; '$' - jmp loc_134F7 -; --------------------------------------------------------------------------- - -loc_1345D: - add word ptr [si+2], 180h - mov [si+shot_t.SHOT_type], ST_MISSILE_RIGHT - mov word ptr [si+0Ah], 1Ch - mov word ptr [si+0Ch], 24h ; '$' - jmp loc_134F7 -; --------------------------------------------------------------------------- - -loc_13473: - sub word ptr [si+2], 180h - mov [si+shot_t.SHOT_type], ST_MISSILE_RIGHT - mov word ptr [si+0Ah], 20h ; ' ' - jmp short loc_13491 -; --------------------------------------------------------------------------- - -loc_13483: - add word ptr [si+2], 180h - mov [si+shot_t.SHOT_type], ST_MISSILE_LEFT - mov word ptr [si+0Ah], 0FFE0h - -loc_13491: - mov word ptr [si+0Ch], 20h ; ' ' - jmp short loc_134F7 -; --------------------------------------------------------------------------- - -loc_13498: - sub word ptr [si+2], 180h - mov [si+shot_t.SHOT_type], ST_MISSILE_STRAIGHT - mov word ptr [si+0Ch], 30h ; '0' - mov word ptr [si+0Ah], 0FFF0h - jmp short loc_134F7 -; --------------------------------------------------------------------------- - -loc_134AD: - add word ptr [si+2], 180h - mov [si+shot_t.SHOT_type], ST_MISSILE_STRAIGHT - mov word ptr [si+0Ch], 30h ; '0' - mov word ptr [si+0Ah], 10h - jmp short loc_134F7 -; --------------------------------------------------------------------------- - -loc_134C2: - sub word ptr [si+2], 180h - mov [si+shot_t.SHOT_type], ST_MISSILE_STRAIGHT - mov word ptr [si+0Ch], 0FFB0h - jmp short loc_134F7 -; --------------------------------------------------------------------------- - -loc_134D2: - add word ptr [si+2], 180h - mov [si+shot_t.SHOT_type], ST_MISSILE_STRAIGHT - mov word ptr [si+0Ch], 0FFB0h - jmp short loc_134F7 -; --------------------------------------------------------------------------- - -loc_134E2: - sub word ptr [si+2], 180h - jmp short loc_134EE -; --------------------------------------------------------------------------- - -loc_134E9: - add word ptr [si+2], 180h - -loc_134EE: - mov [si+shot_t.SHOT_type], ST_MISSILE_STRAIGHT - mov word ptr [si+0Ch], 0FFE0h - -loc_134F7: - mov byte ptr [si+0Eh], 16h - mov byte ptr [si+10h], 0Ah - -loc_134FF: - mov al, [bp+var_1] - add al, 0FFh - mov [bp+var_1], al - or al, al - jbe short loc_13516 - -loc_1350B: - call shots_add - mov si, ax - or ax, ax - jnz loc_13416 - -loc_13516: - pop di - pop si - leave - retn -shot_marisa_l8 endp - -; --------------------------------------------------------------------------- - db 0 -table_1351B dw loc_13447 - dw loc_1345D - dw loc_13473 - dw loc_13483 - dw loc_13498 - dw loc_134AD - dw loc_134C2 - dw loc_134D2 - dw loc_134E2 - dw loc_134E9 - -; =============== S U B R O U T I N E ======================================= - -; Attributes: bp-based frame - -shot_marisa_l9 proc near - -var_1 = byte ptr -1 - - enter 2, 0 - push si - push di - mov [bp+var_1], 6 - call shot_cycle_init - test al, 9 - jz loc_13697 - test al, 8 - jz short loc_1354E - mov al, [bp+var_1] - add al, 0Ch - mov [bp+var_1], al - -loc_1354E: - mov di, 0FD80h - jmp loc_1368C -; --------------------------------------------------------------------------- - -loc_13554: - cmp [bp+var_1], 6 - ja short loc_1356D - add [si+2], di - mov byte ptr [si+10h], 4 - mov word ptr [si+0Ch], 0FF40h - add di, 100h - jmp loc_13680 -; --------------------------------------------------------------------------- - -loc_1356D: - mov al, [bp+var_1] - mov ah, 0 - sub ax, 7 - mov bx, ax - cmp bx, 0Dh - ja loc_13678 - add bx, bx - jmp cs:table_1369C[bx] - -loc_13585: - sub word ptr [si+2], 180h - mov [si+shot_t.SHOT_type], ST_MISSILE_LEFT - mov word ptr [si+0Ah], 0FFE0h - mov word ptr [si+0Ch], 24h ; '$' - jmp loc_13678 -; --------------------------------------------------------------------------- - -loc_1359B: - add word ptr [si+2], 180h - mov [si+shot_t.SHOT_type], ST_MISSILE_RIGHT - mov word ptr [si+0Ah], 20h ; ' ' - mov word ptr [si+0Ch], 24h ; '$' - jmp loc_13678 -; --------------------------------------------------------------------------- - -loc_135B1: - sub word ptr [si+2], 180h - mov [si+shot_t.SHOT_type], ST_MISSILE_RIGHT - mov word ptr [si+0Ah], 20h ; ' ' - jmp short loc_135CF -; --------------------------------------------------------------------------- - -loc_135C1: - add word ptr [si+2], 180h - mov [si+shot_t.SHOT_type], ST_MISSILE_LEFT - mov word ptr [si+0Ah], 0FFE0h - -loc_135CF: - mov word ptr [si+0Ch], 20h ; ' ' - jmp loc_13678 -; --------------------------------------------------------------------------- - -loc_135D7: - sub word ptr [si+2], 180h - mov [si+shot_t.SHOT_type], ST_MISSILE_STRAIGHT - mov word ptr [si+0Ch], 30h ; '0' - jmp loc_13678 -; --------------------------------------------------------------------------- - -loc_135E8: - add word ptr [si+2], 180h - mov [si+shot_t.SHOT_type], ST_MISSILE_STRAIGHT - mov word ptr [si+0Ch], 30h ; '0' - jmp loc_13678 -; --------------------------------------------------------------------------- - -loc_135F9: - sub word ptr [si+2], 180h - mov [si+shot_t.SHOT_type], ST_MISSILE_STRAIGHT - mov word ptr [si+0Ch], 0 - mov word ptr [si+0Ah], 0FFF0h - jmp short loc_13678 -; --------------------------------------------------------------------------- - -loc_1360E: - add word ptr [si+2], 180h - mov [si+shot_t.SHOT_type], ST_MISSILE_STRAIGHT - mov word ptr [si+0Ch], 0 - mov word ptr [si+0Ah], 10h - jmp short loc_13678 -; --------------------------------------------------------------------------- - -loc_13623: - sub word ptr [si+2], 180h - mov [si+shot_t.SHOT_type], ST_MISSILE_STRAIGHT - mov word ptr [si+0Ch], 0FF80h - jmp short loc_13678 -; --------------------------------------------------------------------------- - -loc_13633: - add word ptr [si+2], 180h - mov [si+shot_t.SHOT_type], ST_MISSILE_STRAIGHT - mov word ptr [si+0Ch], 0FF80h - jmp short loc_13678 -; --------------------------------------------------------------------------- - -loc_13643: - sub word ptr [si+2], 180h - mov [si+shot_t.SHOT_type], ST_MISSILE_STRAIGHT - mov word ptr [si+0Ch], 0FFC0h - jmp short loc_13678 -; --------------------------------------------------------------------------- - -loc_13653: - add word ptr [si+2], 180h - mov [si+shot_t.SHOT_type], ST_MISSILE_STRAIGHT - mov word ptr [si+0Ch], 0FFC0h - jmp short loc_13678 -; --------------------------------------------------------------------------- - -loc_13663: - sub word ptr [si+2], 180h - jmp short loc_1366F -; --------------------------------------------------------------------------- - -loc_1366A: - add word ptr [si+2], 180h - -loc_1366F: - mov [si+shot_t.SHOT_type], ST_MISSILE_STRAIGHT - mov word ptr [si+0Ch], 0FFF0h - -loc_13678: - mov byte ptr [si+0Eh], 16h - mov byte ptr [si+10h], 9 - -loc_13680: - mov al, [bp+var_1] - add al, 0FFh - mov [bp+var_1], al - or al, al - jbe short loc_13697 - -loc_1368C: - call shots_add - mov si, ax - or ax, ax - jnz loc_13554 - -loc_13697: - pop di - pop si - leave - retn -shot_marisa_l9 endp - -; --------------------------------------------------------------------------- - db 0 -table_1369C dw loc_13585 - dw loc_1359B - dw loc_135B1 - dw loc_135C1 - dw loc_135D7 - dw loc_135E8 - dw loc_135F9 - dw loc_1360E - dw loc_13623 - dw loc_13633 - dw loc_13643 - dw loc_13653 - dw loc_13663 - dw loc_1366A - + SHOT_MARISA_L2 procdesc pascal near + SHOT_MARISA_L3 procdesc pascal near + SHOT_MARISA_L4 procdesc pascal near + SHOT_MARISA_L5 procdesc pascal near + SHOT_MARISA_L6 procdesc pascal near + SHOT_MARISA_L7 procdesc pascal near + SHOT_MARISA_L8 procdesc pascal near + SHOT_MARISA_L9 procdesc pascal near SHOT_MIMA_L2 procdesc pascal near SHOT_MIMA_L3 procdesc pascal near SHOT_MIMA_L4 procdesc pascal near