Commit Graph

267 Commits

Author SHA1 Message Date
mid-kid 1d9a68dbdd Remove all address comments 2018-06-24 16:13:22 +02:00
mid-kid e8f847b537 Use structure constants for channel_struct 2018-06-04 11:35:27 +02:00
Rangi 32b92ca51c Start improving sprite movement engine (to do: identify bit flags)
Introduce maskbits N[, S]: optionally shift the bitmask
2018-05-23 12:48:14 -04:00
yenatch 53bcd8f46c
Merge pull request #512 from pret/warnings
fix lb/ln and "left shift of negative value" warning
2018-05-11 00:45:12 -04:00
Rangi 8acc8d6e30 Merge branch 'master' of https://github.com/pret/pokecrystal 2018-05-06 22:45:07 -04:00
yenatch 47379235f8 fix lb/ln and "left shift of negative value" warning
fixes #511
2018-05-06 21:35:55 -04:00
Rangi 1c92cb8b48 'rept' is not indented 2018-05-06 12:16:57 -04:00
mid-kid acdb302035 Fix rest of the givepokeitem/checkpokeitem references 2018-05-06 13:48:04 +02:00
mid-kid c82deab86f fix-various-little-things
A compilation of suggestions from the discord that don't deserve
separate commits and are not questionable at all™.
2018-05-05 09:19:04 +02:00
Rangi 81306889e3 Merge branch 'master' of https://github.com/pret/pokecrystal 2018-04-04 23:56:40 -04:00
yenatch f750d4f418
Merge pull request #505 from mid-kid/battlecommands
Battle command fixes
2018-04-04 21:18:15 -04:00
mid-kid d4025863cf Rename some battle commands
`hittarget` was misleading, as it doesn't actually "hit" the target, it
only plays the animation. As such, I've renamed it to `moveanim`.

`checkfaint` has nothing to do with checking if the user or target has
fainted, instead, it applies wCurDamage onto the target's HP, hitting
the substitute if applicable. I've renamed the command to `applydamage`
and all of its subfunctions accordingly.
2018-04-04 23:27:40 +02:00
mid-kid 800f948914 Label BattleCommand_BeatUpFailText 2018-04-04 22:40:35 +02:00
mid-kid 682ca7e93c Label bidefailtext
This "unknown" battle command is actually used to give the proper fail
message to bide.
2018-04-04 22:40:21 +02:00
mid-kid 81fff9bb80 Fix file permissions
I have no idea why this was a thing (do people store this repo on FAT32
flash drives or something?), but quite a bit of files had a permission
of 755. This isn't really a problem, but it's inconsistent and weird.
2018-04-01 17:05:10 +02:00
Rangi 0447ee0cf9 Relabel some map-related WRAM
wMisc -> {wSurroundingTiles, wBoxPartialData, wLink_c608}
wOverworldMap -> {wOverworldMapBlocks, wHallOfFamePokemonList}
2018-03-19 11:36:14 -04:00
Rangi 335c2699f0 Merge branch 'master' of https://github.com/pret/pokecrystal
# Conflicts:
#	constants/map_constants.asm
#	constants/wram_constants.asm
#	data/radio/oaks_pkmn_talk_routes.asm
#	data/radio/pnp_hidden_places.asm
#	engine/battle/core.asm
#	engine/breeding.asm
#	engine/phone/phone_scripts.asm
#	engine/radio.asm
#	maps/BattleTower1F.asm
#	maps/OlivineLighthouse2F.asm
#	maps/OlivineLighthouse6F.asm
#	maps/PokemonFanClub.asm
#	maps/RadioTower1F.asm
#	maps/RadioTower2F.asm
#	maps/Route30BerryHouse.asm
#	maps/Route34IlexForestGate.asm
#	maps/Route36NationalParkGate.asm
#	maps/RuinsOfAlphKabutoChamber.asm
#	maps/RuinsOfAlphResearchCenter.asm
#	maps/VermilionPort.asm
#	maps/VictoryRoad.asm
2018-02-25 20:39:54 -05:00
Rangi 10173f2a62 Default macro parameters use recursion; avoids repeating internal structure 2018-02-25 20:12:58 -05:00
Rangi f964d04a87 * loadmenuheader -> loadmenu (ead103d)
* objectface -> turnobject (c834bda)
2018-02-25 20:05:37 -05:00
mid-kid e8bc86d1fe Pkmn -> Mon
Since we're aiming for consistency across the codebase, I believe it
includes a uniform way to refer to the creatures this game consists of
in the labels of the code.
The only exceptions to this rule are labels referring to things named
through the use of the <PK><MN> or <PKMN> characters, in which case PKMN
is used.

