diff --git a/th03/cutscene/cutscene.cpp b/th03/cutscene/cutscene.cpp
index 139c4718..26d24ee3 100644
--- a/th03/cutscene/cutscene.cpp
+++ b/th03/cutscene/cutscene.cpp
@@ -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
diff --git a/th04/hardware/bgimage.hpp b/th04/hardware/bgimage.hpp
index 00a0617c..684dbd71 100644
--- a/th04/hardware/bgimage.hpp
+++ b/th04/hardware/bgimage.hpp
@@ -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
);
diff --git a/th04/hardware/bgimager.asm b/th04/hardware/bgimager.asm
index e3d85e62..5583e8a6 100644
--- a/th04/hardware/bgimager.asm
+++ b/th04/hardware/bgimager.asm
@@ -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
@@ -87,7 +87,7 @@ endif
pop di
pop bp
retf 8
-bgimage_put_rect endp
+bgimage_put_rect_16 endp
even
SHARED_ ends
diff --git a/th04_maine.asm b/th04_maine.asm
index f04e25f2..38329283 100644
--- a/th04_maine.asm
+++ b/th04_maine.asm
@@ -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
diff --git a/th04_op.asm b/th04_op.asm
index 3f7fa98d..b7fb0689 100644
--- a/th04_op.asm
+++ b/th04_op.asm
@@ -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
diff --git a/th05/m_char.cpp b/th05/m_char.cpp
index 0c171d1d..c174c706 100644
--- a/th05/m_char.cpp
+++ b/th05/m_char.cpp
@@ -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]) {
diff --git a/th05_maine.asm b/th05_maine.asm
index 1756473a..b6f4f94b 100644
--- a/th05_maine.asm
+++ b/th05_maine.asm
@@ -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
diff --git a/th05_op.asm b/th05_op.asm
index 2cd88b46..214f956f 100644
--- a/th05_op.asm
+++ b/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