mirror of https://github.com/nmlgc/ReC98.git
[Naming] [th04/th05] bgimage_put_rect(): Annotate the 16-pixel alignment
This will later become relevant in a piece of ZUN bloat. Part of P0264, funded by [Anonymous] and Blue Bolt.
This commit is contained in:
parent
05721ea8fb
commit
9651bcf7ee
|
@ -528,7 +528,7 @@ void near cursor_advance_and_animate(void)
|
|||
|
||||
// ZUN bloat: A white glyph aligned to the 8×16 cell grid, without
|
||||
// applying boldface… why not just show it on TRAM?
|
||||
bgimage_put_rect(LEFT, cursor.y, GLYPH_FULL_W, GLYPH_H);
|
||||
bgimage_put_rect_16(LEFT, cursor.y, GLYPH_FULL_W, GLYPH_H);
|
||||
|
||||
if(
|
||||
(frames_to_wait <= 0) ||
|
||||
|
@ -606,7 +606,7 @@ script_ret_t pascal near script_op(unsigned char c)
|
|||
|
||||
#if (GAME == 5)
|
||||
graph_accesspage(1);
|
||||
bgimage_put_rect(BOX_LEFT, BOX_TOP, BOX_W, BOX_H);
|
||||
bgimage_put_rect_16(BOX_LEFT, BOX_TOP, BOX_W, BOX_H);
|
||||
|
||||
// ZUN bloat: All blitting operations in this module access the
|
||||
// intended page before they blit. That's why preliminary state
|
||||
|
|
|
@ -7,8 +7,9 @@ void bgimage_snap(void);
|
|||
void bgimage_put(void);
|
||||
|
||||
void bgimage_free(void);
|
||||
|
||||
// Blits the rectangle from (⌊x/16⌋*16, y) to (⌈((x + w)/16)*16⌉, (y + h))
|
||||
// on the [bgimage] to the same position in VRAM.
|
||||
void pascal bgimage_put_rect(
|
||||
void pascal bgimage_put_rect_16(
|
||||
screen_x_t left, screen_y_t top, pixel_t w, pixel_t h
|
||||
);
|
||||
|
|
|
@ -11,8 +11,8 @@ SHARED ends
|
|||
SHARED_ segment word public 'CODE' use16
|
||||
assume cs:g_SHARED
|
||||
|
||||
public BGIMAGE_PUT_RECT
|
||||
bgimage_put_rect proc far
|
||||
public BGIMAGE_PUT_RECT_16
|
||||
bgimage_put_rect_16 proc far
|
||||
; (PASCAL calling convention, parameter list needs to be reversed here)
|
||||
arg @@h:word, @@w:word, @@top:word, @@left:word
|
||||
@@planes_left equ <dl>
|
||||
|
@ -87,7 +87,7 @@ endif
|
|||
pop di
|
||||
pop bp
|
||||
retf 8
|
||||
bgimage_put_rect endp
|
||||
bgimage_put_rect_16 endp
|
||||
even
|
||||
SHARED_ ends
|
||||
|
||||
|
|
|
@ -763,7 +763,7 @@ arg_8 = word ptr 0Ch
|
|||
add ax, ax
|
||||
add ax, [bp+arg_2]
|
||||
push ax
|
||||
call bgimage_put_rect
|
||||
call bgimage_put_rect_16
|
||||
pop si
|
||||
pop bp
|
||||
retn 0Ah
|
||||
|
@ -3210,7 +3210,7 @@ include th04/hardware/grppsafx.asm
|
|||
extern _input_sense:proc
|
||||
extern _bgimage_snap:proc
|
||||
extern _bgimage_free:proc
|
||||
extern BGIMAGE_PUT_RECT:proc
|
||||
extern BGIMAGE_PUT_RECT_16:proc
|
||||
extern CDG_LOAD_SINGLE_NOALPHA:proc
|
||||
extern CDG_LOAD_SINGLE:proc
|
||||
extern CDG_FREE:proc
|
||||
|
|
|
@ -248,9 +248,9 @@ sub_C33F proc near
|
|||
push bp
|
||||
mov bp, sp
|
||||
mov _graph_putsa_fx_func, FX_WEIGHT_BOLD
|
||||
call bgimage_put_rect pascal, (320 shl 16) or 64, (320 shl 16) or 320
|
||||
call bgimage_put_rect_16 pascal, (320 shl 16) or 64, (320 shl 16) or 320
|
||||
call music_flip
|
||||
call bgimage_put_rect pascal, (320 shl 16) or 64, (320 shl 16) or 320
|
||||
call bgimage_put_rect_16 pascal, (320 shl 16) or 64, (320 shl 16) or 320
|
||||
pop bp
|
||||
retn
|
||||
sub_C33F endp
|
||||
|
@ -273,7 +273,7 @@ draw_cmt proc near
|
|||
loc_C37C:
|
||||
call music_cmt_load pascal, [bp+@@track]
|
||||
call screen_back_B_put
|
||||
call bgimage_put_rect pascal, (320 shl 16) or 64, (320 shl 16) or 320
|
||||
call bgimage_put_rect_16 pascal, (320 shl 16) or 64, (320 shl 16) or 320
|
||||
cmp byte_12DBE, 0
|
||||
jz short loc_C3A2
|
||||
call sub_C30E
|
||||
|
@ -1158,7 +1158,7 @@ include th02/snd/snd.inc
|
|||
extern _bgimage_snap:proc
|
||||
extern _bgimage_put:proc
|
||||
extern _bgimage_free:proc
|
||||
extern BGIMAGE_PUT_RECT:proc
|
||||
extern BGIMAGE_PUT_RECT_16:proc
|
||||
extern CDG_LOAD_ALL_NOALPHA:proc
|
||||
extern CDG_LOAD_ALL:proc
|
||||
extern CDG_FREE_ALL:proc
|
||||
|
|
|
@ -134,8 +134,8 @@ void pascal near pic_put(bool16 darkened)
|
|||
}
|
||||
} else {
|
||||
// Raised area of the highlighted pic
|
||||
bgimage_put_rect(pic_raised_left, pic_raised_top, PIC_W, RAISE_H);
|
||||
bgimage_put_rect(pic_raised_left, pic_top, RAISE_W, PIC_H);
|
||||
bgimage_put_rect_16(pic_raised_left, pic_raised_top, PIC_W, RAISE_H);
|
||||
bgimage_put_rect_16(pic_raised_left, pic_top, RAISE_W, PIC_H);
|
||||
|
||||
// Pic
|
||||
if(selectable_with[playchar_menu_sel]) {
|
||||
|
|
|
@ -1225,7 +1225,7 @@ loc_BAFE:
|
|||
mov di, ax
|
||||
|
||||
loc_BB00:
|
||||
call bgimage_put_rect pascal, si, di, (130 shl 16) or 18
|
||||
call bgimage_put_rect_16 pascal, si, di, (130 shl 16) or 18
|
||||
lea ax, [si+2]
|
||||
push ax
|
||||
lea ax, [di+2]
|
||||
|
@ -1787,7 +1787,7 @@ loc_BEA6:
|
|||
add ax, -(GLYPHBALL_CLOUD_SPLASH_H / 2)
|
||||
push ax
|
||||
push (GLYPHBALL_CLOUD_SPLASH_W shl 16) or GLYPHBALL_CLOUD_SPLASH_H
|
||||
call bgimage_put_rect
|
||||
call bgimage_put_rect_16
|
||||
|
||||
loc_BEC8:
|
||||
inc di
|
||||
|
@ -6326,7 +6326,7 @@ include th04/hardware/grppsafx.asm
|
|||
extern _bgimage_free:proc
|
||||
extern @game_exit$qv:proc
|
||||
extern VECTOR2_AT:proc
|
||||
extern BGIMAGE_PUT_RECT:proc
|
||||
extern BGIMAGE_PUT_RECT_16:proc
|
||||
extern SND_LOAD:proc
|
||||
extern SND_KAJA_INTERRUPT:proc
|
||||
extern PI_PUT_QUARTER_MASKED_8:proc
|
||||
|
|
22
th05_op.asm
22
th05_op.asm
|
@ -129,7 +129,7 @@ loc_BEF4:
|
|||
lea ax, [si+96]
|
||||
push ax
|
||||
push (320 shl 16) or 16
|
||||
call bgimage_put_rect
|
||||
call bgimage_put_rect_16
|
||||
|
||||
loc_BF05:
|
||||
mov al, [bp+arg_2]
|
||||
|
@ -296,11 +296,11 @@ sub_C3A7 proc near
|
|||
push bp
|
||||
mov bp, sp
|
||||
mov _graph_putsa_fx_func, FX_WEIGHT_BOLD
|
||||
call bgimage_put_rect pascal, (320 shl 16) or 32, (320 shl 16) or 16
|
||||
call bgimage_put_rect pascal, (320 shl 16) or 180, (320 shl 16) or 144
|
||||
call bgimage_put_rect_16 pascal, (320 shl 16) or 32, (320 shl 16) or 16
|
||||
call bgimage_put_rect_16 pascal, (320 shl 16) or 180, (320 shl 16) or 144
|
||||
call music_flip
|
||||
call bgimage_put_rect pascal, (320 shl 16) or 32, (320 shl 16) or 16
|
||||
call bgimage_put_rect pascal, (320 shl 16) or 180, (320 shl 16) or 144
|
||||
call bgimage_put_rect_16 pascal, (320 shl 16) or 32, (320 shl 16) or 16
|
||||
call bgimage_put_rect_16 pascal, (320 shl 16) or 180, (320 shl 16) or 144
|
||||
pop bp
|
||||
retn
|
||||
sub_C3A7 endp
|
||||
|
@ -323,7 +323,7 @@ draw_cmt proc near
|
|||
loc_C406:
|
||||
call music_cmt_load pascal, [bp+@@track]
|
||||
call screen_back_B_put
|
||||
call bgimage_put_rect pascal, (320 shl 16) or 64, (320 shl 16) or 256
|
||||
call bgimage_put_rect_16 pascal, (320 shl 16) or 64, (320 shl 16) or 256
|
||||
cmp byte_13E96, 0
|
||||
jz short loc_C42C
|
||||
call sub_C376
|
||||
|
@ -355,12 +355,12 @@ arg_0 = word ptr 4
|
|||
mov bp, sp
|
||||
push si
|
||||
mov si, [bp+arg_0]
|
||||
call bgimage_put_rect pascal, large (0 shl 16) or 32, (320 shl 16) or 16
|
||||
call bgimage_put_rect pascal, large (0 shl 16) or 96, (320 shl 16) or 192
|
||||
call bgimage_put_rect_16 pascal, large (0 shl 16) or 32, (320 shl 16) or 16
|
||||
call bgimage_put_rect_16 pascal, large (0 shl 16) or 96, (320 shl 16) or 192
|
||||
call draw_tracks pascal, si
|
||||
call music_flip
|
||||
call bgimage_put_rect pascal, large (0 shl 16) or 32, (320 shl 16) or 16
|
||||
call bgimage_put_rect pascal, large (0 shl 16) or 96, (320 shl 16) or 192
|
||||
call bgimage_put_rect_16 pascal, large (0 shl 16) or 32, (320 shl 16) or 16
|
||||
call bgimage_put_rect_16 pascal, large (0 shl 16) or 96, (320 shl 16) or 192
|
||||
call draw_tracks pascal, si
|
||||
pop si
|
||||
pop bp
|
||||
|
@ -1003,7 +1003,7 @@ include th02/snd/snd.inc
|
|||
extern @POLAR$QIII:proc
|
||||
extern @piano_render$qv:proc
|
||||
extern @piano_setup_and_put_initial$qv:proc
|
||||
extern BGIMAGE_PUT_RECT:proc
|
||||
extern BGIMAGE_PUT_RECT_16:proc
|
||||
extern SND_LOAD:proc
|
||||
extern SND_KAJA_INTERRUPT:proc
|
||||
extern PI_LOAD:proc
|
||||
|
|
Loading…
Reference in New Issue