Skip to content

Commit

Permalink
[Translation unit catch-up] [th03/th04/th05] snd_delay_until_measure(…
Browse files Browse the repository at this point in the history
…), game_exit_to_dos()

Segment alignment issues once again… but that completes the SHARED
segments of all TH03 and TH05 binaries, for now!

Part of P0139, funded by [Anonymous].
  • Loading branch information
nmlgc committed May 11, 2021
1 parent 78df46a commit 62e0167
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 67 deletions.
8 changes: 4 additions & 4 deletions Makefile.mak
Expand Up @@ -105,7 +105,7 @@ bin\th03\res_yume.com: th03\res_yume.cpp
$**
| masters.lib

bin\th03\op.exe: th03\op_01.cpp bin\th03\op.obj bin\th01\vplanset.obj bin\th02\snd_mode.obj bin\th02\snd_pmdr.obj bin\th02\snd_load.obj bin\th03\exit.obj bin\th03\vector1.obj bin\th03\cdg_put.obj bin\frmdely1.obj bin\th03\input_s.obj bin\th03\pi_put.obj bin\th03\snd_kaja.obj bin\th03\initop.obj bin\th03\cdg_load.obj bin\th03\grppsafx.obj bin\th03\pi_load.obj bin\th03\inp_m_w.obj bin\th03\cdg_p_na.obj bin\hfliplut.obj bin\frmdely2.obj
bin\th03\op.exe: th03\op_01.cpp bin\th03\op.obj bin\exit_dos.obj bin\th01\vplanset.obj bin\th02\snd_mode.obj bin\th02\snd_pmdr.obj bin\th02\snd_load.obj bin\th03\exit.obj bin\th03\vector1.obj bin\th03\cdg_put.obj bin\frmdely1.obj bin\th03\input_s.obj bin\th03\pi_put.obj bin\th03\snd_kaja.obj bin\th03\initop.obj bin\th03\cdg_load.obj bin\th03\grppsafx.obj bin\th03\pi_load.obj bin\th03\inp_m_w.obj bin\th03\cdg_p_na.obj bin\hfliplut.obj bin\frmdely2.obj
$(CC) $(CFLAGS) $(LARGE_LFLAGS) -3 -Z -DGAME=3 -nbin\th03\ -eOP.EXE @&&|
$**
|
Expand Down Expand Up @@ -133,7 +133,7 @@ bin\th04\res_huma.com: th04\res_huma.cpp
$**
| masters.lib

bin\th04\op.exe: bin\th04\op.obj th04\m_char.cpp bin\th01\vplanset.obj bin\frmdely1.obj bin\th03\pi_put.obj bin\th03\pi_load.obj bin\hfliplut.obj bin\th04\input_w.obj bin\th04\vector.obj bin\th04\snd_pmdr.obj bin\th04\snd_mmdr.obj bin\th04\snd_kaja.obj bin\th04\cdg_p_nc.obj bin\th04\snd_mode.obj bin\th04\cdg_put.obj bin\th04\exit.obj bin\th04\initop.obj bin\th04\cdg_p_na.obj bin\th04\input_s.obj bin\th04\snd_se_r.obj bin\th04\snd_se.obj bin\th04\egcrect.obj bin\th04\bgimage.obj bin\th04\bgimager.obj bin\th04\cdg_load.obj th04\frmdely2.c
bin\th04\op.exe: bin\th04\op.obj th04\m_char.cpp bin\th01\vplanset.obj bin\frmdely1.obj bin\th03\pi_put.obj bin\th03\pi_load.obj bin\hfliplut.obj bin\th04\input_w.obj bin\th04\vector.obj bin\th04\snd_pmdr.obj bin\th04\snd_mmdr.obj bin\th04\snd_kaja.obj bin\th04\cdg_p_nc.obj bin\th04\snd_mode.obj bin\th04\snd_dlym.obj bin\exit_dos.obj bin\th04\cdg_put.obj bin\th04\exit.obj bin\th04\initop.obj bin\th04\cdg_p_na.obj bin\th04\input_s.obj bin\th04\snd_se_r.obj bin\th04\snd_se.obj bin\th04\egcrect.obj bin\th04\bgimage.obj bin\th04\bgimager.obj bin\th04\cdg_load.obj th04\frmdely2.c
$(CC) $(CFLAGS) $(LARGE_LFLAGS) -DGAME=4 -DBINARY='O' -3 -Z -d -nbin\th04\ -eOP.EXE @&&|
$**
|
Expand All @@ -143,7 +143,7 @@ bin\th04\main.exe: bin\th04\main.obj bin\th04\scoreupd.obj th04\main011.cpp bin\
$**
|

