mirror of https://github.com/nmlgc/ReC98.git
[Separate translation units] [th02] key_delay()
Part of P0138, funded by [Anonymous] and Blue Bolt.
This commit is contained in:
parent
aea5a20de9
commit
78b958f111
|
@ -85,12 +85,12 @@ bin\th02\op.exe: th02\op_01.cpp bin\exit_dos.obj bin\th02\zunerror.obj bin\th02\
|
||||||
$**
|
$**
|
||||||
|
|
|
|
||||||
|
|
||||||
bin\th02\main.exe: bin\th02\main.obj bin\th02\zunerror.obj th02\main02_1.cpp bin\th01\vplanset.obj bin\th02\pi_load.obj bin\th02\vector2.obj bin\frmdely1.obj bin\th02\input_s.obj bin\th02\exit.obj bin\th02\snd_mmdr.obj bin\th02\snd_mode.obj bin\th02\snd_pmdr.obj bin\th02\snd_dlyv.obj bin\th02\snd_load.obj th02\mptn_i.cpp bin\th02\initmain.obj bin\th02\pi_put.obj bin\th02\snd_kaja.obj bin\th02\snd_dlym.obj bin\th02\snd_se_r.obj bin\th02\snd_se.obj th02\main_03.cpp
|
bin\th02\main.exe: bin\th02\main.obj bin\th02\zunerror.obj bin\th02\keydelay.obj th02\main02_1.cpp bin\th01\vplanset.obj bin\th02\pi_load.obj bin\th02\vector2.obj bin\frmdely1.obj bin\th02\input_s.obj bin\th02\exit.obj bin\th02\snd_mmdr.obj bin\th02\snd_mode.obj bin\th02\snd_pmdr.obj bin\th02\snd_dlyv.obj bin\th02\snd_load.obj th02\mptn_i.cpp bin\th02\initmain.obj bin\th02\pi_put.obj bin\th02\snd_kaja.obj bin\th02\snd_dlym.obj bin\th02\snd_se_r.obj bin\th02\snd_se.obj th02\main_03.cpp
|
||||||
$(CC) $(CFLAGS) $(LARGE_LFLAGS) -Z -DGAME=2 -nbin\th02\ -eMAIN.EXE @&&|
|
$(CC) $(CFLAGS) $(LARGE_LFLAGS) -Z -DGAME=2 -nbin\th02\ -eMAIN.EXE @&&|
|
||||||
$**
|
$**
|
||||||
|
|
|
|
||||||
|
|
||||||
bin\th02\maine.exe: bin\th02\maine.obj bin\th02\grppsafx.obj th02\maine021.cpp bin\th01\vplanset.obj bin\th02\pi_load.obj bin\frmdely1.obj th02\maine022.cpp bin\th02\input_s.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\initmain.obj bin\th02\pi_put.obj bin\th02\snd_kaja.obj bin\th02\snd_dlym.obj th02\maine_03.c th02\maine_04.cpp th02\maine_05.cpp
|
bin\th02\maine.exe: bin\th02\maine.obj bin\th02\grppsafx.obj bin\th02\keydelay.obj bin\th01\vplanset.obj bin\th02\pi_load.obj bin\frmdely1.obj th02\maine022.cpp bin\th02\input_s.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\initmain.obj bin\th02\pi_put.obj bin\th02\snd_kaja.obj bin\th02\snd_dlym.obj th02\maine_03.c th02\maine_04.cpp th02\maine_05.cpp
|
||||||
$(CC) $(CFLAGS) $(LARGE_LFLAGS) -3 -Z -DGAME=2 -nbin\th02\ -eMAINE.EXE @&&|
|
$(CC) $(CFLAGS) $(LARGE_LFLAGS) -3 -Z -DGAME=2 -nbin\th02\ -eMAINE.EXE @&&|
|
||||||
$**
|
$**
|
||||||
|
|
|
|
||||||
|
|
|
@ -1,19 +1,29 @@
|
||||||
int key_delay_sense(void)
|
#pragma option -zCSHARED
|
||||||
{
|
|
||||||
extern char key_delay_groups[3];
|
extern "C" {
|
||||||
int ret;
|
#include "platform.h"
|
||||||
ret = key_sense(key_delay_groups[0]);
|
#include "master.hpp"
|
||||||
ret |= key_sense(key_delay_groups[1]);
|
#include "th02/hardware/input.hpp"
|
||||||
ret |= key_sense(key_delay_groups[2]);
|
#include "th02/hardware/frmdelay.h"
|
||||||
frame_delay(2);
|
|
||||||
ret |= key_sense(key_delay_groups[0]);
|
int key_delay_sense(void)
|
||||||
ret |= key_sense(key_delay_groups[1]);
|
{
|
||||||
ret |= key_sense(key_delay_groups[2]);
|
extern char key_delay_groups[3];
|
||||||
return ret;
|
int ret;
|
||||||
}
|
ret = key_sense(key_delay_groups[0]);
|
||||||
|
ret |= key_sense(key_delay_groups[1]);
|
||||||
void key_delay(void)
|
ret |= key_sense(key_delay_groups[2]);
|
||||||
{
|
frame_delay(2);
|
||||||
while(key_delay_sense()) {}
|
ret |= key_sense(key_delay_groups[0]);
|
||||||
while(!key_delay_sense()) {}
|
ret |= key_sense(key_delay_groups[1]);
|
||||||
}
|
ret |= key_sense(key_delay_groups[2]);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
void key_delay(void)
|
||||||
|
{
|
||||||
|
while(key_delay_sense()) {}
|
||||||
|
while(!key_delay_sense()) {}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1 @@
|
||||||
|
#include "th02/hardware/keydelay.cpp"
|
|
@ -9,13 +9,9 @@ extern "C" {
|
||||||
#include "platform.h"
|
#include "platform.h"
|
||||||
#include "x86real.h"
|
#include "x86real.h"
|
||||||
#include "pc98.h"
|
#include "pc98.h"
|
||||||
#include "planar.h"
|
|
||||||
#include "master.hpp"
|
#include "master.hpp"
|
||||||
#include "th02/hardware/frmdelay.h"
|
|
||||||
#include "th02/formats/mptn.hpp"
|
#include "th02/formats/mptn.hpp"
|
||||||
|
|
||||||
#include "th02/hardware/keydelay.c"
|
|
||||||
|
|
||||||
int pascal mptn_load(const char *fn)
|
int pascal mptn_load(const char *fn)
|
||||||
{
|
{
|
||||||
extern bool mptn_show_palette_on_load;
|
extern bool mptn_show_palette_on_load;
|
||||||
|
|
|
@ -1,13 +0,0 @@
|
||||||
/* ReC98
|
|
||||||
* -----
|
|
||||||
* 1st part of code segment #2 of TH02's MAINE.EXE
|
|
||||||
*/
|
|
||||||
|
|
||||||
#pragma option -zCSHARED
|
|
||||||
|
|
||||||
extern "C" {
|
|
||||||
#include "master.hpp"
|
|
||||||
#include "th02/hardware/frmdelay.h"
|
|
||||||
|
|
||||||
#include "th02/hardware/keydelay.c"
|
|
||||||
}
|
|
Loading…
Reference in New Issue