crazygrouptrio
Active member
Probably something stupid I missed, but text is not showing up in my game using the SimplePlatformer Module when talking to an NPC. The box shows up but the text isn't written. The HUD is in place, the palette is set, the text/text group is assigned, so I'm not sure?
I'm just using the standard text script as well.
I also commented out stuff in HandleScreenLoads when removing the HUD if that could potentially be the issue? What I removed was (for me) around line 492-571, so if any of this deals with text feel free to blame me for this issue. Everything LOOKS like it just deals with the HUD but maybe I did something incorrectly.
I'm just using the standard text script as well.
Code:
LDA textboxHandler
AND #%00010000 ;; if the b button is pressed
;; but the box + text have been activated
;; and also the 'do box' bit is OFF
;; that means this is ready to "go away".
BEQ checkToTurnTheTextboxOn ;; hasn't started yet
;; begin turning the textbox off.
LDA gameHandler
ORA #%00100000
STA gameHandler
;;; are we turning this on or off?
;;; check for more
;;; check for 'choice'.
LDA #$00
STA updateNT_offset
STA updateNT_H_offset
STA updateNT_V_offset
STA npc_autotext ;;<-- dale_coop: for autotext tiles
LDA #%10001000
STA textboxHandler
RTS
checkToTurnTheTextboxOn:
LDA npc_autotext ;;<-- dale_coop: for autotext tiles
BEQ +
JMP ++
+
LDA npc_collision
BEQ noNPCcollision
++
LDA textboxHandler
AND #%10000000
BNE noNPCcollision
LDA gameHandler
ORA #%00100000
STA gameHandler
;;; are we turning this on or off?
;;; check for more
;;; check for 'choice'.
turnTheTextboxOn:
LDA #%10000000
STA textboxHandler
noNPCcollision:
RTS
Code:
;LDA currentBank
;STA prevBank
;LDY #$16
;JSR bankswitchY
;LDX backgroundTilesToLoad
;LDA #CHRAddressLo,x
;STA temp16
;LDA #CHRAddressHi,x
;STA temp16+1
;LDY prevBank
;JSR bankswitchY
;LoadChrData #$1d, #$1c, #$00, #$40
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;; ALL GRAPHICS ARE LOADED.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; GET FLAGS FOR OBJECTS SO WE CAN COUNT UPON LOAD.
LDA currentBank
STA prevBank
LDY #BANK_ANIMATIONS
JSR bankswitchY
LDX #$00
DoSetMonsterFlagsLoop:
LDA Object_status,x
AND #%01000000 ;; is it about ready to load, but not loaded yet?
BEQ + ;skip setting flag.
LDY Object_type,x
LDA ObjectFlags,y
STA Object_flags,x
+
INX
CPX #TOTAL_MAX_OBJECTS
BNE DoSetMonsterFlagsLoop
LDY prevBank
JSR bankswitchY
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;; HANDLE LOADING HUD, IF ENABLED
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; LDA #HIDE_HUD
; BEQ dontHideHud
; JMP skipDrawingHud_GameHandler
;dontHideHud
;LDA HudHandler
;AND #%10000000
; BNE drawHud_GameHandler
;JMP skipDrawingHud_GameHandler
;drawHud_GameHandler:
;LDA screenFlags
;AND #%00000001
;BEQ screenDrawsHud
;JMP skipDrawingHud_GameHandler
;screenDrawsHud:
;; check to see if hud is shown.
;; if hud is hidden, skip
;; otherwise...
;;; prep hud area load
;JSR WaitFrame
; LDA #BOX_0_WIDTH
; STA updateNT_columns
; LDA #BOX_0_HEIGHT
; STA updateNT_rows
; LDA #BOX_0_ORIGIN_X
; STA tileX
; LDA #BOX_0_ORIGIN_Y
; STA tileY
; JSR FillBoxArea
;JSR WaitFrame
;;;;;;;;;;;;;;;;
;; set up attribute routine needs
; LDA #BOX_0_ORIGIN_X
; STA tileX
; LDA #BOX_0_ORIGIN_Y
; STA tileY
; LDA #BOX_0_ATT_WIDTH
; STA updateNT_attWidth
; LDA #BOX_0_ATT_HEIGHT
; STA updateNT_attHeight
;;;;;;;;;;;;;;;
; JSR UpdateAttributeTable
;; first turn off drawing sprites.
;JSR WaitFrame
LDA #$00
STA textboxHandler