mirror of https://github.com/nmlgc/ReC98.git
[Decompilation] [th01] SinGyoku: Sprite freeing
Part of P0201, funded by Ember2528 and Yanga.
This commit is contained in:
parent
4779a95c95
commit
49248f458c
|
@ -24,6 +24,12 @@ static const int SPHERE_CELS = 8;
|
|||
boss_entities[0] \
|
||||
)
|
||||
|
||||
inline void singyoku_ent_free(void) {
|
||||
bos_entity_free(0);
|
||||
bos_entity_free(1);
|
||||
bos_entity_free(2);
|
||||
}
|
||||
|
||||
// And that's how you avoid the entity position synchronization code that
|
||||
// plagues Elis: By simply only using a single set of coordinates.
|
||||
#define ent ent_sphere
|
||||
|
@ -53,6 +59,11 @@ extern bool16 invincible;
|
|||
extern int invincibility_frame;
|
||||
extern bool16 initial_hp_rendered;
|
||||
|
||||
void singyoku_free(void)
|
||||
{
|
||||
singyoku_ent_free();
|
||||
}
|
||||
|
||||
// Rotates the sphere by the given [cel_delta]. [interval] could be used to
|
||||
// restrict this function to certain [boss_phase_frame] intervals, but it's
|
||||
// always either 1 or -1 in the original game.
|
||||
|
|
|
@ -56,6 +56,8 @@ static const pixel_t SINGYOKU_W = 96;
|
|||
// is part of the regular boss defeat translation unit.
|
||||
static const pixel_t SINGYOKU_H = 96;
|
||||
|
||||
void singyoku_free(void);
|
||||
|
||||
// Makai
|
||||
void elis_load(void);
|
||||
void elis_main(void);
|
||||
|
|
|
@ -2022,7 +2022,7 @@ sub_D4DD proc far
|
|||
jmp cs:off_D524[bx]
|
||||
|
||||
loc_D4F3:
|
||||
call _singyoku_free
|
||||
call @singyoku_free$qv
|
||||
pop bp
|
||||
retf
|
||||
; ---------------------------------------------------------------------------
|
||||
|
@ -13441,22 +13441,7 @@ sub_22731 proc far
|
|||
retf
|
||||
sub_22731 endp
|
||||
|
||||
|
||||
; =============== S U B R O U T I N E =======================================
|
||||
|
||||
; Attributes: bp-based frame
|
||||
public _singyoku_free
|
||||
_singyoku_free proc far
|
||||
push bp
|
||||
mov bp, sp
|
||||
call @bos_entity_free$qi stdcall, 0
|
||||
call @bos_entity_free$qi stdcall, 1
|
||||
call @bos_entity_free$qi stdcall, 2
|
||||
add sp, 6
|
||||
pop bp
|
||||
retf
|
||||
_singyoku_free endp
|
||||
|
||||
extern @singyoku_free$qv:proc
|
||||
extern @sphere_rotate_and_render$qii:proc
|
||||
extern @singyoku_select_for_rank$qmiiiii:proc
|
||||
main_33_TEXT ends
|
||||
|
|
Loading…
Reference in New Issue