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

Documented and formatted a lot of files to sync with pokeemerald #636

Open
wants to merge 38 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
9997d23
Removed old macros and renamed unk_8 to numTracks
HunarPG Jul 30, 2023
0af8676
Document the files in asm folder present in root directory
HunarPG Jul 30, 2023
70c28c7
Documented data/battle_ai_scripts.s to match Emerald
HunarPG Jul 30, 2023
04a7ff8
Used DEFAULT_STAT_STAGE, MAX_STAT_STAGE and MIN_STAT_STAGE in data/ba…
HunarPG Jul 30, 2023
c84e526
Matched documentation of data/battle_scripts_2.s with pokeemerald
HunarPG Jul 30, 2023
99e7db9
Add commented out numbers for mystery_event_script_cmd_table.s
HunarPG Jul 30, 2023
576b963
Documented and formated include/constants/battle_ai.h
HunarPG Jul 30, 2023
c5c4187
Minor readability improvements to include/constants/battle_script_com…
HunarPG Jul 30, 2023
9326cd4
Formated include/constants/battle_string_ids.h a bit better
HunarPG Jul 30, 2023
7ab4c38
Formated include/constants/event_objects.h
HunarPG Jul 30, 2023
40c5cd9
Add proper comments in include/constants/items.h
HunarPG Jul 31, 2023
4206066
Add proper comments to include/constants/map_script.h
HunarPG Jul 31, 2023
753cfa8
Renamed win0left, win0top, win0right and winbottom to wirelessWinLeft…
HunarPG Jul 31, 2023
5f5f1c0
Rename GAME_STAT_FISHING_CAPTURES to GAME_STAT_FISHING_ENCOUNTERS
HunarPG Jul 31, 2023
12196b3
Replace NUM_TEXT_PRINTERS with WINDOWS_MAX
HunarPG Jul 31, 2023
cf242fe
Added STANDARD_FRIENDSHIP constant to allow easier custom adjustments
HunarPG Jul 31, 2023
4b9a00c
Properly rename eventLegal to modernFatefulEncounter
HunarPG Jul 31, 2023
9beb4af
Rename STRINGID_GOTCHAPKMNCAUGHT to STRINGID_GOTCHAPKMNCAUGHTPLAYER a…
HunarPG Jul 31, 2023
09c3c55
Renamed PrintMysteryGiftOrEReaderTopMenu to PrintMysteryGiftOrEReader…
HunarPG Jul 31, 2023
197fc64
Sync battle anim args
HunarPG Jul 31, 2023
d72c9ef
Add missing TYPE_MUL_NO_EFFECT and PARTY_SIZE usage
HunarPG Jul 31, 2023
8d3e326
Added missing use of gSaveBlock1Ptr->registeredItem = ITEM_NONE; in s…
HunarPG Jul 31, 2023
50b7636
Add NUM_TILES_PER_METATILE constant
HunarPG Jul 31, 2023
3dc1a65
Introduce NUM_BATTLE_SIDES
HunarPG Jul 31, 2023
ecdfcc4
Rename sListMenuItems_TradeBoard to sTradeBoardListMenuItems
HunarPG Jul 31, 2023
0b5c6af
More missing constant usage
HunarPG Jul 31, 2023
9712d03
Adding documentation about GFHeader
HunarPG Jul 31, 2023
1d22e14
Add documentation to thunder weather effect
HunarPG Jul 31, 2023
4eb5728
Added missing usage of NUM_PALS_IN_PRIMARY and NUM_PALS_TOTAL
HunarPG Jul 31, 2023
677b281
Made all the gFieldEffectObjectTemplates in src/data/field_effects/fi…
HunarPG Aug 1, 2023
b16ec26
Converted MovementActions and gMovementActionFuncs to u8 instead of s…
HunarPG Aug 1, 2023
e3b2f9c
Changed static const u8 to const u8 in src/data/pokemon/item_effects.…
HunarPG Aug 1, 2023
328d8d5
Converted sTMHMLearnsets to gTMHMLearnsets and static const u32 to co…
HunarPG Aug 1, 2023
232eed6
Made the Requested Changes
HunarPG Aug 1, 2023
476f4fa
Changed spaces to tabs
HunarPG May 4, 2024
2ad8d98
Used correct naming convention of AI_ITEM_GUARD_SPECS used in pokefir…
HunarPG May 4, 2024
d6758c9
Improved BattleScript_ActionWatchesCarefullyLeftoverWallyPrepToThrow …
HunarPG May 4, 2024
6fe664f
Switch back to more accurate pokefirered names in battle_scripts_2.s
HunarPG May 4, 2024
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
162 changes: 0 additions & 162 deletions asm/macros.inc
Original file line number Diff line number Diff line change
Expand Up @@ -5,165 +5,3 @@
.include "asm/macros/map.inc"
.include "asm/macros/m4a.inc"
.include "asm/macros/trainer_tower.inc"

.macro region_map_location x, y, width, height, name
.byte \x
.byte \y
.byte \width
.byte \height
.4byte gMapName_\name
.endm

.macro obj_tiles address, uncompressed_size, tag
.4byte \address
.2byte \uncompressed_size
.2byte \tag
.endm

