Saga20101115 - simondotm/stardot-wiki GitHub Wiki
Not as much time for code, things like work get in the way!
I've decided to drop SWIFT as a development IDE; it's only really well integrated with Ophis, which is a tad too commodorey for my liking. Instead I've gone to BeebASM and notepad++. One of the advantages is that I can edit my code, reassemble it and then tab across to beebem and just test it.
I did a bit of a redesign, deciding to abstract output routines (in case I want to window them, or give them a half-size mode 5 font). I've also been writing search routines, so for important things I can just set A to the number and do a simple JSR.
To get an output, I hacked together the room outputting code. Whilst the description is relatively sorted, the exits were hacked just so I could have something to display - I'll need a better way to display system messages in future. in the screen shot I manually set A and called the routine, as my initalisation routine also does a mode 7; so this really wouldn't have made a good screen shot!
What the attached screen shot also shows is something I'd forgotten from the specification: rooms are normally preceded with a system message (either You are in a or I am in a), but they may also start with an "*", which tells the engine not to display the system message nor the "*". This resulted in a bit of code I'm not particularly proud of:
lda workbuffer
cmp #'*'
beq skipone
ldx #youare MOD 256
ldy #youare DIV 256
jsr printbuf
.skipone ldx #workbuffer MOD 256
ldy #workbuffer DIV 256
lda workbuffer
cmp #'*'
bne printit
inx
bne printit
iny
.printit jsr printbuf
I'm sure that the second lda
workbuffer:cmp
#0
is superfluous, but I couldn't think of an easier route for the moment.