Commit Graph

1515 Commits

Author SHA1 Message Date
Senate
61c358240e Fix Syntactic and Other Issues 2025-03-30 15:56:59 -04:00
Senate
a591615cb5 Update Game Corner Prizes 2025-03-29 19:47:15 -04:00
Kuruyia
ff1189973c Identify field system generic map data pointer
This identifies the generic pointer declared in the field system struct
used by map with dynamic features to store their own data about the
state of those features.

Signed-off-by: Kuruyia <github@kuruyia.net>
2025-03-24 10:41:37 +01:00
Kuruyia
6e2c5a0fd9 Document persisted map features initializer
This documents the `unk_02071B10.c` file, which is in charge of
initializing the persisted data used for dynamic features specific to a
map.

Signed-off-by: Kuruyia <github@kuruyia.net>
2025-03-24 10:41:29 +01:00
Kuruyia
b39948b1f2 Identify functions related to dynamic map features
This renames the init/free and collision check functions related to
dynamic map features, according to the maps where they are used.

Signed-off-by: Kuruyia <github@kuruyia.net>
2025-03-24 10:11:14 +01:00
Kuruyia
8c206e0283 Document dynamic map features
This documents the `unk_02068344.c` file, which is in charge of calling
the correct init/free functions for the dynamic map features, and call
the correct map-specific collision check function.

Dynamic map features are defined as features that can change the layout
of a map according to player inputs, potentially also affecting their
collision.

Dynamic map features may encompass multiple map headers. Examples
include the Sunyshore Gym dynamic map features with its bridges in
multiple rooms, or the Platform Lift dynamic map features that handles
maps with platform lifts (some rooms in Iron Island and the Pokémon
League).

Signed-off-by: Kuruyia <github@kuruyia.net>
2025-03-24 08:05:26 +01:00
Kuruyia
bb21d0d576 Document persisted map features
This documents the `unk_02027F50.c` file, which is in charge of managing
data used by some maps to be more dynamic, and that needs to be
persisted in the save file. Examples include Sunyshore Gym's bridges
rotation, Pastoria Gym's water level, Canalave Gym's platform
positions...

This also documents related code in the save data module, and names
constants used as IDs for identifying the map that is currently using
dynamic features.

Signed-off-by: Kuruyia <github@kuruyia.net>
2025-03-24 07:43:55 +01:00
Kuruyia
ce5b675d40 Add more well-known map prop model IDs
This identifies the following map prop models:

-  `34`: generic ship, found in Canalave City for instance.
- `123`: the healing machine found in Pokémon Centers.
- `239`: the blue button found in the Pastoria City Gym, used to set the
         water to its highest level.
- `240`: the green button found in the Pastoria City Gym, used to set
         the water to half its highest level.
- `241`: the orange button found in the Pastoria City Gym, used to set
         the water to its lowest level.
- `303`: the muddy slope found in the overworld that needs a bike to
         traverse.
- `304`: the interior variant of the muddy slope.
- `502`: the lift platform found only in the Pokémon League.
- `507`: the "healing machine"-type machine that registers the Pokémons
         in the Hall of Fame.
- `538`: the S.S. Spiral (aka S.S. Sinnoh) ship used to travel between
         Snowpoint City and the Fight Area.

Signed-off-by: Kuruyia <github@kuruyia.net>
2025-03-22 13:48:04 +01:00
Kuruyia
607e8f4bf9 Document terrain collision manager
This documents the `unk_02054D00.c` file, which is in charge of managing
height, collision and tile behavior between the terrain and the
player/map objects.

Signed-off-by: Kuruyia <github@kuruyia.net>
2025-03-22 13:48:02 +01:00
Kuruyia
5306770fd4 Document dynamic terrain height
Some checks failed
build / build (push) Has been cancelled
This documents the `ov5_021EF250.c` file, which is in charge of managing
terrain features whose height can change.

