pokered icon indicating copy to clipboard operation
pokered copied to clipboard

Label cleanup

Open Rangi42 opened this issue 3 years ago • 5 comments

  • [ ] Identify any remaining Unknown labels and ones reported by tools/unnamed.py
    • [x] 9 bit flags: wFlags_0xcd60 wd728 wd72c wd72d wd72e wd730 wd732 wFlags_D733 wd736
    • [ ] 4 multiple misc roles: wcd6d wcf91 wd0b5 wd11e
    • [x] 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

Rangi42 avatar Mar 21 '21 22:03 Rangi42

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 ?

kqesar avatar Jun 06 '21 18:06 kqesar

@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.

dannye avatar Jun 08 '21 00:06 dannye

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).

Rangi42 avatar Jun 08 '21 00:06 Rangi42

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

kqesar avatar Jun 08 '21 10:06 kqesar

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

kqesar avatar May 15 '22 10:05 kqesar