TADA updates
Some progress is better than no progress. And I've been making some progress, which is the opposite of congress.
I'm finished implementing a better item listing routine. If there are objects in the room, previously the Land of Spur would list them thusly:
You see IRON ARMOR
You see PIZZA SLICE
You see ORANGE
You see a dead MUMMY (a dead monster in the room)
You see some wrecked DROIDS (plural item, plus mechanical beings display this if "dead")
You see SAND-WALKER tracks (for when a monster flees)
My version adds proper article definition:
You see IRON ARMOR (no change here, although it should probably read "some IRON ARMOR")
You see a PIZZA SLICE (singular item not ending in S)
You see an ORANGE (the AEIOU "a" vs. "an" grammatical check)
You see a dead MUMMY (no change here)
You see some wrecked DROIDS (no change here)
You see some SAND-WALKER tracks ("tracks" satisfies the "plural item" rule)
Lots of little fixes to code over the past week. Working on labeling lines with C64List. I've made labels sort of class-like (as in a "real" programming language); ie:
' bit.clear math.mod
' bit.flip
' bit.set msg.a_or_some
' bit.test msg.affecting
' msg.ally_health
' check.expert_mode msg.comma_value
' check.guild_membership msg.dusk_approaches
' check.io_error msg.e_cant_go
' msg.e_exception
' cmd.get msg.more_prompt
' cmd.inv msg.n_number
' cmd.main_menu msg.you_see
' cmd.teleport set_2_bytes
' set_3_bytes
' err.too_tired
' sub.hourglass
' get_2_bytes sub.item_init
' get_3_bytes sub.look
'
' i_str.addr x_str.expand
' i_str.find x_str.trim_right
' i_str.uppercase
'
' link_module file.open
' file.append_or_write
Work continues on this.
I borrowed some of Anders Carlsson's "print a string of >255 characters" code from comp.sys.cbm and subverted it to my whims—er, added some parts that check for [highlight characters] and change the current text colors (normal, current and highlighted colors) based on pre-set color combinations.
Quoting myself from C64Dev forum:
I got my highlighted text display working. So if you call it with:
sys br,"this text is [highlighted], neat huh?"+chr$(13)+chr$(0)
it would display (for example):
THIS TEXT IS HIGHLIGHTED, NEAT HUH?
(Color combinations are selectable, albeit in a crude way for now.) The CHR$(13) is required if you want a new line, the CHR$(0) marks the end of the string. (I just assign them to string variables R$ and NL$ respectively).
This is mainly useful in menu files, although a few game messages can take advantage of this, too. I thought it'd be more interesting than hard-coded quote-mode colors.
Also been working with Jeff Hoag's C64List utility which, among other things, allows labels in place of line number references. The original Apple BBS game used labels, so I'm mostly sticking with the same label names.
Reworked some code last night; mainly the "get room data" and "turn a string to uppercase" routines are a bit more efficient (and use fewer bytes/less garbage collection), so that's a bonus.
I'm realizing what a bunch of kangaroo code I have, trying to streamline it a bit. Specifically getting all the data about objects (weapons, items, monsters, food/drink) in rooms could be significantly rewritten. With that comes the "get" and "inventory" routines. Haven't been working super-steadily on all of this, though.
Leave a Comment
You must be signed-in to post comments.Responses
Tom_here 8/31/2011
Yarr! Good stuff.
-Tom!