From 6e782beb3eace81c9b20cf835a2c0cbbd5666822 Mon Sep 17 00:00:00 2001 From: "D.W" Date: Thu, 9 Apr 2020 17:47:39 +1000 Subject: [PATCH] Add comments to *set_oldnew_bg --- InDevelopment/ManualUpdates/0.utf | 30 +++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/InDevelopment/ManualUpdates/0.utf b/InDevelopment/ManualUpdates/0.utf index ecaccbd..51602db 100644 --- a/InDevelopment/ManualUpdates/0.utf +++ b/InDevelopment/ManualUpdates/0.utf @@ -342386,26 +342386,50 @@ return mov %text_bg,0 return - +; 'set_oldnew_bg' is meant to be used to display either a CG image or a fallback BG image +; It's called 'set old new bg' because it's meant to either use the old or new style bg +; depending on the %show_cgs, but in this script %show_cgs is always forced to 1 +; so the 'new' image (first argument) is always used. +; +; set_oldnew_bg [NEW_BG][OLD_BG][MODE][PRINT_EFFECT] +; +; Example usage: set_oldnew_bg e0301_a, Mdin_1b, 1, 23 +; NEW_BG: $witchh11 - The CG to display if CGs are enabled (NOTE: this function always has CGs enabled) +; OLD_BG: $witchh12 - The fallback BG to display if CGs are disabled (This never happens) +; MODE: %witchh13: +; - If 0: doesn't hide sprites when CG shown +; - If any other value: hides sprites +; - Additionally, if 2, uses the 'breakup' effect to display the CG +; - witchh13 is not used if CGs are disabled +; PRINT_EFFECT: %witchh14 - The effect to use when displaying the BG and CG? *set_oldnew_bg getparam $witchh11,$witchh12,%witchh13,%witchh14 - + + ; Someone has forced show_cgs to always be 1 whenever this function is called mov %show_cgs,1 + ; Decide whether to hide sprites based on value of %witchh13 mov %witchh15,1 if %witchh13 = 0 mov %witchh15,0 + ; ------------ If "show_cgs" is enabled ------------ notif %show_cgs = 1 jumpf + + ; This line hides sprites while CG is displayed, until clr_oldnew_bg is called mov %hide_new_sprites,%witchh15 + ; Display the BG mov %oldnew_bg,1 mov $oldnew_bg,$witchh11 mov $oldnew_bg_old,$witchh12 - gosub *displayOldNewBg + + ; Print the BG (either breakup effect or %witchh14 (4th arg) effect) if %witchh13 = 2 print 99,2000,"breakup.dll/lrp" notif %witchh13 = 2 print %witchh14 ~ + + ; ---- If "show_cgs" is NOT enabled, just display the regular background ($witchh12/2nd arg) ---- if %show_cgs = 1 jumpf bg $witchh12,%witchh14 ~