mirror of https://github.com/nmlgc/ReC98.git
[Decompilation] [th01] Mima: Broken vertical sprite transition
Also effectively unused. Part of P0165, funded by Ember2528.
This commit is contained in:
parent
0aaa021c95
commit
f2d55e78bf
|
@ -8,6 +8,7 @@ extern "C" {
|
|||
#include "planar.h"
|
||||
#include "th01/v_colors.hpp"
|
||||
#include "th01/math/area.hpp"
|
||||
#include "th01/hardware/egc.h"
|
||||
#include "th01/hardware/palette.h"
|
||||
#include "th01/formats/pf.hpp"
|
||||
#include "th01/formats/ptn.hpp"
|
||||
|
@ -57,6 +58,32 @@ static inline void ent_free(void) {
|
|||
}
|
||||
// --------
|
||||
|
||||
// Only called while Mima isn't visible anyway. But even apart from that, it
|
||||
// barely would have any effect anywhere, as the Mima sprite is blitted to both
|
||||
// VRAM pages. This *might* have been supposed to crossfade between various
|
||||
// cels? …Nah, why would you do that by blitting whole lines.
|
||||
void mima_vertical_sprite_transition_broken(void)
|
||||
{
|
||||
if((boss_phase_frame < 10) || ((boss_phase_frame % 4) != 0)) {
|
||||
return;
|
||||
}
|
||||
pixel_t half_h = ((boss_phase_frame - 10) * 2);
|
||||
if(half_h >= (MIMA_H / 2)) {
|
||||
boss_phase_frame = 0;
|
||||
return;
|
||||
}
|
||||
// And besides, *VRAM width*?! This is completely broken.
|
||||
egc_copy_rect_1_to_0_16(
|
||||
ent_still.cur_left, (ent_still.cur_top + half_h), ent_still.vram_w, 8
|
||||
);
|
||||
egc_copy_rect_1_to_0_16(
|
||||
ent_still.cur_left,
|
||||
(ent_still.cur_top + (MIMA_H - 8) - half_h),
|
||||
ent_still.vram_w,
|
||||
8
|
||||
);
|
||||
}
|
||||
|
||||
void mima_setup(void)
|
||||
{
|
||||
boss_palette_snap();
|
||||
|
|
|
@ -10834,57 +10834,7 @@ loc_1E735:
|
|||
retf
|
||||
sub_1E659 endp
|
||||
|
||||
|
||||
; =============== S U B R O U T I N E =======================================
|
||||
|
||||
; Attributes: bp-based frame
|
||||
|
||||
sub_1E739 proc far
|
||||
push bp
|
||||
mov bp, sp
|
||||
push si
|
||||
cmp _boss_phase_frame, 10
|
||||
jl short loc_1E798
|
||||
mov ax, _boss_phase_frame
|
||||
mov bx, 4
|
||||
cwd
|
||||
idiv bx
|
||||
or dx, dx
|
||||
jnz short loc_1E798
|
||||
mov ax, _boss_phase_frame
|
||||
add ax, -10
|
||||
add ax, ax
|
||||
mov si, ax
|
||||
cmp si, 80
|
||||
jl short loc_1E768
|
||||
mov _boss_phase_frame, 0
|
||||
jmp short loc_1E798
|
||||
; ---------------------------------------------------------------------------
|
||||
|
||||
loc_1E768:
|
||||
push 8
|
||||
push mima_still.BE_vram_w
|
||||
mov ax, mima_still.BE_cur_top
|
||||
add ax, si
|
||||
push ax
|
||||
push mima_still.BE_cur_left
|
||||
call _egc_copy_rect_1_to_0_16
|
||||
push 8
|
||||
push mima_still.BE_vram_w
|
||||
mov ax, mima_still.BE_cur_top
|
||||
add ax, 152
|
||||
sub ax, si
|
||||
push ax
|
||||
push mima_still.BE_cur_left
|
||||
call _egc_copy_rect_1_to_0_16
|
||||
add sp, 10h
|
||||
|
||||
loc_1E798:
|
||||
pop si
|
||||
pop bp
|
||||
retf
|
||||
sub_1E739 endp
|
||||
|
||||
extern @mima_vertical_sprite_transition_$qv:proc
|
||||
extern @mima_setup$qv:proc
|
||||
extern @mima_free$qv:proc
|
||||
extern @mima_select_for_rank$qmiiiii:proc
|
||||
|
@ -11747,7 +11697,7 @@ loc_1EFE5:
|
|||
cmp byte_39E25, 0
|
||||
jnz short loc_1EFF8
|
||||
mov mima_still.BE_hitbox_orb_inactive, 1
|
||||
call sub_1E739
|
||||
call @mima_vertical_sprite_transition_$qv
|
||||
jmp short loc_1F051
|
||||
; ---------------------------------------------------------------------------
|
||||
|
||||
|
|
Loading…
Reference in New Issue