diff --git a/Makefile.mak b/Makefile.mak index 2fd6dee7..ec65568f 100644 --- a/Makefile.mak +++ b/Makefile.mak @@ -74,7 +74,7 @@ $** | bin\th05\main.exe: bin\th05\main.obj th05\main_01.cpp - $(CC) $(CFLAGS) -ml -3 -DGAME=5 -nbin\th05\ -eMAIN.EXE @&&| + $(CC) $(CFLAGS) -ml -3 -Z -DGAME=5 -nbin\th05\ -eMAIN.EXE @&&| $** | diff --git a/th03/formats/cdg.h b/th03/formats/cdg.h new file mode 100644 index 00000000..e89c95df --- /dev/null +++ b/th03/formats/cdg.h @@ -0,0 +1 @@ +void pascal cdg_load_all_noalpha(int slot_first, const char *fn); diff --git a/th04/boss/vars[bss].asm b/th04/boss/vars[bss].asm index 05e5d0ba..16204a02 100644 --- a/th04/boss/vars[bss].asm +++ b/th04/boss/vars[bss].asm @@ -1,7 +1,9 @@ +public _boss public _boss_pos, _boss_hp, _boss_sprite, _boss_phase, _boss_phase_frame public _boss_damage_this_frame, _boss_mode, _boss_angle, _boss_mode_change public _boss_phase_end_hp +label _boss byte _boss_pos motion_t _boss_hp dw ? _boss_sprite db ? diff --git a/th04/midboss/vars[bss].asm b/th04/midboss/vars[bss].asm index 91eb64df..e023bda5 100644 --- a/th04/midboss/vars[bss].asm +++ b/th04/midboss/vars[bss].asm @@ -1,7 +1,9 @@ +public _midboss public _midboss_pos, _midboss_frames_until, _midboss_hp, _midboss_sprite public _midboss_phase, _midboss_phase_frame, _midboss_damage_this_frame public _midboss_angle +label _midboss byte _midboss_pos motion_t _midboss_frames_until dw ? _midboss_hp dw ? diff --git a/th04/shared.hpp b/th04/shared.hpp index 2794f58e..e2906f42 100644 --- a/th04/shared.hpp +++ b/th04/shared.hpp @@ -42,6 +42,86 @@ typedef struct { } motion_t; /// ---- +/// Rank +/// ---- +int pascal far select_for_rank( + int for_easy, int for_normal, + int for_hard, int for_lunatic +); +/// ---- + +/// Formats - .BB +/// ------------- +void pascal near bb_stage_load(const char far* fn); +/// ------------- + +/// Formats - .CDG/.CD2 +/// ------------------- +#include "th03/formats/cdg.h" +/// ------------------- + +/// Stages +/// ------ +extern nearfunc_t_near stage_invalidate; +extern nearfunc_t_near stage_render; +/// ------ + +/// Midbosses +/// --------- +typedef struct { + motion_t pos; + unsigned int frames_until; + int hp; + unsigned char sprite; + unsigned char phase; + int phase_frame; + // Treated as a bool in TH04 + unsigned char damage_this_frame; + unsigned char angle; +} midboss_stuff_t; + +extern midboss_stuff_t midboss; + +// Callbacks +extern farfunc_t_near midboss_update_func; +extern nearfunc_t_near midboss_render_func; + +#define MIDBOSS_DEC(stage) \ + void pascal far midboss##stage##_update(void); \ + void pascal near midboss##stage##_render(void); +/// --------- + +// Bosses +// ------ +typedef struct { + motion_t pos; + int hp; + unsigned char sprite; + unsigned char phase; + int phase_frame; + unsigned char damage_this_frame; + unsigned char mode; + // Used for both movement and bullet angles. + unsigned char angle; + unsigned char mode_change; + int phase_end_hp; +} boss_stuff_t; + +extern boss_stuff_t boss; +extern SPPoint boss_hitbox_radius; + +// Callbacks +extern farfunc_t_near boss_update_func; +extern nearfunc_t_near boss_backdrop_colorfill; +extern nearfunc_t_near boss_bg_render_func; +extern nearfunc_t_near boss_fg_render_func; + +#define BOSS_DEC(name) \ + void pascal far name##_update(void); \ + void pascal near name##_bg_render(void); \ + void pascal near name##_fg_render(void); +// ------ + /// Score /// ----- extern unsigned long score_delta; diff --git a/th05/boss/vars2[bss].asm b/th05/boss/vars2[bss].asm index 54bdfb4b..cc536165 100644 --- a/th05/boss/vars2[bss].asm +++ b/th05/boss/vars2[bss].asm @@ -2,6 +2,7 @@ ; of the Stage 4 boss fight, for Shinki's leave animation at the beginning of ; the Stage 5 boss fight, and, weirdly enough, for the knife launch position ; in Phase 8 of the same fight. +public _boss2, _yuki public _boss2_pos, _boss2_hp, _boss2_sprite, _boss2_phase, _boss2_phase_frame public _yuki_pos, _yuki_hp, _yuki_sprite, _yuki_phase, _yuki_phase_frame public _boss2_damage_this_frame, _boss2_mode, _boss2_angle, _boss2_mode_change @@ -9,6 +10,9 @@ public _yuki_damage_this_frame, _yuki_mode, _yuki_angle, _yuki_mode_change public _boss2_phase_end_hp public _yuki_phase_end_hp +label _boss2 byte +label _yuki byte + label _yuki_pos motion_t _boss2_pos motion_t diff --git a/th05/main_01.cpp b/th05/main_01.cpp index eed86542..09c3b49e 100644 --- a/th05/main_01.cpp +++ b/th05/main_01.cpp @@ -6,6 +6,22 @@ extern "C" { #include "th05/th05.hpp" +void pascal far nullsub_1(void); +void pascal near nullfunc_near(void); + +void pascal near playfield_fillm_32_0_320_192(void); +void pascal near playfield_fillm_0_0_384_192__2(void); +void pascal near playfield_fillm_0_205_384_163(void); +void pascal near playfield_fillm_64_56_256_256(void); +void pascal near playfield_fillm_0_0_384_192__1(void); +void pascal near playfield_fillm_0_104_384_192(void); + +char boss_phase_timed_out = 0; + +void pascal near boss_reset(void); + +#include "th05/stage/setup.cpp" + // Adds the entire score delta at once to the current score. void pascal score_delta_commit(void) { diff --git a/th05/stage/setup.cpp b/th05/stage/setup.cpp new file mode 100644 index 00000000..5e7bf6ee --- /dev/null +++ b/th05/stage/setup.cpp @@ -0,0 +1,201 @@ +/* ReC98 + * ----- + * TH05 stage initialization + */ + +void pascal near stage1_setup(void) +{ + midboss_update_func = midboss1_update; + midboss_render_func = midboss1_render; + midboss.frames_until = 2500; + midboss.pos. cur.set(192, 96); + midboss.pos.prev.set(192, 96); + midboss.pos.velocity.set(0, 0); + midboss.hp = 1000; + midboss.sprite = 200; + + boss_reset(); + boss.pos.init(192, 64); + boss_bg_render_func = sara_bg_render; + boss_update_func = sara_update; + boss_fg_render_func = sara_fg_render; + boss.sprite = 180; + boss_hitbox_radius.set(24, 24); + boss_sprite_left = 186; + boss_sprite_right = 184; + boss_sprite_stay = 180; + boss_backdrop_colorfill = playfield_fillm_32_0_320_192; + + super_entry_bfnt("st00.bmt"); + cdg_load_all_noalpha(16, "st00bk.cdg"); + bb_stage_load("st00.bb"); + + stage_render = nullfunc_near; + stage_invalidate = nullfunc_near; +} + +void pascal near stage2_setup(void) +{ + midboss_update_func = midboss2_update; + midboss_render_func = midboss2_render; + midboss.frames_until = 2750; + midboss.pos.init(192, -32); + midboss.pos.velocity.set(0, 0.5f); + midboss.hp = 1400; + midboss.sprite = 202; + + boss_reset(); + boss.pos.init(192, 64); + boss_bg_render_func = louise_bg_render; + boss_update_func = louise_update; + boss_fg_render_func = louise_fg_render; + boss.sprite = 180; + boss_hitbox_radius.set(24, 24); + boss_backdrop_colorfill = playfield_fillm_0_0_384_192__1; + + super_entry_bfnt("st01.bmt"); + cdg_load_all_noalpha(16, "st01bk.cdg"); + bb_stage_load("st01.bb"); + + stage_render = stage2_update; + stage_invalidate = stage2_invalidate; +} + +void pascal near stage3_setup(void) +{ + midboss_update_func = midboss3_update; + midboss_render_func = midboss3_render; + midboss.frames_until = 5750; + midboss.pos.init(192, -32); + midboss.pos.velocity.set(0, 0.5f); + midboss.hp = 1400; + midboss.sprite = 208; + + boss_reset(); + boss.pos.init(192, 64); + boss_bg_render_func = alice_bg_render; + boss_update_func = alice_update; + boss_fg_render_func = alice_fg_render; + boss.sprite = 180; + boss_hitbox_radius.set(24, 24); + boss_backdrop_colorfill = playfield_fillm_0_205_384_163; + boss_sprite_left = 188; + boss_sprite_right = 186; + boss_sprite_stay = 180; + + super_entry_bfnt("st02.bmt"); + cdg_load_all_noalpha(16, "st02bk.cdg"); + bb_stage_load("st02.bb"); + + stage_render = nullfunc_near; + stage_invalidate = nullfunc_near; +} + +void pascal near stage4_setup(void) +{ + midboss_update_func = midboss4_update; + midboss_render_func = midboss4_render; + midboss.frames_until = 3900; + midboss.pos.init(192, -32); + midboss.pos.velocity.set(0, 0.5f); + midboss.hp = 1100; + midboss.sprite = 208; + + boss_reset(); + boss.pos.init( 96, 64); + yuki.pos.init(288, 64); + boss_bg_render_func = mai_yuki_bg_render; + boss_update_func = mai_yuki_update; + boss_fg_render_func = mai_yuki_fg_render; + boss.sprite = 180; + yuki.sprite = 180; + boss_hitbox_radius.set(24, 24); + boss_backdrop_colorfill = playfield_fillm_64_56_256_256; + + super_entry_bfnt("st03.bmt"); + cdg_load_all_noalpha(16, "st03bk.cdg"); + bb_stage_load("st03.bb"); + + stage_render = nullfunc_near; + stage_invalidate = nullfunc_near; +} + +void pascal near stage5_setup(void) +{ + midboss_update_func = midboss5_update; + midboss_render_func = midboss5_render; + midboss.frames_until = 4800; + midboss.pos.init(192, -32); + midboss.pos.velocity.set(0, 0.5f); + midboss.hp = 1550; + midboss.sprite = 212; + + boss_reset(); + boss.pos.init(96, 64); + boss2.pos.init(192, 64); + boss_bg_render_func = yumeko_bg_render; + boss_update_func = yumeko_update; + boss_fg_render_func = yumeko_fg_render; + boss.sprite = 180; + boss_hitbox_radius.set(24, 24); + boss_backdrop_colorfill = playfield_fillm_0_0_384_192__2; + + super_entry_bfnt("st04.bmt"); + cdg_load_all_noalpha(16, "st04bk.cdg"); + bb_stage_load("st04.bb"); + + yumeko_interval_phase4 = select_for_rank(20, 10, 6, 6); + yumeko_interval_phase7 = select_for_rank(48, 32, 24, 24); + + stage_render = nullfunc_near; + stage_invalidate = nullfunc_near; +} + +void pascal near stage6_setup(void) +{ + midboss_update_func = nullsub_1; + midboss_render_func = nullfunc_near; + midboss.frames_until = 30000; + + boss_reset(); + boss.pos.init(192, 64); + boss_bg_render_func = shinki_bg_render; + boss_update_func = shinki_update; + boss_fg_render_func = shinki_fg_render; + boss.sprite = 180; + boss_hitbox_radius.set(24, 24); + boss_backdrop_colorfill = playfield_fillm_0_104_384_192; + + cdg_load_all_noalpha(16, "st05bk.cdg"); + cdg_load_all_noalpha(17, "st05bk2.cdg"); + bb_stage_load("st05.bb"); + + stage_render = nullfunc_near; + stage_invalidate = nullfunc_near; +} + +void pascal near stagex_setup(void) +{ + midboss_update_func = midbossx_update; + midboss_render_func = midbossx_render; + midboss.frames_until = 5800; + midboss.pos.init(192, -16); + midboss.angle = 64; + midboss.hp = 3000; + midboss.sprite = 220; + + boss_reset(); + boss.pos.init(192, 64); + boss_bg_render_func = exalice_bg_render; + boss_update_func = exalice_update; + boss_fg_render_func = exalice_fg_render; + boss.sprite = 180; + boss_hitbox_radius.set(24, 24); + boss_backdrop_colorfill = playfield_fillm_0_104_384_192; + + super_entry_bfnt("st06.bmt"); + bb_stage_load("st03.bb"); + + stage_render = nullfunc_near; + stage_invalidate = nullfunc_near; +} diff --git a/th05/th05.hpp b/th05/th05.hpp index ff8c1cbc..0688cd77 100644 --- a/th05/th05.hpp +++ b/th05/th05.hpp @@ -5,4 +5,44 @@ #include "ReC98.h" #include "th04/shared.hpp" + +/// Stages +/// ------ +void pascal near stage2_update(void); +void pascal near stage2_invalidate(void); +/// ------ + +/// Midbosses +/// --------- +MIDBOSS_DEC(1); +MIDBOSS_DEC(2); +MIDBOSS_DEC(3); +MIDBOSS_DEC(4); +MIDBOSS_DEC(5); +MIDBOSS_DEC(x); +/// --------- + +/// Bosses +/// ------ +extern unsigned int boss_sprite_left; +extern unsigned int boss_sprite_right; +extern unsigned int boss_sprite_stay; + +extern boss_stuff_t boss2; + +BOSS_DEC(sara); +BOSS_DEC(louise); +BOSS_DEC(alice); + +BOSS_DEC(mai_yuki); +// Pointing to the same address as `boss2`! Might not be possible anymore once +// that variable has to be moved to a C++ translation unit... +extern boss_stuff_t yuki; + +BOSS_DEC(yumeko); +extern unsigned char yumeko_interval_phase4; +extern unsigned char yumeko_interval_phase7; + +BOSS_DEC(shinki); +BOSS_DEC(exalice); /// ------ diff --git a/th05_main.asm b/th05_main.asm index 703a95f0..4cdc313f 100644 --- a/th05_main.asm +++ b/th05_main.asm @@ -17887,304 +17887,13 @@ boss_reset proc near boss_reset endp include th04/formats/bb_stage.asm - -; =============== S U B R O U T I N E ======================================= - -; Attributes: bp-based frame -stage1_setup proc near - push bp - mov bp, sp - setfarfp _midboss_update_func, midboss1_update - mov _midboss_render_func, offset midboss1_render - mov _midboss_frames_until, 2500 - mov _midboss_pos.cur.x, (192 shl 4) - mov _midboss_pos.cur.y, (96 shl 4) - mov _midboss_pos.prev.x, (192 shl 4) - mov _midboss_pos.prev.y, (96 shl 4) - mov _midboss_pos.velocity.x, 0 - mov _midboss_pos.velocity.y, 0 - mov _midboss_hp, 1000 - mov _midboss_sprite, 200 - call boss_reset - mov _boss_pos.cur.x, (192 shl 4) - mov _boss_pos.prev.x, (192 shl 4) - mov _boss_pos.cur.y, (64 shl 4) - mov _boss_pos.prev.y, (64 shl 4) - mov _boss_bg_render_func, offset sara_bg_render - setfarfp _boss_update_func, sara_update - mov _boss_fg_render_func, offset sara_fg_render - mov _boss_sprite, 180 - mov _boss_hitbox_radius.x, (24 shl 4) - mov _boss_hitbox_radius.y, (24 shl 4) - mov _boss_sprite_left, 186 - mov _boss_sprite_right, 184 - mov _boss_sprite_stay, 180 - mov _boss_backdrop_colorfill, offset playfield_fillm_32_0_320_192 - push ds - push offset aSt00_bmt ; "st00.bmt" - call super_entry_bfnt - call cdg_load_all_noalpha pascal, 16, ds, offset aSt00bk_cdg - call bb_stage_load pascal, ds, offset aSt00_bb - mov _stage_render, offset nullfunc_near - mov _stage_invalidate, offset nullfunc_near - pop bp - retn -stage1_setup endp - - -; =============== S U B R O U T I N E ======================================= - -; Attributes: bp-based frame -stage2_setup proc near - push bp - mov bp, sp - setfarfp _midboss_update_func, midboss2_update - mov _midboss_render_func, offset midboss2_render - mov _midboss_frames_until, 2750 - mov _midboss_pos.cur.x, (192 shl 4) - mov _midboss_pos.prev.x, (192 shl 4) - mov _midboss_pos.cur.y, (-32 shl 4) - mov _midboss_pos.prev.y, (-32 shl 4) - mov _midboss_pos.velocity.x, 0 - mov _midboss_pos.velocity.y, 8 - mov _midboss_hp, 1400 - mov _midboss_sprite, 202 - call boss_reset - mov _boss_pos.cur.x, (192 shl 4) - mov _boss_pos.prev.x, (192 shl 4) - mov _boss_pos.cur.y, (64 shl 4) - mov _boss_pos.prev.y, (64 shl 4) - mov _boss_bg_render_func, offset louise_bg_render - setfarfp _boss_update_func, louise_update - mov _boss_fg_render_func, offset louise_fg_render - mov _boss_sprite, 180 - mov _boss_hitbox_radius.x, (24 shl 4) - mov _boss_hitbox_radius.y, (24 shl 4) - mov _boss_backdrop_colorfill, offset playfield_fillm_0_0_384_192__1 - push ds - push offset aSt01_bmt ; "st01.bmt" - call super_entry_bfnt - call cdg_load_all_noalpha pascal, 16, ds, offset aSt01bk_cdg - call bb_stage_load pascal, ds, offset aSt01_bb - mov _stage_render, offset stage2_update - mov _stage_invalidate, offset stage2_invalidate - pop bp - retn -stage2_setup endp - - -; =============== S U B R O U T I N E ======================================= - -; Attributes: bp-based frame -stage3_setup proc near - push bp - mov bp, sp - setfarfp _midboss_update_func, midboss3_update - mov _midboss_render_func, offset midboss3_render - mov _midboss_frames_until, 5750 - mov _midboss_pos.cur.x, (192 shl 4) - mov _midboss_pos.prev.x, (192 shl 4) - mov _midboss_pos.cur.y, (-32 shl 4) - mov _midboss_pos.prev.y, (-32 shl 4) - mov _midboss_pos.velocity.x, 0 - mov _midboss_pos.velocity.y, 8 - mov _midboss_hp, 1400 - mov _midboss_sprite, 208 - call boss_reset - mov _boss_pos.cur.x, (192 shl 4) - mov _boss_pos.prev.x, (192 shl 4) - mov _boss_pos.cur.y, (64 shl 4) - mov _boss_pos.prev.y, (64 shl 4) - mov _boss_bg_render_func, offset alice_bg_render - setfarfp _boss_update_func, alice_update - mov _boss_fg_render_func, offset alice_fg_render - mov _boss_sprite, 180 - mov _boss_hitbox_radius.x, (24 shl 4) - mov _boss_hitbox_radius.y, (24 shl 4) - mov _boss_backdrop_colorfill, offset playfield_fillm_0_205_384_163 - mov _boss_sprite_left, 188 - mov _boss_sprite_right, 186 - mov _boss_sprite_stay, 180 - push ds - push offset aSt02_bmt ; "st02.bmt" - call super_entry_bfnt - call cdg_load_all_noalpha pascal, 16, ds, offset aSt02bk_cdg - call bb_stage_load pascal, ds, offset aSt02_bb - mov _stage_render, offset nullfunc_near - mov _stage_invalidate, offset nullfunc_near - pop bp - retn -stage3_setup endp - - -; =============== S U B R O U T I N E ======================================= - -; Attributes: bp-based frame -stage4_setup proc near - push bp - mov bp, sp - setfarfp _midboss_update_func, midboss4_update - mov _midboss_render_func, offset midboss4_render - mov _midboss_frames_until, 3900 - mov _midboss_pos.cur.x, (192 shl 4) - mov _midboss_pos.prev.x, (192 shl 4) - mov _midboss_pos.cur.y, (-32 shl 4) - mov _midboss_pos.prev.y, (-32 shl 4) - mov _midboss_pos.velocity.x, 0 - mov _midboss_pos.velocity.y, 8 - mov _midboss_hp, 1100 - mov _midboss_sprite, 208 - call boss_reset - mov _boss_pos.cur.x, (96 shl 4) - mov _boss_pos.prev.x, (96 shl 4) - mov _boss_pos.cur.y, (64 shl 4) - mov _boss_pos.prev.y, (64 shl 4) - mov _yuki_pos.cur.x, (288 shl 4) - mov _yuki_pos.prev.x, (288 shl 4) - mov _yuki_pos.cur.y, (64 shl 4) - mov _yuki_pos.prev.y, (64 shl 4) - mov _boss_bg_render_func, offset mai_yuki_bg_render - setfarfp _boss_update_func, mai_yuki_update - mov _boss_fg_render_func, offset mai_yuki_fg_render - mov _boss_sprite, 180 - mov _yuki_sprite, 180 - mov _boss_hitbox_radius.x, (24 shl 4) - mov _boss_hitbox_radius.y, (24 shl 4) - mov _boss_backdrop_colorfill, offset playfield_fillm_64_56_256_256 - push ds - push offset aSt03_bmt ; "st03.bmt" - call super_entry_bfnt - call cdg_load_all_noalpha pascal, 16, ds, offset aSt03bk_cdg - call bb_stage_load pascal, ds, offset aSt03_bb - mov _stage_render, offset nullfunc_near - mov _stage_invalidate, offset nullfunc_near - pop bp - retn -stage4_setup endp - - -; =============== S U B R O U T I N E ======================================= - -; Attributes: bp-based frame -stage5_setup proc near - push bp - mov bp, sp - setfarfp _midboss_update_func, midboss5_update - mov _midboss_render_func, offset midboss5_render - mov _midboss_frames_until, 4800 - mov _midboss_pos.cur.x, (192 shl 4) - mov _midboss_pos.prev.x, (192 shl 4) - mov _midboss_pos.cur.y, (-32 shl 4) - mov _midboss_pos.prev.y, (-32 shl 4) - mov _midboss_pos.velocity.x, 0 - mov _midboss_pos.velocity.y, 8 - mov _midboss_hp, 1550 - mov _midboss_sprite, 212 - call boss_reset - mov _boss_pos.cur.x, (96 shl 4) - mov _boss_pos.prev.x, (96 shl 4) - mov _boss_pos.cur.y, (64 shl 4) - mov _boss_pos.prev.y, (64 shl 4) - mov _boss2_pos.cur.x, (192 shl 4) - mov _boss2_pos.prev.x, (192 shl 4) - mov _boss2_pos.cur.y, (64 shl 4) - mov _boss2_pos.prev.y, (64 shl 4) - mov _boss_bg_render_func, offset yumeko_bg_render - setfarfp _boss_update_func, yumeko_update - mov _boss_fg_render_func, offset yumeko_fg_render - mov _boss_sprite, 180 - mov _boss_hitbox_radius.x, (24 shl 4) - mov _boss_hitbox_radius.y, (24 shl 4) - mov _boss_backdrop_colorfill, offset playfield_fillm_0_0_384_192__2 - push ds - push offset aSt04_bmt ; "st04.bmt" - call super_entry_bfnt - call cdg_load_all_noalpha pascal, 16, ds, offset aSt04bk_cdg - call bb_stage_load pascal, ds, offset aSt04_bb - push (20 shl 16) or 10 - push ( 6 shl 16) or 6 - nopcall select_for_rank - mov _yumeko_interval_phase4, al - push (48 shl 16) or 32 - push (24 shl 16) or 24 - nopcall select_for_rank - mov _yumeko_interval_phase7, al - mov _stage_render, offset nullfunc_near - mov _stage_invalidate, offset nullfunc_near - pop bp - retn -stage5_setup endp - - -; =============== S U B R O U T I N E ======================================= - -; Attributes: bp-based frame -stage6_setup proc near - push bp - mov bp, sp - setfarfp _midboss_update_func, nullsub_1 - mov _midboss_render_func, offset nullfunc_near - mov _midboss_frames_until, 30000 - call boss_reset - mov _boss_pos.cur.x, (192 shl 4) - mov _boss_pos.prev.x, (192 shl 4) - mov _boss_pos.cur.y, (64 shl 4) - mov _boss_pos.prev.y, (64 shl 4) - mov _boss_bg_render_func, offset shinki_bg_render - setfarfp _boss_update_func, shinki_update - mov _boss_fg_render_func, offset shinki_fg_render - mov _boss_sprite, 180 - mov _boss_hitbox_radius.x, (24 shl 4) - mov _boss_hitbox_radius.y, (24 shl 4) - mov _boss_backdrop_colorfill, offset playfield_fillm_0_104_384_192 - call cdg_load_all_noalpha pascal, 16, ds, offset aSt05bk_cdg - call cdg_load_all_noalpha pascal, 17, ds, offset aSt05bk2_cdg - call bb_stage_load pascal, ds, offset aSt05_bb - mov _stage_render, offset nullfunc_near - mov _stage_invalidate, offset nullfunc_near - pop bp - retn -stage6_setup endp - - -; =============== S U B R O U T I N E ======================================= - -; Attributes: bp-based frame -stagex_setup proc near - push bp - mov bp, sp - setfarfp _midboss_update_func, midbossx_update - mov _midboss_render_func, offset midbossx_render - mov _midboss_frames_until, 5800 - mov _midboss_pos.cur.x, (192 shl 4) - mov _midboss_pos.prev.x, (192 shl 4) - mov _midboss_pos.cur.y, (-16 shl 4) - mov _midboss_pos.prev.y, (-16 shl 4) - mov _midboss_angle, 64 - mov _midboss_hp, 3000 - mov _midboss_sprite, 220 - call boss_reset - mov _boss_pos.cur.x, (192 shl 4) - mov _boss_pos.prev.x, (192 shl 4) - mov _boss_pos.cur.y, (64 shl 4) - mov _boss_pos.prev.y, (64 shl 4) - mov _boss_bg_render_func, offset exalice_bg_render - setfarfp _boss_update_func, exalice_update - mov _boss_fg_render_func, offset exalice_fg_render - mov _boss_sprite, 180 - mov _boss_hitbox_radius.x, (24 shl 4) - mov _boss_hitbox_radius.y, (24 shl 4) - mov _boss_backdrop_colorfill, offset playfield_fillm_0_104_384_192 - push ds - push offset aSt06_bmt ; "st06.bmt" - call super_entry_bfnt - call bb_stage_load pascal, ds, offset aSt03_bb_0 - mov _stage_render, offset nullfunc_near - mov _stage_invalidate, offset nullfunc_near - pop bp - retn -stagex_setup endp - + STAGE1_SETUP procdesc near + STAGE2_SETUP procdesc near + STAGE3_SETUP procdesc near + STAGE4_SETUP procdesc near + STAGE5_SETUP procdesc near + STAGE6_SETUP procdesc near + STAGEX_SETUP procdesc near extern SCORE_DELTA_COMMIT:proc main_01_TEXT ends @@ -38615,28 +38324,7 @@ include th05/hud/gaiji_row[data].asm db 1 db 1 db 1 -include th04/boss/phase_timed_out[data].asm -aSt00_bmt db 'st00.bmt',0 -aSt00bk_cdg db 'st00bk.cdg',0 -aSt00_bb db 'st00.bb',0 -aSt01_bmt db 'st01.bmt',0 -aSt01bk_cdg db 'st01bk.cdg',0 -aSt01_bb db 'st01.bb',0 -aSt02_bmt db 'st02.bmt',0 -aSt02bk_cdg db 'st02bk.cdg',0 -aSt02_bb db 'st02.bb',0 -aSt03_bmt db 'st03.bmt',0 -aSt03bk_cdg db 'st03bk.cdg',0 -aSt03_bb db 'st03.bb',0 -aSt04_bmt db 'st04.bmt',0 -aSt04bk_cdg db 'st04bk.cdg',0 -aSt04_bb db 'st04.bb',0 -aSt05bk_cdg db 'st05bk.cdg',0 -aSt05bk2_cdg db 'st05bk2.cdg',0 -aSt05_bb db 'st05.bb',0 -aSt06_bmt db 'st06.bmt',0 -aSt03_bb_0 db 'st03.bb',0 - db 0 + extern _boss_phase_timed_out:byte .data?