Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Separate translation units] [th02/th03/th05] game_init_op()
Completes P0133, funded by [Anonymous].
- Loading branch information
Showing
10 changed files
with
72 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
#include "th02/core/initop.cpp" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
#pragma option -3 | ||
|
||
extern "C" { | ||
#include <stddef.h> | ||
#include <dos.h> | ||
#include "master.hpp" | ||
#include "th01/hardware/vplanset.h" | ||
#include "th03/core/initexit.h" | ||
|
||
#if (GAME <= 3) | ||
#include "th03/mem.h" | ||
#define mem_assign_paras MEM_ASSIGN_PARAS_OP | ||
#endif | ||
|
||
int game_init_op(const unsigned char *pf_fn) | ||
{ | ||
if(mem_assign_dos(mem_assign_paras)) { | ||
return 1; | ||
} | ||
#if (GAME <= 4) | ||
vram_planes_set(); | ||
#endif | ||
graph_start(); | ||
graph_clear_both(); | ||
#if (GAME >= 4) | ||
pfsetbufsiz(8192); | ||
#endif | ||
vsync_start(); | ||
key_beep_off(); | ||
text_systemline_hide(); | ||
text_cursor_hide(); | ||
egc_start(); | ||
js_start(); | ||
|
||
#if (GAME >= 4) | ||
if(pf_fn[0]) { | ||
pfstart(pf_fn); | ||
} | ||
bgm_init(1024); | ||
#else | ||
pfstart(pf_fn); | ||
#endif | ||
return 0; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#pragma codeseg SHARED | ||
#include "th03/core/initop.cpp" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#pragma codeseg SHARED_ | ||
#include "th03/core/initop.cpp" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters