Commit Graph
100 Commits
Author SHA1 Message Date
Phlosioneer 5886f82ef5 Merge branch 'master' into extern-cleanup 2019-03-08 02:45:26 -05:00
Phlosioneer 6638ebe7fd Fix copyright mixup 2019-03-07 08:46:55 -06:00
Phlosioneer b0c634d531 Support absolute paths 2019-03-07 08:46:55 -06:00
Phlosioneer 105e1721d6 Overhaul scaninc to work recursively
This also fixes the bug where scaninc would ignore #include lines
in assembly files.
2019-03-07 08:46:55 -06:00
Phlosioneer 18902219ad Fix make to look for .json files instead of folders
Currently, when Make is building the maps, it considers every
folder in the data/maps/ directory as a map that needs to be built,
even folders that are empty. This can be a problem when modding on
a separate branch, because git doesn't always clean up directories
when switching branches (usually because of hidden files in those
directories), so switching back to an unmodded branch will leave
an empty folder that confuses make.

This commit changes the makefile so that it only checks directories
that have map.json files in them.
2019-03-05 01:46:20 -05:00
Phlosioneer 4ea5e85bed Fix typos
This is an updated version of #554, since it hasn't been updated in two
weeks.
2019-03-03 09:31:47 -06:00
Phlosioneer e03595a10d Bugfixes from #591 2019-03-03 09:31:08 -06:00
Phlosioneer 9372731c3e Merge branch 'master' into main-menu-state-machine 2019-03-02 17:35:44 -05:00
Phlosioneer 3716da5430 Rename macro with correct name for pixel values 2019-03-02 17:25:39 -05:00
Phlosioneer 80a4ee1145 Remove water.h and flying.h 2019-03-02 17:23:10 -05:00
Phlosioneer 25050b9944 Fix tabs, do suggested rename 2019-03-02 04:13:27 -05:00
Phlosioneer 49bef25856 Clean up the last extern functions 2019-03-02 03:18:08 -05:00
Phlosioneer ee69426838 Eliminate more externs 2019-03-02 02:44:02 -05:00
Phlosioneer 0f6cc27e81 Fixed decomp issue around LoadPalette
In LoadLinkPartnerEventObjectSpritePalette, using paletteNum += 6 causes
GCC to "mark" paletteNum's register as a possible overflow, even though
it performs the overflow check. Then, when passing args to LoadPalette,
GCC fails to recognize that 0x100 + ((any u8) << 4) can never overflow
as a u16. It then does an overflow check before calling LoadPalette.