Examples include the water floor of Pastoria Gym, and the various lift
platforms in the game (in Iron Island, the Pokémon League...).

Signed-off-by: Kuruyia <github@kuruyia.net>
2025-03-22 10:26:50 +00:00
Eduardo Quezada
18ecf16d74
Document Daycare (#436)
* Identified Daycare struct + incense baby table

* Daycare params

* Daycare_CreateEgg

* TryGiveVoltTackle

* Better names

* DetermineEggSpeciesAndParentSlots

* Format

* GetParentsCompatibility

* Party_GetFirstEgg

* GetEggCyclesToSubtract

* Egg cycles

* Nature inheritence

* DaycareMon

* Better name for FieldSystem_GetDay

* Cleaner struct defs

* Store into daycare

* Daycare levels and price

* Daycare mon count

* DaycareMail

* Mail struct def

* MON_DATA_MAIL and Take mon from daycare

* IVs and Moves

* Utility functions

* More utility functions

* Review changes

* Renamed files
2025-03-22 03:16:18 -07:00
Kuruyia
9eb354e48a Sync BDHC terminology with Markdown documentation
This synchonizes the terminology used in BDHC-related code with the new
terminology specified in the Markdown BDHC and file format spec
documents.

In particular:

- rename `xSize` to `xCount` for the various fields of the BDHC file
  header
- rename the strip's `lowerBound` to `scanline`
- rename the plate's `height` to `constant`
- rename the plate's `slope` to `normal`
- rename the point's `y` to `z`

Signed-off-by: Kuruyia <github@kuruyia.net>
2025-03-20 12:49:09 +01:00
Kuruyia
00a7c5dd3d Move some map-related constant files to the field sub-directory
This moves the files holding constants for the BDHC, map matrix and map
prop subsystems to the `include/constants/field` directory.

Signed-off-by: Kuruyia <github@kuruyia.net>
2025-03-19 18:46:19 +01:00
Kuruyia
8eda7bb52a Rename Id to ID in map-related code
This simply capitalizes the "D" in "ID" in map-related code.

Signed-off-by: Kuruyia <github@kuruyia.net>
2025-03-19 18:27:22 +01:00
RavePossum
536799a102
Merge pull request #435 from AsparagusEduardo/messageFunctions
Message functions literals to constants
2025-03-17 11:05:41 -04:00
Rachel
5c4943582b
Merge pull request #429 from CharlesFolz4/boxDisplayData
Some checks failed
build / build (push) Has been cancelled
Documenting UnkStruct_ov19_021D4F5C as BoxCustomization
2025-03-16 10:02:36 -07:00
Eduardo Quezada
392d94611a sub_02014B34, MessageUtil_ExpandedStrbuf, MessageUtil_MoveName and MessageUtil_SpeciesName 2025-03-15 12:34:40 -03:00
Eduardo Quezada
1894139a22 Text banks 2025-03-15 12:32:39 -03:00
Eduardo Quezada
db41c75d26
Ribbon Documentation + Footstep House scripts (#427)
Some checks failed
build / build (push) Has been cancelled
* Footstep house types and script commands

* Generated ribbons + messages

* Get Friendship + Get/Set Ribbon map scripts

* First non egg in party

* Standarized "ribbonID" as "monDataParam" and "ribbonNum" as "ribbonID"
2025-03-15 09:16:21 -04:00
Eduardo Quezada
83f42dde1f sub_02014B34, MessageUtil_ExpandedStrbuf, MessageUtil_MoveName and MessageUtil_SpeciesName 2025-03-15 00:27:37 -03:00
narf0708@gmail.com
09591db39c Refactor box -> boxID 2025-03-13 17:55:26 -04:00
narf0708@gmail.com
1cb844256b Documenting UnkStruct_ov19_021D4F5C as BoxCustomization 2025-03-13 17:47:53 -04:00
Rachel
30b901cbd5
Merge pull request #432 from AsparagusEduardo/soundEffect
Some checks failed
build / build (push) Has been cancelled
Sound_PlayEffect literals to constants
2025-03-12 22:21:14 -07:00
Eduardo Quezada
9b91475cd8 Document Egg Moves 2025-03-12 22:41:33 -03:00
Eduardo Quezada
f883bca9d5 Sound_PlayEffect literals to constants 2025-03-12 22:33:32 -03:00
Rachel
bb093d841b
Merge pull request #425 from CharlesFolz4/pcCompare
Documenting UnkStruct_ov19_021D5FAC as PCCompareMon
2025-03-12 08:18:21 -07:00
Rachel
44915351ee
Merge pull request #424 from ravepossum/mon_sprites
Document PokemonSprite and related structs
2025-03-12 07:59:02 -07:00
RavePossum
ac37372667 Address PR feedback 2025-03-11 20:06:15 -04:00
narf0708@gmail.com
ab01106dc3 Documentign UnkStruct_ov19_021D5FAC as PCCompareMon 2025-03-09 21:30:36 -04:00
Eduardo Quezada
1d33088d8c Merge branch 'main' into document12 2025-03-09 22:11:08 -03:00
RavePossum
7c701a376d Document mon sprite magic numbers, generate otherpoke naix 2025-03-09 19:29:06 -04:00
RavePossum
bf5ac11a52 Improve some PokemonSprite names 2025-03-09 19:29:06 -04:00
RavePossum
cb30afbe26 Document PokemonSpriteTaskAnim 2025-03-09 19:29:06 -04:00
RavePossum
f20ec79157 Add inlines for unintuitive bitmask hideShadows field 2025-03-09 19:29:06 -04:00
RavePossum
a2480dfa73 Mass renames for pokemon_sprite 2025-03-09 19:29:06 -04:00
RavePossum
be5355af20 Document most of pokemon_sprite.c 2025-03-09 19:28:45 -04:00
RavePossum
ad79c0418c unk_0200762C -> pokemon_sprite 2025-03-09 19:24:44 -04:00
RavePossum
f0ff83c47a Remove pokemon sprite struct def file and move to unk_0200762C.h 2025-03-09 19:24:43 -04:00
RavePossum
8c388258e3 Name PokemonSprite fields based on pokeheartgold 2025-03-09 19:24:43 -04:00
RavePossum
dd7046ff07 Move PokemonSpriteTransforms to pokemon sprite struct def header 2025-03-09 19:24:43 -04:00
RavePossum
0d8a1f1259 UnkFuncPtr_02007C34 -> PokemonSpriteCallback 2025-03-09 19:24:43 -04:00
RavePossum
34be0bc7db Name PokemonSpriteTransforms and fields based on pokeheartgold 2025-03-09 19:24:43 -04:00
RavePossum
b37e5caf9a Move PokemonSpriteShadow to pokemon sprite struct def header 2025-03-09 19:24:43 -04:00
RavePossum
ae19bfe5ee Name PokemonSpriteShadow and fields based on pokeheartgold 2025-03-09 19:24:43 -04:00
RavePossum
fa983cf03b Move PokemonSpriteTemplate to pokemon sprite struct def header 2025-03-09 19:24:43 -04:00
RavePossum
67ec27b77e Move PokemonSpriteManager to pokemon sprite struct def header 2025-03-09 19:24:43 -04:00
RavePossum
7c6bfa45df Mass rename UnkStruct_02007768 -> PokemonSpriteManager 2025-03-09 19:24:43 -04:00
RavePossum
430b6ba6b9 Rename Unk_02007768 fields based on pokeheartgold 2025-03-09 19:24:43 -04:00
RavePossum
50c09423f2 Mass rename PokemonSpriteTemplate related functions 2025-03-09 19:24:43 -04:00
RavePossum
fc4b0b7304 Rename parameters and other bits ArchivedSprite -> PokemonSpriteTemplate 2025-03-09 19:23:08 -04:00