-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Script/Text Pointer Macros for Map Scripts #367
Conversation
I like the look of this. |
This comment was marked as resolved.
This comment was marked as resolved.
Assuming we come up with meaningful constant names, this looks good. I'm not sure if the constant should be first or the pointer label. It's an issue that was also brought up in pret/pokecrystal#748 and pret/pokecrystal#755. |
This comment was marked as resolved.
This comment was marked as resolved.
We're used to reading large diffs when it's worth it :p
I don't think this is a good idea. Your 3) and 4) sound good to me, aside from simplifying proposed macro names (ie,
Just one PR is good 👍 |
739fcf9
to
b05cbf2
Compare
bc21eea
to
3f0da33
Compare
9a22a70
to
55c6221
Compare
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.
Awesome progress!
Hello, I don't know if it's the right place to ask this but could we merge this PR ? Merge this PR give the possibility to update our forks and continue to contribute to de-obsucate the code with the new macro of @vulcandth Actually with the big update of this PR, contribute to help to de-obscucate it is not a good idea :/ Thank you in advance PS: If my request is not in the right place i will remove my comment Regards |
I don't have a strong argument against this other than... I don't think it really matters all that much.. and i've already done the work by giving them dialog-specific labels and it be a minor pain to go back and fix them. If you think its best I will of course go back and fix it lol... but I can't say i'm not slightly reluctant lol. |
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.
Alright, that's all I can spot. I'll do another pass checking for hSpriteIndex
/hSpriteIndexOrTextID
and w*CurScript
to see if there are any more spots we should be using the new constants.
I did a pretty thorough review for this after I finished using several regex's to help identify potential ones I might have missed; but feel free! |
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.
Final round from me :)
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.
Looks ready to merge to me! @Rangi42 anything else you want to check for?
I mainly want to review the Seafoam Islands and Silph Co names. (At least some are still unidentified, e.g. |
Amazing work, @vulcandth ! 🥳 |
This introduces `def_script_pointers`, `def_text_pointers`, and `object_const_def` macros, and applies them to all maps. Most other map labels have also been identified.
|
||
PewterGymTrainerHeaders: | ||
def_trainers 2 | ||
PewterGymTrainerHeader0: | ||
trainer EVENT_BEAT_PEWTER_GYM_TRAINER_0, 5, PewterGymBattleText1, PewterGymEndBattleText1, PewterGymAfterBattleText1 | ||
trainer EVENT_BEAT_PEWTER_GYM_TRAINER_0, 5, PewterGymCooltrainerMBattleText, PewterGymCooltrainerMEndBattleText, PewterGymCooltrainerMAfterBattleText |
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.
Isn't this guy a Jr Trainer?
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.
Isn't this guy a Jr Trainer?
It's based on the sprite. He uses the CooltrainerM sprite.
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.
Hmm. Given that we have things like FIGHTINGDOJO_HITMONLEE_POKE_BALL
, I'd expect trainers' labels and constants to match their real class. That's already the case for specific characters, e.g. OPP_ERIKA
has TEXT_CELADONGYM_ERIKA
, despite using SPRITE_SILPH_WORKER_F
.
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.
All such cases: https://pastebin.com/vb93gijw (There's just one case not in there which already goes this way: in PokemonMansionB1F.asm, an OPP_BURGLAR
has TEXT_POKEMONMANSIONB1F_BURGLAR
, despite using SPRITE_SUPER_NERD
. All the rest are like TEXT_POKEMONMANSION2F_SUPER_NERD
, TEXT_CINNABARGYM_SUPER_NERD2
, etc.) I've updated #420 with this.
Fixes #376
Was looking through through some of the comments for #270 and noticed that there was a lack of constants for script/text pointers. So I came up with some macros to define a constant and pointer at the same time. This would also allow giving more appropriate names to the text labels.
Todos at the end:
; person
commentsw<Map>CurScript
are using the new SCRIPT_* constants. (See Script/Text Pointer Macros for Map Scripts #367 (comment) for the last constant related to this item.)Consider changes SilphCoWorker text to something like:SilphCo7FWorkerM1BeforeText
andSilphCo7FWorkerM1AfterText