Skip to content

Conversation

@gameboy9
Copy link
Contributor

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.

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)
Copy link
Owner

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.

Copy link
Contributor Author

@gameboy9 gameboy9 Apr 22, 2022

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);
Copy link
Owner

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.

Copy link
Contributor Author

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.

common/dwr.h Outdated
Comment on lines 54 to 55
#define MEDIUM_TEXT(x) (x->flags[15] & 0x03)
#define DOUBLE_WALKING(x) (x->flags[15] & 0x30)
Copy link
Owner

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.

Suggested change
#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)

gameboy9 and others added 2 commits April 23, 2022 12:10
Accepting mcgrew's suggestion

Co-authored-by: Thomas McGrew <tjmcgrew@gmail.com>
@gameboy9
Copy link
Contributor Author

Hey mcgrew; both suggestions were implemented via two commits. I appreciate the review!

@mcgrew
Copy link
Owner

mcgrew commented Jun 13, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants