mirror of https://github.com/nmlgc/ReC98.git
[Naming] [th04/th05] Bosses: HP fill and .BB tile animation phase constants
These phases are the same across all bosses. Part of P0189, funded by Arandui and Lmocinemod.
This commit is contained in:
parent
71b6e66fec
commit
992cd74970
|
@ -7,7 +7,7 @@ void near boss_reset(void)
|
|||
#if GAME == 5
|
||||
boss_custombullets_render = nullfunc_near;
|
||||
#endif
|
||||
boss.phase = 0;
|
||||
boss.phase = PHASE_BOSS_HP_FILL;
|
||||
boss.mode = 0;
|
||||
boss.mode_change = 0;
|
||||
boss.phase_frame = 0;
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
// Midboss and boss phases
|
||||
// Common midboss and boss phases
|
||||
static const unsigned char PHASE_BOSS_HP_FILL = 0;
|
||||
static const unsigned char PHASE_BOSS_ENTRANCE_BB = 1;
|
||||
#if (GAME == 5)
|
||||
static const unsigned char PHASE_BOSS_EXPLODE_SMALL = 253;
|
||||
static const unsigned char PHASE_BOSS_EXPLODE_BIG = 254;
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
PHASE_BOSS_HP_FILL = 0
|
||||
PHASE_BOSS_ENTRANCE_BB = 1
|
||||
if (GAME eq 5)
|
||||
PHASE_BOSS_EXPLODE_SMALL = 253
|
||||
PHASE_BOSS_EXPLODE_BIG = 254
|
||||
|
|
|
@ -5054,7 +5054,7 @@ var_2 = word ptr -2
|
|||
; ---------------------------------------------------------------------------
|
||||
|
||||
loc_E8D8:
|
||||
cmp _boss_phase, 1
|
||||
cmp _boss_phase, PHASE_BOSS_ENTRANCE_BB
|
||||
ja short loc_E91D
|
||||
mov ax, _boss_pos.cur.x
|
||||
sar ax, 4
|
||||
|
@ -5426,7 +5426,7 @@ stage5_render proc near
|
|||
|
||||
enter 2, 0
|
||||
push si
|
||||
cmp _boss_phase, 1
|
||||
cmp _boss_phase, PHASE_BOSS_ENTRANCE_BB
|
||||
jb short loc_EC01
|
||||
cmp _boss_phase, PHASE_EXPLODE_BIG
|
||||
jb short loc_EC56
|
||||
|
@ -9184,7 +9184,7 @@ var_2 = word ptr -2
|
|||
add dx, 146
|
||||
mov [bp+var_2], dx
|
||||
call super_put pascal, si, di, dx
|
||||
cmp _boss_phase, 0
|
||||
cmp _boss_phase, PHASE_BOSS_HP_FILL
|
||||
jnz loc_11961
|
||||
cmp _boss_phase_frame, 128
|
||||
jle loc_11961
|
||||
|
@ -9381,7 +9381,7 @@ var_2 = word ptr -2
|
|||
add dx, ax
|
||||
mov [bp+var_2], dx
|
||||
call super_put pascal, si, di, dx
|
||||
cmp _boss_phase, 0
|
||||
cmp _boss_phase, PHASE_BOSS_HP_FILL
|
||||
jnz loc_11A90
|
||||
cmp _boss_phase_frame, 192
|
||||
jl loc_11A90
|
||||
|
@ -10212,7 +10212,7 @@ include th04/main/boss/backdrop.asm
|
|||
@orange_bg_render$qv proc near
|
||||
push bp
|
||||
mov bp, sp
|
||||
cmp _boss_phase, 0
|
||||
cmp _boss_phase, PHASE_BOSS_HP_FILL
|
||||
jnz short loc_12199
|
||||
cmp _boss_phase_frame, 192
|
||||
jge short loc_121E1
|
||||
|
@ -10222,7 +10222,7 @@ include th04/main/boss/backdrop.asm
|
|||
; ---------------------------------------------------------------------------
|
||||
|
||||
loc_12199:
|
||||
cmp _boss_phase, 1
|
||||
cmp _boss_phase, PHASE_BOSS_ENTRANCE_BB
|
||||
jnz short loc_121BF
|
||||
call @boss_backdrop_render$qiic pascal, (32 shl 16) or 136, 1
|
||||
mov ax, _bb_boss_seg
|
||||
|
@ -10270,9 +10270,9 @@ loc_121E6:
|
|||
@kurumi_bg_render$qv proc near
|
||||
push bp
|
||||
mov bp, sp
|
||||
cmp _boss_phase, 0
|
||||
cmp _boss_phase, PHASE_BOSS_HP_FILL
|
||||
jz short loc_1223D
|
||||
cmp _boss_phase, 1
|
||||
cmp _boss_phase, PHASE_BOSS_ENTRANCE_BB
|
||||
jnz short loc_1221B
|
||||
call @boss_backdrop_render$qiic pascal, (32 shl 16) or 96, 0
|
||||
mov ax, _bb_boss_seg
|
||||
|
@ -10340,7 +10340,7 @@ sub_12247 endp
|
|||
@elly_bg_render$qv proc near
|
||||
push bp
|
||||
mov bp, sp
|
||||
cmp _boss_phase, 1
|
||||
cmp _boss_phase, PHASE_BOSS_ENTRANCE_BB
|
||||
ja short loc_12285
|
||||
cmp _boss_phase_frame, 2
|
||||
jle short loc_122CD
|
||||
|
@ -10399,7 +10399,7 @@ loc_122D2:
|
|||
@@entrance_cel = byte ptr -1
|
||||
|
||||
enter 2, 0
|
||||
cmp _boss_phase, 0
|
||||
cmp _boss_phase, PHASE_BOSS_HP_FILL
|
||||
jnz short loc_122EB
|
||||
cmp _boss_phase_frame, 2
|
||||
jg short loc_1235F
|
||||
|
@ -10407,7 +10407,7 @@ loc_122D2:
|
|||
; ---------------------------------------------------------------------------
|
||||
|
||||
loc_122EB:
|
||||
cmp _boss_phase, 1
|
||||
cmp _boss_phase, PHASE_BOSS_ENTRANCE_BB
|
||||
jnz short loc_12338
|
||||
mov ax, _boss_phase_frame
|
||||
mov bx, 8
|
||||
|
@ -10474,7 +10474,7 @@ loc_1235F:
|
|||
@@entrance_cel = byte ptr -1
|
||||
|
||||
enter 2, 0
|
||||
cmp _boss_phase, 0
|
||||
cmp _boss_phase, PHASE_BOSS_HP_FILL
|
||||
jnz short loc_12378
|
||||
cmp _boss_phase_frame, 2
|
||||
jg short loc_123EC
|
||||
|
@ -10482,7 +10482,7 @@ loc_1235F:
|
|||
; ---------------------------------------------------------------------------
|
||||
|
||||
loc_12378:
|
||||
cmp _boss_phase, 1
|
||||
cmp _boss_phase, PHASE_BOSS_ENTRANCE_BB
|
||||
jnz short loc_123C5
|
||||
mov ax, _boss_phase_frame
|
||||
mov bx, 4
|
||||
|
@ -11160,7 +11160,7 @@ table_1289F dw loc_12484
|
|||
push si
|
||||
push di
|
||||
call _grcg_setmode_tdw
|
||||
cmp _boss_phase, 0
|
||||
cmp _boss_phase, PHASE_BOSS_HP_FILL
|
||||
jnz short loc_12921
|
||||
mov ah, GC_RGI
|
||||
call _grcg_setcolor_direct_seg1_raw
|
||||
|
@ -11196,7 +11196,7 @@ loc_12904:
|
|||
; ---------------------------------------------------------------------------
|
||||
|
||||
loc_12921:
|
||||
cmp _boss_phase, 1
|
||||
cmp _boss_phase, PHASE_BOSS_ENTRANCE_BB
|
||||
jnz short loc_12958
|
||||
mov ax, _boss_phase_frame
|
||||
mov bx, 4
|
||||
|
@ -11256,7 +11256,7 @@ public @MUGETSU_GENGETSU_BG_RENDER$QV
|
|||
@@entrance_cel = byte ptr -1
|
||||
|
||||
enter 2, 0
|
||||
cmp _boss_phase, 0
|
||||
cmp _boss_phase, PHASE_BOSS_HP_FILL
|
||||
jnz short loc_12996
|
||||
cmp _boss_phase_frame, 2
|
||||
jg short loc_12A05
|
||||
|
@ -11269,7 +11269,7 @@ loc_12991:
|
|||
; ---------------------------------------------------------------------------
|
||||
|
||||
loc_12996:
|
||||
cmp _boss_phase, 1
|
||||
cmp _boss_phase, PHASE_BOSS_ENTRANCE_BB
|
||||
jnz short loc_129E3
|
||||
mov ax, _boss_phase_frame
|
||||
mov bx, 4
|
||||
|
@ -27824,7 +27824,7 @@ public @boss_reset$qv
|
|||
mov bp, sp
|
||||
setfarfp _boss_update, nullfunc_far
|
||||
mov _boss_fg_render, offset nullfunc_near
|
||||
mov _boss_phase, 0
|
||||
mov _boss_phase, PHASE_BOSS_HP_FILL
|
||||
mov _boss_mode, 0
|
||||
mov _boss_mode_change, 0
|
||||
mov _boss_phase_frame, 0
|
||||
|
|
|
@ -524,9 +524,9 @@ void near shinki_bg_type_d_update(void)
|
|||
|
||||
void pascal near shinki_bg_render(void)
|
||||
{
|
||||
if(boss.phase == 0) {
|
||||
if(boss.phase == PHASE_BOSS_HP_FILL) {
|
||||
boss_backdrop_render(PLAYFIELD_LEFT, SHINKI_STAGE_BACKDROP_TOP, 1);
|
||||
} else if(boss.phase == 1) {
|
||||
} else if(boss.phase == PHASE_BOSS_ENTRANCE_BB) {
|
||||
unsigned char entrance_cel = (boss.phase_frame / 4);
|
||||
if(entrance_cel < TILES_BB_CELS) {
|
||||
boss_backdrop_render(PLAYFIELD_LEFT, SHINKI_STAGE_BACKDROP_TOP, 1);
|
||||
|
@ -657,9 +657,9 @@ void near exalice_hexagrams_update_and_render(void)
|
|||
|
||||
void pascal near exalice_bg_render(void)
|
||||
{
|
||||
if(boss.phase == 0) {
|
||||
if(boss.phase == PHASE_BOSS_HP_FILL) {
|
||||
tiles_render_after_custom_bg(boss.phase_frame);
|
||||
} else if(boss.phase == 1) {
|
||||
} else if(boss.phase == PHASE_BOSS_ENTRANCE_BB) {
|
||||
unsigned char entrance_cel = (boss.phase_frame / 4);
|
||||
boss_bg_fill_col_0();
|
||||
tiles_bb_col = 15;
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
extern "C" {
|
||||
#include "th03/formats/cdg.h"
|
||||
#include "th04/math/motion.hpp"
|
||||
#include "th04/main/phase.hpp"
|
||||
#include "th04/main/playfld.hpp"
|
||||
#include "th04/main/null.hpp"
|
||||
#include "th04/main/score.hpp"
|
||||
|
|
|
@ -1733,7 +1733,7 @@ sub_C52D proc near
|
|||
idiv bx
|
||||
or dx, dx
|
||||
jnz short loc_C565
|
||||
cmp _boss_phase, 0
|
||||
cmp _boss_phase, PHASE_BOSS_HP_FILL
|
||||
jz short loc_C555
|
||||
mov al, _bomb_frame
|
||||
mov ah, 0
|
||||
|
@ -2819,7 +2819,7 @@ public @SARA_BG_RENDER$QV
|
|||
@sara_bg_render$qv proc near
|
||||
push bp
|
||||
mov bp, sp
|
||||
cmp _boss_phase, 0
|
||||
cmp _boss_phase, PHASE_BOSS_HP_FILL
|
||||
jnz short loc_D09F
|
||||
cmp _boss_phase_frame, 2
|
||||
jg short loc_D0EF
|
||||
|
@ -2827,7 +2827,7 @@ public @SARA_BG_RENDER$QV
|
|||
; ---------------------------------------------------------------------------
|
||||
|
||||
loc_D09F:
|
||||
cmp _boss_phase, 1
|
||||
cmp _boss_phase, PHASE_BOSS_ENTRANCE_BB
|
||||
jnz short loc_D0C8
|
||||
call @boss_backdrop_render$qiic pascal, (64 shl 16) or 16, 0
|
||||
mov ax, _bb_boss_seg
|
||||
|
@ -2879,7 +2879,7 @@ public @LOUISE_BG_RENDER$QV
|
|||
push bp
|
||||
mov bp, sp
|
||||
push si
|
||||
cmp _boss_phase, 0
|
||||
cmp _boss_phase, PHASE_BOSS_HP_FILL
|
||||
jnz short loc_D108
|
||||
cmp _boss_phase_frame, 2
|
||||
jg short loc_D17A
|
||||
|
@ -2887,7 +2887,7 @@ public @LOUISE_BG_RENDER$QV
|
|||
; ---------------------------------------------------------------------------
|
||||
|
||||
loc_D108:
|
||||
cmp _boss_phase, 1
|
||||
cmp _boss_phase, PHASE_BOSS_ENTRANCE_BB
|
||||
jnz short loc_D153
|
||||
mov ax, _boss_phase_frame
|
||||
mov bx, 4
|
||||
|
@ -2953,7 +2953,7 @@ public @ALICE_BG_RENDER$QV
|
|||
push bp
|
||||
mov bp, sp
|
||||
push si
|
||||
cmp _boss_phase, 0
|
||||
cmp _boss_phase, PHASE_BOSS_HP_FILL
|
||||
jnz short loc_D194
|
||||
cmp _boss_phase_frame, 2
|
||||
jg short loc_D206
|
||||
|
@ -2961,7 +2961,7 @@ public @ALICE_BG_RENDER$QV
|
|||
; ---------------------------------------------------------------------------
|
||||
|
||||
loc_D194:
|
||||
cmp _boss_phase, 1
|
||||
cmp _boss_phase, PHASE_BOSS_ENTRANCE_BB
|
||||
jnz short loc_D1DF
|
||||
mov ax, _boss_phase_frame
|
||||
mov bx, 4
|
||||
|
@ -3028,7 +3028,7 @@ public @MAI_YUKI_BG_RENDER$QV
|
|||
@@entrance_cel = byte ptr -1
|
||||
|
||||
enter 2, 0
|
||||
cmp _boss_phase, 0
|
||||
cmp _boss_phase, PHASE_BOSS_HP_FILL
|
||||
jnz short loc_D220
|
||||
cmp _boss_phase_frame, 2
|
||||
jg short loc_D299
|
||||
|
@ -3036,7 +3036,7 @@ public @MAI_YUKI_BG_RENDER$QV
|
|||
; ---------------------------------------------------------------------------
|
||||
|
||||
loc_D220:
|
||||
cmp _boss_phase, 1
|
||||
cmp _boss_phase, PHASE_BOSS_ENTRANCE_BB
|
||||
jnz short loc_D272
|
||||
mov ax, _boss_phase_frame
|
||||
mov bx, 4
|
||||
|
@ -3105,9 +3105,9 @@ public @YUMEKO_BG_RENDER$QV
|
|||
@@entrance_cel = byte ptr -1
|
||||
|
||||
enter 2, 0
|
||||
cmp _boss_phase, 0
|
||||
cmp _boss_phase, PHASE_BOSS_HP_FILL
|
||||
jz short loc_D31D
|
||||
cmp _boss_phase, 1
|
||||
cmp _boss_phase, PHASE_BOSS_ENTRANCE_BB
|
||||
jnz short loc_D2FB
|
||||
mov ax, _boss_phase_frame
|
||||
mov bx, 4
|
||||
|
@ -6440,7 +6440,7 @@ var_6 = word ptr -6
|
|||
; ---------------------------------------------------------------------------
|
||||
|
||||
loc_11001:
|
||||
cmp _boss_phase, 0
|
||||
cmp _boss_phase, PHASE_BOSS_HP_FILL
|
||||
jnz short loc_11029
|
||||
mov ax, _boss2_pos.x
|
||||
sar ax, 4
|
||||
|
@ -6798,13 +6798,13 @@ var_2 = word ptr -2
|
|||
enter 4, 0
|
||||
push si
|
||||
push di
|
||||
cmp _boss_phase, 1
|
||||
cmp _boss_phase, PHASE_BOSS_ENTRANCE_BB
|
||||
jbe short loc_113B9
|
||||
cmp _boss_phase, PHASE_BOSS_EXPLODE_BIG
|
||||
jb loc_1162C
|
||||
|
||||
loc_113B9:
|
||||
cmp _boss_phase, 1
|
||||
cmp _boss_phase, PHASE_BOSS_ENTRANCE_BB
|
||||
jnz short loc_113C9
|
||||
cmp _boss_phase_frame, 32
|
||||
jge loc_1162C
|
||||
|
@ -7481,7 +7481,7 @@ loc_12083:
|
|||
loc_12092:
|
||||
cmp _dream, 2
|
||||
jbe short loc_120B1
|
||||
cmp _boss_phase, 0
|
||||
cmp _boss_phase, PHASE_BOSS_HP_FILL
|
||||
jz short loc_120A7
|
||||
cmp _stage_frame_mod2, 0
|
||||
jz short loc_120B6
|
||||
|
@ -15994,7 +15994,7 @@ loc_1AF66:
|
|||
loc_1AF85:
|
||||
call @dialog_animate$qv
|
||||
mov _overlay1, offset @overlay_boss_bgm_update_and_rend$qv
|
||||
mov _boss_phase, 0
|
||||
mov _boss_phase, PHASE_BOSS_HP_FILL
|
||||
mov _boss_phase_frame, 0
|
||||
mov _boss_fg_render, offset sub_10F12
|
||||
mov _boss_hp, 7900
|
||||
|
|
Loading…
Reference in New Issue