Skip to content
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

Label cleanup #315

Open
6 tasks
Rangi42 opened this issue Mar 21, 2021 · 5 comments
Open
6 tasks

Label cleanup #315

Rangi42 opened this issue Mar 21, 2021 · 5 comments
Labels

Comments

@Rangi42
Copy link
Member

Rangi42 commented Mar 21, 2021

  • Identify any remaining Unknown labels and ones reported by tools/unnamed.py
    • 9 bit flags: wFlags_0xcd60 wd728 wd72c wd72d wd72e wd730 wd732 wFlags_D733 wd736
    • 4 multiple misc roles: wcd6d wcf91 wd0b5 wd11e
    • 16 unused leftovers: wUnusedC000 wUnusedCC5B wUnusedCD37 wUnusedCD39 wUnusedCD3A wUnusedCD3D wUnusedCF8D wUnusedD08A wUnusedD09B wUnusedD119 wUnusedD153 wUnusedD366 wUnusedD5A3 wUnusedD71B wUnusedDA38 wUnusedD71F
  • Rename early labels to be more accurate (e.g. MissableObjects, which are not just for missables)
  • Sync data, function, and memory labels with pokecrystal (e.g. EvosMovesPointerTableEvosAttacksPointers) (sometimes pokered's term may be ported to pokecrystal instead)
  • Standardize names for in-game entities (e.g. MoonMons1MtMoon1FWildMons)
  • Be less verbose (e.g. wTileInFrontOfBoulderAndBoulderCollisionResult → separate wTileInFrontOfBoulder and wBoulderCollisionResult, or _CableClubNPCAreaReservedFor2FriendsLinkedByCableText_CableClubNPCAreaReservedText)
  • Use UNIONs to group related overlapping WRAM labels
@kqesar
Copy link
Contributor

kqesar commented Jun 6, 2021

Hi,

I have several suggestions for this issues, tell me if these are good ideas or not:

  • In pokecrystal and pokered, we have function setevent and checkevent about event but in pokycrystal the case is not the same that pokered, can be a good things to uniform case between projects ( pokered will have same case convention that pokecrystal)
  • Can be interesting to name the trainers of gym like pokecrystal ( example, the trainer of PewterGym PewterGymTrainerHeader0 become TrainerCamperJerry)
  • In map/objects of gym ( for example map/objects/PewterGym.asm) in the def_warps part we can use constant and rename warp to warp_event like pokecrystal: warp 4, 13, 2, LAST_MAP become warp_event 4, 13, PEWTER_CITY, LAST_MAP

What do you think about this @Rangi42 @dannye ?

@dannye
Copy link
Member

dannye commented Jun 8, 2021

@kqesar

In pokecrystal and pokered, we have function setevent and checkevent about event but in pokycrystal the case is not the same that pokered, can be a good things to uniform case between projects ( pokered will have same case convention that pokecrystal)

I agree in general that it's good to try to keep terminology/structure the same between pokered and pokecrystal where possible. But given that the overworld scripts are handled so differently between the two games, I don't think there's much compelling reason to rename the event macros to match. It's not as if scripts could be trivially ported from one game to the other, regardless of whether the event macros are named the same or not.

Can be interesting to name the trainers of gym like pokecrystal ( example, the trainer of PewterGym PewterGymTrainerHeader0 become TrainerCamperJerry)

I don't see why we would introduce our own names for trainers whom have no canonical name.

In map/objects of gym ( for example map/objects/PewterGym.asm) in the def_warps part we can use constant and rename warp to warp_event like pokecrystal: warp 4, 13, 2, LAST_MAP become warp_event 4, 13, PEWTER_CITY, LAST_MAP

I think you misunderstand the pokered warp macro. The third parameter is a warp ID, not a map ID. So warp 4, 13, 2, LAST_MAP would not become warp_event 4, 13, PEWTER_CITY, LAST_MAP. I also don't think there's much value in renaming pokered's warp to warp_event.

@Rangi42
Copy link
Member Author

Rangi42 commented Jun 8, 2021

I wouldn't mind names like CeladonGymLass1TrainerHeader or FuchsiaGymTamerTrainerHeader. A few are already like that, e.g. ZapdosTrainerHeader (could have been PowerPlantZapdosTrainerHeader too but that's not necessary).

@kqesar
Copy link
Contributor

kqesar commented Jun 8, 2021

Thank you for your feedback @Rangi42 @dannye ! It's ok for me :)

@kqesar
Copy link
Contributor

kqesar commented May 15, 2022

Hello, i have question about case conventions:

I have seen in some scripts that some functions don't have same cases:

For example some function are "PascalCased" like .BagFull or "cameCased" like .beforeBeat.

I have also some functions "snake_cased" like .bag_full in https://github.com/pret/pokered/blob/master/scripts/MrPsychicsHouse.asm#L20

What the good approach ? PascalCase like pokecrystal or camelCase ( if is this approach, can we keep the same conventions in pokecrystal ?)

NB: I can contribute to refactor this if necessary, it's not too hard for me

Thank you in advance

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants