[Decompilation] [th01] graph_putsa_fx

TH01's (original) version also replicates the PC-98 text RAM's reverse
and underline attributes. Which was removed in later games,
interestingly and inconsistently enough.

Part of P0068, funded by Yanga.
This commit is contained in:
nmlgc 2020-01-11 21:06:26 +01:00
parent 4340b5d6ae
commit a6d292a62c
7 changed files with 241 additions and 1506 deletions

View File

@ -76,6 +76,29 @@ as part of the same translation unit. Found nothing so far, though.
Borland C++ just pushes the entire word. Will cause IDA to mis-identify Borland C++ just pushes the entire word. Will cause IDA to mis-identify
certain local variables as `word`s when they aren't. certain local variables as `word`s when they aren't.
## Flags
### `-O` (Optimize jumps)
Inhibited by identical variable declarations within more than one scope the
optimizer will only merge the code *after* the last ASM reference to that
declared variable. Yes, even though the emitted ASM would be identical:
```c
if(a) {
int v = set_v();
do_something_else();
use(v);
} else if(underline) {
// Second declaration of [v]. Even though it's assigned to the same stack
// offset, the second `PUSH w` call will still be emitted separately.
// Thus, jump optimization only reuses the `CALL use` instruction.
// Move the `int v;` declaraion to the beginning of the function to avoid
// this.
int v = set_v();
use(v);
}
```
## Inlining ## Inlining
Always worth a try to get rid of a potential macro. Some edge cases don't Always worth a try to get rid of a potential macro. Some edge cases don't

View File