Most of this was already consistent enough™, I just picked the
convention with the most occurences and fixed the outliers.
2018-02-22 17:39:06 +01:00
Rangi 73ea7c6326 Macro factors out sine code, just like sine data, since it's used 5 times 2018-02-03 21:11:55 -05:00
Rangi 32ed487a47 Merge branch 'master' of https://github.com/pret/pokecrystal
# Conflicts:
#	audio/engine.asm
#	constants/gfx_constants.asm
#	constants/map_data_constants.asm
#	constants/pokemon_data_constants.asm
#	constants/sprite_constants.asm
#	constants/wram_constants.asm
#	data/maps/data.asm
#	engine/battle/ai/scoring.asm
#	engine/battle/core.asm
#	engine/battle/effect_commands.asm
#	engine/battle/misc.asm
#	engine/battle_anims/getpokeballwobble.asm
#	engine/breeding.asm
#	engine/buy_sell_toss.asm
#	engine/decorations.asm
#	engine/events/battle_tower/battle_tower.asm
#	engine/events/battle_tower/rules.asm
#	engine/events/buena.asm
#	engine/events/bug_contest/contest_2.asm
#	engine/events/daycare.asm
#	engine/events/dratini.asm
#	engine/events/halloffame.asm
#	engine/events/happiness_egg.asm
#	engine/events/kurt.asm
#	engine/events/lucky_number.asm
#	engine/events/magnet_train.asm
#	engine/events/overworld.asm
#	engine/events/pokerus/pokerus.asm
#	engine/events/print_unown.asm
#	engine/events/print_unown_2.asm
#	engine/events/unown_walls.asm
#	engine/item_effects.asm
#	engine/link.asm
#	engine/mon_menu.asm
#	engine/player_object.asm
#	engine/routines/playslowcry.asm
#	engine/scripting.asm
#	engine/search.asm
#	engine/search2.asm
#	engine/specials.asm
#	engine/start_menu.asm
#	engine/timeset.asm
#	home/battle_vars.asm
#	home/map.asm
#	maps/GoldenrodUndergroundSwitchRoomEntrances.asm
#	maps/IlexForest.asm
#	maps/KrissHouse2F.asm
#	maps/Route39Barn.asm
#	mobile/mobile_12_2.asm
#	mobile/mobile_40.asm
#	mobile/mobile_5f.asm
#	wram.asm
2018-02-03 19:42:56 -05:00
Rangi 6ff2cb20e6 map → map_id; map_def → map; map_data → map_attributes 2018-02-03 17:11:55 -05:00
Rangi b0d84c64a6 Use fixed-point DIV function for a generalized sine_wave table macro 2018-02-03 13:26:34 -05:00
Rangi d11cac9e83 can't achieve this with rgbds 0.3.5 2018-02-03 01:55:22 -05:00
Rangi e32e5212af use "x + -1" not "x +- 1"
(TODO: use "x - 1" once rgbds allows it)
2018-02-02 22:55:38 -05:00
Rangi 45373ec601 sine_wave macro parameterizes table size, not frequency ("amplitude" was an incorrect comment) 2018-02-02 22:45:42 -05:00
Rangi f258ff8a41 oops 2018-02-02 22:28:29 -05:00
Rangi 07fddb1803 Legacy support macros 2018-02-02 22:24:50 -05:00
Rangi c834bdadf2 spriteface → objectface, consistent with the other script commands 2018-02-02 21:50:43 -05:00
Rangi aa8db1632c Remove checkmorn/checkday/checknite macros 2018-02-02 21:20:13 -05:00
Rangi 2a53d75807 Similar formatting for similar WRAM areas 2018-02-02 21:15:15 -05:00
Rangi 68d855c213 Script commands don't have underscores 2018-02-02 21:09:17 -05:00
Rangi 3088a77a21 warp_event x, y, map, warp_id 2018-02-01 21:54:00 -05:00
Rangi 323ef81286 More comments and macros 2018-02-01 15:19:27 -05:00
Rangi b04f41da98 enum_start like const_def 2018-01-31 12:21:36 -05:00
Rangi 08891da822 const_def N 2018-01-31 11:38:45 -05:00
Rangi 477adc72af grep -rl warp_def . | xargs sed -i s/warp_def/warp_event/g 2018-01-28 13:20:04 -05:00
luckytyphlosion a1951cefc0 Prefix wram labels with w, part 2. 2018-01-23 17:39:09 -05:00
luckytyphlosion f2ae74079f Prefix wram labels with w, part 1.
Handle edge cases first.
2018-01-23 16:45:34 -05:00
Rangi ead103d2c6 MenuDataHeader → MenuHeader, MenuData2 → MenuData (might complete issue #440) 2018-01-23 16:08:43 -05:00
Rangi 8f2878c37e trainers put the class and id first: `trainer YOUNGSTER, JOEY1, ...` 2018-01-23 13:08:48 -05:00
Rangi dea26c6639 hiddenitem, like itemball and object_event, puts the item first and the event last 2018-01-23 12:59:21 -05:00
Rangi 682548493b Struct macros should have their main label outside the macro 2018-01-23 11:40:32 -05:00
Rangi 14ef9d3066 PALETTE_SIZE 2018-01-22 19:57:35 -05:00
Rangi a73c532738 tile+color macros in gfx.asm 2018-01-22 19:40:17 -05:00
Remy Oukaour 05382d3e3c PARTY_LENGTH; MON_NAME; sgb_border.bin 2018-01-20 12:25:55 -05:00
Remy Oukaour 105ef872dd Better TX_SOUND_* names 2018-01-18 22:06:51 -05:00
Remy Oukaour 2acaa96cf1 More charmap and home/text.asm documentation for JP chars 2018-01-18 18:34:20 -05:00
Remy Oukaour 7b3de85a06 Avoid "+- 1" at every maskbits 2018-01-16 17:27:50 -05:00
Remy Oukaour 6c7e88513a Long lists of db/dw series with struct-defining macros belong in data/ 2018-01-15 14:11:11 -05:00
Remy Oukaour 5c28d05bb4 Merge branch 'master' of https://github.com/xCrystal/pokecrystal (resolve PR #459)
# Conflicts:
#	data/items/descriptions.asm
#	data/sprite_anims/framesets.asm
#	engine/crystal_colors.asm
#	engine/events/kurt.asm
#	engine/events/special.asm
#	engine/events/std_scripts.asm
#	engine/events_3.asm
#	engine/item_effects.asm
#	engine/namingscreen.asm
#	engine/scripting.asm
#	engine/stats_screen.asm
#	engine/trade_animation.asm
#	home/audio.asm
#	main.asm
#	maps/BattleTower1F.asm
#	maps/BattleTowerBattleRoom.asm
#	maps/BurnedTowerB1F.asm
#	maps/ElmsLab.asm
#	maps/GoldenrodDeptStore5F.asm
#	maps/GoldenrodUnderground.asm
#	maps/HallOfFame.asm
#	maps/MahoganyTown.asm
#	maps/ManiasHouse.asm
#	maps/MobileBattleRoom.asm
#	maps/MobileTradeRoomMobile.asm
#	maps/RadioTower2F.asm
#	maps/Route35NationalParkGate.asm
#	maps/Route36NationalParkGate.asm
#	maps/Route39Farmhouse.asm
#	tilesets/palette_maps.asm
2018-01-14 22:56:36 -05:00
Remy Oukaour 2ab60fa8a4 menu_coords macro for (x1, y1, x2, y2) order (see issue #440) 2018-01-13 16:38:14 -05:00
Remy Oukaour 5a3822fe86 Introduce callback, hiddenitem, conditional_event, and cmdqueue macros for map scripts 2018-01-13 00:47:38 -05:00
Remy Oukaour d83aefb30a Use more constants in scripts 2018-01-12 02:27:42 -05:00
Remy Oukaour e0088adb3f Other files belong in data/battle/ 2018-01-10 17:49:19 -05:00
Remy Oukaour 417937cffc Resolve #461 2018-01-10 13:47:57 -05:00
Remy Oukaour cc95d1208d Use maskbits more, and clarify its usage 2018-01-10 11:57:28 -05:00
Remy Oukaour 8aa58dca9e Specialized macros go with their data/code 2018-01-10 00:08:05 -05:00
Remy Oukaour 6c20ff9e20 Reorganize some macros
* tileset data macros go atop their related files, like all the ones in data/
* charmaps are not macros
2018-01-07 13:11:29 -05:00
Remy Oukaour 01d994b8a3 dsprite always has 6 arguments 2018-01-02 18:06:56 -05:00
xCrystal aa9a0a900d No more mobile EQUS ret (replace with Stubbed_ + ret) 2018-01-02 20:00:14 +01:00
yenatch 8c3905c4cd
Merge pull request #451 from yenatch/document-battle-anim-macros
Fix and document some battle animation macros
2018-01-01 12:47:28 -05:00
yenatch 4ce75e8dfc Document some more battle animation commands 2018-01-01 04:40:15 -05:00
yenatch 92fba8821c
Merge pull request #450 from roukaour/master
Constants for TextBoxFlags
2017-12-30 21:32:45 -05:00
Remy Oukaour f01434f2c0 bgrows → * BG_MAP_WIDTH
No dims macro
2017-12-29 18:59:50 -05:00
Remy Oukaour 1321a70029 hldims, bcdims, dedims 2017-12-29 16:15:34 -05:00
Remy Oukaour 145a1c3441 Define ld_dims for in-order (width, height) pairs 2017-12-29 16:14:02 -05:00
Remy Oukaour 2acc7f378a Coordinate macros all have similar structure 2017-12-29 16:05:33 -05:00
yenatch cc5aeb8b87 Fix anim_obj x/y values
- negative values have no meaning
- left in optional tile x/y for backwards compatibility
2017-12-29 13:43:17 -05:00
xCrystal ee5bf71640 Consistently name unknown fields in macros/wram as Fieldxx 2017-12-29 16:19:51 +01:00
Remy Oukaour b9a68fec25 Consistent if/else/endc (matches rept/endr) and DEF (matches BANK/HIGH/LOW) 2017-12-28 22:13:39 -05:00
Remy Oukaour 4c35f3ac85 Merge branch 'master' of https://github.com/pret/pokecrystal
# Conflicts:
#	macros/scripts/maps.asm
2017-12-28 20:56:21 -05:00
xCrystal 50fc9c3389 endm -> ENDM 2017-12-28 22:31:16 +01:00
Remy Oukaour 84e22eb578 Consistent (x, y) coordinate formatting in map scripts 2017-12-28 14:31:25 -05:00
xCrystal d6507e3882 More constants and documentation in slot machines 2017-12-28 19:38:15 +01:00
xCrystal 333524f0be Lowercase v for VRAM addresses 2017-12-28 13:32:33 +01:00
xCrystal 7beb497d3a Uppercase MACRO and EQU(S) according to the style guide 2017-12-28 13:23:44 +01:00
Remy Oukaour 7a4d641251 Remove redundant data/ filename prefixes 2017-12-27 01:29:15 -05:00
Remy Oukaour 35a3a19fda Use "battle_anims" and "sprite_anims" for clarity, not just "anims" 2017-12-26 18:45:04 -05:00
Remy Oukaour b5417fafec Split battle/ into data/ and engine/ components 2017-12-26 17:47:05 -05:00
Remy Oukaour 8983c0c809 dwb → dab 2017-12-26 14:39:16 -05:00
Remy Oukaour 24f0e7d045 Rename: emote_headers, sprite_headers, cry_headers, gfx_headers, tileset_headers 2017-12-26 12:50:32 -05:00
Remy Oukaour e34e68095d Resolve #428: Use `HIGH(X)` and `LOW(X)` instead of `X / $100` and `X % $100` or `X >> 8` and `X & $ff` 2017-12-25 14:23:16 -05:00
Remy Oukaour 3e7f3bbeb6 s/number/scene/, and correct some documentation 2017-12-24 17:35:33 -05:00
Remy Oukaour c05b7f41dd Renaming: (fix #412)
- MapTriggers / maptrigger → SceneScripts / scene_script
- XYTriggers / xy_trigger → CoordEvents / coord_event
- Signposts / signpost → BGEvents / bg_event
- PersonEvents / person_event → ObjectEvents / object_event
2017-12-24 14:33:17 -05:00
Remy Oukaour 10a1e6c860 Support old one-argument sound_duty macro, similar to callab/callba legacy support 2017-12-24 12:52:05 -05:00
Remy Oukaour c66d195089 callba/callab → farcall/callfar 2017-12-24 12:47:30 -05:00
Remy Oukaour 2f9f2317a3 Document the meaning of hour and daytime values for person_events 2017-12-23 01:19:34 -05:00
Remy Oukaour e44640b008 Move more main.asm code into individual files 2017-12-15 21:22:26 -05:00
Remy Oukaour 606817f18b Add a map_connection_struct macro 2017-12-15 18:25:32 -05:00
Remy Oukaour dc76bf804f Move all misc/ and unknown/ files to meaningful directories 2017-12-15 13:21:47 -05:00
Remy Oukaour d334a331fa Correct `endturn` value 2017-12-15 00:54:45 -05:00
Remy Oukaour d6dc9351e9 Start documenting effect commands 2017-12-15 00:48:59 -05:00
Remy Oukaour fecc5c339a More comments for macros 2017-12-15 00:38:52 -05:00
Remy Oukaour 6ab1d028bb Split items/ and trainers/ into their data/ and engine/ components
Move some data into a pokemon/ subdirectory
2017-12-14 23:00:54 -05:00
Remy Oukaour 2ff7f50584 Clarify which gfx anim commands are for oam 2017-12-14 00:38:08 -05:00
Remy Oukaour e48a401290 Reorganize macros 2017-12-14 00:36:24 -05:00
Remy Oukaour e4a61cf1ae Use constants for asm collision data 2017-12-12 16:27:09 -05:00
Remy Oukaour 047c8e4bc0 xy_trigger handles $0 padding, so map scripts are simpler 2017-12-12 14:11:23 -05:00