bin\th04\maine.exe: bin\th04\maine.obj th04\maine011.cpp bin\th01\vplanset.obj bin\frmdely1.obj bin\th03\pi_put.obj bin\th04\cdg_put.obj bin\th04\exit.obj bin\th04\initmain.obj bin\th04\input_s.obj bin\th04\snd_se_r.obj bin\th04\snd_se.obj bin\th04\bgimage.obj bin\th04\bgimager.obj bin\th03\pi_load.obj bin\th03\pi_put_q.obj bin\th04\cdg_load.obj bin\hfliplut.obj bin\th04\input_w.obj bin\th04\vector.obj bin\th04\snd_pmdr.obj bin\th04\snd_mmdr.obj bin\th04\snd_kaja.obj bin\th04\snd_mode.obj
bin\th04\maine.exe: bin\th04\maine.obj th04\maine011.cpp bin\th01\vplanset.obj bin\frmdely1.obj bin\th03\pi_put.obj bin\th04\cdg_put.obj bin\th04\exit.obj bin\th04\initmain.obj bin\th04\input_s.obj bin\th04\snd_se_r.obj bin\th04\snd_se.obj bin\th04\bgimage.obj bin\th04\bgimager.obj bin\th03\pi_load.obj bin\th03\pi_put_q.obj bin\th04\cdg_load.obj bin\hfliplut.obj bin\th04\input_w.obj bin\th04\vector.obj bin\th04\snd_pmdr.obj bin\th04\snd_mmdr.obj bin\th04\snd_kaja.obj bin\th04\snd_mode.obj bin\th04\snd_dlym.obj
$(CC) $(CFLAGS) $(LARGE_LFLAGS) -DGAME=4 -DBINARY='E' -Z -nbin\th04\ -eMAINE.EXE @&&|
$**
|
Expand All @@ -156,7 +156,7 @@ bin\th05\res_kso.com: th05\res_kso.cpp
$**
| masters.lib

bin\th05\op.exe: th05\op010.cpp bin\th05\op.obj th05\op011.cpp th05\m_char.cpp bin\th04\cdg_p_na.obj bin\th04\snd_se_r.obj bin\th04\snd_se.obj bin\th04\bgimage.obj bin\th05\cdg_put.obj bin\th04\exit.obj bin\th05\vector.obj bin\th05\musicp_c.obj bin\th05\musicp_a.obj bin\th05\bgimager.obj bin\th05\snd_load.obj bin\th05\snd_kaja.obj bin\th05\pi_cpp_1.obj bin\th05\pi_asm_1.obj bin\th05\pi_cpp_2.obj bin\th05\pi_asm_2.obj bin\th05\initop.obj bin\th05\input_s.obj bin\th05\inp_h_w.obj bin\th05\snd_dlym.obj th05\cdg_p_nc.cpp bin\th05\frmdelay.obj bin\th04\cdg_load.obj bin\th05\egcrect.obj bin\hfliplut.obj bin\th04\snd_pmdr.obj bin\th04\snd_mmdr.obj bin\th04\snd_mode.obj
bin\th05\op.exe: th05\op010.cpp bin\th05\op.obj th05\op011.cpp th05\m_char.cpp bin\th04\cdg_p_na.obj bin\th04\snd_se_r.obj bin\th04\snd_se.obj bin\th04\bgimage.obj bin\th05\cdg_put.obj bin\th04\exit.obj bin\th05\vector.obj bin\th05\musicp_c.obj bin\th05\musicp_a.obj bin\th05\bgimager.obj bin\th05\snd_load.obj bin\th05\snd_kaja.obj bin\th05\pi_cpp_1.obj bin\th05\pi_asm_1.obj bin\th05\pi_cpp_2.obj bin\th05\pi_asm_2.obj bin\th05\initop.obj bin\th05\input_s.obj bin\th05\inp_h_w.obj bin\th05\snd_dlym.obj th05\cdg_p_nc.cpp bin\th05\frmdelay.obj bin\th04\cdg_load.obj bin\th05\egcrect.obj bin\hfliplut.obj bin\th04\snd_pmdr.obj bin\th04\snd_mmdr.obj bin\th04\snd_mode.obj bin\exit_dos.obj
$(CC) $(CFLAGS) $(LARGE_LFLAGS) -DGAME=5 -DBINARY='O' -3 -Z -nbin\th05\ -eOP.EXE @&&|
$**
|
Expand Down
11 changes: 0 additions & 11 deletions th02/exit_dos.asm

