[Naming] .PI: Mention palette mutation and 640×400 in the load→put→free macro

Also dropping the `_8` as it's irrelevant to a fullscreen image.
And yes, we'll see a version without palette mutation.

Part of P0278, funded by Yanga.
This commit is contained in:
nmlgc 2024-04-03 22:53:39 +02:00
parent b6a7285847
commit 311138a2d9
9 changed files with 13 additions and 12 deletions

View File

@ -30,11 +30,12 @@ void DEFCONV pi_palette_apply(int slot);
// the clipping frame defined via grc_setclip().
void DEFCONV pi_put_8(screen_x_t left, vram_y_t top, int slot);
#define pi_load_put_8_free(slot, fn) \
pi_load(slot, (fn)); \
#define pi_fullres_load_palette_apply_put_free(slot, fn) { \
pi_load(slot, fn); \
pi_palette_apply(slot); \
pi_put_8(0, 0, slot); \
pi_free(slot); \
}
// .PI row pointer arithmetic
// --------------------------

View File

@ -816,9 +816,9 @@ void MUSICROOM_DISTANCE musicroom_menu(void)
graph_accesspage(1);
#if (GAME >= 4)
pi_load_put_8_free(0, "music.pi");
pi_fullres_load_palette_apply_put_free(0, "music.pi");
#else
pi_load_put_8_free(0, "op3.pi");
pi_fullres_load_palette_apply_put_free(0, "op3.pi");
#endif
#if (GAME == 5)
@ -1082,7 +1082,7 @@ controls:
#if (GAME == 2)
// ZUN bloat: The call site would have been a better place for this.
pi_load_put_8_free(0, "op2.pi");
pi_fullres_load_palette_apply_put_free(0, "op2.pi");
palette_entry_rgb_show("op.rgb");
graph_copy_page(0);
#endif

View File

@ -426,7 +426,7 @@ void main_update_and_render(void)
score_menu();
graph_accesspage(1);
graph_showpage(0);
pi_load_put_8_free(0, "op2.pi");
pi_fullres_load_palette_apply_put_free(0, "op2.pi");
palette_entry_rgb_show("op.rgb");
graph_copy_page(0);
graph_accesspage(0);

View File

@ -149,7 +149,7 @@ void pascal shottype_menu_init(void)
palette_black();
graph_accesspage(0);
pi_load_put_8_free(3, "TSELECT.pi");
pi_fullres_load_palette_apply_put_free(3, "TSELECT.pi");
graph_copy_page(1);
graph_accesspage(0);
if(resident->stage != 5) {

View File

@ -103,7 +103,7 @@ void near regist_load_and_put_initial(void)
graph_accesspage(0);
graph_showpage(0);
pi_load_put_8_free(0, regib_pi);
pi_fullres_load_palette_apply_put_free(0, regib_pi);
// Kind of assumes that we only show this screen once for the lifetime of
// the process.

View File

@ -91,7 +91,7 @@ void near end_animate(void)
* assert() of sorts.) \
*/ \
graph_accesspage(1); \
pi_load_put_8_free(0, pic_fn); \
pi_fullres_load_palette_apply_put_free(0, pic_fn); \
graph_copy_page(0); \
\
palette_black_in(1); \

View File

@ -330,7 +330,7 @@ void pascal near menu_sel_update_and_render(int8_t max, int8_t direction)
inline void return_from_other_screen_to_main(bool& main_initialized, int sel) {
graph_accesspage(1);
pi_load_put_8_free(0, MENU_MAIN_BG_FN);
pi_fullres_load_palette_apply_put_free(0, MENU_MAIN_BG_FN);
graph_copy_page(0); // switches the accessed page back 0
palette_100();
main_initialized = false;

View File

@ -322,7 +322,7 @@ void near setup_menu(void)
palette_black();
super_entry_bfnt("mswin.bft");
graph_accesspage(1);
pi_load_put_8_free(0, "ms.pi");
pi_fullres_load_palette_apply_put_free(0, "ms.pi");
graph_copy_page(0);
palette_black_in(1);

View File

@ -163,7 +163,7 @@ void near playchar_menu_put_initial(void)
palette_settone(0);
graph_accesspage(1);
pi_load_put_8_free(0, "slb1.pi");
pi_fullres_load_palette_apply_put_free(0, "slb1.pi");
graph_copy_page(0);
bgimage_snap();