Skip to content

Commit

Permalink
[Maintenance] Declare game_exit() and game_exit_to_dos() as __cdecl
Browse files Browse the repository at this point in the history
Again, no `pascal` convention unless necessary…

Part of P0114, funded by Lmocinemod.
  • Loading branch information
nmlgc committed Sep 7, 2020
1 parent 716a925 commit f467b68
Show file tree
Hide file tree
Showing 12 changed files with 28 additions and 28 deletions.
6 changes: 3 additions & 3 deletions th02/exit.asm
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
public GAME_EXIT
game_exit proc far
public _game_exit
_game_exit proc far
push bp
mov bp, sp
call pfend
Expand All @@ -26,4 +26,4 @@ if GAME ge 4
endif
pop bp
retf
game_exit endp
_game_exit endp
8 changes: 4 additions & 4 deletions th02/exit_dos.asm
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
public GAME_EXIT_TO_DOS
game_exit_to_dos proc far
public _game_exit_to_dos
_game_exit_to_dos proc far
push bp
mov bp, sp
nopcall game_exit
nopcall _game_exit
call key_beep_on
call text_systemline_show
call text_cursor_show
pop bp
retf
game_exit_to_dos endp
_game_exit_to_dos endp
2 changes: 1 addition & 1 deletion th03/start.asm
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ start_demo proc near
call cfg_save
call gaiji_restore
kajacall KAJA_SONG_STOP
call game_exit
call _game_exit
call _execl c, offset path, ds, offset path, ds, large 0
pop si
pop bp
Expand Down
2 changes: 1 addition & 1 deletion th03_main.asm
Original file line number Diff line number Diff line change
Expand Up @@ -2405,7 +2405,7 @@ _arg0 = dword ptr 6
call sub_EF1C
push 1
call sub_EF1C
call game_exit
call _game_exit
pushd 0
pushd [bp+_arg0] ; arg0
pushd [bp+_arg0] ; path
Expand Down
6 changes: 3 additions & 3 deletions th03_mainl.asm
Original file line number Diff line number Diff line change
Expand Up @@ -913,7 +913,7 @@ loc_9DAD:
call sub_B7D2
call text_clear
call gaiji_restore
call game_exit
call _game_exit
pushd 0
push ds
push offset path ; "op"
Expand Down Expand Up @@ -1051,7 +1051,7 @@ loc_9F58:
loc_9F69:
call text_clear
call gaiji_restore
call game_exit
call _game_exit
pushd 0
push ds
push offset path ; "op"
Expand Down Expand Up @@ -4241,7 +4241,7 @@ loc_B9DD:
loc_BA66:
call text_clear
call gaiji_restore
call game_exit
call _game_exit
pushd 0
push ds
push offset aOp_0 ; "op"
Expand Down
8 changes: 4 additions & 4 deletions th03_op.asm
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ loc_9B4E:
call cfg_save
call gaiji_restore
kajacall KAJA_SONG_STOP
call game_exit
call _game_exit
pushd 0
push ds
push offset path ; "mainl"
Expand Down Expand Up @@ -503,7 +503,7 @@ loc_9D19:
call cfg_save
call gaiji_restore
kajacall KAJA_SONG_STOP
call game_exit
call _game_exit
pushd 0
push ds
push offset path ; "mainl"
Expand Down Expand Up @@ -600,7 +600,7 @@ loc_9EA6:
call gaiji_restore
kajacall KAJA_SONG_STOP
call super_free
call game_exit
call _game_exit
pushd 0
push ds
push offset path ; "mainl"
Expand Down Expand Up @@ -1382,7 +1382,7 @@ loc_A4FE:
call cfg_save_exit
call gaiji_restore
call text_clear
call game_exit_to_dos
call _game_exit_to_dos
call respal_free
pop bp
retf
Expand Down
2 changes: 1 addition & 1 deletion th04_main.asm
Original file line number Diff line number Diff line change
Expand Up @@ -5761,7 +5761,7 @@ loc_E813:
call graph_hide
call text_clear
call gaiji_restore
call game_exit
call _game_exit
pushd 0
pushd [bp+_arg0] ; arg0
pushd [bp+_arg0] ; path
Expand Down
2 changes: 1 addition & 1 deletion th04_maine.asm
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ _arg0 = dword ptr 4
call graph_hide
call text_clear
call gaiji_restore
call game_exit
call _game_exit
pushd 0
pushd [bp+_arg0] ; arg0
pushd [bp+_arg0] ; path
Expand Down
8 changes: 4 additions & 4 deletions th04_op.asm
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ start_game proc near
call cfg_save
call gaiji_restore
kajacall KAJA_SONG_FADE, 10
call game_exit
call _game_exit
les bx, _resident
cmp es:[bx+resident_t.debug_mode], 0
jnz short loc_A957
Expand Down Expand Up @@ -236,7 +236,7 @@ start_extra proc near
call cfg_save
call gaiji_restore
kajacall KAJA_SONG_FADE, 10
call game_exit
call _game_exit
pushd 0
push ds
push offset aMain ; "main"
Expand Down Expand Up @@ -320,7 +320,7 @@ loc_AA6E:
call main_cdg_free
call cfg_save
call gaiji_restore
call game_exit
call _game_exit
pushd 0
push ds
push offset aMain ; "main"
Expand Down Expand Up @@ -1339,7 +1339,7 @@ loc_B47B:
call cfg_save_exit
call gaiji_restore
call text_clear
call game_exit_to_dos
call _game_exit_to_dos
call respal_free
pop si
pop bp
Expand Down
2 changes: 1 addition & 1 deletion th05_main.asm
Original file line number Diff line number Diff line change
Expand Up @@ -6371,7 +6371,7 @@ loc_F71C:
call super_free
call graph_hide
call text_clear
call game_exit
call _game_exit
pushd 0
pushd [bp+_arg0] ; arg0
pushd [bp+_arg0] ; path
Expand Down
2 changes: 1 addition & 1 deletion th05_maine.asm
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ _arg0 = dword ptr 4
call cdg_free_all
call graph_hide
call text_clear
call game_exit
call _game_exit
pushd 0
pushd [bp+_arg0] ; arg0
pushd [bp+_arg0] ; path
Expand Down
8 changes: 4 additions & 4 deletions th05_op.asm
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ loc_A400:
call main_cdg_free
call cfg_save
kajacall KAJA_SONG_FADE, 10
call game_exit
call _game_exit
les bx, _resident
cmp es:[bx+resident_t.debug_mode], 0
jnz short loc_A430
Expand Down Expand Up @@ -290,7 +290,7 @@ loc_A4A0:
call main_cdg_free
call cfg_save
kajacall KAJA_SONG_FADE, 10
call game_exit
call _game_exit
pushd 0
push ds
push offset aMain ; "main"
Expand Down Expand Up @@ -413,7 +413,7 @@ loc_A5BF:
call cfg_save
push 1
call palette_black_out
call game_exit
call _game_exit
pushd 0
push ds
push offset aMain ; "main"
Expand Down Expand Up @@ -1474,7 +1474,7 @@ loc_B058:
call main_cdg_free
call cfg_save_exit
call text_clear
call game_exit_to_dos
call _game_exit_to_dos
call respal_free
pop si
pop bp
Expand Down

0 comments on commit f467b68

Please sign in to comment.