This file was deleted.

5 changes: 5 additions & 0 deletions th02/exit_dos.c
Expand Up @@ -3,6 +3,11 @@
#include "master.hpp"
#include "th02/core/initexit.h"

// TODO: Remove this macro once those functions are part of the actual SHARED
// segment (not SHARED_) in TH04 and TH05, after graph_putsa_fx() has been
// turned into its own translation unit.
#define game_exit() __asm { nop; push cs; call near ptr game_exit; }

void game_exit_to_dos(void)
{
game_exit();
Expand Down
40 changes: 0 additions & 40 deletions th03/snd/delaymea.asm

This file was deleted.

7 changes: 1 addition & 6 deletions th03_op.asm
Expand Up @@ -3603,13 +3603,8 @@ op_01_TEXT ends

; ===========================================================================

; Segment type: Pure code
SHARED segment word public 'CODE' use16
assume cs:SHARED
;org 8
assume es:nothing, ss:nothing, ds:_DATA, fs:nothing, gs:nothing

include th02/exit_dos.asm
extern _game_exit_to_dos:proc
extern _snd_determine_mode:proc
extern _snd_load:proc
extern _game_exit:proc
Expand Down
3 changes: 1 addition & 2 deletions th04_maine.asm
Expand Up @@ -4590,14 +4590,13 @@ SHARED segment word public 'CODE' use16
extern VECTOR1_AT:proc
extern SND_KAJA_INTERRUPT:proc
extern SND_DETERMINE_MODES:proc
extern SND_DELAY_UNTIL_MEASURE:proc
SHARED ends

SHARED_ segment word public 'CODE' use16
assume cs:g_SHARED
assume es:nothing, ss:nothing, ds:_DATA, fs:nothing, gs:nothing

include th03/snd/delaymea.asm
db 0
include th04/formats/cdg_put_plane.asm
include th04/snd/load.asm
include th04/hardware/grppsafx.asm
Expand Down
4 changes: 2 additions & 2 deletions th04_op.asm
Expand Up @@ -2642,14 +2642,14 @@ SHARED segment word public 'CODE' use16
extern SND_KAJA_INTERRUPT:proc
extern CDG_PUT_NOCOLORS_8:proc
extern SND_DETERMINE_MODES:proc
extern SND_DELAY_UNTIL_MEASURE:proc
extern _game_exit_to_dos:proc
SHARED ends

SHARED_ segment word public 'CODE' use16
assume cs:g_SHARED
assume es:nothing, ss:nothing, ds:_DATA, fs:nothing, gs:nothing

include th03/snd/delaymea.asm
include th02/exit_dos.asm
include th04/snd/load.asm
include th04/hardware/grppsafx.asm
extern CDG_PUT_8:proc
Expand Down
3 changes: 1 addition & 2 deletions th05_op.asm
Expand Up @@ -2516,15 +2516,14 @@ op_01_TEXT ends
; Segment type: Pure code
SHARED segment word public 'CODE' use16
extern SND_DETERMINE_MODES:proc
extern _game_exit_to_dos:proc
SHARED ends

SHARED_ segment word public 'CODE' use16
assume cs:g_SHARED
; org 4
assume es:nothing, ss:nothing, ds:_DATA, fs:nothing, gs:nothing

include th02/exit_dos.asm
db 0
include th04/hardware/grppsafx.asm
extern CDG_PUT_NOALPHA_8:proc
extern _snd_se_reset:proc
Expand Down

0 comments on commit 62e0167

Please sign in to comment.