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

Sync sprite and battle anim consts/labels #1055

Merged
merged 3 commits into from
Sep 17, 2023

Conversation

vulcandth
Copy link
Collaborator

@vulcandth vulcandth commented May 31, 2023

resolves #765

I'm fairly confident this is what we wanted to accomplish here. I think this is much more consistent. Let me know what you think Rangi / Mid-kid.

Edit:

What this PR has done:

Battle Animations

  • BattleAnimObjects: (see data/battle_anims_objects.asm)
    • ANIM_OBJ_* renamed to  BATTLE_ANIM_OBJ_*
    • NUM_ANIM_OBJS renamed to NUM_BATTLE_ANIM_OBJS
  • DoBattleAnimFrame: (see engine/battle_anims/functions.asm
    • BATTLEANIMFUNC_* renamed to BATTLE_ANIM_FUNC_*
    • NUM_BATTLEANIMFUNCS renamed to NUM_BATTLE_ANIM_FUNCS
  • BattleAnimFrameData: (see data/battle_anims/framsets.asm)
    • BATTLEANIMFRAMESET_* renamed to BATTLE_ANIM_FRAMSET_*
    • NUM_BATTLEANIMFRAMESETS renamed to NUM_BATTLE_ANIM_FRAMESETS
  • BattleAnimOAMData: (see data/battle_anim/oam.asm)
    • BATTLEANIMOAMSET_* renamed to BATTLE_ANIM_OAMSET_*
    • NUM_BATTLEANIMOAMSETS renamed to NUM_BATTLE_ANIM_OAMSETS
  • BattleBGEffects: (see engine/battle_anims/bg_effects.asm)
    • ANIM_BG_* renamed to BATTLE_BG_EFFECT_*
    • NUM_ANIM_BGS renamed to NUM_BATTLE_BG_EFFECTS
  • AnimObjGFX: (see data/battle_anims/object_gfx.asm)
    • ANIM_GFX_* renamed to BATTLE_ANIM_GFX_
    • NUM_ANIM_GFX renamed to NUM_BATTLE_ANIM_GFX

Sprite Animations

  • SpriteAnimSeqData: renamed to SpriteAnimObjects: (data/sprite_anims/sequences.asm renamed to data/sprite_anims/objects.asm)
    • SPRITE_ANIM_INDEX_* renamed to SPRITE_ANIM_OBJ_*
    • NUM_SPRITE_ANIM_INDEXES renamed to NUM_SPRITE_ANIM_OBJS
  • DoAnimFrame: renamed to DoSpriteAnimFrame: (engine/gfx/sprite_anims.asm moved/renamed to engine/sprite_anims/functions.asm)
    • SPRITE_ANIM_SEQ_* renamed to SPRITE_ANIM_FUNC_*
    • NUM_SPRITE_ANIM_SEQS renamed to NUM_SPRITE_ANIM_FUNCS
  • SpriteAnimFrameData: (see data/sprite_anims/framesets.asm)
    • SPRITE_ANIM_FRAMESET_* unchanged.
  • SpriteAnimOAMData: (see data/sprite_anims/oam.asm)
    • SPRITE_ANIM_OAMSET_* unchanged.

MISC

  • Added various ; 00 comments.
  • Renamed NUM_ANIM_OBJECTS to NUM_BATTLE_ANIM_STRUCTS

@vulcandth
Copy link
Collaborator Author

Related to #1016

@vulcandth vulcandth requested a review from mid-kid May 31, 2023 20:27
Copy link
Member

@mid-kid mid-kid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! This is essentially what I was aiming for, yeah.

@vulcandth
Copy link
Collaborator Author

Looks great! This is essentially what I was aiming for, yeah.

Great! I'll just wait for Rangi to have time to take a quick look as well and then i'll merge this and work on pokegold as well.

@Rangi42
Copy link
Member

Rangi42 commented Jun 22, 2023

So, we have this for sprite animations:

  • SPRITE_ANIM_INDEX_* constants are indexes into SpriteAnimSeqData (see data/sprite_anims/sequences.asm) (SpriteAnimSeqData should be renamed!)
  • SPRITE_ANIM_SEQ_* constants are indexes into DoAnimFrame.Jumptable (see engine/gfx/sprite_anims.asm)
  • SPRITE_ANIM_FRAMESET_* constants are indexes into SpriteAnimFrameData (see data/sprite_anims/framesets.asm)
  • SPRITE_ANIM_OAMSET_* constants are indexes into SpriteAnimOAMData(see data/sprite_anims/oam.asm)

And for battle animations, with this PR:

  • BATTLE_ANIM_INDEX_* constants are indexes into BattleAnimObjects (see data/battle_anims/objects.asm) (BattleAnimObjects should be renamed!)
  • BATTLE_ANIM_SEQ_* constants are indexes into DoBattleAnimFrame.Jumptable (see engine/battle_anims/functions.asm)
  • BATTLE_ANIM_FRAMESET_* constants are indexes into BattleAnimFrameData (see data/battle_anims/framesets.asm)
  • BATTLE_ANIM_OAMSET_* constants are indexes into BattleAnimOAMData (see data/battle_anims/oam.asm)

This is mostly good. I would consider getting rid of the whole "seq(uence)" terminology, and just having indexes, functions, framesets, and oamsets.

@Rangi42 Rangi42 changed the title Sync OW Sprite and Battle Anim const/labels Sync sprite and battle anim consts/labels Jun 22, 2023
@vulcandth
Copy link
Collaborator Author

Going to draft this for now until I have a chance to work on it again.. and after SourApple's PR is merged.

@vulcandth vulcandth marked this pull request as draft August 9, 2023 19:07
@vulcandth vulcandth marked this pull request as ready for review August 22, 2023 02:23
@vulcandth
Copy link
Collaborator Author

Alright I completely reworked this PR... so the old feedback is mostly irrelevant now. Look at the first comment for updated information on what this PR has changed.

@mid-kid
Copy link
Member

mid-kid commented Aug 23, 2023

I'd prefer SpriteAnimFunc_ and BattleAnimFunc_ over spelling out the full Function. I also wonder if InitSpriteAnimStruct could be renamed into something else, maybe SpawnSprite or AddSprite.

@mid-kid
Copy link
Member

mid-kid commented Sep 12, 2023

Bumping to confirm that this may be merged.

@vulcandth
Copy link
Collaborator Author

Thanks! I'll merge this; this weekend. So I have time to do it for pokegold as well.

@vulcandth vulcandth merged commit aba1f14 into pret:master Sep 17, 2023
1 check passed
@vulcandth vulcandth deleted the battle_anim_seq branch September 17, 2023 18:09
github-actions bot pushed a commit that referenced this pull request Sep 17, 2023
* Sync sprite and battle anim consts/labels

* Add `; 00` comments

* Renamed to `SpriteAnimFunc_` and `BattleAnimFunc_`
vulcandth added a commit to pret/pokegold that referenced this pull request Sep 17, 2023
* Sync sprite and battle anim consts/labels

* Add `; 00` comments

* Renamed to `SpriteAnimFunc_` and `BattleAnimFunc_`
github-actions bot pushed a commit to pret/pokegold that referenced this pull request Sep 17, 2023
* Sync sprite and battle anim consts/labels

* Add `; 00` comments

* Renamed to `SpriteAnimFunc_` and `BattleAnimFunc_`
Nayru62 added a commit to Nayru62/pokecrystal that referenced this pull request Sep 27, 2023
reflected the latest commit that changed sprite stuff, copied the relevant old funcs from lilikoi and updated to the new Constants

pret#1055
Nayru62 added a commit to Nayru62/pokecrystal that referenced this pull request Sep 28, 2023
Bundled: Idain's Custom Dex Colors and Toggle Shiny Palettes, doesnt impact you if you dont want it.

REQUIRED:
Replace StatExp with EVs,
Expanded Tilesets to 255,
Unique Mon Icons (or at least adapt to the new Bank structure, actual icons used are irrelevant)

and my Gen3 Type/Status/Cat Tiles. Pokedex portion must be implemented. Other parts, optional.

FEATURES:  Base stats and info, Move Info, Detailed area info, Evoulation chart, and sprite page showing animated sprites (reflects shiny toggle too).

Move Information: Lvl-Up Moves -> Field Moves (plus lvl learned and/or TM/HM/Move Tutor) -> Egg Moves -> TMs. I have fully functional code commented out to include HMs. But I decided not to since Field Moves serve the same purpse. But, if you've messed with adding or deleting Field Moves, I reccomend scrapping the Field Moves code and restoring the HM code. Please feel free to DM about this if it's an issue. I'm working on better solutions at some point.
Move Page Future Ideas: Full Page toggle option, to show additional details about the moves, Type, power, category, accuracy, effects, etc

AREA Pages: Currently supports Johto/Kanto Walking/grass/surfing encounters plus their swarms. Fishing Rods information is also included. Right now, all it will show you is the relevant Fishing Group Name. In the near future, it will print Route information like the other pages.
To check your local Fishing Group, check your PokeGear.

POKEGEAR: Now shows the detailed name of map you're currently in (based on Map Group & Map Number) and it also reads the map's attribute to see it's fishing group, if it has one.

COMING SOON: AREA support for Headbutt Trees and Rock Smash Rocks and the Bug contest. Roaming Support for the dogs and any custom roamers.

I also have an idea to have a python script scrape all information about special event pokemon (like Celebi, Ho-oh, Lugia, Starters, Casinos, Gift pokemon like Eevee) and NPC trades and displaying that. The script should be run if you ever make edits to these and will recompile the list. I should probably do this for Field Moves too, since people can and do have custom Field Moves...

Feel Free to DM me any suggestions and feedback. If you want to help me design Tiles/GFX to help make everything easier to look at, I would be eternally grateful.

Commit Notes: newest to oldest.

I'm still not happy with field moves, having to maintain a seperate data table about the moves and if they're TM/HM/MT goes against the spirit of the project. but for now, it works, and will display the field move twice if can learn via lvl up & TM/HM/MT

pokedexpart1

need to get mon icons

pokedexpart2

Mon Icons are broken,
Evo Page is borked,
Sprite Page isnt animating

Customizable Pokédex Color

https://github.com/pret/pokecrystal/wiki/Customizable-Pok%C3%A9dex-Color

Plus changing _CGB_PokedexSearchOption: in engine/gfx/cgb_layouts.asm, ld a, PREDEFPAL_POKEDEX -> call CheckPokedexColor

pokedex Restore EV code

Pokedex, fixed animations

reflected the latest commit that changed sprite stuff, copied the relevant old funcs from lilikoi and updated to the new Constants

pret#1055

Pokedex: PokeGear shows fish group, cards wrap

In the Pokedex, Press start to bring up the Vanilla AREA option, and Kanto is enabled regardless of HoF

Card icons:
Test w/:
- Only clock + phone
- clock, map, phone
Need to test w/ Radio

Pokegear: forgot a few things

forgot to add check for radio when going left on clock screen

added print local fishing group name. It's ugly. Soooo much space for tiles on the pokegear!
@xCrystal
Copy link
Member

Is it intended that SPRITEANIMSTRUCT_ANIM_SEQ_ID has not been renamed to SPRITEANIMSTRUCT_FUNC_ID (and idem for the associated WRAM addresses from the wSpriteAnim macro) even though SPRITE_ANIM_SEQ_* have been renamed to SPRITE_ANIM_FUNC_*?

Nayru62 added a commit to Nayru62/pokecrystal that referenced this pull request Oct 5, 2023
Bundled: Idain's Custom Dex Colors and Toggle Shiny Palettes, doesnt impact you if you dont want it.

REQUIRED:
Replace StatExp with EVs,
Expanded Tilesets to 255,
Unique Mon Icons (or at least adapt to the new Bank structure, actual icons used are irrelevant)

and my Gen3 Type/Status/Cat Tiles. Pokedex portion must be implemented. Other parts, optional.

FEATURES:  Base stats and info, Move Info, Detailed area info, Evoulation chart, and sprite page showing animated sprites (reflects shiny toggle too).

Move Information: Lvl-Up Moves -> Field Moves (plus lvl learned and/or TM/HM/Move Tutor) -> Egg Moves -> TMs. I have fully functional code commented out to include HMs. But I decided not to since Field Moves serve the same purpse. But, if you've messed with adding or deleting Field Moves, I reccomend scrapping the Field Moves code and restoring the HM code. Please feel free to DM about this if it's an issue. I'm working on better solutions at some point.
Move Page Future Ideas: Full Page toggle option, to show additional details about the moves, Type, power, category, accuracy, effects, etc

AREA Pages: Currently supports Johto/Kanto Walking/grass/surfing encounters plus their swarms. Fishing Rods information is also included. Right now, all it will show you is the relevant Fishing Group Name. In the near future, it will print Route information like the other pages.
To check your local Fishing Group, check your PokeGear.

POKEGEAR: Now shows the detailed name of map you're currently in (based on Map Group & Map Number) and it also reads the map's attribute to see it's fishing group, if it has one.

COMING SOON: AREA support for Headbutt Trees and Rock Smash Rocks and the Bug contest. Roaming Support for the dogs and any custom roamers.

I also have an idea to have a python script scrape all information about special event pokemon (like Celebi, Ho-oh, Lugia, Starters, Casinos, Gift pokemon like Eevee) and NPC trades and displaying that. The script should be run if you ever make edits to these and will recompile the list. I should probably do this for Field Moves too, since people can and do have custom Field Moves...

Feel Free to DM me any suggestions and feedback. If you want to help me design Tiles/GFX to help make everything easier to look at, I would be eternally grateful.

Commit Notes: newest to oldest.

I'm still not happy with field moves, having to maintain a seperate data table about the moves and if they're TM/HM/MT goes against the spirit of the project. but for now, it works, and will display the field move twice if can learn via lvl up & TM/HM/MT

pokedexpart1

need to get mon icons

pokedexpart2

Mon Icons are broken,
Evo Page is borked,
Sprite Page isnt animating

Customizable Pokédex Color

https://github.com/pret/pokecrystal/wiki/Customizable-Pok%C3%A9dex-Color

Plus changing _CGB_PokedexSearchOption: in engine/gfx/cgb_layouts.asm, ld a, PREDEFPAL_POKEDEX -> call CheckPokedexColor

pokedex Restore EV code

Pokedex, fixed animations

reflected the latest commit that changed sprite stuff, copied the relevant old funcs from lilikoi and updated to the new Constants

pret#1055

Pokedex: PokeGear shows fish group, cards wrap

In the Pokedex, Press start to bring up the Vanilla AREA option, and Kanto is enabled regardless of HoF

Card icons:
Test w/:
- Only clock + phone
- clock, map, phone
Need to test w/ Radio

Pokegear: forgot a few things

forgot to add check for radio when going left on clock screen

added print local fishing group name. It's ugly. Soooo much space for tiles on the pokegear!

Pokedex BETA pokegear fish str fix

just forgot the @

vanilla merged fonts

charmap for evopage

Vanilla Dex changes

Vanilla complete, short text version

cleanup

Pokedex Choose Theme Color fix

https://github.com/pret/pokecrystal/wiki/Customizable-Pok%C3%A9dex-Color

Type GFX Vanilla

GFX SETup
Nayru62 added a commit to Nayru62/pokecrystal that referenced this pull request Oct 5, 2023
https://github.com/pret/pokecrystal/wiki/Customizable-Pok%C3%A9dex-Color

Nayru's Pokedex ALPHA

Bundled: Idain's Custom Dex Colors and Toggle Shiny Palettes, doesnt impact you if you dont want it.

REQUIRED:
Replace StatExp with EVs,
Expanded Tilesets to 255,
Unique Mon Icons (or at least adapt to the new Bank structure, actual icons used are irrelevant)

and my Gen3 Type/Status/Cat Tiles. Pokedex portion must be implemented. Other parts, optional.

FEATURES:  Base stats and info, Move Info, Detailed area info, Evoulation chart, and sprite page showing animated sprites (reflects shiny toggle too).

Move Information: Lvl-Up Moves -> Field Moves (plus lvl learned and/or TM/HM/Move Tutor) -> Egg Moves -> TMs. I have fully functional code commented out to include HMs. But I decided not to since Field Moves serve the same purpse. But, if you've messed with adding or deleting Field Moves, I reccomend scrapping the Field Moves code and restoring the HM code. Please feel free to DM about this if it's an issue. I'm working on better solutions at some point.
Move Page Future Ideas: Full Page toggle option, to show additional details about the moves, Type, power, category, accuracy, effects, etc

AREA Pages: Currently supports Johto/Kanto Walking/grass/surfing encounters plus their swarms. Fishing Rods information is also included. Right now, all it will show you is the relevant Fishing Group Name. In the near future, it will print Route information like the other pages.
To check your local Fishing Group, check your PokeGear.

POKEGEAR: Now shows the detailed name of map you're currently in (based on Map Group & Map Number) and it also reads the map's attribute to see it's fishing group, if it has one.

COMING SOON: AREA support for Headbutt Trees and Rock Smash Rocks and the Bug contest. Roaming Support for the dogs and any custom roamers.

I also have an idea to have a python script scrape all information about special event pokemon (like Celebi, Ho-oh, Lugia, Starters, Casinos, Gift pokemon like Eevee) and NPC trades and displaying that. The script should be run if you ever make edits to these and will recompile the list. I should probably do this for Field Moves too, since people can and do have custom Field Moves...

Feel Free to DM me any suggestions and feedback. If you want to help me design Tiles/GFX to help make everything easier to look at, I would be eternally grateful.

Commit Notes: newest to oldest.

I'm still not happy with field moves, having to maintain a seperate data table about the moves and if they're TM/HM/MT goes against the spirit of the project. but for now, it works, and will display the field move twice if can learn via lvl up & TM/HM/MT

pokedexpart1

need to get mon icons

pokedexpart2

Mon Icons are broken,
Evo Page is borked,
Sprite Page isnt animating

Customizable Pokédex Color

https://github.com/pret/pokecrystal/wiki/Customizable-Pok%C3%A9dex-Color

Plus changing _CGB_PokedexSearchOption: in engine/gfx/cgb_layouts.asm, ld a, PREDEFPAL_POKEDEX -> call CheckPokedexColor

pokedex Restore EV code

Pokedex, fixed animations

reflected the latest commit that changed sprite stuff, copied the relevant old funcs from lilikoi and updated to the new Constants

pret#1055

Pokedex: PokeGear shows fish group, cards wrap

In the Pokedex, Press start to bring up the Vanilla AREA option, and Kanto is enabled regardless of HoF

Card icons:
Test w/:
- Only clock + phone
- clock, map, phone
Need to test w/ Radio

Pokegear: forgot a few things

forgot to add check for radio when going left on clock screen

added print local fishing group name. It's ugly. Soooo much space for tiles on the pokegear!

Pokedex BETA pokegear fish str fix

just forgot the @

vanilla merged fonts

charmap for evopage

Vanilla Dex changes

Vanilla complete, short text version
Nayru62 added a commit to Nayru62/pokecrystal that referenced this pull request Oct 7, 2023
Bundled: Idain's Custom Dex Colors and Toggle Shiny Palettes, doesnt impact you if you dont want it.

REQUIRED:
Replace StatExp with EVs,
Expanded Tilesets to 255,
Unique Mon Icons (or at least adapt to the new Bank structure, actual icons used are irrelevant)

and my Gen3 Type/Status/Cat Tiles. Pokedex portion must be implemented. Other parts, optional.

FEATURES:  Base stats and info, Move Info, Detailed area info, Evoulation chart, and sprite page showing animated sprites (reflects shiny toggle too).

Move Information: Lvl-Up Moves -> Field Moves (plus lvl learned and/or TM/HM/Move Tutor) -> Egg Moves -> TMs. I have fully functional code commented out to include HMs. But I decided not to since Field Moves serve the same purpse. But, if you've messed with adding or deleting Field Moves, I reccomend scrapping the Field Moves code and restoring the HM code. Please feel free to DM about this if it's an issue. I'm working on better solutions at some point.
Move Page Future Ideas: Full Page toggle option, to show additional details about the moves, Type, power, category, accuracy, effects, etc

AREA Pages: Currently supports Johto/Kanto Walking/grass/surfing encounters plus their swarms. Fishing Rods information is also included. Right now, all it will show you is the relevant Fishing Group Name. In the near future, it will print Route information like the other pages.
To check your local Fishing Group, check your PokeGear.

POKEGEAR: Now shows the detailed name of map you're currently in (based on Map Group & Map Number) and it also reads the map's attribute to see it's fishing group, if it has one.

COMING SOON: AREA support for Headbutt Trees and Rock Smash Rocks and the Bug contest. Roaming Support for the dogs and any custom roamers.

I also have an idea to have a python script scrape all information about special event pokemon (like Celebi, Ho-oh, Lugia, Starters, Casinos, Gift pokemon like Eevee) and NPC trades and displaying that. The script should be run if you ever make edits to these and will recompile the list. I should probably do this for Field Moves too, since people can and do have custom Field Moves...

Feel Free to DM me any suggestions and feedback. If you want to help me design Tiles/GFX to help make everything easier to look at, I would be eternally grateful.

Commit Notes: newest to oldest.

I'm still not happy with field moves, having to maintain a seperate data table about the moves and if they're TM/HM/MT goes against the spirit of the project. but for now, it works, and will display the field move twice if can learn via lvl up & TM/HM/MT

pokedexpart1

need to get mon icons

pokedexpart2

Mon Icons are broken,
Evo Page is borked,
Sprite Page isnt animating

Customizable Pokédex Color

https://github.com/pret/pokecrystal/wiki/Customizable-Pok%C3%A9dex-Color

Plus changing _CGB_PokedexSearchOption: in engine/gfx/cgb_layouts.asm, ld a, PREDEFPAL_POKEDEX -> call CheckPokedexColor

pokedex Restore EV code

Pokedex, fixed animations

reflected the latest commit that changed sprite stuff, copied the relevant old funcs from lilikoi and updated to the new Constants

pret#1055

Pokedex: PokeGear shows fish group, cards wrap

In the Pokedex, Press start to bring up the Vanilla AREA option, and Kanto is enabled regardless of HoF

Card icons:
Test w/:
- Only clock + phone
- clock, map, phone
Need to test w/ Radio

Pokegear: forgot a few things

forgot to add check for radio when going left on clock screen

added print local fishing group name. It's ugly. Soooo much space for tiles on the pokegear!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Sync overworld sprite and battle animation sprite OAM constants+labels
4 participants