Assigning to a temp variable seems to avoid this "marking" behavior.
2019-03-02 00:36:59 -05:00
Phlosioneer 3ceb1667c9 Reduce externs 2019-03-01 22:32:50 -05:00
Phlosioneer a7e5852f1d More minor fixes 2019-03-01 01:49:11 -05:00
Phlosioneer 459fd93b59 Fix minor errors 2019-03-01 01:18:58 -05:00
Phlosioneer da0687987d Pick better names for constants 2019-02-28 22:21:16 -06:00
Phlosioneer 189d387f01 Add macros for metatile manipulation 2019-02-28 22:21:16 -06:00
Phlosioneer 99bfd8c80f VAR_0x3F20 is not a var 2019-02-28 00:10:44 -05:00
Phlosioneer 373d73eb3b Fix last special var 2019-02-28 00:06:27 -05:00
Phlosioneer bf45b83c65 Finish documenting event vars 2019-02-27 23:54:51 -05:00
Phlosioneer 782979f1fc Finish documenting trainer hill
Trainer hill isn't anywhere close to done, but I figured out enough
to name the VAR. That's all this PR should do.
2019-02-27 22:16:01 -05:00
Phlosioneer 66f0616a2d I guess I'm documenting Trainer Hill now 2019-02-27 21:31:05 -05:00
Phlosioneer e77e7844ea Name several vars, document some related events 2019-02-27 20:25:09 -05:00
Phlosioneer 648fc3d4f3 Name more unknown vars 2019-02-27 15:18:56 -05:00
Phlosioneer 4137dd7b0b Identify unused, never read, and never written vars 2019-02-27 14:42:32 -05:00
Phlosioneer c1348d22f3 Name most event scripts related to unusual weather 2019-02-27 04:27:54 -05:00
Phlosioneer fe55580fe1 Reverse engineer unusual weather events 2019-02-27 03:42:04 -05:00
Phlosioneer b2c92ee8c5 Missed some fill values
Must have forgotten to check FillWindowPixelRect.
2019-02-26 22:45:39 -05:00
Phlosioneer 72bb0daccb Merge branch 'master' into main-menu-state-machine 2019-02-26 22:34:42 -05:00
Phlosioneer 6cb4c677cd Fix backwards names 2019-02-26 22:30:40 -05:00
Phlosioneer b8a60b055b Fix previous merge 2019-02-26 22:11:43 -05:00
Phlosioneer 3a44b090d1 Merge branch 'master' into multiplayer-stuff 2019-02-26 22:07:29 -05:00
Phlosioneer accea672f1 Incorporate feedback 2019-02-26 22:04:44 -05:00
Phlosioneer a5cf2b8090 Use map script constants in map script functions 2019-02-25 08:01:22 -06:00
Phlosioneer 8816aa527d Update map script files 2019-02-25 08:01:22 -06:00
Phlosioneer 5f7a971313 Source file part of map script renaming 2019-02-25 08:01:22 -06:00
Phlosioneer 1cd5cb09cf Merge branch 'master' into weather-15 2019-02-25 02:30:35 -05:00
Phlosioneer e1b2460748 Adjust formatting, rename function 2019-02-25 02:28:41 -05:00
Phlosioneer 4e5fae0086 Merge branch 'master' into event-vars 2019-02-25 02:24:20 -05:00
Phlosioneer 87859a655b Fix flag formatting for fun 2019-02-25 02:20:38 -05:00
Phlosioneer 04db99bb0a More misc event names 2019-02-24 10:10:18 -06:00
Phlosioneer 0de831fd29 Name some common single-entry movements 2019-02-24 10:10:18 -06:00
Phlosioneer 4582fd1545 Name a ton of commonly used event scripts 2019-02-24 10:10:18 -06:00
Phlosioneer b2866fae21 Document the weather state functions
All weather types are now documented (including WEATHER_15)
2019-02-22 22:20:42 -05:00
Phlosioneer cea5696f23 Finish moving pokeruby vars 2019-02-22 04:18:43 -05:00
Phlosioneer e12a7790cf Start porting pokeruby vars to pokeemerald 2019-02-22 04:01:38 -05:00
Phlosioneer 44e92ce259 Give window drawing functions better names 2019-02-22 01:40:11 -05:00
Phlosioneer 199863f21f Replace more instances of fill values 2019-02-21 23:56:22 -05:00
Phlosioneer c96f8751cd Improve window palette macros 2019-02-21 23:27:12 -05:00
Phlosioneer 399d646e3f Merge branch 'master' into main-menu-state-machine 2019-02-21 22:24:25 -05:00
Phlosioneer eca329f9c5 Merge branch 'master' into multiplayer-stuff 2019-02-21 21:22:10 -05:00
Phlosioneer 486cf449b8 Make flag names more consistent 2019-02-18 14:17:02 -05:00
Phlosioneer bfe67842ab Fix spelling (again) 2019-02-18 14:14:07 -05:00
Phlosioneer fcb541189d Rename some flags, and use map ID macros 2019-02-18 02:02:20 -05:00
Phlosioneer 93e9b9fe5d Fix some names 2019-02-18 01:33:41 -05:00
Phlosioneer 0a7b97ee06 Merge branch 'master' into multiplayer-stuff 2019-02-18 01:19:16 -05:00
Phlosioneer 5695617d64 Merge branch 'master' into multiplayer-stuff 2019-02-18 01:12:47 -05:00
Phlosioneer 40d4f7f8db Minor fixes 2019-02-18 01:10:59 -05:00
Phlosioneer 08579edbcd Clean up mistakes and bad formatting 2019-02-18 01:03:44 -05:00
Phlosioneer 7ad225a72f Address formatting issues and use constants 2019-02-18 00:16:27 -05:00
Phlosioneer f528552583 Rename pokenav file 2019-02-17 23:14:14 -05:00
Phlosioneer 762640664f Fix formatting 2019-02-17 23:14:14 -05:00
Phlosioneer bfeb7fb32a Tabs converted to spaces.
Oops.
2019-02-17 23:14:14 -05:00
Phlosioneer fbcfb69fe6 Remove guess code, fix pointer formatting 2019-02-17 23:14:14 -05:00
Phlosioneer 197ad274b4 Reformat braces 2019-02-17 23:14:14 -05:00
Phlosioneer be08a662a8 More data moved into C code 2019-02-17 23:14:14 -05:00
Phlosioneer a4aaf279ac Move more data into pokenav, name some strings 2019-02-17 23:14:14 -05:00
Phlosioneer bf4c1a73c0 Start moving pokenav data into C files
The types and usage of many of the globals are now known.
2019-02-17 23:14:14 -05:00
Phlosioneer 758b8c7f0e Decompiled three more functions. 2019-02-17 23:14:14 -05:00
Phlosioneer 6d929c61c5 Decompiled 4 more functions 2019-02-17 23:14:14 -05:00
Phlosioneer cb800e4708 Decompiled 5 functions
Was unable to decompile sub_81C79BC.
2019-02-17 23:14:14 -05:00
Phlosioneer d41c597f90 Decompiled sub_81C7990 2019-02-17 23:14:14 -05:00
Phlosioneer f95eebf47a With help, sub_81C795C has been tamed.
Thanks to Garak on the discord server.
2019-02-17 23:14:14 -05:00
Phlosioneer a8d920cc45 Decompiled 2 functions, unable to decompile 1.
sub_81C795C could not be decompiled due to register naming issues.
However, its structure was correctly matched, so I have left the C
code and a comment explaining the issue.
2019-02-17 23:14:14 -05:00
Phlosioneer 34b16e9e78 Decompiled 5 functions for unknown structs 2019-02-17 23:14:14 -05:00
Phlosioneer 3bb4057bad Decompiled sub_81C7764 2019-02-17 23:14:14 -05:00
Phlosioneer 7c405e08d0 Decompiled three more small functions 2019-02-17 23:14:14 -05:00
Phlosioneer 5beb2baa97 Decompiled sub_81C76C4 2019-02-17 23:14:14 -05:00
Phlosioneer b038556851 Decompiled several setters and getters 2019-02-17 23:14:14 -05:00
Phlosioneer 13a6765c88 Decompiled several trivial functions 2019-02-17 23:14:14 -05:00
Phlosioneer 112fc47017 Decompiled sub_81C756C
Also discovered a constant that may be useful for future decompiling.
Comments were added in the asm that references the constant.
2019-02-17 23:14:14 -05:00
Phlosioneer 3d73f7c48c Decompiled sub_81C742C 2019-02-17 23:14:14 -05:00
Phlosioneer cf721879dd Decompiled sub_81C7418 2019-02-17 23:14:14 -05:00
Phlosioneer 323df8ed40 Decompiled sub_81C7400 2019-02-17 23:14:14 -05:00
Phlosioneer 729e7116f2 Decompiled AnyMonHasRibbon 2019-02-17 23:14:14 -05:00
Phlosioneer 5441d80ebc Decompiled sub_81C7360 2019-02-17 23:14:14 -05:00
Phlosioneer aa61e105e0 Decompiled sub_81C7334 2019-02-17 23:14:14 -05:00
Phlosioneer d52cbe6bcb Decompiled sub_81C72BC 2019-02-17 23:14:14 -05:00
Phlosioneer 9bda2297e3 Decompiled sub_81C72A4 2019-02-17 23:14:14 -05:00
Phlosioneer cd84c92cfa Decompiled CB2_PokeNav 2019-02-17 23:14:14 -05:00
Phlosioneer 69b014f7aa Decompiled sub_81C71E4 2019-02-17 23:14:14 -05:00
Phlosioneer fb705e6047 Decompiled sub_81C7170. 2019-02-17 23:14:14 -05:00
Phlosioneer 6466d0bea8 Decompiled sub_81C7124 2019-02-17 23:14:14 -05:00
Phlosioneer 052cd4da10 Decompiled sub_81C70D8 2019-02-17 23:14:14 -05:00
Phlosioneer 698c2879e4 Decompiled sub_81C7078 2019-02-17 23:14:14 -05:00
Phlosioneer e90e3458cb Document the regi* code more
Fixed some confusing naming, named some unknown symbols, and fixed the
names of some flags.
2019-02-15 18:24:55 -05:00
Phlosioneer 986d3d8b2f Finish and polish new_game.c
Only one function is left undocumented. I tried to go into the assembly
to at least name it, but it clears fields in the save block that aren't
even documented yet.
2019-02-15 03:40:57 -05:00
Phlosioneer 0a3912c95d Add comments explaining asm in pokedex.c
I added comments to each of the asm functions explaining why they won't
match with the C.
I also got one of the functions much closer to matching.
2019-02-15 01:28:28 -05:00