Skip to content

Commit

Permalink
[Decompilation] [th03/th04/th05] Music Room: Move all remaining data …
Browse files Browse the repository at this point in the history
…to C land

Part of P0265, funded by [Anonymous] and iruleatgames.
  • Loading branch information
nmlgc committed Feb 3, 2024
1 parent b7c8f13 commit f30fa98
Show file tree
Hide file tree
Showing 11 changed files with 12 additions and 51 deletions.
2 changes: 1 addition & 1 deletion Makefile.mak
Expand Up @@ -94,7 +94,7 @@ bin\th02\zun_res.com: th02\zun_res1.cpp th02\zun_res2.cpp th02\zun_res3.cpp
$**
| masters.lib

bin\th02\op.exe: th02\op_01.cpp bin\th02\exit_dos.obj bin\th02\zunerror.obj bin\th02\grppsafx.obj bin\th02\op.obj bin\th01\vplanset.obj bin\th02\pi_load.obj bin\th02\grp_rect.obj bin\th02\frmdely2.obj bin\th02\input_s.obj bin\th02\initop.obj bin\th02\exit.obj bin\th02\snd_mmdr.obj bin\th02\snd_mode.obj bin\th02\snd_pmdr.obj bin\th02\snd_load.obj bin\th02\pi_put.obj bin\th02\snd_kaja.obj th02\op_02_3.cpp bin\th02\snd_se_r.obj bin\th02\snd_se.obj bin\th02\frmdely1.obj th02\op_03.cpp bin\th02\globals.obj th02\op_04.cpp th02\op_05.cpp th02\op_music.cpp th02\op_06.cpp
bin\th02\op.exe: th02\op_01.cpp bin\th02\exit_dos.obj bin\th02\zunerror.obj bin\th02\grppsafx.obj bin\th02\op.obj bin\th01\vplanset.obj bin\th02\pi_load.obj bin\th02\grp_rect.obj bin\th02\frmdely2.obj bin\th02\input_s.obj bin\th02\initop.obj bin\th02\exit.obj bin\th02\snd_mmdr.obj bin\th02\snd_mode.obj bin\th02\snd_pmdr.obj bin\th02\snd_load.obj bin\th02\pi_put.obj bin\th02\snd_kaja.obj th02\op_02_3.cpp bin\th02\snd_se_r.obj bin\th02\snd_se.obj bin\th02\frmdely1.obj th02\op_03.cpp bin\th02\globals.obj th02\op_04.cpp th02\op_05.cpp th02\op_music.cpp
$(CC) $(CFLAGS) $(LARGE_LFLAGS) -Z -DGAME=2 -nbin\th02\ -eOP.EXE @&&|
$**
|
Expand Down
19 changes: 11 additions & 8 deletions th02/op/m_music.cpp
Expand Up @@ -175,6 +175,7 @@ page_t music_page;
// The initial comment is displayed immediately, without a fade-in
// animation.
bool cmt_shown_initial;
static int8_t unused_byte; // ZUN bloat
#endif
// ---------------

Expand All @@ -184,26 +185,28 @@ page_t music_page;
// B plane of the background image as loaded from the .PI file, without any
// polygons drawn on top of it.
#if (GAME >= 3)
extern dots8_t __seg* nopoly_B;
dots8_t __seg* nopoly_B;
#else
extern dots8_t* nopoly_B;
dots8_t* nopoly_B;
#endif
extern Planar<dots8_t far *> cmt_bg;

// ZUN bloat: Unused in TH04 and TH05 which use the bgimage system for that,
// but still present in the binary.
Planar<dots8_t far *> cmt_bg;
// -----------

#define cmt music_cmt
struct cmt_line_t {
shiftjis_t c[CMT_LINE_SIZE];
};
extern cmt_line_t cmt[CMT_LINES];
cmt_line_t cmt[CMT_LINES];

#if (GAME == 5)
// TH05 selection state
// --------------------

extern int track_id_at_top;
extern int track_playing;
extern int track_count_cur;
int track_id_at_top;
int track_playing;
int track_count_cur;
// --------------------

void pascal near track_unput_or_put(uint8_t track_sel, bool16 put)
Expand Down
2 changes: 0 additions & 2 deletions th02/op/music.inc

This file was deleted.

4 changes: 0 additions & 4 deletions th02/op/music_cmt[bss].asm

This file was deleted.

11 changes: 0 additions & 11 deletions th02/op_06.cpp

This file was deleted.

5 changes: 0 additions & 5 deletions th03/op/cmt_back[bss].asm

This file was deleted.

3 changes: 0 additions & 3 deletions th03_op.asm
Expand Up @@ -18,7 +18,6 @@

include ReC98.inc
include th03/th03.inc
include th02/op/music.inc
include th03/sprites/regi.inc
include th03/formats/scoredat.inc

Expand Down Expand Up @@ -3140,8 +3139,6 @@ aTlsl_rgb db 'TLSL.RGB',0
extern _pi_buffers:dword
extern _pi_headers:PiHeader

include th03/op/cmt_back[bss].asm
include th02/op/music_cmt[bss].asm
public _hi
_hi scoredat_section_t <?>
word_FC52 dw ?
Expand Down
3 changes: 0 additions & 3 deletions th04/op/music.inc

This file was deleted.

3 changes: 0 additions & 3 deletions th04_op.asm
Expand Up @@ -20,7 +20,6 @@ BINARY = 'O'

include ReC98.inc
include th04/th04.inc
include th04/op/music.inc
include th04/sprites/op_cdg.inc

op_01 group OP_SETUP_TEXT, op_01_TEXT
Expand Down Expand Up @@ -845,8 +844,6 @@ aOp1_pi_1 db 'op1.pi',0
extern _key_det:word

include th04/zunsoft[bss].asm
include th03/op/cmt_back[bss].asm
include th02/op/music_cmt[bss].asm
include th04/formats/scoredat_op[bss].asm
_rank db ?
public _cleared_with, _extra_unlocked
Expand Down
3 changes: 0 additions & 3 deletions th05/op/music.inc

This file was deleted.

8 changes: 0 additions & 8 deletions th05_op.asm
Expand Up @@ -21,8 +21,6 @@ BINARY = 'O'
include ReC98.inc
include th05/th05.inc
include th04/sprites/op_cdg.inc
include th05/op/music.inc
include th05/op/piano.inc

op_01 group OP_SETUP_TEXT, op_01_TEXT, HI_VIEW_TEXT

Expand Down Expand Up @@ -482,12 +480,6 @@ aOp_1 db 'op',0
extern _key_det:word

include th04/zunsoft[bss].asm
include th03/op/cmt_back[bss].asm
include th02/op/music_cmt[bss].asm
public _track_id_at_top, _track_playing, _track_count_cur
_track_id_at_top dw ?
_track_playing dw ?
_track_count_cur dw ?
extern _hi:scoredat_section_t
extern _hi2:scoredat_section_t
extern _rank:byte
Expand Down

0 comments on commit f30fa98

Please sign in to comment.