@ -2,6 +2,8 @@
extern "C" { extern "C" {
#include <dos.h> #include <dos.h>
#include <mbctype.h>
#include <mbstring.h>
#include "ReC98.h" #include "ReC98.h"
#include "th01/hardware/vsync.h" #include "th01/hardware/vsync.h"
#include "th01/hardware/graph.h" #include "th01/hardware/graph.h"
@ -40,6 +42,20 @@ extern "C" {
memcpy(dst##_E, src##_E, bytes); memcpy(dst##_E, src##_E, bytes);
/// ----------------------- /// -----------------------
/// Temporary translation unit mismatch workarounds
/// -----------------------------------------------
#define GRCG_SETCOLOR_RMW(col) __asm { \
push col; \
push cs; \
call near ptr grcg_setcolor_rmw; \
pop cx; \
}
#define GRCG_OFF() __asm { \
push cs; \
call near ptr grcg_off_func; \
}
/// -----------------------------------------------
/// Pages /// Pages
/// ----- /// -----
extern page_t page_back; extern page_t page_back;
@ -57,6 +73,142 @@ extern bool graph_r_restore_from_1;
extern planar16_t graph_r_pattern; extern planar16_t graph_r_pattern;
/// ----------------------- /// -----------------------
int text_extent_fx(int fx, const unsigned char *str)
{
register int ret = 0;
register int spacing = (fx / 0x40) % 8;
while(*str) {
if(_ismbblead(str[0])) {
uint16_t codepoint = ((char)str[0] << 8) + str[0];
str++;
str++;
if(codepoint < 0x8540) {
ret += GLYPH_FULL_W;
} else if(codepoint > 0x869E) {
ret += GLYPH_FULL_W;
} else {
ret += GLYPH_HALF_W;
}
} else {
ret += GLYPH_HALF_W;
str++;
}
ret += spacing;
}
return ret - spacing;
}
#include "th01/hardware/grppsafx.c"
void graph_putsa_fx(int left, int top, int fx, const unsigned char *str)
{
uint16_t codepoint;
planar16_t glyph_row;
unsigned char far *vram;
int fullwidth;
int first_bit;
int weight = (fx / 0x10) % 4;
int spacing = (fx / 0x40) % 8;
int clear_bg = (fx & FX_CLEAR_BG);
int underline = (fx & FX_UNDERLINE);
int reverse = (fx & FX_REVERSE);
int w;
int line;
planar16_t glyph[GLYPH_H];
planar16_t glyph_row_tmp;
if(clear_bg) {
w = text_extent_fx(fx, str);
if(underline) {
/* TODO: Replace with the decompiled call
* z_grcg_boxfill(left, top, (left + w - 1), (top + GLYPH_H + 1), 0);
* once that function is part of this translation unit */
__asm {
push 0
mov ax, top
add ax, GLYPH_H + 1
push ax
db 0x8B, 0xC6
add ax, w
dec ax
push ax
push top
db 0x56
push cs
call near ptr z_grcg_boxfill
add sp, 10
}
/* TODO: Replace with the decompiled call
* graph_r_hline(left, (left + w - 1), (top + GLYPH_H + 1), 7);
* once that function is part of this translation unit */
goto graph_hline_call;
} else {
/* TODO: Replace with the decompiled call
* z_grcg_boxfill(left, top, (left + w - 1), (top + GLYPH_H - 1), 0);
* once that function is part of this translation unit */
__asm {
push 0
mov ax, top
add ax, GLYPH_H - 1
push ax
db 0x8B, 0xC6
add ax, w
dec ax
push ax
push top
db 0x56
push cs
call near ptr z_grcg_boxfill
add sp, 10
}
}
} else if(underline) {
w = text_extent_fx(fx, str);
/* TODO: Replace with the decompiled call
* graph_r_hline(left, (left + w - 1), (top + GLYPH_H + 1), 7);
* once that function is part of this translation unit */
graph_hline_call:
__asm {
push 7
mov ax, top
add ax, GLYPH_H + 1
push ax
db 0x8B, 0xC6
add ax, w
dec ax
push ax
db 0x56
push cs
call near ptr graph_r_hline
add sp, 8
}
}
GRCG_SETCOLOR_RMW(fx);
OUTB(0x68, 0xB); // CG ROM dot access
while(str[0]) {
set_vram_ptr(vram, first_bit, left, top);
get_glyph(glyph, codepoint, fullwidth, str, left, line);
for(line = 0; line < GLYPH_H; line++) {
apply_weight(glyph_row, glyph[line], glyph_row_tmp, weight);
if(reverse) {
if(fullwidth) {
glyph_row ^= 0xFFFF;
} else {
glyph_row ^= 0xFF00;
}
}
put_row_and_advance(vram, glyph_row, first_bit);
}
advance_left(left, fullwidth, spacing);
}
OUTB(0x68, 0xA); // CG ROM code access
GRCG_OFF();
}
void graph_copy_byterect_back_to_front( void graph_copy_byterect_back_to_front(
int left, int top, int right, int bottom int left, int top, int right, int bottom
) )

View File

@ -38,6 +38,23 @@ void graph_r_line_from_1(int left, int top, int right, int bottom);
void graph_r_box(int left, int top, int right, int bottom, int col); void graph_r_box(int left, int top, int right, int bottom, int col);
/// ----------------------- /// -----------------------
/// Text
/// ----
// Calculates the width of [str], displayed with the given [fx]
int text_extent_fx(int fx, const unsigned char *str);
// TH01-exclusive effects
// ----------------------
// Puts a black background behind the text. Useful if the text is rendered
// onto the back page and should then 2✕ scaled onto the front page.
#define FX_CLEAR_BG 0x200
#define FX_UNDERLINE 0x400
#define FX_REVERSE 0x800
// ----------------------
#include "th01/hardware/grppsafx.h"
/// ----
/// Blitting /// Blitting
/// -------- /// --------
// Copies the given rectangle from // Copies the given rectangle from

View File

@ -26,6 +26,13 @@ reiidenconfig_t struc ; (sizeof=0x4B)
p_value dw ? p_value dw ?
reiidenconfig_t ends reiidenconfig_t ends
; Text
; ----
FX_CLEAR_BG = 200h
FX_UNDERLINE = 400h
FX_REVERSE = 800h
; ----
; Player ; Player
; ------ ; ------
MISS_INVINCIBILITY_FRAMES = 150 MISS_INVINCIBILITY_FRAMES = 150

View File

@ -1314,7 +1314,7 @@ loc_A814:
loc_A84F: loc_A84F:
cmp si, 1Ah cmp si, 1Ah
jl short loc_A814 jl short loc_A814
call _graph_putsa_fx c, 32, 240, 823h, offset aVb, ds ; "<>" call _graph_putsa_fx c, 32, 240, FX_REVERSE or 23h, offset aVb, ds ; "<>"
mov di, 8260h mov di, 8260h
xor si, si xor si, si
jmp short loc_A8AA jmp short loc_A8AA
@ -6837,485 +6837,7 @@ loc_D7E6:
sub_D77C endp sub_D77C endp
include th01/hardware/graph_r.asm include th01/hardware/graph_r.asm
extern _graph_putsa_fx:proc
; =============== S U B R O U T I N E =======================================
; Attributes: bp-based frame
sub_E099 proc far
arg_0 = word ptr 6
arg_2 = dword ptr 8
push bp
mov bp, sp
push si
push di
xor cx, cx
mov ax, [bp+arg_0]
mov bx, 40h
cwd
idiv bx
mov bx, 8
cwd
idiv bx
mov si, dx
jmp short loc_E0FB
; ---------------------------------------------------------------------------
loc_E0B3:
les bx, [bp+arg_2]
mov al, es:[bx]
mov ah, 0
mov bx, ax
test __mbctype+1[bx], 4
jz short loc_E0F3
mov bx, word ptr [bp+arg_2]
mov al, es:[bx]
cbw
shl ax, 8
mov dl, es:[bx]
mov dh, 0
add ax, dx
mov di, ax
inc word ptr [bp+arg_2]
inc word ptr [bp+arg_2]
cmp di, 8540h
jb short loc_E0E9
cmp di, 869Eh
jbe short loc_E0EE
loc_E0E9:
add cx, 10h
jmp short loc_E0F9
; ---------------------------------------------------------------------------
loc_E0EE:
add cx, 8
jmp short loc_E0F9
; ---------------------------------------------------------------------------
loc_E0F3:
add cx, 8
inc word ptr [bp+arg_2]
loc_E0F9:
add cx, si
loc_E0FB:
les bx, [bp+arg_2]
cmp byte ptr es:[bx], 0
jnz short loc_E0B3
mov ax, cx
sub ax, si
pop di
pop si
pop bp
retf
sub_E099 endp
; =============== S U B R O U T I N E =======================================
; Attributes: bp-based frame
_graph_putsa_fx proc far
var_3A = byte ptr -3Ah
var_1A = word ptr -1Ah
var_18 = word ptr -18h
var_16 = word ptr -16h
var_14 = word ptr -14h
var_12 = word ptr -12h
var_10 = word ptr -10h
var_E = word ptr -0Eh
var_C = word ptr -0Ch
var_A = word ptr -0Ah
var_8 = dword ptr -8
var_4 = word ptr -4
var_2 = word ptr -2
arg_0 = word ptr 6
arg_2 = word ptr 8
arg_4 = word ptr 0Ah
arg_6 = dword ptr 0Ch
enter 3Ah, 0
push si
push di
mov si, [bp+arg_0]
mov ax, [bp+arg_4]
mov bx, 10h
cwd
idiv bx
mov bx, 4
cwd
idiv bx
mov [bp+var_E], dx
mov ax, [bp+arg_4]
mov bx, 40h
cwd
idiv bx
mov bx, 8
cwd
idiv bx
mov [bp+var_10], dx
mov ax, [bp+arg_4]
and ax, 200h
mov [bp+var_12], ax
mov ax, [bp+arg_4]
and ax, 400h
mov [bp+var_14], ax
mov ax, [bp+arg_4]
and ax, 800h
mov [bp+var_16], ax
cmp [bp+var_12], 0
jz short loc_E1AB
pushd [bp+arg_6]
push [bp+arg_4]
call sub_E099
add sp, 6
mov [bp+var_18], ax
cmp [bp+var_14], 0
jz short loc_E18E
push 0
mov ax, [bp+arg_2]
add ax, 11h
push ax
mov ax, si
add ax, [bp+var_18]
dec ax
push ax
push [bp+arg_2]
push si
call _z_grcg_boxfill
add sp, 0Ah
jmp short loc_E1C2
; ---------------------------------------------------------------------------
loc_E18E:
push 0
mov ax, [bp+arg_2]
add ax, 0Fh
push ax
mov ax, si
add ax, [bp+var_18]
dec ax
push ax
push [bp+arg_2]
push si
call _z_grcg_boxfill
add sp, 0Ah
jmp short loc_E1DA
; ---------------------------------------------------------------------------
loc_E1AB:
cmp [bp+var_14], 0
jz short loc_E1DA
pushd [bp+arg_6]
push [bp+arg_4]
call sub_E099
add sp, 6
mov [bp+var_18], ax
loc_E1C2:
push 7
mov ax, [bp+arg_2]
add ax, 17
push ax
mov ax, si
add ax, [bp+var_18]
dec ax
push ax
push si
call _graph_r_hline
add sp, 8
loc_E1DA:
push [bp+arg_4]
call _grcg_setcolor_rmw
pop cx
mov dx, 68h ; 'h'
mov al, 0Bh
out dx, al
jmp loc_E412
; ---------------------------------------------------------------------------
loc_E1EB:
mov ax, [bp+arg_2]
imul ax, 50h
push ax
mov ax, si
mov bx, 8
cwd
idiv bx
pop dx
add dx, ax
mov word ptr [bp+var_8+2], 0A800h
mov word ptr [bp+var_8], dx
mov ax, si
cwd
idiv bx
mov [bp+var_C], dx
les bx, [bp+arg_6]
mov al, es:[bx]
mov ah, 0
mov bx, ax
test __mbctype+1[bx], 4
jz short loc_E240
mov bx, word ptr [bp+arg_6]
mov al, es:[bx]
cbw
shl ax, 8
mov dl, es:[bx+1]
mov dh, 0
add ax, dx
push ax
call __mbcjmstojis
pop cx
mov [bp+var_2], ax
add word ptr [bp+arg_6], 2
jmp short loc_E286
; ---------------------------------------------------------------------------
loc_E240:
les bx, [bp+arg_6]
mov al, es:[bx]
mov ah, 0
mov bx, ax
test __mbctype+1[bx], 3
jz short loc_E25E
mov bx, word ptr [bp+arg_6]
mov al, es:[bx]
mov ah, 0
add ax, 2980h
jmp short loc_E279
; ---------------------------------------------------------------------------
loc_E25E:
les bx, [bp+arg_6]
mov al, es:[bx]
cbw
mov bx, ax
test byte ptr [bx+0EEBh], 5Eh
jz short loc_E27E
mov bx, word ptr [bp+arg_6]
mov al, es:[bx]
mov ah, 0
add ax, 2900h
loc_E279:
mov [bp+var_2], ax
jmp short loc_E283
; ---------------------------------------------------------------------------
loc_E27E:
mov [bp+var_2], 2B21h
loc_E283:
inc word ptr [bp+arg_6]
loc_E286:
mov al, byte ptr [bp+var_2]
and al, 0FFh
mov dx, 0A1h ; '¡'
out dx, al
mov ax, [bp+var_2]
shr ax, 8
sub al, 20h ; ' '
mov dx, 0A3h ; '£'
out dx, al
cmp [bp+var_2], 2921h
jb short loc_E2E7
cmp [bp+var_2], 2B7Eh
ja short loc_E2E7
cmp si, 278h
jg loc_E41D
mov [bp+var_1A], 0
jmp short loc_E2DA
; ---------------------------------------------------------------------------
loc_E2B8:
mov al, byte ptr [bp+var_1A]
or al, 20h
mov dx, 0A5h ; '¥'
out dx, al
mov dx, 0A9h ; '©'
in al, dx
mov ah, 0
shl ax, 8
mov bx, [bp+var_1A]
add bx, bx
lea dx, [bp+var_3A]
add bx, dx
mov ss:[bx], ax
inc [bp+var_1A]
loc_E2DA:
cmp [bp+var_1A], 10h
jl short loc_E2B8
mov [bp+var_A], 0
jmp short loc_E33D
; ---------------------------------------------------------------------------
loc_E2E7:
cmp si, 270h
jg loc_E41D
mov [bp+var_1A], 0
jmp short loc_E332
; ---------------------------------------------------------------------------
loc_E2F6:
mov al, byte ptr [bp+var_1A]
or al, 20h
mov dx, 0A5h ; '¥'
out dx, al
mov dx, 0A9h ; '©'
in al, dx
mov ah, 0
shl ax, 8
mov bx, [bp+var_1A]
add bx, bx
lea dx, [bp+var_3A]
add bx, dx
mov ss:[bx], ax
mov dx, 0A5h ; '¥'
mov al, byte ptr [bp+var_1A]
out dx, al
mov dx, 0A9h ; '©'
in al, dx
mov ah, 0
mov bx, [bp+var_1A]
add bx, bx
lea dx, [bp+var_3A]
add bx, dx
add ss:[bx], ax
inc [bp+var_1A]
loc_E332:
cmp [bp+var_1A], 10h
jl short loc_E2F6
mov [bp+var_A], 1
loc_E33D:
mov [bp+var_1A], 0
jmp loc_E3F9
; ---------------------------------------------------------------------------
loc_E345:
mov bx, [bp+var_1A]
add bx, bx
lea ax, [bp+var_3A]
add bx, ax
mov ax, ss:[bx]
mov [bp+var_4], ax
mov ax, [bp+var_E]
cmp ax, 1
jz short loc_E369
cmp ax, 2
jz short loc_E37F
cmp ax, 3
jz short loc_E375
jmp short loc_E395
; ---------------------------------------------------------------------------
loc_E369:
mov di, [bp+var_4]
mov ax, di
add ax, ax
or [bp+var_4], ax
jmp short loc_E395
; ---------------------------------------------------------------------------
loc_E375:
mov di, [bp+var_4]
mov ax, di
add ax, ax
or [bp+var_4], ax
loc_E37F:
mov di, [bp+var_4]
mov ax, di
add ax, ax
or [bp+var_4], ax
xor di, [bp+var_4]
mov ax, di
add ax, ax
not ax
and [bp+var_4], ax
loc_E395:
cmp [bp+var_16], 0
jz short loc_E3AC
cmp [bp+var_A], 0
jz short loc_E3A7
xor [bp+var_4], 0FFFFh
jmp short loc_E3AC
; ---------------------------------------------------------------------------
loc_E3A7:
xor [bp+var_4], 0FF00h
loc_E3AC:
cmp [bp+var_C], 0
jz short loc_E3DF
mov cl, byte ptr [bp+var_C]
add cl, 8
mov ax, [bp+var_4]
shr ax, cl
les bx, [bp+var_8]
mov es:[bx], al
mov ax, [bp+var_4]
mov cl, byte ptr [bp+var_C]
shr ax, cl
mov es:[bx+1], al
mov cl, 8
sub cl, byte ptr [bp+var_C]
mov al, byte ptr [bp+var_4]
shl al, cl
mov es:[bx+2], al
jmp short loc_E3F2
; ---------------------------------------------------------------------------
loc_E3DF:
mov ax, [bp+var_4]
shr ax, 8
les bx, [bp+var_8]
mov es:[bx], al
mov al, byte ptr [bp+var_4]
mov es:[bx+1], al
loc_E3F2:
add word ptr [bp+var_8], 50h ; 'P'
inc [bp+var_1A]
loc_E3F9:
cmp [bp+var_1A], 10h
jl loc_E345
cmp [bp+var_A], 0
jz short loc_E40A
add si, 8
loc_E40A:
mov ax, [bp+var_10]
add ax, 8
add si, ax
loc_E412:
les bx, [bp+arg_6]
cmp byte ptr es:[bx], 0
jnz loc_E1EB
loc_E41D:
mov dx, 68h ; 'h'
mov al, 0Ah
out dx, al
call _grcg_off_func
pop di
pop si
leave
retf
_graph_putsa_fx endp
extern _graph_move_byterect_interpage:proc extern _graph_move_byterect_interpage:proc
extern _z_respal_set:proc extern _z_respal_set:proc
fuuin_08_TEXT ends fuuin_08_TEXT ends

View File

@ -1024,12 +1024,7 @@ arg_0 = word ptr 6
idiv bx idiv bx
cmp dx, 50 cmp dx, 50
jge short loc_A954 jge short loc_A954
push ds call _graph_putsa_fx c, 244, (2Fh shl 16) or 306, offset aVgvhvsb@vjvdvx, ds ; "  "
push offset aVgvhvsb@vjvdvx ; " ghs<E2809A>@jdx"
push (2Fh shl 16) or 306
push 244
call _graph_putsa_fx
add sp, 0Ah
pop bp pop bp
retf retf
; --------------------------------------------------------------------------- ; ---------------------------------------------------------------------------
@ -3182,485 +3177,7 @@ loc_C022:
retf retf
include th01/hardware/graph_r.asm include th01/hardware/graph_r.asm
extern _graph_putsa_fx:proc
; =============== S U B R O U T I N E =======================================
; Attributes: bp-based frame
sub_C8D5 proc far
arg_0 = word ptr 6
arg_2 = dword ptr 8
push bp
mov bp, sp
push si
push di
xor cx, cx
mov ax, [bp+arg_0]
mov bx, 40h
cwd
idiv bx
mov bx, 8
cwd
idiv bx
mov si, dx
jmp short loc_C937
; ---------------------------------------------------------------------------
loc_C8EF:
les bx, [bp+arg_2]
mov al, es:[bx]
mov ah, 0
mov bx, ax
test __mbctype+1[bx], 4
jz short loc_C92F
mov bx, word ptr [bp+arg_2]
mov al, es:[bx]
cbw
shl ax, 8
mov dl, es:[bx]
mov dh, 0
add ax, dx
mov di, ax
inc word ptr [bp+arg_2]
inc word ptr [bp+arg_2]
cmp di, 8540h
jb short loc_C925
cmp di, 869Eh
jbe short loc_C92A
loc_C925:
add cx, 10h
jmp short loc_C935
; ---------------------------------------------------------------------------
loc_C92A:
add cx, 8
jmp short loc_C935
; ---------------------------------------------------------------------------
loc_C92F:
add cx, 8
inc word ptr [bp+arg_2]
loc_C935:
add cx, si
loc_C937:
les bx, [bp+arg_2]
cmp byte ptr es:[bx], 0
jnz short loc_C8EF
mov ax, cx
sub ax, si
pop di
pop si
pop bp
retf
sub_C8D5 endp
; =============== S U B R O U T I N E =======================================
; Attributes: bp-based frame
_graph_putsa_fx proc far
var_3A = byte ptr -3Ah
var_1A = word ptr -1Ah
var_18 = word ptr -18h
var_16 = word ptr -16h
var_14 = word ptr -14h
var_12 = word ptr -12h
var_10 = word ptr -10h
var_E = word ptr -0Eh
var_C = word ptr -0Ch
var_A = word ptr -0Ah
var_8 = dword ptr -8
var_4 = word ptr -4
var_2 = word ptr -2
arg_0 = word ptr 6
arg_2 = word ptr 8
arg_4 = word ptr 0Ah
arg_6 = dword ptr 0Ch
enter 3Ah, 0
push si
push di
mov si, [bp+arg_0]
mov ax, [bp+arg_4]
mov bx, 10h
cwd
idiv bx
mov bx, 4
cwd
idiv bx
mov [bp+var_E], dx
mov ax, [bp+arg_4]
mov bx, 40h
cwd
idiv bx
mov bx, 8
cwd
idiv bx
mov [bp+var_10], dx
mov ax, [bp+arg_4]
and ax, 200h
mov [bp+var_12], ax
mov ax, [bp+arg_4]
and ax, 400h
mov [bp+var_14], ax
mov ax, [bp+arg_4]
and ax, 800h
mov [bp+var_16], ax
cmp [bp+var_12], 0
jz short loc_C9E7
pushd [bp+arg_6]
push [bp+arg_4]
call sub_C8D5
add sp, 6
mov [bp+var_18], ax
cmp [bp+var_14], 0
jz short loc_C9CA
push 0
mov ax, [bp+arg_2]
add ax, 11h
push ax
mov ax, si
add ax, [bp+var_18]
dec ax
push ax
push [bp+arg_2]
push si
call _z_grcg_boxfill
add sp, 0Ah
jmp short loc_C9FE
; ---------------------------------------------------------------------------
loc_C9CA:
push 0
mov ax, [bp+arg_2]
add ax, 0Fh
push ax
mov ax, si
add ax, [bp+var_18]
dec ax
push ax
push [bp+arg_2]
push si
call _z_grcg_boxfill
add sp, 0Ah
jmp short loc_CA16
; ---------------------------------------------------------------------------
loc_C9E7:
cmp [bp+var_14], 0
jz short loc_CA16
pushd [bp+arg_6]
push [bp+arg_4]
call sub_C8D5
add sp, 6
mov [bp+var_18], ax
loc_C9FE:
push 7
mov ax, [bp+arg_2]
add ax, 17
push ax
mov ax, si
add ax, [bp+var_18]
dec ax
push ax
push si
call _graph_r_hline
add sp, 8
loc_CA16:
push [bp+arg_4]
call _grcg_setcolor_rmw
pop cx
mov dx, 68h ; 'h'
mov al, 0Bh
out dx, al
jmp loc_CC4E
; ---------------------------------------------------------------------------
loc_CA27:
mov ax, [bp+arg_2]
imul ax, 50h
push ax
mov ax, si
mov bx, 8
cwd
idiv bx
pop dx
add dx, ax
mov word ptr [bp+var_8+2], 0A800h
mov word ptr [bp+var_8], dx
mov ax, si
cwd
idiv bx
mov [bp+var_C], dx
les bx, [bp+arg_6]
mov al, es:[bx]
mov ah, 0
mov bx, ax
test __mbctype+1[bx], 4
jz short loc_CA7C
mov bx, word ptr [bp+arg_6]
mov al, es:[bx]
cbw
shl ax, 8
mov dl, es:[bx+1]
mov dh, 0
add ax, dx
push ax
call __mbcjmstojis
pop cx
mov [bp+var_2], ax
add word ptr [bp+arg_6], 2
jmp short loc_CAC2
; ---------------------------------------------------------------------------
loc_CA7C:
les bx, [bp+arg_6]
mov al, es:[bx]
mov ah, 0
mov bx, ax
test __mbctype+1[bx], 3
jz short loc_CA9A
mov bx, word ptr [bp+arg_6]
mov al, es:[bx]
mov ah, 0
add ax, 2980h
jmp short loc_CAB5
; ---------------------------------------------------------------------------
loc_CA9A:
les bx, [bp+arg_6]
mov al, es:[bx]
cbw
mov bx, ax
test byte ptr [bx+0C3Bh], 5Eh
jz short loc_CABA
mov bx, word ptr [bp+arg_6]
mov al, es:[bx]
mov ah, 0
add ax, 2900h
loc_CAB5:
mov [bp+var_2], ax
jmp short loc_CABF
; ---------------------------------------------------------------------------
loc_CABA:
mov [bp+var_2], 2B21h
loc_CABF:
inc word ptr [bp+arg_6]
loc_CAC2:
mov al, byte ptr [bp+var_2]
and al, 0FFh
mov dx, 0A1h
out dx, al
mov ax, [bp+var_2]
shr ax, 8
sub al, 20h ; ' '
mov dx, 0A3h ; '£'
out dx, al
cmp [bp+var_2], 2921h
jb short loc_CB23
cmp [bp+var_2], 2B7Eh
ja short loc_CB23
cmp si, 278h
jg loc_CC59
mov [bp+var_1A], 0
jmp short loc_CB16
; ---------------------------------------------------------------------------
loc_CAF4:
mov al, byte ptr [bp+var_1A]
or al, 20h
mov dx, 0A5h
out dx, al
mov dx, 0A9h
in al, dx
mov ah, 0
shl ax, 8
mov bx, [bp+var_1A]
add bx, bx
lea dx, [bp+var_3A]
add bx, dx
mov ss:[bx], ax
inc [bp+var_1A]
loc_CB16:
cmp [bp+var_1A], 10h
jl short loc_CAF4
mov [bp+var_A], 0
jmp short loc_CB79
; ---------------------------------------------------------------------------
loc_CB23:
cmp si, 270h
jg loc_CC59
mov [bp+var_1A], 0
jmp short loc_CB6E
; ---------------------------------------------------------------------------
loc_CB32:
mov al, byte ptr [bp+var_1A]
or al, 20h
mov dx, 0A5h
out dx, al
mov dx, 0A9h
in al, dx
mov ah, 0
shl ax, 8
mov bx, [bp+var_1A]
add bx, bx
lea dx, [bp+var_3A]
add bx, dx
mov ss:[bx], ax
mov dx, 0A5h
mov al, byte ptr [bp+var_1A]
out dx, al
mov dx, 0A9h
in al, dx
mov ah, 0
mov bx, [bp+var_1A]
add bx, bx
lea dx, [bp+var_3A]
add bx, dx
add ss:[bx], ax
inc [bp+var_1A]
loc_CB6E:
cmp [bp+var_1A], 10h
jl short loc_CB32
mov [bp+var_A], 1
loc_CB79:
mov [bp+var_1A], 0
jmp loc_CC35
; ---------------------------------------------------------------------------
loc_CB81:
mov bx, [bp+var_1A]
add bx, bx
lea ax, [bp+var_3A]
add bx, ax
mov ax, ss:[bx]
mov [bp+var_4], ax
mov ax, [bp+var_E]
cmp ax, 1
jz short loc_CBA5
cmp ax, 2
jz short loc_CBBB
cmp ax, 3
jz short loc_CBB1
jmp short loc_CBD1
; ---------------------------------------------------------------------------
loc_CBA5:
mov di, [bp+var_4]
mov ax, di
add ax, ax
or [bp+var_4], ax
jmp short loc_CBD1
; ---------------------------------------------------------------------------
loc_CBB1:
mov di, [bp+var_4]
mov ax, di
add ax, ax
or [bp+var_4], ax
loc_CBBB:
mov di, [bp+var_4]
mov ax, di
add ax, ax
or [bp+var_4], ax
xor di, [bp+var_4]
mov ax, di
add ax, ax
not ax
and [bp+var_4], ax
loc_CBD1:
cmp [bp+var_16], 0
jz short loc_CBE8
cmp [bp+var_A], 0
jz short loc_CBE3
xor [bp+var_4], 0FFFFh
jmp short loc_CBE8
; ---------------------------------------------------------------------------
loc_CBE3:
xor [bp+var_4], 0FF00h
loc_CBE8:
cmp [bp+var_C], 0
jz short loc_CC1B
mov cl, byte ptr [bp+var_C]
add cl, 8
mov ax, [bp+var_4]
shr ax, cl
les bx, [bp+var_8]
mov es:[bx], al
mov ax, [bp+var_4]
mov cl, byte ptr [bp+var_C]
shr ax, cl
mov es:[bx+1], al
mov cl, 8
sub cl, byte ptr [bp+var_C]
mov al, byte ptr [bp+var_4]
shl al, cl
mov es:[bx+2], al
jmp short loc_CC2E
; ---------------------------------------------------------------------------
loc_CC1B:
mov ax, [bp+var_4]
shr ax, 8
les bx, [bp+var_8]
mov es:[bx], al
mov al, byte ptr [bp+var_4]
mov es:[bx+1], al
loc_CC2E:
add word ptr [bp+var_8], 50h ; 'P'
inc [bp+var_1A]
loc_CC35:
cmp [bp+var_1A], 10h
jl loc_CB81
cmp [bp+var_A], 0
jz short loc_CC46
add si, 8
loc_CC46:
mov ax, [bp+var_10]
add ax, 8
add si, ax
loc_CC4E:
les bx, [bp+arg_6]
cmp byte ptr es:[bx], 0
jnz loc_CA27
loc_CC59:
mov dx, 68h ; 'h'
mov al, 0Ah
out dx, al
call _grcg_off_func
pop di
pop si
leave
retf
_graph_putsa_fx endp
extern _z_respal_set:proc extern _z_respal_set:proc
op_06_TEXT ends op_06_TEXT ends

View File

@ -2844,11 +2844,11 @@ sub_CC0F proc far
call _graph_accesspage_func call _graph_accesspage_func
pop cx pop cx
call sub_EC80 call sub_EC80
call _graph_putsa_fx c, 0, (227h shl 16) or 0, offset aVgvpvovfvivovx, ds ; "    " call _graph_putsa_fx c, 0, ((FX_CLEAR_BG or 27h) shl 16) or 0, offset aVgvpvovfvivovx, ds ; "    "
call _graph_putsa_fx c, 0, (227h shl 16) or 16, offset aVxvevub@b@B@, ds ; "    " call _graph_putsa_fx c, 0, ((FX_CLEAR_BG or 27h) shl 16) or 16, offset aVxvevub@b@B@, ds ; "    "
call _graph_putsa_fx c, 0, (227h shl 16) or 32, offset aVmvpb@b@B@, ds ; "     " call _graph_putsa_fx c, 0, ((FX_CLEAR_BG or 27h) shl 16) or 32, offset aVmvpb@b@B@, ds ; "     "
call _graph_putsa_fx c, 0, (221h shl 16) or 48, offset aVxvevub@b@c@, ds ; "    " call _graph_putsa_fx c, 0, ((FX_CLEAR_BG or 21h) shl 16) or 48, offset aVxvevub@b@c@, ds ; "    "
call _graph_putsa_fx c, 0, (221h shl 16) or 64, offset aVmvpb@b@c@, ds ; "    " call _graph_putsa_fx c, 0, ((FX_CLEAR_BG or 21h) shl 16) or 64, offset aVmvpb@b@c@, ds ; "    "
push 0 push 0
call _graph_accesspage_func call _graph_accesspage_func
pop cx pop cx
@ -6440,485 +6440,8 @@ loc_F11D:
sub_F0B3 endp sub_F0B3 endp
include th01/hardware/graph_r.asm include th01/hardware/graph_r.asm
extern _text_extent_fx:proc
; =============== S U B R O U T I N E ======================================= extern _graph_putsa_fx:proc
; Attributes: bp-based frame
sub_F9D0 proc far
arg_0 = word ptr 6
arg_2 = dword ptr 8
push bp
mov bp, sp
push si
push di
xor cx, cx
mov ax, [bp+arg_0]
mov bx, 40h
cwd
idiv bx
mov bx, 8
cwd
idiv bx
mov si, dx
jmp short loc_FA32
; ---------------------------------------------------------------------------
loc_F9EA:
les bx, [bp+arg_2]
mov al, es:[bx]
mov ah, 0
mov bx, ax
test __mbctype+1[bx], 4
jz short loc_FA2A
mov bx, word ptr [bp+arg_2]
mov al, es:[bx]
cbw
shl ax, 8
mov dl, es:[bx]
mov dh, 0
add ax, dx
mov di, ax
inc word ptr [bp+arg_2]
inc word ptr [bp+arg_2]
cmp di, 8540h
jb short loc_FA20
cmp di, 869Eh
jbe short loc_FA25
loc_FA20:
add cx, 10h
jmp short loc_FA30
; ---------------------------------------------------------------------------
loc_FA25:
add cx, 8
jmp short loc_FA30
; ---------------------------------------------------------------------------
loc_FA2A:
add cx, 8
inc word ptr [bp+arg_2]
loc_FA30:
add cx, si
loc_FA32:
les bx, [bp+arg_2]
cmp byte ptr es:[bx], 0
jnz short loc_F9EA
mov ax, cx
sub ax, si
pop di
pop si
pop bp
retf
sub_F9D0 endp
; =============== S U B R O U T I N E =======================================
; Attributes: bp-based frame
_graph_putsa_fx proc far
var_3A = byte ptr -3Ah
var_1A = word ptr -1Ah
var_18 = word ptr -18h
var_16 = word ptr -16h
var_14 = word ptr -14h
var_12 = word ptr -12h
var_10 = word ptr -10h
var_E = word ptr -0Eh
var_C = word ptr -0Ch
var_A = word ptr -0Ah
var_8 = dword ptr -8
var_4 = word ptr -4
var_2 = word ptr -2
arg_0 = word ptr 6
arg_2 = word ptr 8
arg_4 = word ptr 0Ah
arg_6 = dword ptr 0Ch
enter 3Ah, 0
push si
push di
mov si, [bp+arg_0]
mov ax, [bp+arg_4]
mov bx, 10h
cwd
idiv bx
mov bx, 4
cwd
idiv bx
mov [bp+var_E], dx
mov ax, [bp+arg_4]
mov bx, 40h
cwd
idiv bx
mov bx, 8
cwd
idiv bx
mov [bp+var_10], dx
mov ax, [bp+arg_4]
and ax, 200h
mov [bp+var_12], ax
mov ax, [bp+arg_4]
and ax, 400h
mov [bp+var_14], ax
mov ax, [bp+arg_4]
and ax, 800h
mov [bp+var_16], ax
cmp [bp+var_12], 0
jz short loc_FAE2
pushd [bp+arg_6]
push [bp+arg_4]
call sub_F9D0
add sp, 6
mov [bp+var_18], ax
cmp [bp+var_14], 0
jz short loc_FAC5
push 0
mov ax, [bp+arg_2]
add ax, 11h
push ax
mov ax, si
add ax, [bp+var_18]
dec ax
push ax
push [bp+arg_2]
push si
call _z_grcg_boxfill
add sp, 0Ah
jmp short loc_FAF9
; ---------------------------------------------------------------------------
loc_FAC5:
push 0
mov ax, [bp+arg_2]
add ax, 0Fh
push ax
mov ax, si
add ax, [bp+var_18]
dec ax
push ax
push [bp+arg_2]
push si
call _z_grcg_boxfill
add sp, 0Ah
jmp short loc_FB11
; ---------------------------------------------------------------------------
loc_FAE2:
cmp [bp+var_14], 0
jz short loc_FB11
pushd [bp+arg_6]
push [bp+arg_4]
call sub_F9D0
add sp, 6
mov [bp+var_18], ax
loc_FAF9:
push 7
mov ax, [bp+arg_2]
add ax, 17
push ax
mov ax, si
add ax, [bp+var_18]
dec ax
push ax
push si
call _graph_r_hline
add sp, 8
loc_FB11:
push [bp+arg_4]
call _grcg_setcolor_rmw
pop cx
mov dx, 68h ; 'h'
mov al, 0Bh
out dx, al
jmp loc_FD49
; ---------------------------------------------------------------------------
loc_FB22:
mov ax, [bp+arg_2]
imul ax, 50h
push ax
mov ax, si
mov bx, 8
cwd
idiv bx
pop dx
add dx, ax
mov word ptr [bp+var_8+2], 0A800h
mov word ptr [bp+var_8], dx
mov ax, si
cwd
idiv bx
mov [bp+var_C], dx
les bx, [bp+arg_6]
mov al, es:[bx]
mov ah, 0
mov bx, ax
test __mbctype+1[bx], 4
jz short loc_FB77
mov bx, word ptr [bp+arg_6]
mov al, es:[bx]
cbw
shl ax, 8
mov dl, es:[bx+1]
mov dh, 0
add ax, dx
push ax
call __mbcjmstojis
pop cx
mov [bp+var_2], ax
add word ptr [bp+arg_6], 2
jmp short loc_FBBD
; ---------------------------------------------------------------------------
loc_FB77:
les bx, [bp+arg_6]
mov al, es:[bx]
mov ah, 0
mov bx, ax
test __mbctype+1[bx], 3
jz short loc_FB95
mov bx, word ptr [bp+arg_6]
mov al, es:[bx]
mov ah, 0
add ax, 2980h
jmp short loc_FBB0
; ---------------------------------------------------------------------------
loc_FB95:
les bx, [bp+arg_6]
mov al, es:[bx]
cbw
mov bx, ax
test byte ptr [bx+1D17h], 5Eh
jz short loc_FBB5
mov bx, word ptr [bp+arg_6]
mov al, es:[bx]
mov ah, 0
add ax, 2900h
loc_FBB0:
mov [bp+var_2], ax
jmp short loc_FBBA
; ---------------------------------------------------------------------------
loc_FBB5:
mov [bp+var_2], 2B21h
loc_FBBA:
inc word ptr [bp+arg_6]
loc_FBBD:
mov al, byte ptr [bp+var_2]
and al, 0FFh
mov dx, 0A1h ; '。'
out dx, al
mov ax, [bp+var_2]
shr ax, 8
sub al, 20h ; ' '
mov dx, 0A3h ; '」'
out dx, al
cmp [bp+var_2], 2921h
jb short loc_FC1E
cmp [bp+var_2], 2B7Eh
ja short loc_FC1E
cmp si, 278h
jg loc_FD54
mov [bp+var_1A], 0
jmp short loc_FC11
; ---------------------------------------------------------------------------
loc_FBEF:
mov al, byte ptr [bp+var_1A]
or al, 20h
mov dx, 0A5h ; '・'
out dx, al
mov dx, 0A9h ; 'ゥ'
in al, dx
mov ah, 0
shl ax, 8
mov bx, [bp+var_1A]
add bx, bx
lea dx, [bp+var_3A]
add bx, dx
mov ss:[bx], ax
inc [bp+var_1A]
loc_FC11:
cmp [bp+var_1A], 10h
jl short loc_FBEF
mov [bp+var_A], 0
jmp short loc_FC74
; ---------------------------------------------------------------------------
loc_FC1E:
cmp si, 270h
jg loc_FD54
mov [bp+var_1A], 0
jmp short loc_FC69
; ---------------------------------------------------------------------------
loc_FC2D:
mov al, byte ptr [bp+var_1A]
or al, 20h
mov dx, 0A5h ; '・'
out dx, al
mov dx, 0A9h ; 'ゥ'
in al, dx
mov ah, 0
shl ax, 8
mov bx, [bp+var_1A]
add bx, bx
lea dx, [bp+var_3A]
add bx, dx
mov ss:[bx], ax
mov dx, 0A5h ; '・'
mov al, byte ptr [bp+var_1A]
out dx, al
mov dx, 0A9h ; 'ゥ'
in al, dx
mov ah, 0
mov bx, [bp+var_1A]
add bx, bx
lea dx, [bp+var_3A]
add bx, dx
add ss:[bx], ax
inc [bp+var_1A]
loc_FC69:
cmp [bp+var_1A], 10h
jl short loc_FC2D
mov [bp+var_A], 1
loc_FC74:
mov [bp+var_1A], 0
jmp loc_FD30
; ---------------------------------------------------------------------------
loc_FC7C:
mov bx, [bp+var_1A]
add bx, bx
lea ax, [bp+var_3A]
add bx, ax
mov ax, ss:[bx]
mov [bp+var_4], ax
mov ax, [bp+var_E]
cmp ax, 1
jz short loc_FCA0
cmp ax, 2
jz short loc_FCB6
cmp ax, 3
jz short loc_FCAC
jmp short loc_FCCC
; ---------------------------------------------------------------------------
loc_FCA0:
mov di, [bp+var_4]
mov ax, di
add ax, ax
or [bp+var_4], ax
jmp short loc_FCCC
; ---------------------------------------------------------------------------
loc_FCAC:
mov di, [bp+var_4]
mov ax, di
add ax, ax
or [bp+var_4], ax
loc_FCB6:
mov di, [bp+var_4]
mov ax, di
add ax, ax
or [bp+var_4], ax
xor di, [bp+var_4]
mov ax, di
add ax, ax
not ax
and [bp+var_4], ax
loc_FCCC:
cmp [bp+var_16], 0
jz short loc_FCE3
cmp [bp+var_A], 0
jz short loc_FCDE
xor [bp+var_4], 0FFFFh
jmp short loc_FCE3
; ---------------------------------------------------------------------------
loc_FCDE:
xor [bp+var_4], 0FF00h
loc_FCE3:
cmp [bp+var_C], 0
jz short loc_FD16
mov cl, byte ptr [bp+var_C]
add cl, 8
mov ax, [bp+var_4]
shr ax, cl
les bx, [bp+var_8]
mov es:[bx], al
mov ax, [bp+var_4]
mov cl, byte ptr [bp+var_C]
shr ax, cl
mov es:[bx+1], al
mov cl, 8
sub cl, byte ptr [bp+var_C]
mov al, byte ptr [bp+var_4]
shl al, cl
mov es:[bx+2], al
jmp short loc_FD29
; ---------------------------------------------------------------------------
loc_FD16:
mov ax, [bp+var_4]
shr ax, 8
les bx, [bp+var_8]
mov es:[bx], al
mov al, byte ptr [bp+var_4]
mov es:[bx+1], al
loc_FD29:
add word ptr [bp+var_8], 50h ; 'P'
inc [bp+var_1A]
loc_FD30:
cmp [bp+var_1A], 10h
jl loc_FC7C
cmp [bp+var_A], 0
jz short loc_FD41
add si, 8
loc_FD41:
mov ax, [bp+var_10]
add ax, 8
add si, ax
loc_FD49:
les bx, [bp+arg_6]
cmp byte ptr es:[bx], 0
jnz loc_FB22
loc_FD54:
mov dx, 68h ; 'h'
mov al, 0Ah
out dx, al
call _grcg_off_func
pop di
pop si
leave
retf
_graph_putsa_fx endp
extern _graph_move_byterect_interpage:proc extern _graph_move_byterect_interpage:proc
extern _z_respal_set:proc extern _z_respal_set:proc
main_06_TEXT ends main_06_TEXT ends
@ -10764,32 +10287,12 @@ loc_127AC:
push 1 push 1
call _graph_accesspage_func call _graph_accesspage_func
call sub_EC0D call sub_EC0D
push ds call _graph_putsa_fx stdcall, 0, large ((FX_CLEAR_BG or 7) shl 16) or 0, offset aVqvnvtvmvcb@vp, ds ; "  "
push offset aVqvnvtvmvcb@vp ; "  " call _graph_putsa_fx stdcall, 0, large ((FX_CLEAR_BG or 7) shl 16) or 32, offset aVbvpvovzvtvbvf, ds ; ""
push (207h shl 16) or 0 call _graph_putsa_fx stdcall, 0, large ((FX_CLEAR_BG or 7) shl 16) or 64, offset aVrvevmvevgvfb@, ds ; "  "
push 0 call _graph_putsa_fx stdcall, 0, large ((FX_CLEAR_BG or 1) shl 16) or 96, offset aCvkev, ds ; "魔界へ"
call _graph_putsa_fx
push ds
push offset aVbvpvovzvtvbvf ; ""
push (207h shl 16) or 32
push 0
call _graph_putsa_fx
push ds
push offset aVrvevmvevgvfb@ ; "  "
push (207h shl 16) or 64
push 0
call _graph_putsa_fx
push ds
push offset aCvkev ; "魔界へ"
push (201h shl 16) or 96
push 0
call _graph_putsa_fx
add sp, 2Eh add sp, 2Eh
push ds call _graph_putsa_fx stdcall, 0, large ((FX_CLEAR_BG or 3) shl 16) or 128, offset aTnncv, ds ; "地獄へ"
push offset aTnncv ; "地獄へ"
push (203h shl 16) or 128
push 0
call _graph_putsa_fx
push 0 push 0
call _graph_accesspage_func call _graph_accesspage_func
push (0Fh shl 16) or 0Fh push (0Fh shl 16) or 0Fh
@ -13265,7 +12768,7 @@ var_18 = byte ptr -18h
var_6 = byte ptr -6 var_6 = byte ptr -6
var_5 = byte ptr -5 var_5 = byte ptr -5
var_4 = byte ptr -4 var_4 = byte ptr -4
var_2 = word ptr -2 @@top = word ptr -2
arg_0 = word ptr 6 arg_0 = word ptr 6
arg_2 = dword ptr 8 arg_2 = dword ptr 8
arg_6 = word ptr 0Ch arg_6 = word ptr 0Ch
@ -13309,7 +12812,7 @@ loc_13E79:
mov ax, si mov ax, si
shl ax, 4 shl ax, 4
add ax, 40h add ax, 40h
mov [bp+var_2], ax mov [bp+@@top], ax
mov bx, si mov bx, si
cmp bx, 9 cmp bx, 9
ja short loc_13EE1 ja short loc_13EE1
@ -13378,7 +12881,7 @@ loc_13ECE:
mov ax, di mov ax, di
or ax, 20h or ax, 20h
push ax push ax
push [bp+var_2] push [bp+@@top]
push 32 push 32
call _graph_putsa_fx call _graph_putsa_fx
add sp, 0Ah add sp, 0Ah
@ -13406,7 +12909,7 @@ loc_13EFC:
mov ax, di mov ax, di
or ax, 20h or ax, 20h
push ax push ax
push [bp+var_2] push [bp+@@top]
push 144 push 144
call _graph_putsa_fx call _graph_putsa_fx
add sp, 0Ah add sp, 0Ah
@ -13431,7 +12934,7 @@ loc_13F31:
mov ax, di mov ax, di
or ax, 30h or ax, 30h
push ax push ax
push [bp+var_2] push [bp+@@top]
push 160h push 160h
call sub_18589 call sub_18589
add sp, 12h add sp, 12h
@ -13473,7 +12976,7 @@ loc_13F85:
mov ax, di mov ax, di
or ax, 20h or ax, 20h
push ax push ax
push [bp+var_2] push [bp+@@top]
push 210h push 210h
call sub_18589 call sub_18589
add sp, 12h add sp, 12h
@ -13526,7 +13029,7 @@ loc_13FEB:
mov ax, di mov ax, di
or ax, 20h or ax, 20h
push ax push ax
push [bp+var_2] push [bp+@@top]
push 528 push 528
call _graph_putsa_fx call _graph_putsa_fx
add sp, 0Ah add sp, 0Ah
@ -13537,7 +13040,7 @@ loc_13FFF:
mov ax, di mov ax, di
or ax, 20h or ax, 20h
push ax push ax
push [bp+var_2] push [bp+@@top]
push 560 push 560
call _graph_putsa_fx call _graph_putsa_fx
add sp, 0Ah add sp, 0Ah
@ -13578,7 +13081,7 @@ loc_1404B:
mov ax, di mov ax, di
or ax, 20h or ax, 20h
push ax push ax
push [bp+var_2] push [bp+@@top]
push 576 push 576
call _graph_putsa_fx call _graph_putsa_fx
add sp, 0Ah add sp, 0Ah
@ -13621,7 +13124,7 @@ off_1408D dw offset loc_13E94
sub_140A1 proc far sub_140A1 proc far
var_8 = byte ptr -8 var_8 = byte ptr -8
var_4 = word ptr -4 @@fx = word ptr -4
var_2 = word ptr -2 var_2 = word ptr -2
@@x = word ptr 6 @@x = word ptr 6
@@y = word ptr 8 @@y = word ptr 8
@ -13645,11 +13148,11 @@ arg_4 = word ptr 0Ah
; --------------------------------------------------------------------------- ; ---------------------------------------------------------------------------
loc_140CD: loc_140CD:
mov ax, 803h mov ax, (FX_REVERSE or 3)
loc_140D0: loc_140D0:
or ax, 20h or ax, 20h
mov [bp+var_4], ax mov [bp+@@fx], ax
cmp di, 240 cmp di, 240
jnz short loc_140EA jnz short loc_140EA
lea ax, [si-32] lea ax, [si-32]
@ -13761,7 +13264,7 @@ loc_14192:
push offset aPi ; "<22>I" push offset aPi ; "<22>I"
loc_141A2: loc_141A2:
push [bp+var_4] push [bp+@@fx]
push di push di
push si push si
call _graph_putsa_fx call _graph_putsa_fx
@ -13778,7 +13281,7 @@ loc_141AF:
push ss push ss
lea ax, [bp+var_8] lea ax, [bp+var_8]
push ax push ax
push [bp+var_4] push [bp+@@fx]
push di push di
push si push si
call _graph_putsa_fx call _graph_putsa_fx
@ -14627,7 +14130,7 @@ loc_148F9:
pop cx pop cx
cmp di, 1Eh cmp di, 1Eh
jge short loc_14942 jge short loc_14942
call _graph_putsa_fx c, 0, large (227h shl 16) or 384, offset aUmx_2, ds ; "東方靈異伝 強者の記録 " call _graph_putsa_fx c, 0, large ((FX_CLEAR_BG or 27h) shl 16) or 384, offset aUmx_2, ds ; "東方靈異伝 強者の記録 "
mov al, _rank mov al, _rank
cbw cbw
shl ax, 2 shl ax, 2
@ -14635,12 +14138,12 @@ loc_148F9:
add ax, dx add ax, dx
mov bx, ax mov bx, ax
pushd dword ptr ss:[bx] pushd dword ptr ss:[bx]
push (227h shl 16) or 384 push ((FX_CLEAR_BG or 27h) shl 16) or 384
jmp short loc_1496F jmp short loc_1496F
; --------------------------------------------------------------------------- ; ---------------------------------------------------------------------------
loc_14942: loc_14942:
call _graph_putsa_fx c, 0, large (227h shl 16) or 0, offset aUmx_1, ds ; "東方靈異伝 強者の記録" call _graph_putsa_fx c, 0, large ((FX_CLEAR_BG or 27h) shl 16) or 0, offset aUmx_1, ds ; "東方靈異伝 強者の記録"
mov al, _rank mov al, _rank
cbw cbw
shl ax, 2 shl ax, 2
@ -14648,7 +14151,7 @@ loc_14942:
add ax, dx add ax, dx
mov bx, ax mov bx, ax
pushd dword ptr ss:[bx] pushd dword ptr ss:[bx]
push (227h shl 16) or 0 push ((FX_CLEAR_BG or 27h) shl 16) or 0
loc_1496F: loc_1496F:
push 192 push 192
@ -21560,9 +21063,9 @@ var_30 = byte ptr -30h
var_8 = dword ptr -8 var_8 = dword ptr -8
var_4 = word ptr -4 var_4 = word ptr -4
var_2 = word ptr -2 var_2 = word ptr -2
arg_0 = word ptr 6 @@left = word ptr 6
arg_2 = word ptr 8 @@top = word ptr 8
arg_4 = word ptr 0Ah @@fx = word ptr 0Ah
arg_6 = word ptr 0Ch arg_6 = word ptr 0Ch
arg_8 = dword ptr 0Eh arg_8 = dword ptr 0Eh
arg_C = dword ptr 12h arg_C = dword ptr 12h
@ -21571,7 +21074,7 @@ arg_10 = word ptr 16h
enter 30h, 0 enter 30h, 0
push si push si
push di push di
mov si, [bp+arg_0] mov si, [bp+@@left]
mov [bp+var_8], 1 mov [bp+var_8], 1
lea ax, [bp+var_30] lea ax, [bp+var_30]
push ss push ss
@ -21600,7 +21103,7 @@ loc_185C1:
xor edx, edx xor edx, edx
div ebx div ebx
mov [bp+var_8], eax mov [bp+var_8], eax
cmp si, 270h cmp si, (RES_X - GLYPH_FULL_W)
jg short loc_18653 jg short loc_18653
mov eax, [bp+arg_8] mov eax, [bp+arg_8]
xor edx, edx xor edx, edx
@ -21633,7 +21136,7 @@ loc_18629:
shl bx, 2 shl bx, 2
lea ax, [bp+var_30] lea ax, [bp+var_30]
add bx, ax add bx, ax
call _graph_putsa_fx c, si, [bp+arg_2], [bp+arg_4], large dword ptr ss:[bx] call _graph_putsa_fx c, si, [bp+@@top], [bp+@@fx], large dword ptr ss:[bx]
loc_18647: loc_18647:
add si, 10h add si, 10h
@ -23052,10 +22555,7 @@ loc_19124:
cbw cbw
shl ax, 2 shl ax, 2
mov bx, ax mov bx, ax
pushd aRANKS[bx] call _text_extent_fx c, 7, large aRANKS[bx]
push 7
call sub_F9D0
add sp, 6
cwd cwd
sub ax, dx sub ax, dx
sar ax, 1 sar ax, 1
@ -23096,10 +22596,7 @@ loc_19124:
cbw cbw
shl ax, 2 shl ax, 2
mov bx, ax mov bx, ax
pushd aRANKS[bx] call _text_extent_fx c, 7, large aRANKS[bx]
push 7
call sub_F9D0
add sp, 6
cwd cwd
sub ax, dx sub ax, dx
sar ax, 1 sar ax, 1