.macro null_obj_tiles
obj_tiles 0, 0, 0
.endm

.macro obj_pal address, tag
.4byte \address
.2byte \tag
.2byte 0 @ padding
.endm

.macro null_obj_pal
obj_pal 0, 0
.endm

.macro paired_pals tag, address
.2byte \tag
.2byte 0 @ padding
.4byte \address
.endm

@ For object animation frames.
.macro obj_frame_tiles address, uncompressed_size
.4byte \address
.2byte \uncompressed_size
.2byte 0 @ padding
.endm

.macro spr_template tile_tag, pal_tag, oam, anims, images, affine_anims, callback
.2byte \tile_tag
.2byte \pal_tag
.4byte \oam
.4byte \anims
.4byte \images
.4byte \affine_anims
.4byte \callback
.endm

@ Berry trees have a table defining the palette slot used for each of their 5
@ stages. However, the first 2 stages always use the same slots regardless of
@ the type of tree and the slots of the last 3 stages always equal each other.
.macro berry_tree_palette_slot_table slot
.byte 3, 4, \slot, \slot, \slot
.endm

.macro subsprite x, y, priority, tile_num_offset, size
.byte \x
.byte \y
.2byte ((\priority) << 14) | ((\tile_num_offset) << 4) | SPRITE_SIZE_\size
.endm

.macro obj_image_anim_frame pic_id, duration, flags = 0
.2byte \pic_id
.byte (\flags) | (\duration)
.byte 0 @ padding
.endm

.macro obj_image_anim_loop count
.2byte 0xfffd
.byte \count
.byte 0 @ padding
.endm

.macro obj_image_anim_jump target_index
.2byte 0xfffe
.byte \target_index
.byte 0 @ padding
.endm

.macro obj_image_anim_end
.2byte 0xffff
.2byte 0 @ padding
.endm

.macro obj_rot_scal_anim_frame delta_x_scale, delta_y_scale, delta_angle, duration
.2byte \delta_x_scale
.2byte \delta_y_scale
.byte \delta_angle
.byte \duration
.2byte 0 @ padding
.endm

.macro obj_rot_scal_anim_loop count
.2byte 0x7ffd
.2byte \count
.4byte 0 @ padding
.endm

.macro obj_rot_scal_anim_jump target_index
.2byte 0x7ffe
.2byte \target_index
.4byte 0 @ padding
.endm

.macro obj_rot_scal_anim_end unknown=0
.2byte 0x7fff
.2byte \unknown
.fill 4 @ padding
.endm

.macro overworld_frame ptr:req, width:req, height:req, frame:req
.4byte (\ptr + (\width * \height * \frame * 64) / 2)
.2byte (\width * \height * 64) / 2
.2byte 0 @ padding
.endm

.macro credits_entry number, text
.4byte \number
.4byte \text
.endm

.macro door_anim_frame unknown, offset
.byte \unknown
.byte 0 @ padding
.2byte \offset
.endm

.macro door_anim_gfx metatile_num, unknown, tile_addr, palette_addr
.2byte \metatile_num
.2byte \unknown
.4byte \tile_addr
.4byte \palette_addr
.endm

.macro trainer_eye_trainer opp_1, opp_2, opp_3, opp_4, opp_5, map_name
.2byte OPPONENT_\opp_1
.2byte OPPONENT_\opp_2
.2byte OPPONENT_\opp_3
.2byte OPPONENT_\opp_4
.2byte OPPONENT_\opp_5
.2byte GROUP_\map_name
.2byte MAP_\map_name
.space 2
.endm

.macro window_template bg, top, left, height, width, palno, baseBlock
.byte \bg, \top, \left, \height, \width, \palno
.2byte \baseBlock
.endm

.macro abspath relative
.if REVISION == 0
.ascii "C:/WORK/POKeFRLG/src/pm_lgfr_ose/source/"
.else
.ascii "C:/WORK/POKeFRLG/Src/pm_lgfr_ose/source/"
.endif
.asciz "\relative"
.endm
12 changes: 6 additions & 6 deletions asm/macros/asm.inc
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
.ifndef GUARD_ASM_MACROS_ASM_INC
.set GUARD_ASM_MACROS_ASM_INC, 1
GriffinRichards marked this conversation as resolved.
Show resolved Hide resolved

.macro inc x
.ifndef GUARD_ASM_MACROS_ASM_INC
.set GUARD_ASM_MACROS_ASM_INC, 1
.macro inc x:req
.set \x, \x + 1
.endm

.macro enum_start x=0
.set __enum__, \x
.endm

.macro enum constant
.macro enum constant:req
.equiv \constant, __enum__
inc __enum__
.endm

.endif @ GUARD_ASM_MACROS_ASM_INC
.endif @ GUARD_ASM_MACROS_ASM_INC
2 changes: 1 addition & 1 deletion asm/macros/battle_ai_script.inc
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@
.byte 0x2b
.endm

.macro count_alive_pokemon battler:req
.macro count_usable_party_mons battler:req
.byte 0x2c
.byte \battler
.endm
Expand Down
Loading