mirror of https://github.com/nmlgc/ReC98.git
[Maintenance] Fix any whitespace issues in our own code
This commit is contained in:
parent
14e69ceb6d
commit
43001161e3
|
@ -6,7 +6,7 @@
|
|||
; reason)
|
||||
; * PROC DIST and LABEL DIST being changed to just PROC and LABEL PROC,
|
||||
; respectively
|
||||
; * and a small section of code in ExtendHeap, which is present in the
|
||||
; * and a small section of code in ExtendHeap, which is present in the
|
||||
; original Touhou builds, but was not included in the original version of
|
||||
; this file.
|
||||
|
||||
|
|
|
@ -141,7 +141,7 @@ __openfp proc near
|
|||
push [bp+@@mode]
|
||||
mov ax, [bp+@@oflag]
|
||||
or ax, [bp+@@shflag]
|
||||
push ax
|
||||
push ax
|
||||
push word ptr [bp+@@filename+2]
|
||||
push word ptr [bp+@@filename]
|
||||
nopcall _open
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
; int __stdcall fgetn(FILE *fp, int n, void *ptr)
|
||||
_fgetn proc near
|
||||
_fgetn proc near
|
||||
@@var_4 = word ptr -4
|
||||
@@Temp = word ptr -2
|
||||
@@fp = dword ptr 4
|
||||
|
@ -13,7 +13,7 @@ _fgetn proc near
|
|||
push di
|
||||
jmp @@while
|
||||
|
||||
@@loop:
|
||||
@@loop:
|
||||
inc [bp+@@n]
|
||||
les bx, [bp+@@fp]
|
||||
mov ax, es:[bx+FILE._bsize]
|
||||
|
@ -22,23 +22,23 @@ _fgetn proc near
|
|||
mov ax, [bp+@@n]
|
||||
jmp short @@bin?
|
||||
|
||||
@@len_bsize:
|
||||
@@len_bsize:
|
||||
les bx, [bp+@@fp]
|
||||
mov ax, es:[bx+FILE._bsize]
|
||||
|
||||
@@bin?:
|
||||
@@bin?:
|
||||
mov [bp+@@Temp], ax
|
||||
les bx, [bp+@@fp]
|
||||
test byte ptr es:[bx+FILE.flags], 40h
|
||||
jnz short @@bsize?
|
||||
jmp @@getc?
|
||||
|
||||
@@bsize?:
|
||||
@@bsize?:
|
||||
cmp es:[bx+FILE._bsize], 0
|
||||
jnz short @@greater?
|
||||
jmp @@getc?
|
||||
|
||||
@@greater?:
|
||||
@@greater?:
|
||||
mov ax, es:[bx+FILE._bsize]
|
||||
cmp ax, [bp+@@n]
|
||||
jnb short @@getc?
|
||||
|
@ -48,7 +48,7 @@ _fgetn proc near
|
|||
mov [bp+@@Temp], 0
|
||||
jmp short @@adjust?
|
||||
|
||||
@@adjust:
|
||||
@@adjust:
|
||||
les bx, [bp+@@fp]
|
||||
add bx, FILE._bsize
|
||||
mov [bp+@@var_4], bx
|
||||
|
@ -56,7 +56,7 @@ _fgetn proc near
|
|||
add [bp+@@Temp], ax
|
||||
sub [bp+@@n], ax
|
||||
|
||||
@@adjust?:
|
||||
@@adjust?:
|
||||
les bx, [bp+@@fp]
|
||||
mov ax, es:[bx+FILE._bsize]
|
||||
cmp ax, [bp+@@n]
|
||||
|
@ -76,7 +76,7 @@ _fgetn proc near
|
|||
les bx, [bp+@@fp]
|
||||
or es:[bx+FILE.flags], 10h
|
||||
|
||||
@@advance:
|
||||
@@advance:
|
||||
add word ptr [bp+@@ptr], dx
|
||||
cmp dx, [bp+@@Temp]
|
||||
jz short @@while
|
||||
|
@ -84,17 +84,17 @@ _fgetn proc near
|
|||
sub ax, dx
|
||||
add [bp+@@n], ax
|
||||
|
||||
@@setEOF:
|
||||
@@setEOF:
|
||||
les bx, [bp+@@fp]
|
||||
or es:[bx+FILE.flags], 20h
|
||||
jmp short @@ret
|
||||
|
||||
@@writec:
|
||||
@@writec:
|
||||
les bx, [bp+@@ptr]
|
||||
mov es:[bx], dl
|
||||
inc word ptr [bp+@@ptr]
|
||||
|
||||
@@getc?:
|
||||
@@getc?:
|
||||
dec [bp+@@n]
|
||||
mov ax, [bp+@@n]
|
||||
or ax, ax
|
||||
|
@ -112,28 +112,28 @@ _fgetn proc near
|
|||
mov ah, 0
|
||||
jmp short @@gotEOF?
|
||||
|
||||
@@getc:
|
||||
@@getc:
|
||||
push word ptr [bp+@@fp+2]
|
||||
push word ptr [bp+@@fp]
|
||||
nopcall __fgetc
|
||||
pop cx
|
||||
pop cx
|
||||
|
||||
@@gotEOF?:
|
||||
@@gotEOF?:
|
||||
mov dx, ax
|
||||
cmp ax, 0FFFFh
|
||||
jnz short @@writec
|
||||
|
||||
@@EOF?:
|
||||
@@EOF?:
|
||||
cmp dx, 0FFFFh
|
||||
jz short @@setEOF
|
||||
|
||||
@@while:
|
||||
@@while:
|
||||
cmp [bp+@@n], 0
|
||||
jz short @@ret
|
||||
jmp @@loop
|
||||
|
||||
@@ret:
|
||||
@@ret:
|
||||
mov ax, [bp+@@n]
|
||||
pop di
|
||||
pop si
|
||||
|
@ -191,13 +191,13 @@ _fread proc
|
|||
div [bp+@@psize]
|
||||
jmp short @@ret
|
||||
|
||||
@@huge:
|
||||
@@huge:
|
||||
mov ax, [bp+@@nitems]
|
||||
inc ax
|
||||
mov [bp+@@n], ax
|
||||
jmp short @@hugeGet
|
||||
|
||||
@@hugeAdvance:
|
||||
@@hugeAdvance:
|
||||
mov bx, [bp+@@psize]
|
||||
xor cx, cx
|
||||
mov dx, word ptr [bp+@@ptr+2]
|
||||
|
@ -206,7 +206,7 @@ _fread proc
|
|||
mov word ptr [bp+@@ptr+2], dx
|
||||
mov word ptr [bp+@@ptr], ax
|
||||
|
||||
@@hugeGet:
|
||||
@@hugeGet:
|
||||
dec [bp+@@n]
|
||||
mov ax, [bp+@@n]
|
||||
or ax, ax
|
||||
|
@ -220,11 +220,11 @@ _fread proc
|
|||
or ax, ax
|
||||
jz short @@hugeAdvance
|
||||
|
||||
@@retItemsMinusN:
|
||||
@@retItemsMinusN:
|
||||
mov ax, [bp+@@nitems]
|
||||
sub ax, [bp+@@n]
|
||||
|
||||
@@ret:
|
||||
@@ret:
|
||||
pop di
|
||||
pop si
|
||||
mov sp, bp
|
||||
|
|
|
@ -26,7 +26,7 @@ _gettime proc
|
|||
push si
|
||||
push di
|
||||
mov ah, 2Ch
|
||||
int 21h
|
||||
int 21h
|
||||
LES_ bx, [bp+@@timep]
|
||||
mov es:[bx], cx
|
||||
mov es:[bx+2], dx
|
||||
|
|
|
@ -17,7 +17,7 @@ argcx = word ptr 0Eh
|
|||
mov al, byte ptr [bp+_func]
|
||||
mov bx, [bp+handle]
|
||||
mov cx, [bp+argcx]
|
||||
int 21h
|
||||
int 21h
|
||||
pop ds
|
||||
jb short @@ioctlFailed
|
||||
cmp [bp+_func], 0
|
||||
|
|
|
@ -28,7 +28,7 @@ __mbcjmstojis proc
|
|||
jb short @@_1
|
||||
sub al, 0A2h
|
||||
|
||||
@@_1:
|
||||
@@_1:
|
||||
rcl ah, 1
|
||||
and ah, 7Fh
|
||||
add ax, 1F21h
|
||||
|
@ -37,7 +37,7 @@ __mbcjmstojis proc
|
|||
@@_invalid_jms:
|
||||
xor ax, ax
|
||||
|
||||
@@_rts:
|
||||
@@_rts:
|
||||
pop di
|
||||
pop si
|
||||
pop bp
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
; char *__pascal __near _MKNAME(char *s, char *prefix, unsigned int num)
|
||||
public __MKNAME
|
||||
__MKNAME proc near
|
||||
__MKNAME proc near
|
||||
@@num = word ptr 4
|
||||
@@prefix = dword ptr 6
|
||||
@@s = dword ptr 0Ah
|
||||
|
@ -15,7 +15,7 @@ __MKNAME proc near
|
|||
mov word ptr [bp+@@s+2], ds
|
||||
mov word ptr [bp+@@s], offset mkname_template
|
||||
|
||||
@@haveS:
|
||||
@@haveS:
|
||||
push [bp+@@num]
|
||||
mov ax, word ptr [bp+@@prefix]
|
||||
or ax, word ptr [bp+@@prefix+2]
|
||||
|
@ -24,11 +24,11 @@ __MKNAME proc near
|
|||
mov ax, offset mkname_TMP
|
||||
jmp short @@build
|
||||
|
||||
@@havePrefix:
|
||||
@@havePrefix:
|
||||
mov dx, word ptr [bp+@@prefix+2]
|
||||
mov ax, word ptr [bp+@@prefix]
|
||||
|
||||
@@build:
|
||||
@@build:
|
||||
push dx
|
||||
push ax
|
||||
push word ptr [bp+@@s+2]
|
||||
|
@ -66,7 +66,7 @@ __TMPNAM proc near
|
|||
push si
|
||||
push di
|
||||
|
||||
@@loop:
|
||||
@@loop:
|
||||
push word ptr [bp+@@s+2]
|
||||
push word ptr [bp+@@s]
|
||||
xor ax, ax
|
||||
|
@ -78,10 +78,10 @@ __TMPNAM proc near
|
|||
mov ax, 2
|
||||
jmp short @@mkname
|
||||
|
||||
@@incNumP:
|
||||
@@incNumP:
|
||||
mov ax, 1
|
||||
|
||||
@@mkname:
|
||||
@@mkname:
|
||||
LES_ bx, [bp+@@numP]
|
||||
add ES_[bx], ax
|
||||
mov ax, ES_[bx]
|
||||
|
|
|
@ -21,7 +21,7 @@ endif
|
|||
@@valid:
|
||||
if LDATA
|
||||
push word ptr [bp+@@s+2]
|
||||
endif
|
||||
endif
|
||||
push word ptr [bp+@@s]
|
||||
nopcall _strlen
|
||||
pop cx
|
||||
|
@ -50,7 +50,7 @@ endif
|
|||
mov ax, 0Ah
|
||||
push ax
|
||||
nopcall _fputc
|
||||
if LDATA
|
||||
if LDATA
|
||||
add sp, 6
|
||||
else
|
||||
pop cx
|
||||
|
|
|
@ -101,7 +101,7 @@ endif
|
|||
push [bp+@@size]
|
||||
nopcall _malloc
|
||||
pop cx
|
||||
if LDATA
|
||||
if LDATA
|
||||
mov word ptr [bp+@@buf+2], dx
|
||||
mov word ptr [bp+@@buf], ax
|
||||
or ax, dx
|
||||
|
|
|
@ -9,7 +9,7 @@ _unlink proc
|
|||
pushDS_
|
||||
mov ah, 41h
|
||||
LDS_ dx, [bp+@@path]
|
||||
int 21h
|
||||
int 21h
|
||||
popDS_
|
||||
jb short @@unlinkFailed
|
||||
xor ax, ax
|
||||
|
|
|
@ -26,7 +26,7 @@ To achieve this, ReC98 has been kept in an openly available Git repository from
|
|||
Moreover, a clear line will be drawn between the original content and fanmade modifications, which will only be available as optional packages. This also means that we won't ship the reconstructed games with any existing English translation patch. For the visible modifications that *will* be necessary (read: the "Mods" screen in the main menu), great care will be taken to keep them in the spirit of the original PC-98 games.
|
||||
|
||||
#### Is this even viable?
|
||||
It certainly *seems* to be. During the development of the static English patches for these games, we identified two main libraries used across all 5 games, and even found their source code. These are:
|
||||
It certainly *seems* to be. During the development of the static English patches for these games, we identified two main libraries used across all 5 games, and even found their source code. These are:
|
||||
|
||||
* [master.lib](http://www.koizuka.jp/~koizuka/master.lib/), a 16-bit x86 assembly library providing an abstraction layer for all components of a PC-98 DOS system
|
||||
* as well as the Borland C/C++ runtime library, version 4.0.
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* -----
|
||||
* Code segment #11 of TH01's FUUIN.EXE
|
||||
*/
|
||||
|
||||
|
||||
#include "th01\th01.h"
|
||||
|
||||
#include "th01\hardware\vplanset.c"
|
||||
|
|
|
@ -47,7 +47,7 @@ void graph_slow_2xscale_rect_1_to_0(int x0, int y0, int x1, int y1, int w1, int
|
|||
*(long*)(VRAM_PLANE_B + p0 + scale_p) = px32_nonzero;
|
||||
grcg_off();
|
||||
|
||||
scale_2x(&dst32, px16.B);
|
||||
scale_2x(&dst32, px16.B);
|
||||
*(long*)(VRAM_PLANE_B + p0 + scale_p) |= dst32;
|
||||
|
||||
scale_2x(&dst32, px16.R);
|
||||
|
|
|
@ -26,7 +26,7 @@ void egc_copy_rect_1_to_0(int x, int y, int w, int h)
|
|||
int row_p;
|
||||
int bits;
|
||||
int p;
|
||||
|
||||
|
||||
x_end += w;
|
||||
x_floor &= 0xFFF0;
|
||||
row_p = VRAM_OFFSET(x_floor, y);
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
typedef enum {
|
||||
MDRV2_MPLAY = 0x00,
|
||||
MDRV2_MFADE_OUT_BLOCK = 0x01,
|
||||
MDRV2_MFADE_OUT_BLOCK = 0x01,
|
||||
MDRV2_MFADE_OUT_NONBLOCK = 0x02,
|
||||
MDRV2_MSTOP = 0x03,
|
||||
MDRV2_EPLAY = 0x04,
|
||||
|
|
|
@ -193,7 +193,7 @@ int pascal score_cleared_load(void)
|
|||
unsigned char extra_clear_flags[SHOTTYPE_COUNT] = EXTRA_CLEAR_FLAGS;
|
||||
int extra_unlocked = 1;
|
||||
int shottype;
|
||||
|
||||
|
||||
for(rank = 0; rank < 3; rank++) {
|
||||
score_load();
|
||||
if(hi.score.cleared != game_clear_constants[rank]) {
|
||||
|
|
|
@ -104,7 +104,7 @@ void pascal near polygon_build(Point near *pts, int x, int y, int rad, int npoin
|
|||
void pascal near polygons_update_and_render(void)
|
||||
{
|
||||
#define VERTICES(i) (i / 4) + 3
|
||||
|
||||
|
||||
#define POLYGON_INIT_PART2 \
|
||||
if(move_speed[i].x == 0) { \
|
||||
move_speed[i].x = 1; \
|
||||
|
@ -115,7 +115,7 @@ void pascal near polygons_update_and_render(void)
|
|||
if(rot_speed[i] == 0) { \
|
||||
rot_speed[i] = 4; \
|
||||
}
|
||||
|
||||
|
||||
static char initialized = 0;
|
||||
|
||||
static Point points[10];
|
||||
|
|
|
@ -41,7 +41,7 @@ void pi_slot_put(int x, int y, int slot);
|
|||
graph_pi_free(&pi_slot_headers[slot], pi_slot_buffers[slot]);
|
||||
|
||||
// "東方封魔.録" in Shift-JIS
|
||||
#define PF_FN "\x93\x8C\x95\xFB\x95\x95\x96\x82\x2E\x98\x5E"
|
||||
#define PF_FN "\x93\x8C\x95\xFB\x95\x95\x96\x82\x2E\x98\x5E"
|
||||
#define PF_KEY 0x12
|
||||
// -------
|
||||
|
||||
|
@ -250,7 +250,7 @@ extern resident_t *mikoconfig;
|
|||
extern char rank;
|
||||
extern char bombs;
|
||||
extern char lives;
|
||||
// ------------------
|
||||
// ------------------
|
||||
|
||||
#define SHOTTYPE_COUNT 3
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
include ReC98.inc
|
||||
include th02/th02.asm
|
||||
|
||||
|
||||
extern SCOPY@:proc
|
||||
extern _execl:proc
|
||||
|
||||
|
|
|
@ -26,8 +26,8 @@
|
|||
; The TH03 version improves upon the original by preloading all pfHeader
|
||||
; structures of an archive on pfstart(). In doing this, seeking to the
|
||||
; desired file becomes much more efficient and the SEEK function can be
|
||||
; eliminated entirely. For some reason, It also saw fit to reduce the
|
||||
; size fields in pfHeader to 16-bit for some reason.
|
||||
; eliminated entirely. It also saw fit to reduce the size fields in
|
||||
; pfHeader to 16-bit for some reason.
|
||||
;
|
||||
; TH05 further optimizes the implementation by using 32-bit registers
|
||||
; and instructions where possible, and removing unnecessary instructions
|
||||
|
|
|
@ -5425,7 +5425,7 @@ loc_C032:
|
|||
call grcg_byteboxfill_x
|
||||
call grcg_off
|
||||
call sub_BCD5
|
||||
call grcg_setcolor pascal, (GC_RMW shl 16) + 0
|
||||
call grcg_setcolor pascal, (GC_RMW shl 16) + 0
|
||||
push 10008h
|
||||
push 4E0187h
|
||||
call grcg_byteboxfill_x
|
||||
|
|
|
@ -16383,7 +16383,7 @@ loc_12508:
|
|||
ja loc_127EC
|
||||
add bx, bx
|
||||
jmp word ptr cs:table_1287D[bx]
|
||||
|
||||
|
||||
loc_12522:
|
||||
cmp byte_26719, 2
|
||||
jbe short loc_12567
|
||||
|
|
|
@ -14266,7 +14266,7 @@ loc_115CE:
|
|||
add si, 1Ah
|
||||
|
||||
loc_115D4:
|
||||
cmp [bp+var_2], 40h
|
||||
cmp [bp+var_2], 40h
|
||||
jl short loc_11568
|
||||
mov dx, 7Ch
|
||||
mov al, GC_OFF
|
||||
|
|
Loading…
Reference in New Issue