Sure, though it probably won't be of any use to anyone else.
The way it is set up is as follows:
call script_name
.db parameter_1, parameter_2, etc...
When a procedure is called, it does a "pop hl" and reads in the parameters for the function. Then it increments hl and pushes it, so that when the function hits a "ret" statement, it will jump back to the instruction after the parameters. This was the most space efficient and convenient method I could devise.
Right now I only have a handful of script procedures, and I probably won't need very many in the end. Here's a rundown in psudocode:
- Create Character (location, normal sprite, talking sprite)
This creates a "character" that is represented by the sprite
normal sprite. It draws the character at
location.
- Character Talk (character number)
This sets up an animation so that the character's sprite toggles back and forth between
normal sprite and the
talking sprite. Then it calls the
Display function.
- Wait (cycles)
Does nothing for
cycles number of animation cycles.
- Set Text Pointer (text label)
Sets the text pointer to the next block of text.
- Display
Displays a block of text pointed to by the text pointer.
There's little variations on these for convenience... like a wait_1 method that waits only 1 cycle and display methods of different langths (for sentences that take longer to read)... but you get the idea.
Adding animations into the scenes is going to be tricky. That's what I tackle next.
_________________

- Now Under Development -
[Progress]