Can anyone think of a good way to link strings? Basically, i'd like to do something like this:
"This property costs: $",$FA,5,". Do you want to buy it?",0
$FA just being an example, basically a byte to let the text handler know that the next byte is a databyte, not a letter. I think the stack could maybe be used for this:
- Code: Select all
ld hl,-1
push hl
ld hl,string_to_draw
push hl
then pop hl to get the next string. When i reach a $FA byte, push hl+2 (skip $FA and $05) and load the address of the new string into hl and continue processing until hl pops $FFFF (ie inc hl / ret z) or maybe $0000 (ld a,l / cp h / ret z).
Right now the text drawing sections look really ugly, and there'll be several points where i'll need to display the same figures (player's money, property price, etc.), and rather than display each string separately it'd be easier to just load it all into one string and display that.
(EDIT: Totally just put on the FFVII soundtrack while transcribing the alphabet into .bmps.. this music makes me want to cry! Such strong memories... Don't even ask me to listen to the Legend of Legaia OST, i don't think i could handle that.)