-
Notifications
You must be signed in to change notification settings - Fork 29
Implement "medium text" and "double walking" #135
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
…or the overworld currently
common/dwr.h
Outdated
|
|
||
| #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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
common/dwr.c
Outdated
| 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My bad; I added comments to the vpatches.
…speed and medium text for now.
common/dwr.h
Outdated
| #define MEDIUM_TEXT(x) (x->flags[15] & 0x03) | ||
| #define DOUBLE_WALKING(x) (x->flags[15] & 0x30) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.