Commit Graph

2897 Commits

Author SHA1 Message Date
Rachel
1083f5d6c5 Apply formatting rules to #451 2025-03-31 11:11:09 -07:00
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
Rachel
0497e60823
Merge pull request #448 from Kuruyia/docs/fix-land-data-map-prop
Fix the map prop ID size in the land data Markdown doc
2025-03-27 12:07:49 +00:00
Kuruyia
a5843fb044 Fix the map prop ID size in the land data Markdown doc
This fixes the size of the `modelID` field found in the land data NARC
files. It was incorrectly documented as being 2 bytes, where it is in
reality 4 bytes.

Signed-off-by: Kuruyia <github@kuruyia.net>
2025-03-26 07:55:08 +01:00
Rachel
ad9711c8ed
Merge pull request #446 from Kuruyia/feat/document-dynamic-map-features
Some checks failed
build / build (push) Has been cancelled
Document dynamic map features
2025-03-25 12:20:33 +00: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
d5ee4064f7 Document persisted map features initializer script commands
This documents the map script commands related to the persisted map
features initializers.

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
RavePossum
b97930d7fd
Merge pull request #445 from Kuruyia/feat/document-terrain-collision-manager
Some checks failed
build / build (push) Has been cancelled
Document terrain collision manager
2025-03-23 23:59:35 -04: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
Rachel
f1cabf31b0
Merge pull request #442 from Kuruyia/refactor/map-code
Some checks are pending
build / build (push) Waiting to run
Some improvements on map-related code
2025-03-21 13:54:18 +00: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
8b73095b11 Merge variable declaration and definition in map-related code
This applies more aggressive variable declaration and definition merging
in map-related code files.

Signed-off-by: Kuruyia <github@kuruyia.net>
2025-03-20 12:48:46 +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
Rachel
d3134b7a99
Merge pull request #440 from Kuruyia/docs/fix-arealight
Some checks failed
build / build (push) Has been cancelled
Small fixes in the area light Markdown doc
2025-03-19 16:08:48 +00:00
Rachel
7fb18f939f
Merge pull request #437 from ravepossum/map_bins
Dump map data binaries, texture sets, and matrices
2025-03-19 16:08:06 +00:00
Kuruyia
67bf6c7eee Small fixes in the area light Markdown doc
This fixes the following related to area light in the file format
specifications Markdown document:

- change the name of the area light NARC file from `area_light.narc` to
  `arealight.narc` to reflect its real name in the repo
- change the "light enabled" parameter to "light valid", as documented
  in area light-related code.

Signed-off-by: Kuruyia <github@kuruyia.net>
2025-03-19 13:24:56 +01:00
RavePossum
5bb9556a4c Dump map matrices 2025-03-17 17:39:12 -04:00
RavePossum
04d18dd474 Generate map ID constants 2025-03-17 17:39:12 -04:00
RavePossum
84372b4827 Dump map texture sets 2025-03-17 17:39:03 -04:00
Rachel
f60f5f0b46
Merge pull request #434 from Kuruyia/docs/maps
Some checks failed
build / build (push) Has been cancelled
Start Markdown documentation of the maps system
2025-03-17 17:09:34 +00:00
RavePossum
536799a102
Merge pull request #435 from AsparagusEduardo/messageFunctions
Message functions literals to constants
2025-03-17 11:05:41 -04:00
RavePossum
5bff852559 Dump map data files 2025-03-17 09:46:33 -04:00
Kuruyia
eab4f9a4ad Start Markdown documentation of the maps system
This starts a human-readable documentation of the various subsystems
used in the game's map system. The following files are included in this
commit:

- `maps.md`: a general overview of maps
- `bdhc.md`: an overview of the BDHC subsystem, which is used to provide
  height information on maps
- `loading_maps.md`: an overview of how maps are loaded by the game
- `file_format_specifications.md`: specs for the maps data structures

The `file_format_specifications.md` is meant to be a purely technical
document that contains a precise description of the data structures used
by the game's map system.

The other files are meant to be semi-technical documentation, where some
of the nitty-gritty details have been either simplified or left out
entirely.

Some of the maps subsystems were purposefully left out of this commit,
such as map objects and map scripts. They will need to be addressed in
future updates to those documents.

Signed-off-by: Kuruyia <github@kuruyia.net>
2025-03-16 21:40:56 +01: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
4e9a2a62c6 Text Bank IDs 2025-03-15 12:48:09 -03: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
400ec4eb43 MessageLoader_Init message loader type and narc ID 2025-03-15 01:01:35 -03: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
Rachel
ec82048cb0
Merge pull request #431 from AsparagusEduardo/eggMoves
Document Egg Moves
2025-03-12 22:10:48 -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
4fc59bfe4c
Merge pull request #329 from lhearachel/make-venv
Some checks are pending
build / build (push) Waiting to run
Pull Meson as a subproject
2025-03-12 08:26:37 -07: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
narf0708@gmail.com
6e413f6c8d PR feedback 2025-03-11 20:52:35 -04:00
RavePossum
ac37372667 Address PR feedback 2025-03-11 20:06:15 -04:00