Skip to content

Commit

Permalink
Add comments to *set_oldnew_bg
Browse files Browse the repository at this point in the history
  • Loading branch information
drojf committed Apr 9, 2020
1 parent 5379e11 commit 6e782be
Showing 1 changed file with 27 additions and 3 deletions.
30 changes: 27 additions & 3 deletions InDevelopment/ManualUpdates/0.utf
Original file line number Diff line number Diff line change
Expand Up @@ -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
~
Expand Down

0 comments on commit 6e782be

Please sign in to comment.