Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
4570fa0
aaa
assidion2 Jun 7, 2026
531e62d
aaaMerge branch 'master' of https://github.com/UsernameFodder/pmdsky-…
assidion2 Jun 7, 2026
2da053d
aaa
assidion2 Jun 7, 2026
0683913
aaa
assidion2 Jun 7, 2026
64c096b
aaa
assidion2 Jun 7, 2026
33fe952
aaa
assidion2 Jun 7, 2026
0503a70
aaa
assidion2 Jun 7, 2026
9825d35
aaa
assidion2 Jun 7, 2026
a638af3
aaa
assidion2 Jun 12, 2026
5ffa25f
aaa
assidion2 Jun 12, 2026
567ccd2
aaa
assidion2 Jun 12, 2026
63f179c
aaa
assidion2 Jun 12, 2026
8892475
aaa
assidion2 Jun 12, 2026
c26ee74
aaa
assidion2 Jun 13, 2026
200e1b7
aaa
assidion2 Jun 13, 2026
ab73edc
aaa
assidion2 Jun 13, 2026
a8a7d30
aaa
assidion2 Jun 13, 2026
0a9ed9f
aaa
assidion2 Jun 13, 2026
f489e44
aaa
assidion2 Jun 13, 2026
43dc1ec
aaa
assidion2 Jun 13, 2026
dbcfd34
aaa
assidion2 Jun 13, 2026
415cae8
aaa
assidion2 Jun 13, 2026
5db767b
aaa
assidion2 Jun 13, 2026
cebbaed
aaa
assidion2 Jun 13, 2026
ac0d314
aaa
assidion2 Jun 13, 2026
2ff8090
aaa
assidion2 Jun 13, 2026
f0658ea
aaa
assidion2 Jun 17, 2026
9dfe789
aaa
assidion2 Jun 17, 2026
957b360
aaaMerge branch 'master' of https://github.com/UsernameFodder/pmdsky-…
assidion2 Jun 18, 2026
272e768
aaa
assidion2 Jun 20, 2026
4f096c0
aaaMerge branch 'master' of https://github.com/UsernameFodder/pmdsky-…
assidion2 Jun 20, 2026
6f01a57
aaa
assidion2 Jun 20, 2026
4d5e32b
aaaMerge branch 'master' of https://github.com/UsernameFodder/pmdsky-…
assidion2 Jun 20, 2026
555506b
aaa
assidion2 Jun 22, 2026
9b06076
aaa
assidion2 Jun 22, 2026
37aed59
aaa
assidion2 Jun 22, 2026
2740c49
aaa
assidion2 Jun 22, 2026
8d62f1e
aaa
assidion2 Jun 22, 2026
a5ef11a
aaa
assidion2 Jun 22, 2026
006190b
aaa
assidion2 Jun 23, 2026
21a410f
aaa
assidion2 Jun 23, 2026
6db4cc7
aaa
assidion2 Jun 23, 2026
00e7910
aaa
assidion2 Jun 27, 2026
0a0ba11
aaa
assidion2 Jun 27, 2026
e900bb1
aaa
assidion2 Jun 27, 2026
3fff17f
aaa
assidion2 Jun 27, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions headers/functions/arm9.h
Original file line number Diff line number Diff line change
Expand Up @@ -485,6 +485,9 @@ uint32_t DecodeFragmentByteAssemblyTable(struct wan_fragment_bytes_assembly_entr
void* dst);
int LoadObjPalette(struct obj_graphics_control* obj_graphics_control,
struct palette_init_info* palette_init_info, uint8_t palette_num);
int AddWanFragmentToOam(struct obj_graphics_control* obj_graphics_control,
struct wan_fragment* fragment, uint16_t* param_3,
uint16_t* oam_adjustment_info);
int AddSimpleObjToOam(struct obj_graphics_control* obj_graphics_control, uint16_t* obj, int group);
void GroupOamAttributesWrapper(struct obj_graphics_control* obj_graphics_control);
void CopyAttributesToOamWrapper(struct obj_graphics_control* obj_graphics_control);
Expand All @@ -495,6 +498,7 @@ void InitObjGraphicsControls(void);
void CopyAttributesToOamBothScreens(void);
void GroupOamAttributesBothScreens(void);
void CopyAndInterleaveWrapper(uint16_t* dst, uint16_t* src, uint32_t len, uint8_t val);
void InitOamAdjustmentInfo(uint16_t* oam_adjustment_info);
void InitAnimationControl(struct animation_control* animation_control);
void InitAnimationControlWithSet(struct animation_control* animation_control);
void SetSpriteIdForAnimationControl(struct animation_control* anim_ctrl, uint16_t sprite_id);
Expand All @@ -512,7 +516,7 @@ void SetAndPlayAnimationForAnimationControl(struct animation_control* anim_ctrl,
void SwitchAnimationControlToNextFrame(struct animation_control* anim_ctrl);
void LoadAnimationFrameAndIncrementInAnimationControl(struct animation_control* anim_ctrl,
struct wan_animation_frame* anim_frame);
void FillOamAttributeInfo(struct animation_control* dst, uint16_t* src);
void FillOamAdjustmentInfo(struct animation_control* dst, uint16_t* src);
uint32_t AnimationControlGetAllocForMaxFrame(struct animation_control* anim_ctrl);
void DeleteWanTableEntry(struct wan_table* wan_table, int wan_id);
int AllocateWanTableEntry(struct wan_table* wan_table);
Expand Down Expand Up @@ -553,6 +557,7 @@ void GeomSetVertexCoord16(int x, int y, int z);
void InitRender3dData(void);
void GeomSwapBuffers(void);
void InitRender3dElement64(struct render_3d_element_64* element64);
int GetPaletteBaseAddress(undefined4 pal_vram_offset_upper, undefined4 pal_vram_offset_lower);
void Render3d64Texture0x7(struct render_3d_element_64* element64);
void Render3d64WindowFrame(struct render_3d_element_64* element64);
void EnqueueRender3d64Tiling(struct render_3d_element_64* element64);
Expand All @@ -568,7 +573,7 @@ void ConvertPointersSir0(undefined* sir0_ptr);
int HandleSir0TranslationVeneer(uint8_t** dst, uint8_t* src);
void FillPaletteInitInfo(struct palette_init_info* palette_init_info, struct rgba* palette_bytes,
uint16_t palette_mode, uint16_t nb_colors_or_palettes,
uint16_t ext_palette_upper, int8_t palette_num_custom);
uint16_t ext_palette_start, int8_t palette_num_custom);
int DecompressAtNormalVeneer(undefined* addr_decomp, int expected_size, undefined* at_ptr);
int DecompressAtNormal(undefined* addr_decomp, int expected_size, undefined* at_ptr);
int DecompressAtHalf(undefined* addr_decomp, int expected_size, undefined* at_ptr, int high_nibble);
Expand All @@ -589,6 +594,11 @@ int PreprocessStringFromId(char* output, int output_size, int string_id,
bool StrcmpTagVeneer(const char* s1, const char* s2);
int AtoiTagVeneer(const char* s);
void InitPreprocessorArgs(struct preprocessor_args* args);
void CopyOrInitPreprocessorArgs(struct preprocessor_args* out, struct preprocessor_args* in);
void QuantityToString(char* s, int quantity, uint8_t adj_size, undefined4 param_4);
void MoneyQuantityToString(char* s, int quantity);
void BankQuantityToString(char* s, int quantity);
void ExpQuantityToString(char* s, int quantity);
char* SetStringAccuracy(char* s, int param_2);
char* SetStringPower(char* s, int param_2);
char* GetRankString(char* s, int rank_and_flags);
Expand Down Expand Up @@ -625,7 +635,6 @@ uint8_t DrawChar(int window_id, int x, int y, char symbol, int color_offset);
struct window* GetWindow(int window_id);
int NewWindowScreenCheck(struct window_params* params, uint8_t param_2);
int NewWindow(struct window_params* params, uint8_t param_2);
int GetPaletteBaseAddress(undefined4 pal_vram_offset_upper, undefined4 pal_vram_offset_lower);
void SetScreenWindowsColor(int palette_idx, bool upper_screen);
void SetBothScreensWindowsColor(int palette_idx);
void UpdateWindow(int window_id);
Expand Down
20 changes: 18 additions & 2 deletions headers/functions/overlay29.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ int GetVisibilityRange(void);
void RevealWholeFloor(struct entity* entity);
int PlayEffectAnimationEntity(struct entity* entity, int effect_id, bool play_now, int param_4,
int param_5, undefined param_6, enum direction_id effect_dir,
undefined2* param_8);
uint16_t* custom_oam_adjustment_info);
int PlayEffectAnimationPos(struct position* pos, int effect_id, bool play_now);
int PlayEffectAnimationPixelPos(struct pixel_position* pixel_pos, int effect_id, bool play_now);
void AnimationDelayOrSomething(undefined param_1);
Expand Down Expand Up @@ -88,6 +88,7 @@ bool ShouldDisplayEntityAdvanced(struct entity* entity);
void PlayEffectAnimation0x1A9(struct entity* entity);
void PlayEffectAnimation0x29(struct entity* entity);
void PlayEffectAnimation0x18E(struct entity* entity);
void PlayStairSensorArrowEffect(struct entity* entity, enum direction_id arrow_dir);
void LoadMappaFileAttributes(int quick_saved, bool disable_monsters, undefined* special_process);
enum trap_id GetRandomSpawnTrapId(void);
enum trap_id GetRandomTrapId(void);
Expand Down Expand Up @@ -147,6 +148,8 @@ int CalcStatusDuration(struct entity* entity, int16_t* turn_range, bool iq_skill
void DungeonRngUnsetSecondary(void);
void DungeonRngSetSecondary(int i);
void DungeonRngSetPrimary(void);
void PlayLevelUpSound(void);
void PlayDungeonTipSound(void);
void PlaySeByIdIfNotSilence(int se_id);
void PlayMeByIdIfNot998(int me_id);
enum music_id MusicTableIdxToMusicId(int music_table_idx);
Expand Down Expand Up @@ -293,7 +296,12 @@ bool ShouldMonsterHeadToStairs(struct entity* entity);
void DisplayLinkedMovesWarnings(struct entity* entity, int move_slot);
bool MewSpawnCheck(enum monster_id monster_id, bool fail_if_mew);
void TryEndStatusWithAbility(struct entity* attacker, struct entity* defender);
void TryActivateNewFloorPpRestoration(bool suppress_logs);
bool ExclusiveItemEffectIsActive(struct entity* entity, enum exclusive_item_effect_id effect_id);
void TryActivateNewFloorHpRestoration(bool log_failure);
void TryActivateStairSensor(bool suppress_logs);
void TryActivateAcuteSniffer(bool suppress_logs);
bool ShouldTreatMonsterAsAlly(struct entity* entity1, struct entity* entity2);
struct entity* GetTeamMemberWithIqSkill(enum iq_skill_id iq_skill);
bool TeamMemberHasEnabledIqSkill(enum iq_skill_id iq_skill);
bool TeamLeaderIqSkillIsEnabled(enum iq_skill_id iq_skill);
Expand Down Expand Up @@ -406,6 +414,7 @@ bool IsTacticSet(struct entity* entity, enum tactic_id tactic_id);
bool HasDropeyeStatus(struct entity* entity);
bool IqSkillIsEnabled(struct entity* entity, enum iq_skill_id iq_id);
void UpdateIqSkills(struct monster* monster);
void UpdateIqSkillsWrapper(struct entity* entity);
bool CanSeeTeammate(struct monster* monster);
enum type_id GetMoveTypeForMonster(struct entity* entity, struct move* move);
int GetMovePower(struct entity* entity, struct move* move);
Expand Down Expand Up @@ -507,6 +516,12 @@ void UpdateShopkeeperModeAfterTrap(struct entity* shopkeeper, bool non_team_memb
void ResetDamageCalcDiagnostics(void);
void PointCameraToMonsterWrapper(struct entity* entity);
bool IsEitherMonsterInvalid(struct entity* entity1, struct entity* entity2);
void SwapDefensiveStages(struct entity* attacker, struct entity* defender, bool log_message);
void SwapDefensiveMultipliers(struct entity* attacker, struct entity* defender, bool log_message);
void SwapOffensiveStages(struct entity* attacker, struct entity* defender, bool log_message);
void SwapOffensiveMultipliers(struct entity* attacker, struct entity* defender, bool log_message);
void SwapHitChanceStages(struct entity* attacker, struct entity* defender, bool log_message);
void SwapUserAtkAndDefModifiers(struct entity* attacker, struct entity* defender, bool log_message);
bool SpecificRecruitCheck(enum monster_id monster_id);
bool RecruitCheck(struct entity* user, struct entity* target);
bool TryRecruit(struct entity* user, struct entity* recruit);
Expand Down Expand Up @@ -795,10 +810,11 @@ void ActivateSportCondition(bool water_sport);
bool TryActivateWeather(bool param_1, bool param_2);
int DigitCount(int n);
void LoadTextureUi(void);
void InitUi3dElement(struct render_3d_element_64* element64, undefined4 pal_vram_offset_upper);
int GetPaletteBaseAddressOv29(undefined4 pal_vram_offset_upper, undefined4 pal_vram_offset_lower);
int DisplayNumberTextureUi(int16_t x, int16_t y, int n, int ally_mode);
int DisplayCharTextureUi(struct render_3d_element_64* element64, int16_t x, int16_t y, int char_id,
int16_t param_5);
undefined4 pal_vram_offset_lower);
void DisplayUi(void);
struct tile* GetTile(int x, int y);
struct tile* GetTileSafe(int x, int y);
Expand Down
10 changes: 5 additions & 5 deletions headers/types/common/graphics.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ struct animation_control {
uint16_t field6_0xc; // (from struct entity) animation frame counter for the idle animation?
undefined field7_0xe;
undefined field8_0xf;
// 0x10: Information used to create an object's OAM attributes.
// 0x10: Information used to adjust an object's OAM attributes.
// See https://problemkaputt.de/gbatek.htm#lcdobjoamattributes
// To do so, the first three elements of the array are ANDed with some value, then ORed
// with the element three indexes above.
// Notably, setting bit 0x400 of oam_attribute_info[3] will make the object semi-transparent.
uint16_t oam_attribute_info[6];
// To do so, each attribute is ANDed with the corresponding element in the first half
// of the array, then ORed with the corresponding element in the second half.
// Notably, setting bit 0x400 of oam_adjustment_info[3] will make the object semi-transparent.
uint16_t oam_adjustment_info[6];
struct vec2_16 position;
struct vec2_16 anim_frame_offset;
struct vec2_16 anim_frame_shadow_offset;
Expand Down
15 changes: 9 additions & 6 deletions headers/types/files/wan.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ struct palette_init_info {
// https://problemkaputt.de/gbatek.htm#dsvideoextendedpalettes
uint16_t palette_mode;
uint16_t nb_colors_or_palettes; // 0x6
uint16_t ext_palette_upper; // 0x8: Upper 4 bits in 256-color extended palette
uint16_t ext_palette_start; // 0x8: Starting position in 256-color extended palette
int8_t palette_num_custom; // 0xA: If not -1, overwrites palette_num in LoadObjPalette
// 0xB: If 1, splits the palette in chunks of 0x10 across multiple
// extended palettes starting from palette_num
Expand Down Expand Up @@ -103,16 +103,19 @@ ASSERT_SIZE(struct wan_header, 10);
struct wan_fragment {
// negative mean using the previous defined fragment bytes (or to not update it?)
int16_t fragment_bytes_index;
int8_t unk1;
int8_t unk2;
int16_t unk1;

// 2 bytes
int8_t offset_y : 8;
bool unk3 : 1;
bool unk4 : 1;
uint8_t likely_padding_1 : 3;
// 0=Normal, 1=Semi-Transparent, 2=OBJ Window, 3=Prohibited
// Seemingly always 0 in the base game, but still works properly for creating
// semi-transparent objects assuming it is not zeroed by oam_adjustment_info.
uint8_t obj_mode : 2;
uint8_t likely_padding_1 : 1;
bool is_mosaic : 1;
uint8_t shape_indice : 2; // as used in OBJ attribute 1
uint8_t shape_indice : 2; // as used in OBJ attribute 0

// 2 bytes
uint16_t offset_x : 9; // The value to be used is this - 256, which can end up negative.
Expand All @@ -121,7 +124,7 @@ struct wan_fragment {
bool is_last : 1;
bool h_flip : 1;
bool v_flip : 1;
uint8_t size_indice : 2; // as used in OBJ attribute 0
uint8_t size_indice : 2; // as used in OBJ attribute 1

// 2 bytes
uint16_t fragment_alloc_counter : 10;
Expand Down
102 changes: 85 additions & 17 deletions symbols/arm9.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1161,7 +1161,7 @@ arm9:

r0: oam_info
r1: oam_attributes
r2: group
r2: priority group
- name: UpdateFadeStatus
address:
EU: 0x200BA18
Expand Down Expand Up @@ -4701,6 +4701,17 @@ arm9:
r1: palette_init_info
r2: palette_num (bits 12-15 of OAM attribute 2)
return: always 1
- name: AddWanFragmentToOam
address:
EU: 0x201B770
description: |-
Adds a WAN fragment to OAM.

r0: obj_graphics_control
r1: wan_fragment
r2: ?
r3: oam_adjustment_info (length 6 array, or null to not adjust)
return: -2 if group out of bounds, -1 if too many objects, 0 if successful
- name: AddSimpleObjToOam
address:
EU: 0x201BA94
Expand All @@ -4714,7 +4725,7 @@ arm9:

r0: obj_graphics_control
r1: obj
r2: group
r2: priority group
return: -2 if group out of bounds, -1 if too many objects, 0 if successful
- name: GroupOamAttributesWrapper
address:
Expand Down Expand Up @@ -4775,6 +4786,13 @@ arm9:
r1: src
r2: len (in bytes, will be divided by 2 in the call to CopyAndInterleave)
r3: val
- name: InitOamAdjustmentInfo
address:
EU: 0x201C09C
description: |-
Initializes an oam_adjustment_info array that will be used in an animation_control structure with default values (0xFFFF for the ANDs, 0 for the ORs).

r0: [output] oam_adjustment_info array (length 6)
- name: InitAnimationControl
address:
EU: 0x201C0EC
Expand Down Expand Up @@ -4895,13 +4913,15 @@ arm9:

r0: animation_control
r1: animation_frame
- name: FillOamAttributeInfo
- name: FillOamAdjustmentInfo
aliases:
- FillOamAttributeInfo
address:
EU: 0x201D1AC
NA: 0x201D110
JP: 0x201D168
description: |-
Copies an array of values into an animation_control struct's oam_attribute_info.
Copies an array of values into an animation_control struct's oam_adjustment_info.

r0: animation_control
r1: source array (length 6)
Expand Down Expand Up @@ -5227,6 +5247,20 @@ arm9:
Initialize the render_3d_element_64 structure (without performing any drawing or external data access)

r0: render_3d_element_64
- name: GetPaletteBaseAddress
address:
EU:
- 0x201E858
- 0x2027B9C
NA: 0x20278A8
JP: 0x2027C08
description: |-
Gets the palette base address for a 3D element loaded from a WTE file.
Normally takes the same parameters as were used in the specified file's ProcessWte call.

r0: upper part of the palette VRAM
r1: lower part of the palette VRAM
return: palette base address
- name: Render3d64Texture0x7
address:
EU: 0x201E8E0
Expand Down Expand Up @@ -5600,9 +5634,55 @@ arm9:
NA: 0x2023690
JP: 0x20236E0
description: |-
Initializes a struct preprocess_args.
Initializes a preprocessor_args struct.

r0: preprocessor args pointer
- name: CopyOrInitPreprocessorArgs
address:
EU: 0x2023920
description: |-
Copies the input preprocessor_args struct to the output struct, or initializes it if the input is a null pointer.

r0: [output] preprocessor args pointer
r1: input preprocessor args pointer, or null if should initialize one
- name: QuantityToString
address:
EU: 0x20239D8
description: |-
Converts a quantity to a string, adding commas in between numbers when appropriate.

r0: [output] string
r1: quantity
r2: adjusted size (if there are less characters in the string than this number, leading spaces will be added to make it this size)
r3: ?
- name: MoneyQuantityToString
address:
EU:
- 0x2023B30
- 0x2023B58
description: |-
Converts a money quantity to a string, adding commas in between numbers when appropriate.

Note that this function does not add the P symbol at the end.

r0: [output] string
r1: quantity
- name: BankQuantityToString
address:
EU: 0x2023B44
description: |-
Converts a money quantity shown in the bank menu to a string, adding commas in between numbers when appropriate and also adding leading spaces.

r0: [output] string
r1: quantity
- name: ExpQuantityToString
address:
EU: 0x2023B6C
description: |-
Converts an experience quantity to a string, adding commas in between numbers when appropriate.

r0: [output] string
r1: quantity
- name: SetStringAccuracy
address:
EU: 0x20245C0
Expand Down Expand Up @@ -5991,18 +6071,6 @@ arm9:
r0: window_params pointer to be copied by value into window::hdr in the new window
r1: ?
return: window_id
- name: GetPaletteBaseAddress
address:
EU: 0x2027B9C
NA: 0x20278A8
JP: 0x2027C08
description: |-
Gets the palette base address for a 3D element loaded from a WTE file.
Takes the same parameters as were used in the specified file's ProcessWte call.

r0: upper part of the palette VRAM
r1: lower part of the palette VRAM
return: palette base address
- name: SetScreenWindowsColor
address:
EU: 0x2027D5C
Expand Down
Loading
Loading