[C decompilation] [th02/op] [th03/op] [th04/op] Frame delay #1

This commit is contained in:
nmlgc 2015-03-03 10:20:20 +01:00
parent a8384c925f
commit 404044f32b
11 changed files with 56 additions and 11 deletions

View File

@ -39,7 +39,7 @@ bin\th01\fuuin.exe: bin\th01\fuuin.obj th01\fuuin_11.c th01\fuuin_13.c
$**
|
bin\th02\op.exe: bin\th02\op.obj th02\op_03.c th02\op_04.c th02\op_05.c th02\op_06.c
bin\th02\op.exe: bin\th02\op.obj th02\op_02.c th02\op_03.c th02\op_04.c th02\op_05.c th02\op_06.c
$(CC) $(CFLAGS) -ml -Z -DGAME=2 -nbin\th02\ -eOP.EXE @&&|
$**
|
@ -48,3 +48,13 @@ bin\th02\maine.exe: bin\th02\maine.obj th02\maine_03.c th02\maine_04.c th02\main
$(CC) $(CFLAGS) -ml -3 -Z -DGAME=2 -nbin\th02\ -eMAINE.EXE @&&|
$**
|
bin\th03\op.exe: bin\th03\op.obj th03\op_02.c
$(CC) $(CFLAGS) -ml -DGAME=3 -nbin\th03\ -eOP.EXE @&&|
$**
|
bin\th04\op.exe: bin\th04\op.obj th04\op_02.c
$(CC) $(CFLAGS) -ml -DGAME=4 -nbin\th04\ -eOP.EXE @&&|
$**
|

View File

@ -1,3 +1,4 @@
frame_delay_ proc
public FRAME_DELAY_2
frame_delay_2 proc
frame_delay_macro
frame_delay_ endp
frame_delay_2 endp

5
th02/hardware/frmdely1.c Normal file
View File

@ -0,0 +1,5 @@
void pascal frame_delay(int frames)
{
vsync_reset1();
while(vsync_Count1 < frames) {}
}

5
th02/hardware/frmdely2.c Normal file
View File

@ -0,0 +1,5 @@
void pascal frame_delay_2(int frames)
{
vsync_reset1();
while(vsync_Count1 < frames) {}
}

8
th02/op_02.c Normal file
View File

@ -0,0 +1,8 @@
/* ReC98
* -----
* Code segment #2 of TH02's OP.EXE
*/
#include "th02/th02.h"
#include "th02/hardware/frmdely1.c"

View File

@ -115,6 +115,7 @@ extern input_t input;
void input_sense(void);
void pascal frame_delay(int frames);
void pascal frame_delay_2(int frames);
// Sound
#include "libs\kaja\kaja.h"

View File

@ -2347,14 +2347,14 @@ include th02/hardware/snd_kaja_func.asm
cmp _snd_active, 0
jnz short loc_B232
push 64h ; 'd'
nopcall frame_delay_
nopcall frame_delay_2
pop bp
retf
; ---------------------------------------------------------------------------
loc_B232:
push 1
nopcall frame_delay_
nopcall frame_delay_2
mov ah, KAJA_GET_SONG_MEASURE
cmp _snd_midi_active, 1
jz short loc_B246
@ -2377,7 +2377,7 @@ loc_B24B:
; ---------------------------------------------------------------------------
include th02/hardware/snd_se.asm
include th02/hardware/frame_delay.asm
extern FRAME_DELAY:proc
op_02_TEXT ends
; ===========================================================================

8
th03/op_02.c Normal file
View File

@ -0,0 +1,8 @@
/* ReC98
* -----
* Code segment #2 of TH02's OP.EXE
*/
#include <master.h>
#include "th02/hardware/frmdely2.c"

View File

@ -2166,7 +2166,7 @@ sub_A899 proc near
mov dx, 0A6h ; '¦'
out dx, al
push 1
call frame_delay_
call frame_delay_2
pop bp
retn
sub_A899 endp
@ -6245,8 +6245,7 @@ loc_CB7D:
retf
sub_CB68 endp
include th02/hardware/frame_delay_.asm
db 0
extern FRAME_DELAY_2:proc
op_02_TEXT ends
.data

8
th04/op_02.c Normal file
View File

@ -0,0 +1,8 @@
/* ReC98
* -----
* Code segment #2 of TH02's OP.EXE
*/
#include <master.h>
#include "th02/hardware/frmdely2.c"

View File

@ -3438,7 +3438,7 @@ sub_C244 proc near
mov dx, 0A6h ; '¦'
out dx, al
push 1
call frame_delay_
call frame_delay_2
pop bp
retn
sub_C244 endp
@ -7492,7 +7492,7 @@ loc_E6D4:
retf
sub_E6D0 endp
include th02/hardware/frame_delay_.asm
extern FRAME_DELAY_2:proc
op_02_TEXT ends