Implement "medium text" and "double walking"#135
Implement "medium text" and "double walking"#135gameboy9 wants to merge 5 commits intomcgrew:masterfrom
Conversation
…or the overworld currently
|
|
||
| #define FAST_TEXT(x) (x->flags[ 7] & 0xc0) | ||
| #define SPEED_HACKS(x) (x->flags[ 7] & 0x30) | ||
| #define MEDIUM_TEXT(x) (x->flags[15] & 0x03) |
There was a problem hiding this comment.
This doesn't work. The array is only 15 bytes so this would be out of bounds.
In addition, tri-state options should be in the first 13 bytes of the array.
There was a problem hiding this comment.
Ah, I understand; I changed the flags to standard on/off and got it off the "16th" byte and moved it to the "15th". ([14])
If we want to tri-state these ultimately, I think that we'll have to expand the array.
| vpatch(rom, 0x35cf, 2, 0x90, 0xa5); | ||
| vpatch(rom, 0x36f4, 1, 0x07); | ||
| vpatch(rom, 0x2590, 16, 0xA5, 0x45, 0xC9, 0x01, 0xD0, 0x06, 0xA5, 0x05, 0x29, 0x01, 0xD0, 0x03, 0x20, 0x74, 0xFF, 0x60); | ||
| vpatch(rom, 0x25a0, 16, 0xA5, 0x45, 0xC9, 0x01, 0xD0, 0x06, 0xA5, 0x07, 0x29, 0x01, 0xD0, 0x03, 0x20, 0x74, 0xFF, 0x60); |
There was a problem hiding this comment.
These should have comments with assembly code which denotes the changes for easier maintenance. Examples can be seen elsewhere in the code.
There was a problem hiding this comment.
My bad; I added comments to the vpatches.
…speed and medium text for now.
| #define MEDIUM_TEXT(x) (x->flags[15] & 0x03) | ||
| #define DOUBLE_WALKING(x) (x->flags[15] & 0x30) |
There was a problem hiding this comment.
There is still some room in the array, though it is getting pretty full. I'm not really wanting to expand it until necessary since I don't expect there will be many new features soon.
| #define MEDIUM_TEXT(x) (x->flags[15] & 0x03) | |
| #define DOUBLE_WALKING(x) (x->flags[15] & 0x30) | |
| #define MEDIUM_TEXT(x) (x->flags[10] & 0x30) | |
| #define DOUBLE_WALKING(x) (x->flags[10] & 0xc0) |
Accepting mcgrew's suggestion Co-authored-by: Thomas McGrew <tjmcgrew@gmail.com>
|
Hey mcgrew; both suggestions were implemented via two commits. I appreciate the review! |
|
I finally got around to testing these changes and once I fixed the compile and javascript errors it seems... broken? With fast walking on, trying to walk around the throne room caused me to walk through the wall and shortly thereafter the game crashed. |
Medium text will print 2 characters / frame instead of 1 character or 1 line / frame. A nice in between.
Double walking will double the walking speed of the hero in the overworld only due to NPC glitching. (there are no NPCs in the overworld)
There's still a little graphical glitch when turning left or right, but it doesn't affect gameplay.