mirror of https://github.com/nmlgc/ReC98.git
[Maintenance] [th04/th05] Demo Play: Move OP return code into the header
Part of P0258, funded by [Anonymous] and Blue Bolt.
This commit is contained in:
parent
757ee718c4
commit
4c888ee4ad
|
@ -17,7 +17,9 @@
|
|||
|
||||
void near DemoPlay(void)
|
||||
{
|
||||
extern const char DEMO_OP[];
|
||||
#undef BINARY_OP
|
||||
#define BINARY_OP DEMOPLAY_BINARY_OP
|
||||
extern const char BINARY_OP[];
|
||||
|
||||
#if (GAME == 5)
|
||||
size_t shift_offset = (resident->demo_num <= 4) ? DEMO_N : DEMO_N_EXTRA;
|
||||
|
@ -40,16 +42,5 @@ void near DemoPlay(void)
|
|||
return;
|
||||
}
|
||||
}
|
||||
HMem<uint8_t>::free(DemoBuf);
|
||||
palette_black_out((GAME == 5) ? 8 : 10);
|
||||
/* TODO: Replace with the decompiled call
|
||||
* GameExecl(DEMO_OP);
|
||||
* once that function is part of the same segment */
|
||||
_asm {
|
||||
push ds;
|
||||
push offset DEMO_OP;
|
||||
nop;
|
||||
push cs;
|
||||
call near ptr GameExecl;
|
||||
}
|
||||
demo_end();
|
||||
}
|
||||
|
|
|
@ -15,5 +15,20 @@
|
|||
// buffer.
|
||||
extern uint8_t *DemoBuf; /* ZUN symbol [MAGNet2010] */
|
||||
|
||||
#define demo_end() { \
|
||||
HMem<uint8_t>::free(DemoBuf); \
|
||||
palette_black_out((GAME == 5) ? 8 : 10); \
|
||||
/* TODO: Replace with the decompiled call \
|
||||
* GameExecl(BINARY_OP); \
|
||||
* once that function is only called from the same segment */ \
|
||||
_asm { \
|
||||
push ds; \
|
||||
push offset BINARY_OP; \
|
||||
nop; \
|
||||
push cs; \
|
||||
call near ptr GameExecl; \
|
||||
} \
|
||||
}
|
||||
|
||||
// Assigns the next frame out of [DemoBuf] to [key_det] and [shiftkey].
|
||||
void near DemoPlay();
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
public _DEMO_OP
|
||||
_DEMO_OP db 'op',0
|
||||
public _DEMOPLAY_BINARY_OP
|
||||
_DEMOPLAY_BINARY_OP db 'op',0
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
#define BINARY_OP "op"
|
||||
|
||||
#define EYECATCH_FN_FORMAT "eye0.cdg"
|
||||
|
||||
#define FACESET_REIMU_FN "KAO0.cd2"
|
||||
|
|
Loading…
Reference in New Issue