mirror of https://github.com/nmlgc/ReC98.git
[Decompilation] [th02] Endings: Clearing the text line
Part of P0278, funded by Yanga.
This commit is contained in:
parent
ddaf8c9495
commit
f623a70929
|
@ -21,6 +21,14 @@
|
||||||
// -----------
|
// -----------
|
||||||
|
|
||||||
static const screen_y_t CUTSCENE_PIC_TOP = ((RES_Y / 2) - (CUTSCENE_PIC_H / 2));
|
static const screen_y_t CUTSCENE_PIC_TOP = ((RES_Y / 2) - (CUTSCENE_PIC_H / 2));
|
||||||
|
static const pixel_t END_LINE_W = (END_LINE_LENGTH * GLYPH_HALF_W);
|
||||||
|
|
||||||
|
static const screen_x_t END_LINE_LEFT = ((RES_X / 2) - (END_LINE_W / 2));
|
||||||
|
static const screen_y_t END_LINE_TOP = (
|
||||||
|
CUTSCENE_PIC_TOP + CUTSCENE_PIC_H + (GLYPH_H * 2)
|
||||||
|
);
|
||||||
|
static const screen_x_t END_LINE_RIGHT = (END_LINE_LEFT + END_LINE_W);
|
||||||
|
static const screen_y_t END_LINE_BOTTOM = (END_LINE_TOP + GLYPH_H);
|
||||||
// -----------
|
// -----------
|
||||||
|
|
||||||
// State
|
// State
|
||||||
|
@ -266,3 +274,18 @@ void pascal near end_pic_put_rows(
|
||||||
CUTSCENE_PIC_LEFT, CUTSCENE_PIC_TOP, rows, quarter, quarter_offset_y
|
CUTSCENE_PIC_LEFT, CUTSCENE_PIC_TOP, rows, quarter, quarter_offset_y
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void near end_line_clear(void)
|
||||||
|
{
|
||||||
|
screen_y_t y;
|
||||||
|
screen_y_t x;
|
||||||
|
|
||||||
|
grcg_setcolor(GC_RMW, 0);
|
||||||
|
for(y = END_LINE_TOP; y < END_LINE_BOTTOM; y++) {
|
||||||
|
for(x = END_LINE_LEFT; x < END_LINE_RIGHT; x += GLYPH_FULL_W) {
|
||||||
|
vram_offset_t vo = vram_offset_shift(x, y);
|
||||||
|
grcg_put(vo, 0xFFFF, GLYPH_FULL_W);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
grcg_off();
|
||||||
|
}
|
||||||
|
|
|
@ -127,6 +127,7 @@ END_TEXT segment byte public 'CODE' use16
|
||||||
@STAFFROLL_PIC_PUT$QIII procdesc pascal near \
|
@STAFFROLL_PIC_PUT$QIII procdesc pascal near \
|
||||||
left_and_top:dword, quarter:word
|
left_and_top:dword, quarter:word
|
||||||
@END_PIC_PUT_ROWS$QIII procdesc pascal near
|
@END_PIC_PUT_ROWS$QIII procdesc pascal near
|
||||||
|
@end_line_clear$qv procdesc near
|
||||||
END_TEXT ends
|
END_TEXT ends
|
||||||
|
|
||||||
; Segment type: Pure code
|
; Segment type: Pure code
|
||||||
|
@ -135,58 +136,6 @@ maine_01_TEXT segment byte public 'CODE' use16
|
||||||
;org 3
|
;org 3
|
||||||
assume es:nothing, ss:nothing, ds:_DATA, fs:nothing, gs:nothing
|
assume es:nothing, ss:nothing, ds:_DATA, fs:nothing, gs:nothing
|
||||||
|
|
||||||
; =============== S U B R O U T I N E =======================================
|
|
||||||
|
|
||||||
; Attributes: bp-based frame
|
|
||||||
public @end_line_clear$qv
|
|
||||||
@end_line_clear$qv proc near
|
|
||||||
|
|
||||||
var_2 = word ptr -2
|
|
||||||
|
|
||||||
enter 2, 0
|
|
||||||
push si
|
|
||||||
push di
|
|
||||||
call grcg_setcolor pascal, (GC_RMW shl 16) + 0
|
|
||||||
mov si, 14Ch
|
|
||||||
jmp short loc_9AC5
|
|
||||||
; ---------------------------------------------------------------------------
|
|
||||||
|
|
||||||
loc_9A94:
|
|
||||||
mov di, 90h
|
|
||||||
jmp short loc_9ABE
|
|
||||||
; ---------------------------------------------------------------------------
|
|
||||||
|
|
||||||
loc_9A99:
|
|
||||||
mov ax, di
|
|
||||||
sar ax, 3
|
|
||||||
mov dx, si
|
|
||||||
shl dx, 6
|
|
||||||
add ax, dx
|
|
||||||
mov dx, si
|
|
||||||
shl dx, 4
|
|
||||||
add ax, dx
|
|
||||||
mov [bp+var_2], ax
|
|
||||||
les bx, _VRAM_PLANE_B
|
|
||||||
add bx, [bp+var_2]
|
|
||||||
mov word ptr es:[bx], 0FFFFh
|
|
||||||
add di, 10h
|
|
||||||
|
|
||||||
loc_9ABE:
|
|
||||||
cmp di, 1F0h
|
|
||||||
jl short loc_9A99
|
|
||||||
inc si
|
|
||||||
|
|
||||||
loc_9AC5:
|
|
||||||
cmp si, 15Ch
|
|
||||||
jl short loc_9A94
|
|
||||||
call grcg_off
|
|
||||||
pop di
|
|
||||||
pop si
|
|
||||||
leave
|
|
||||||
retn
|
|
||||||
@end_line_clear$qv endp
|
|
||||||
|
|
||||||
|
|
||||||
; =============== S U B R O U T I N E =======================================
|
; =============== S U B R O U T I N E =======================================
|
||||||
|
|
||||||
; Attributes: bp-based frame
|
; Attributes: bp-based frame
|
||||||
|
|
Loading…
Reference in New Issue