151 Commits

Author SHA1 Message Date
mrgriffin 55a6f2f117 Merge pull request #2208 from Mitsunee/spelling-synchronize-paralyze 2025-11-19 20:31:51 +00:00
GriffinRichards b553acb96a Merge pull request #2205 from Mitsunee/standardize-spelling-of-canceler 2025-11-16 04:16:02 +00:00
mrgriffin 604f6d801e Key split restructure (#2168) 2025-08-02 01:15:01 +00:00
mrgriffin 632d0abe3f Allow names for voicegroups and use a macro for use with drumsets (#2149) 2025-07-30 18:48:24 +00:00
mrgriffin f1b3ee4b14 Add pack/unpack for data masks (#2163) 2025-07-23 08:32:56 +00:00
GriffinRichards 134488388a Merge pull request #2073 from AsparagusEduardo/_pret/pr/pyramidLocation 2025-06-30 17:33:48 +00:00
mrgriffin 98aa6eb0ec Fixed typo in sMoveRelearnerMenuState (#2155) 2025-06-17 14:43:28 +00:00
GriffinRichards 84233df471 Merge pull request #2150 from cawtds/list-menu-documentation 2025-06-03 01:28:51 +00:00
GriffinRichards eb21f57c5f Merge pull request #2141 from pret/porymap-6 2025-05-27 14:56:46 +00:00
mrgriffin 67b5837f9c Rename ItemId_GetX to GetItemX (#2116) 2025-05-22 12:32:42 +00:00
SBird1337 ea8c3c9917 Fixes for Mirage Tower graphics (#2120) 2025-04-14 06:16:20 +00:00
GriffinRichards 325c9acaed Merge pull request #2014 from Bassoonian/battleterrain 2025-04-13 23:35:34 +00:00
mrgriffin c150590427 Merge pull request #2114 from aronson/typo-union-room 2025-03-28 15:48:03 +00:00
SBird1337 ae2028a46f Renamed a berry tag variable 2025-03-24 12:51:06 +00:00
mrgriffin e9ea9434e3 Document bard music (#2053) 2025-01-17 18:01:04 +00:00
mrgriffin 4cef18d6ab Merge pull request #2095 from DizzyEggg/transition 2025-01-15 09:24:40 +00:00
GriffinRichards 5caf7b3efb remove sBirchSpeechPlatformBlackPal (#2075) 2024-12-13 22:43:27 +00:00
GriffinRichards 43ad32e8bc Merge pull request #2066 from surtr-games/bugfix_battle_ai 2024-11-15 20:21:44 +00:00
GriffinRichards e7587f84ff Get rid of common syms (#2040) 2024-10-15 03:55:30 +00:00
GriffinRichards 4cba6916e0 Merge pull request #2038 from GriffinRichards/gflib-syms 2024-10-02 19:38:04 +00:00
GriffinRichards abbb7dbb21 Fix swapped cycling road entrances 2024-08-31 05:58:10 +00:00
SBird1337 936d9eefa5 Fix trainer match call flags 2024-08-15 21:03:31 +00:00
GriffinRichards d1cc1d4846 Merge pull request #2009 from abcboy101/berry-blender 2024-06-29 20:34:57 +00:00
GriffinRichards df4dedcef7 Use Only One Loop in RandomlyGivePartyPokerus (#1991) 2024-04-19 18:20:36 +00:00
GriffinRichards 9e8c7f5d5d Merge pull request #1989 from NTx86/fix-poison-anim-array 2024-04-19 18:14:57 +00:00
GriffinRichards a77153fb92 Merge pull request #1983 from LOuroboros/modernfateful 2024-03-22 01:32:12 +00:00
GriffinRichards 733a0a27d6 Merge pull request #1961 from GriffinRichards/doc-camera-sprite 2024-03-22 01:27:35 +00:00
GriffinRichards 209498947c Merge slot machine smoke SubspriteTable arrays 2024-01-30 16:50:23 +00:00
GriffinRichards cd0b6575f1 Merge pull request #1952 from Icedude907/build-linkerscript 2023-11-23 22:04:40 +00:00
GriffinRichards 3a5f4a08d7 Merge pull request #1936 from GriffinRichards/doc-datahpupdate 2023-11-07 17:33:28 +00:00
GriffinRichards 28a4a6a6ec Merge pull request #1940 from LOuroboros/copyMonToPC 2023-11-07 17:28:24 +00:00
GriffinRichards cabd538bf4 Merge pull request #1915 from GriffinRichards/misc-tasks 2023-10-08 01:39:23 +00:00
GriffinRichards afabe892e7 Merge pull request #1926 from AsparagusEduardo/pret/pr2/EggWall 2023-10-01 16:01:44 +00:00
GriffinRichards 78ede1a4b4 Merge pull request #1922 from AsparagusEduardo/pret/pr2/MrMime 2023-09-12 16:30:58 +00:00
GriffinRichards cab3d9cde6 Merge pull request #1909 from GriffinRichards/stat-anim 2023-08-20 18:33:37 +00:00
GriffinRichards 7f1215926c Merge pull request #1908 from GriffinRichards/name-buffer 2023-08-13 03:40:42 +00:00
GriffinRichards 7081b462f8 Merge pull request #1906 from AsparagusEduardo/pret/pr2/butItFailed 2023-08-13 03:05:51 +00:00
GriffinRichards 41a3e26cf3 Merge pull request #1903 from GriffinRichards/frontier-gfx 2023-08-10 18:54:09 +00:00
GriffinRichards 6b6484a4f7 Correct berry fix graphics colors, more PLTT constant use (#1892) 2023-08-09 16:53:37 +00:00
GriffinRichards 736c39be27 Reference TMs and HMs by move instead of number (#1732) 2023-08-09 14:55:37 +00:00
GriffinRichards 306ad6ea2c Declarations for 2- and 3-argument GetMonData (#1756) 2023-07-24 14:01:59 +00:00
GriffinRichards 7b9d4fc85b Fix sTVPokemonAnslerTextGroup typo 2023-06-05 17:17:53 +00:00
GriffinRichards d7ad503307 Merge pull request #1890 from GriffinRichards/pal-macro 2023-05-28 22:33:11 +00:00
GriffinRichards cd3b6a51d3 Merge pull request #1879 from GriffinRichards/cable-car-tilemap 2023-04-09 17:24:18 +00:00
GriffinRichards 9d9e4efb41 Merge pull request #1871 from GriffinRichards/doc-trendy-sayings 2023-03-24 12:12:55 +00:00
GriffinRichards 2abbf739a8 Merge pull request #1864 from AsparagusEduardo/pret/doc/songsComments 2023-03-05 20:33:45 +00:00
GriffinRichards 321d07f02b Merge pull request #1858 from AsparagusEduardo/pret/doc/fateful 2023-02-28 16:52:55 +00:00
GriffinRichards 6ccd32f67d Merge pull request #1855 from GriffinRichards/doc-chat 2023-02-27 18:29:37 +00:00
GriffinRichards 1651658d56 Merge pull request #1853 from GriffinRichards/doc-contest-bar 2023-02-15 16:34:20 +00:00
GriffinRichards e0d7b2f137 Merge pull request #1852 from GriffinRichards/doc-windows 2023-02-15 15:51:53 +00:00
GriffinRichards 65d3a5b65c Merge pull request #1851 from GriffinRichards/doc-fldspc 2023-02-09 03:39:20 +00:00
GriffinRichards ba5c22adf4 Merge pull request #1850 from GriffinRichards/sync-trade 2023-02-04 00:09:13 +00:00
GriffinRichards 0b04fece90 Add some missing sizeof usage for SpriteSheets 2023-01-24 22:11:21 +00:00
GriffinRichards 26c75f1f69 Fix Best Streak stat name 2023-01-20 17:06:22 +00:00
GriffinRichards 7739976284 Merge pull request #1746 from mrgriffin/ui-standardize 2023-01-18 16:20:10 +00:00
GriffinRichards f5a2c42ff0 Merge pull request #1843 from GriffinRichards/colorize 2023-01-15 17:54:22 +00:00
GriffinRichards 2b5cf0d1d5 Merge pull request #1845 from AsparagusEduardo/pret/pr2/EasyChat 2023-01-15 05:27:07 +00:00
GriffinRichards 3324be7035 Merge pull request #1820 from GriffinRichards/doc-wnews 2023-01-04 03:39:18 +00:00
GriffinRichards 37b83523c3 Merge pull request #1825 from AsparagusEduardo/pret/pr2/AnimationMacros 2022-12-10 15:05:24 +00:00
GriffinRichards 62670d877a Merge pull request #1810 from AsparagusEduardo/pret/pr/baseStatsRename 2022-11-18 22:50:54 +00:00
GriffinRichards 16385e56db Merge pull request #1817 from GriffinRichards/sync-wireless 2022-11-17 20:23:06 +00:00
GriffinRichards 01b1422ea7 Merge pull request #1807 from pret/porymap-5 2022-10-30 15:07:12 +00:00
GriffinRichards 3df5c15e71 Fix more text and movements labeled as scripts 2022-10-30 07:32:11 +00:00
GriffinRichards c3e4a0f833 Fix EventScript_WroteSecretCodeLockOpened typo 2022-10-30 07:20:15 +00:00
GriffinRichards e9e516facc Merge pull request #1803 from abaresk/thunder 2022-10-20 15:41:05 +00:00
huderlem 80d7aa5902 Update src/overworld.c 2022-10-18 00:46:42 +00:00
GriffinRichards c05ee6e5b9 Merge pull request #1802 from abaresk/wild-encounters 2022-10-17 23:01:27 +00:00
GriffinRichards ed52916392 Merge pull request #1791 from AsparagusEduardo/pret/pr/unk40EF 2022-09-26 01:55:04 +00:00
GriffinRichards 7622423a3b Merge pull request #1762 from GriffinRichards/sync-fieldmap 2022-09-12 18:37:03 +00:00
GriffinRichards b18119817c Merge pull request #1749 from GriffinRichards/ur-classes 2022-09-07 01:39:39 +00:00
GriffinRichards 0422eccba3 Merge pull request #1748 from GriffinRichards/fix-judgement 2022-09-01 15:57:29 +00:00
GriffinRichards e8cc43d6d5 Merge pull request #1757 from AsparagusEduardo/pret_clean2 2022-08-27 15:45:08 +00:00
GriffinRichards 1fd3f34f74 Merge pull request #1747 from GriffinRichards/contest-ai-bug 2022-08-27 03:58:47 +00:00
GriffinRichards ef0248e2f3 Merge pull request #1742 from GriffinRichards/sound-pan 2022-08-26 18:52:01 +00:00
GriffinRichards 191e32a69a Merge pull request #1754 from AsparagusEduardo/pret_citySigns 2022-08-26 02:14:27 +00:00
GriffinRichards ea25a03f5a Revert COMMON wildcards 2022-08-22 23:20:29 +00:00
GriffinRichards 33cb7eb4ed Merge pull request #1737 from GriffinRichards/lock-unlock 2022-08-22 05:35:27 +00:00
GriffinRichards fb5973fa8e Merge pull request #1735 from GriffinRichards/arena-const 2022-08-21 02:58:59 +00:00
GriffinRichards 34af4331c5 Merge pull request #1727 from AsparagusEduardo/pret_clean 2022-08-20 01:32:27 +00:00
GriffinRichards eb2ee02306 Merge pull request #1741 from tustin2121/tustin2121-patch-scriptcontext 2022-08-15 20:50:31 +00:00
GriffinRichards e1930820f2 Merge pull request #1738 from mrgriffin/wildcard-ld-script 2022-08-15 12:40:50 +00:00
GriffinRichards 2c1bf600e7 Merge pull request #1730 from GriffinRichards/sync-naming-screen 2022-08-12 15:10:31 +00:00
GriffinRichards ebc1ca8a2f Merge pull request #1725 from GriffinRichards/security-signature 2022-08-12 14:52:13 +00:00
GriffinRichards 8a46deb0e7 Merge pull request #1723 from GriffinRichards/fix-impassable 2022-08-11 01:33:54 +00:00
GriffinRichards 84d3bef333 Merge pull request #1724 from DizzyEggg/lang_improvements 2022-08-05 01:43:12 +00:00
GriffinRichards 36d3bc860e Merge pull request #1702 from GriffinRichards/clean-psn 2022-08-02 17:25:32 +00:00
GriffinRichards 0f6f1d88a4 Merge pull request #1721 from AsparagusEduardo/pret_clean2 2022-08-01 21:02:55 +00:00
GriffinRichards 6d441dfa8c Merge pull request #1719 from AsparagusEduardo/pret_cleanBattleScriptCommands 2022-07-30 13:14:59 +00:00
GriffinRichards 48280c666d Merge pull request #1718 from AsparagusEduardo/pret_cleanEvoScene 2022-07-28 01:59:50 +00:00
GriffinRichards 52ddf1fcd2 Merge pull request #1701 from GriffinRichards/faint-cmd-name 2022-07-16 12:21:16 +00:00
GriffinRichards 2688122846 Merge pull request #1678 from GriffinRichards/const-frontier 2022-06-18 14:27:43 +00:00
GriffinRichards e3c9d2a629 Merge pull request #1675 from GriffinRichards/doc-arg 2022-06-09 15:16:14 +00:00
GriffinRichards ced350b936 Merge pull request #1662 from GriffinRichards/door-gfx 2022-05-21 20:11:33 +00:00
GriffinRichards c96ae8bc1e Merge pull request #1661 from GriffinRichards/fix-inconsistent-static 2022-05-20 23:42:20 +00:00
GriffinRichards 181fd7af40 Merge pull request #1649 from GriffinRichards/clean-trainer 2022-04-20 04:26:23 +00:00
GriffinRichards daee464c83 Merge pull request #1642 from GriffinRichards/bstrings 2022-03-14 20:47:13 +00:00
GriffinRichards 84e1af7b7e Merge pull request #1640 from GriffinRichards/doc-egg-hatch 2022-03-12 14:46:09 +00:00
GriffinRichards 867db46a4f Merge pull request #1639 from GriffinRichards/typo-hoppy 2022-03-01 03:39:22 +00:00
GriffinRichards e30daccce3 Merge pull request #1635 from sphericalice/battle-pyramind 2022-02-22 19:37:36 +00:00
GriffinRichards 10cc816f84 Merge pull request #1633 from abaresk/slot-cleanup 2022-02-20 23:03:43 +00:00
GriffinRichards eb68aea111 Merge pull request #1630 from GriffinRichards/party-menu-slots 2022-02-16 18:05:12 +00:00
GriffinRichards b9447efde8 Fix Swap_HandleQuitSwappingResposne typo 2022-01-27 02:55:59 +00:00
GriffinRichards a8d77a46c2 Merge pull request #1608 from GriffinRichards/fix-fieldmap 2022-01-26 22:57:24 +00:00
GriffinRichards 38510b6e25 Merge pull request #1599 from GriffinRichards/fix-tilemaps 2022-01-20 13:58:28 +00:00
GriffinRichards f05d24e30e Merge pull request #1597 from GriffinRichards/misc-cleanup 2022-01-20 03:23:46 +00:00
GriffinRichards 56da280fc5 Merge pull request #1600 from GriffinRichards/remove-berry-fix 2022-01-15 17:25:10 +00:00
GriffinRichards 4e4983b501 Merge pull request #1594 from GriffinRichards/pokestorage-clean 2022-01-11 17:31:46 +00:00
GriffinRichards f2304ffa3b Merge pull request #1586 from GriffinRichards/clean-areascreen 2022-01-07 04:07:15 +00:00
GriffinRichards cf22c7bc55 Merge pull request #1583 from GriffinRichards/renametilemaps 2021-12-29 06:03:34 +00:00
GriffinRichards 7fb1dc42e6 Merge pull request #1575 from LOuroboros/benriBotan 2021-12-18 03:33:11 +00:00
GriffinRichards 3fdae9e18c Remove sFiller from malloc.c 2021-11-29 16:26:05 +00:00
GriffinRichards edf8fef056 Merge pull request #1567 from LOuroboros/sBattleTerrainTable 2021-11-28 04:48:09 +00:00
GriffinRichards a7487b4140 Merge pull request #1558 from GriffinRichards/update-macros 2021-11-23 00:16:04 +00:00
GriffinRichards e1b9addf4c Merge pull request #1550 from GriffinRichards/doc-pokenav 2021-11-17 19:53:10 +00:00
GriffinRichards 0f5d38b4d0 Merge pull request #1548 from GriffinRichards/doc-banim 2021-11-14 04:37:25 +00:00
GriffinRichards 75336a96f8 Merge pull request #1552 from ProjectRevoTPP/fix_saveblock_reorder 2021-11-14 04:31:15 +00:00
GriffinRichards ea33ba1ed5 Merge pull request #1549 from GriffinRichards/doc-binterface 2021-11-14 04:24:02 +00:00
GriffinRichards 1ee4371df7 Merge pull request #1547 from GriffinRichards/doc-sounddata 2021-11-13 21:00:32 +00:00
GriffinRichards 6a55635785 Merge pull request #1544 from GriffinRichards/romheadergf 2021-11-10 05:00:26 +00:00
GriffinRichards c1de2675fe Merge pull request #1542 from GriffinRichards/doc-menu 2021-11-09 02:29:08 +00:00
GriffinRichards 32b5788b7d Merge pull request #1543 from cbt6/move-fastest 2021-11-06 14:38:48 +00:00
GriffinRichards e9c8c4f639 Merge pull request #1545 from sphericalice/pal-constants 2021-11-05 22:11:59 +00:00
PikalaxALT 03bb66d3b3 Merge pull request #1540 from GriffinRichards/sync-libgcn 2021-11-04 00:50:49 +00:00
GriffinRichards 0110ebf959 Merge pull request #1536 from GriffinRichards/clean-braille 2021-11-03 17:22:27 +00:00
GriffinRichards cd04741d71 Merge pull request #1534 from GriffinRichards/doc-btrans 2021-11-03 15:31:53 +00:00
GriffinRichards 2d2d8058b1 Merge pull request #1538 from cbt6/move-speed 2021-11-02 19:12:52 +00:00
GriffinRichards 8bbf771dd7 Merge pull request #1537 from AsparagusEduardo/pret_solarbeam 2021-11-01 21:52:07 +00:00
GriffinRichards 13ee63ec15 Merge pull request #1530 from GriffinRichards/doc-graphics 2021-11-01 21:05:58 +00:00
GriffinRichards 89fa816483 Merge pull request #1528 from GriffinRichards/doc-ereaderscr 2021-10-30 13:39:04 +00:00
GriffinRichards aaeb8052b8 Merge pull request #1529 from GriffinRichards/profileman 2021-10-27 18:41:41 +00:00
GriffinRichards e9558ed8ba Merge pull request #1527 from cbt6/field-player 2021-10-26 18:35:16 +00:00
GriffinRichards 7793949eae Merge pull request #1525 from GriffinRichards/doc-recmix 2021-10-26 18:24:57 +00:00
GriffinRichards 05aa0dccfb Merge pull request #1520 from GriffinRichards/doc-random 2021-10-25 03:48:18 +00:00
GriffinRichards 98392ff7ef Merge pull request #1519 from GriffinRichards/doc-mgift 2021-10-24 19:55:35 +00:00
GriffinRichards 4601e53bb5 Merge pull request #1516 from GriffinRichards/doc-miscbattle 2021-10-19 12:14:31 +00:00
GriffinRichards a3d01252a4 Merge pull request #1512 from GriffinRichards/minor-constants 2021-10-17 15:37:24 +00:00
GriffinRichards e74dc4e728 Merge pull request #1511 from GriffinRichards/doc-union 2021-10-16 02:49:58 +00:00
GriffinRichards 23923e146b Merge pull request #1509 from GriffinRichards/doc-sprman 2021-10-08 14:44:44 +00:00
GriffinRichards b3cd1fc345 Merge pull request #1507 from GriffinRichards/doc-walda 2021-09-30 16:32:55 +00:00
GriffinRichards 3f45220736 Merge pull request #1506 from GriffinRichards/single-doc 2021-09-29 04:14:52 +00:00
GriffinRichards 144204f24a Merge pull request #1504 from LOuroboros/staticRegionMapSecIdToPopUpThemeIdMapping 2021-09-24 02:54:18 +00:00
GriffinRichards b7fb75bae1 Merge pull request #1500 from GriffinRichards/fix-healthboxgfx 2021-09-07 01:52:35 +00:00
GriffinRichards ce2bd6b24a Merge pull request #1499 from froggestspirit/master 2021-09-06 20:59:52 +00:00
GriffinRichards f83aa1d69e Merge pull request #1493 from GriffinRichards/doc-itemmenu2 2021-08-15 16:07:31 +00:00
GriffinRichards 6838656949 Merge pull request #1489 from GriffinRichards/doc-playerpc 2021-08-11 23:06:00 +00:00
GriffinRichards 7ced344e95 Merge pull request #1488 from GriffinRichards/doc-frontierpass2 2021-08-11 21:45:21 +00:00
GriffinRichards 00dfb8bfb4 Commit from GitHub Actions (CI) 2021-07-11 03:31:08 +00:00
GriffinRichards 9153b44ca2 Label remaining region_map symbols 2021-07-08 04:29:24 +00:00
GriffinRichards 3aa1f2f908 Fix some object lock names 2021-07-03 15:25:54 +00:00
PikalaxALT d3afc11cca Port symfile implementation from Ruby, FireRed 2021-06-18 17:09:23 +00:00
PikalaxALT 457a08cff6 Initial commit 2021-06-16 11:03:56 -04:00
11548 changed files with 73204 additions and 1035266 deletions
-26
View File
@@ -1,26 +0,0 @@
*.pal text eol=crlf
*.sh text eol=lf
*.s text eol=lf
*.txt text eol=lf
Makefile text eol=lf
*.mk text eol=lf
*.c text eol=lf
*.h text eol=lf
*.pl text eol=lf
*.inc text eol=lf
*.sha1 text eol=lf
*.json text eol=lf
*.sed text eol=lf
*.cpp text eol=lf
.gitattributes text eol=lf
.gitignore text eol=lf
*.hpp text eol=lf
*.md text eol=lf
*.ps1 text eol=crlf
*.yml text eol=lf
*.png binary
*.bin binary
*.h linguist-language=C
*.inc linguist-language=Assembly
-175
View File
@@ -1,175 +0,0 @@
#!/usr/bin/perl
# Usage:
# calcrom.pl <mapfile> [--data]
#
# mapfile: path to .map file output by LD
# data: set to output % breakdown of data
use IPC::Cmd qw[ run ];
use Getopt::Long;
my $usage = "Usage: calcrom.pl file.map [--data]\n";
my $showData;
GetOptions("data" => \$showData) or die $usage;
(@ARGV == 1)
or die $usage;
open(my $file, $ARGV[0])
or die "ERROR: could not open file '$ARGV[0]'.\n";
my $src = 0;
my $asm = 0;
my $srcdata = 0;
my $data = 0;
while (my $line = <$file>)
{
if ($line =~ /^ \.(\w+)\s+0x[0-9a-f]+\s+(0x[0-9a-f]+) (\w+)\/.+\.o/)
{
my $section = $1;
my $size = hex($2);
my $dir = $3;
if ($section =~ /text/)
{
if ($dir eq 'src')
{
$src += $size;
}
elsif ($dir eq 'asm')
{
$asm += $size;
}
}
elsif ($section =~ /rodata/)
{
if ($dir eq 'src')
{
$srcdata += $size;
}
elsif ($dir eq 'data')
{
$data += $size;
}
}
}
}
(my $elffname = $ARGV[0]) =~ s/\.map/.elf/;
# Note that the grep filters out all branch labels. It also requires a minimum
# line length of 5, to filter out a ton of generated symbols (like AcCn). No
# settings to nm seem to remove these symbols. Finally, nm prints out a separate
# entry for whenever a name appears in a file, not just where it's defined. uniq
# removes all the duplicate entries.
#
#
# You'd expect this to take a while, because of uniq. It runs in under a second,
# though. Uniq is pretty fast!
my $base_cmd = "nm $elffname | awk '{print \$3}' | grep '^[^_].\\{4\\}' | uniq";
# This looks for Unknown_, Unknown_, or sub_, followed by an address. Note that
# it matches even if stuff precedes the unknown, like sUnknown/gUnknown.
my $undoc_regex = "'[Uu]nknown_[0-9a-fA-F]\\{5,7\\}\\|sub_[0-9a-fA-F]\\{5,7\\}'";
# This looks for every symbol with an address at the end of it. Some things are
# given a name based on their type / location, but still have an unknown purpose.
# For example, FooMap_EventScript_FFFFFFF.
# The above may be double counted here, and will need to be filtered out.
my $partial_doc_regex = "'_[0-28][0-9a-fA-F]\\{5,7\\}'";
my $count_cmd = "wc -l";
# It sucks that we have to run this three times, but I can't figure out how to get
# stdin working for subcommands in perl while still having a timeout. It's decently
# fast anyway.
my $total_syms_as_string;
(run (
command => "$base_cmd | $count_cmd",
buffer => \$total_syms_as_string,
timeout => 60
))
or die "ERROR: Error while getting all symbols: $?";
my $undocumented_as_string;
(run (
command => "$base_cmd | grep $undoc_regex | $count_cmd",
buffer => \$undocumented_as_string,
timeout => 60
))
or die "ERROR: Error while filtering for undocumented symbols: $?";
my $partial_documented_as_string;
(run (
command => "$base_cmd | grep $partial_doc_regex | grep -v $undoc_regex | $count_cmd",
buffer => \$partial_documented_as_string,
timeout => 60
))
or die "ERROR: Error while filtering for partial symbols: $?";
# Performing addition on a string converts it to a number. Any string that fails
# to convert to a number becomes 0. So if our converted number is 0, but our string
# is nonzero, then the conversion was an error.
$undocumented_as_string =~ s/^\s+|\s+$//g;
my $undocumented = $undocumented_as_string + 0;
(($undocumented != 0) or (($undocumented == 0) and ($undocumented_as_string eq "0")))
or die "ERROR: Cannot convert string to num: '$undocumented_as_string'";
$partial_documented_as_string =~ s/^\s+|\s+$//g;
my $partial_documented = $partial_documented_as_string + 0;
(($partial_documented != 0) or (($partial_documented == 0) and ($partial_documented_as_string eq "0")))
or die "ERROR: Cannot convert string to num: '$partial_documented_as_string'";
$total_syms_as_string =~ s/^\s+|\s+$//g;
my $total_syms = $total_syms_as_string + 0;
(($total_syms != 0) or (($total_syms == 0) and ($total_syms_as_string eq "0")))
or die "ERROR: Cannot convert string to num: '$total_syms_as_string'";
($total_syms != 0)
or die "ERROR: No symbols found.";
my $total = $src + $asm;
my $srcPct = sprintf("%.4f", 100 * $src / $total);
my $asmPct = sprintf("%.4f", 100 * $asm / $total);
my $documented = $total_syms - ($undocumented + $partial_documented);
my $docPct = sprintf("%.4f", 100 * $documented / $total_syms);
my $partialPct = sprintf("%.4f", 100 * $partial_documented / $total_syms);
my $undocPct = sprintf("%.4f", 100 * $undocumented / $total_syms);
if ($asm == 0)
{
print "Code decompilation is 100% complete\n"
}
else
{
print "$total total bytes of code\n";
print "$src bytes of code in src ($srcPct%)\n";
print "$asm bytes of code in asm ($asmPct%)\n";
}
print "\n";
if ($partial_documented == 0 && $undocumented == 0)
{
print "Documentation is 100% complete\n"
}
else
{
print "$total_syms total symbols\n";
print "$documented symbols documented ($docPct%)\n";
print "$partial_documented symbols partially documented ($partialPct%)\n";
print "$undocumented symbols undocumented ($undocPct%)\n";
}
if ($showData)
{
print "\n";
my $dataTotal = $srcdata + $data;
my $srcDataPct = sprintf("%.4f", 100 * $srcdata / $dataTotal);
my $dataPct = sprintf("%.4f", 100 * $data / $dataTotal);
print "$dataTotal total bytes of data\n";
print "$srcdata bytes of data in src ($srcDataPct%)\n";
print "$data bytes of data in data ($dataPct%)\n";
}
-11
View File
@@ -1,11 +0,0 @@
#!/bin/bash -ex
build_name=$1
map_file=$build_name.map
if [ ! -f $map_file ]; then
echo "$map_file does not exist!"
exit 1
fi
output=$(perl $(dirname "$0")/calcrom.pl $build_name.map | sed -E ':a;N;$!ba;s/\r{0,1}\n/\\n/g')
curl -d "{\"username\": \"$CALCROM_DISCORD_WEBHOOK_USERNAME\", \"avatar_url\": \"$CALCROM_DISCORD_WEBHOOK_AVATAR_URL\", \"content\":\"\`\`\`\\n$build_name progress:\\n$output\\n\`\`\`\"}" -H "Content-Type: application/json" -X POST "$CALCROM_DISCORD_WEBHOOK_URL"
-8
View File
@@ -1,8 +0,0 @@
<!--- Provide a general summary of your changes in the Title above -->
## Description
<!--- Describe your changes in detail -->
## **Discord contact info**
<!--- Formatted as username (e.g. pikalaxalt) or username#numbers (e.g. PikalaxALT#5823) -->
<!--- Contributors must join https://discord.gg/d5dubZ3 -->
-69
View File
@@ -1,69 +0,0 @@
name: CI
on:
push:
branches: [ master ]
pull_request:
jobs:
build:
runs-on: ubuntu-latest
env:
GAME_VERSION: EMERALD
GAME_REVISION: 0
GAME_LANGUAGE: ENGLISH
MODERN: 0
COMPARE: 1
steps:
- name: Checkout
uses: actions/checkout@master
- name: Checkout syms
if: ${{ github.event_name == 'push' }}
uses: actions/checkout@master
with:
path: symbols
ref: symbols
- name: Checkout agbcc
uses: actions/checkout@master
with:
path: agbcc
repository: pret/agbcc
- name: Install binutils
run: |
sudo apt install gcc-arm-none-eabi binutils-arm-none-eabi libpng-dev
# build-essential and git are already installed
# gcc-arm-none-eabi is only needed for the modern build
# as an alternative to dkP
- name: Install agbcc
run: |
./build.sh
./install.sh ../
working-directory: agbcc
- name: Compare
run: make -j${nproc} all syms
- name: Modern
env:
MODERN: 1
COMPARE: 0
run: make -j${nproc} all
- name: Move symfiles
if: ${{ github.event_name == 'push' }}
run: |
cp -v *.sym symbols/
echo "SYMBOLS_COMMIT_MSG=$( git log --format=%s ${GITHUB_SHA} )" >> $GITHUB_ENV
- name: Update symfiles
if: ${{ github.event_name == 'push' }}
uses: EndBug/add-and-commit@v7
with:
branch: symbols
cwd: "./symbols"
add: "*.sym"
message: ${{ env.SYMBOLS_COMMIT_MSG }}
+3 -42
View File
@@ -1,42 +1,3 @@
*.exe *
*.o !.gitignore
*.i !*.sym
*.elf
*.gba
!data/*.gba
*.sgm
*.sa1
*.ss[0-9]
*.sg1
*.1bpp
*.4bpp
*.8bpp
*.gbapal
*.lz
*.rl
*.latfont
*.hwjpnfont
*.fwjpnfont
sound/**/*.bin
sound/songs/midi/*.s
tools/agbcc
*.map
*.bat
*.dump
*.sa*
Thumbs.db
build/
.DS_Store
*.ddump
.idea/
porymap.*.cfg
prefabs.json
.vscode/
*.a
.fuse_hidden*
*.sna
*.diff
*.sym
*.js
/pokeemerald-*.png
/pokeemerald_modern-*.png
-640
View File
@@ -1,640 +0,0 @@
# Instructions
These instructions explain how to set up the tools required to build **pokeemerald**, which assembles the source files into a ROM.
These instructions come with notes which can be expanded by clicking the "<i>Note...</i>" text.
In general, you should not need to open these unless if you get an error or if you need additional clarification.
If you run into trouble, ask for help on Discord or IRC (see [README.md](README.md)).
## Windows
Windows has instructions for building with three possible terminals, providing 3 different options in case the user stumbles upon unexpected errors.
- [Windows 10/11 (WSL1)](#windows-1011-wsl1) (**Fastest, highly recommended**, Windows 10 and 11 only)
- [Windows (msys2)](#windows-msys2) (Second fastest)
- [Windows (Cygwin)](#windows-cygwin) (Slowest)
Unscientific benchmarks suggest **msys2 is 2x slower** than WSL1, and **Cygwin is 5-6x slower** than WSL1.
<details>
<summary><i>Note for advanced users: <b>WSL2</b>...</i></summary>
> <b>WSL2</b> is an option and is even faster than <b>WSL1</b> if files are stored on the WSL2 file system, but some tools may have trouble interacting
> with the WSL2 file system over the network drive. For example, tools which use Qt versions before 5.15.2 such as <a href="https://github.com/huderlem/porymap">porymap</a>
> may <a href="https://bugreports.qt.io/browse/QTBUG-86277">have problems with parsing the <code>\\wsl$</code> network drive path</a>.
</details>
All of the Windows instructions assume that the default drive is C:\\. If this differs to your actual drive letter, then replace C with the correct drive letter when reading the instructions.
**A note of caution**: As Windows 7 and Windows 8 are officially unsupported by Microsoft, some maintainers are unwilling to maintain the Windows 7/8 instructions. Thus, these instructions may break in the future with fixes taking longer than fixes to the Windows 10/11 instructions.
## Windows 10/11 (WSL1)
WSL1 is the preferred terminal to build **pokeemerald**. The following instructions will explain how to install WSL1 (referred to interchangeably as WSL).
- If WSL (Debian or Ubuntu) is **not installed**, then go to [Installing WSL1](#Installing-WSL1).
- Otherwise, if WSL is installed, but it **hasn't previously been set up for another decompilation project**, then go to [Setting up WSL1](#Setting-up-WSL1).
- Otherwise, **open WSL** and go to [Choosing where to store pokeemerald (WSL1)](#Choosing-where-to-store-pokeemerald-WSL1).
### Installing WSL1
1. Open [Windows Powershell **as Administrator**](https://i.imgur.com/QKmVbP9.png), and run the following commands (Right Click or Shift+Insert is paste in the Powershell).
```powershell
wsl --install -d Ubuntu --enable-wsl1
```
2. Once the process finishes, restart your machine.
3. Open Windows Powershell **as Administrator** again (after restarting), and run the following command to configure Ubuntu to use WSL1.
```powershell
wsl --set-version Ubuntu 1
```
<details>
<summary><i>Note...</i></summary>
> WSL may open automatically after restarting, but you can ignore it for now.
</details>
### Setting up WSL1
Some tips before proceeding:
- In WSL, Copy and Paste is either done via
- **right-click** (selection + right click to Copy, right click with no selection to Paste)
- **Ctrl+Shift+C/Ctrl+Shift+V** (enabled by right-clicking the title bar, going to Properties, then checking the checkbox next to "Use Ctrl+Shift+C/V as Copy/Paste").
- Some of the commands that you'll run will ask for your WSL password and/or confirmation to perform the stated action. This is to be expected, just enter your WSL password and/or the yes action when necessary.
1. Open **Ubuntu** (e.g. using Search).
2. WSL/Ubuntu will set up its own installation when it runs for the first time. Once WSL/Ubuntu finishes installing, it will ask for a username and password (to be input in).
<details>
<summary><i>Note...</i></summary>
> When typing in the password, there will be no visible response, but the terminal will still read in input.
</details>
3. Update WSL/Ubuntu before continuing. Do this by running the following command. These commands will likely take a long time to finish:
```bash
sudo apt update && sudo apt upgrade
```
> Note: If the repository you plan to build has an **[older revision of the INSTALL.md](https://github.com/pret/pokeemerald/blob/571c598/INSTALL.md)**, then follow the [legacy WSL1 instructions](docs/legacy_WSL1_INSTALL.md) from here.
4. Certain packages are required to build pokeemerald. Install these packages by running the following command:
```bash
sudo apt install build-essential binutils-arm-none-eabi git libpng-dev
```
<details>
<summary><i>Note...</i></summary>
> If the above command does not work, try the above command but replacing `apt` with `apt-get`.
</details>
### Choosing where to store pokeemerald (WSL1)
WSL has its own file system that's not natively accessible from Windows, but Windows files *are* accessible from WSL. So you're going to want to store pokeemerald within Windows.
For example, say you want to store pokeemerald (and agbcc) in **C:\Users\\_\<user>_\Desktop\decomps**. First, ensure that the folder already exists. Then, enter this command to **change directory** to said folder, where *\<user>* is your **Windows** username:
```bash
cd /mnt/c/Users/<user>/Desktop/decomps
```
<details>
<summary><i>Notes...</i></summary>
> Note 1: The Windows C:\ drive is called /mnt/c/ in WSL.
> Note 2: If the path has spaces, then the path must be wrapped with quotations, e.g. `cd "/mnt/c/users/<user>/Desktop/decomp folder"`.
> Note 3: Windows path names are case-insensitive so adhering to capitalization isn't needed
</details>
If this works, then proceed to [Installation](#installation).
Otherwise, ask for help on Discord or IRC (see [README.md](README.md)), or continue reading below for [Windows instructions using msys2](#windows-msys2).
## Windows (msys2)
- If devkitARM is **not installed**, then go to [Installing devkitARM](#installing-devkitarm).
- If devkitARM is installed, but msys2 **hasn't previously been set up for another decompilation project**, then go to [Setting up msys2](#setting-up-msys2).
- Otherwise, **open msys2** and go to [Choosing where to store pokeemerald (msys2)](#choosing-where-to-store-pokeemerald-msys2).
### Installing devkitARM
1. Download the devkitPro installer [here](https://github.com/devkitPro/installer/releases).
2. Run the devkitPro installer. In the "Choose Components" screen, uncheck everything except GBA Development unless if you plan to install other devkitPro components for other purposes. Keep the install location as C:\devkitPro and leave the Start Menu option unchanged.
### Setting up msys2
Note that in msys2, Copy is Ctrl+Insert and Paste is Shift+Insert.
1. Open msys2 at C:\devkitPro\msys2\msys2_shell.bat.
2. Certain packages are required to build pokeemerald. Install these by running the following two commands:
```bash
pacman -Sy msys2-keyring
pacman -S make gcc zlib-devel git
```
<details>
<summary><i>Note...</i></summary>
> The commands will ask for confirmation, just enter the yes action when prompted.
</details>
3. Download [libpng](https://sourceforge.net/projects/libpng/files/libpng16/1.6.37/libpng-1.6.37.tar.xz/download).
4. Change directory to where libpng was downloaded. By default, msys2 will start in the current user's profile folder, located at **C:\Users\\&#8288;_\<user>_**, where *\<user>* is your Windows username. In most cases, libpng should be saved within a subfolder of the profile folder. For example, if libpng was saved to **C:\Users\\_\<user>_\Downloads** (the Downloads location for most users), enter this command:
```bash
cd Downloads
```
<details>
<summary><i>Notes...</i></summary>
> Note 1: While not shown, msys uses forward slashes `/` instead of backwards slashes `\` as the directory separator.
> Note 2: If the path has spaces, then the path must be wrapped with quotations, e.g. `cd "Downloads/My Downloads"`.
> Note 3: Windows path names are case-insensitive so adhering to capitalization isnt needed.
> Note 4: If libpng was saved elsewhere, you will need to specify the full path to where libpng was downloaded, e.g. `cd c:/devkitpro/msys2` if it was saved there.
</details>
5. Run the following commands to uncompress and install libpng.
```bash
tar xf libpng-1.6.37.tar.xz
cd libpng-1.6.37
./configure --prefix=/usr
make check
make install
```
6. Then finally, run the following command to change back to the user profile folder.
```bash
cd
```
### Choosing where to store pokeemerald (msys2)
At this point, you can choose a folder to store pokeemerald into. If you're okay with storing pokeemerald in the user profile folder, then proceed to [Installation](#installation). Otherwise, you'll need to account for where pokeemerald is stored when changing directory to the pokeemerald folder.
For example, if you want to store pokeemerald (and agbcc) in **C:\Users\\_\<user>_\Desktop\decomps** (where *\<user>* is your **Windows** username), enter this command:
```bash
cd Desktop/decomps
```
If this works, then proceed to [Installation](#installation).
Otherwise, ask for help on Discord or IRC (see [README.md](README.md)), or continue reading below for [Windows instructions using Cygwin](#windows-cygwin).
## Windows (Cygwin)
1. If devkitARM is **not installed**, then follow the instructions used to [install devkitARM](#installing-devkitarm) for the msys2 setup before continuing. *Remember to not continue following the msys2 instructions by mistake!*
2.
- If Cygwin is **not installed**, or does not have all of the required packages installed, then go to [Installing Cygwin](#installing-cygwin).
- If Cygwin is installed, but **is not configured to work with devkitARM**, then go to [Configuring devkitARM for Cygwin](#configuring-devkitarm-for-cygwin).
- Otherwise, **open Cygwin** and go to [Choosing where to store pokeemerald (Cygwin)](#choosing-where-to-store-pokeemerald-cygwin)
### Installing Cygwin
1. Download [Cygwin](https://cygwin.com/install.html): setup-x86_64.exe for 64-bit Windows, setup-x86.exe for 32-bit.
2. Run the Cygwin setup. Within the Cygwin setup, leave the default settings until the "Choose A Download Site" screen.
3. At "Choose a Download Site", select any mirror within the Available Download Sites.
4. At "Select Packages", set the view to "Full" (top left) and search for the following packages:
- `make`
- `git`
- `gcc-core`
- `gcc-g++`
- `libpng-devel`
To quickly find these, use the search bar and type the name of each package. Ensure that the selected package name is the **exact** same as the one you're trying to download, e.g. `cmake` is **NOT** the same as `make`.
5. For each package, double click on the text that says "**Skip**" next to each package to select the most recent version to install. If the text says anything other than "**Skip**", (e.g. Keep or a version number), then the package is or will be installed and you don't need to do anything.
6. Once all required packages have been selected, finish the installation.
### Configuring devkitARM for Cygwin
Note that in Cygwin, Copy is Ctrl+Insert and Paste is Shift+Insert.
1. Open **Cygwin**.
2. Run the following commands to configure devkitPro to work with Cygwin.
```bash
export DEVKITPRO=/cygdrive/c/devkitpro
echo export DEVKITPRO=$DEVKITPRO >> ~/.bashrc
export DEVKITARM=$DEVKITPRO/devkitARM
echo export DEVKITARM=$DEVKITARM >> ~/.bashrc
```
<details>
<summary><i>Note...</i></summary>
> Replace the drive letter c with the actual drive letter if it is not c.
</details>
### Choosing where to store pokeemerald (Cygwin)
Cygwin has its own file system that's within Windows, at **C:\cygwin64\home\\_\<user>_**. If you don't want to store pokeemerald there, you'll need to account for where pokeemerald is stored when **changing directory** to the pokeemerald folder.
For example, if you want to store pokeemerald (and agbcc) in **C:\Users\\_\<user>_\Desktop\decomps**, enter this command, where *\<user>* is your **Windows** username:
```bash
cd c:/Users/<user>/Desktop/decomps
```
Note that the directory **must exist** in Windows. If you want to store pokeemerald in a dedicated folder that doesn't exist (e.g. the example provided above), then create the folder (e.g. using Windows Explorer) before executing the `cd` command.
<details>
<summary><i>Notes...</i></summary>
> Note 1: If the path has spaces, then the path must be wrapped with quotations, e.g. `cd "c:/users/<user>/Desktop/decomp folder"`.
> Note 2: Windows path names are case-insensitive so adhering to capitalization isn't needed
</details>
If this works, then proceed to [Installation](#installation). Otherwise, ask for help on Discord or IRC (see [README.md](README.md)).
## macOS
1. If the Xcode Command Line Tools are not installed, download the tools [here](https://developer.apple.com/xcode/resources/), open your Terminal, and run the following command:
```bash
xcode-select --install
```
2. - If libpng is **not installed**, then go to [Installing libpng (macOS)](#installing-libpng-macos).
- If devkitARM is **not installed**, then go to [Installing devkitARM (macOS)](#installing-devkitarm-macos).
- Otherwise, **open the Terminal** and go to [Choosing where to store pokeemerald (macOS)](#choosing-where-to-store-pokeemerald-macos)
### Installing libpng (macOS)
<details>
<summary><i>Note for advanced users...</i></summary>
> This guide installs libpng via Homebrew as it is the easiest method, however advanced users can install libpng through other means if they so desire.
</details>
1. Open the Terminal.
2. If Homebrew is not installed, then install [Homebrew](https://brew.sh/) by following the instructions on the website.
3. Run the following command to install libpng.
```bash
brew install libpng
```
libpng is now installed.
Continue to [Installing devkitARM (macOS)](#installing-devkitarm-macos) if **devkitARM is not installed**, otherwise, go to [Choosing where to store pokeemerald (macOS)](#choosing-where-to-store-pokeemerald-macos).
### Installing devkitARM (macOS)
1. Download the `devkitpro-pacman-installer.pkg` package from [here](https://github.com/devkitPro/pacman/releases).
2. Open the package to install devkitPro pacman.
3. In the Terminal, run the following commands to install devkitARM:
```bash
sudo dkp-pacman -Sy
sudo dkp-pacman -S gba-dev
sudo dkp-pacman -S devkitarm-rules
```
The command with gba-dev will ask for the selection of packages to install. Just press Enter to install all of them, followed by entering Y to proceed with the installation.
4. After the tools are installed, devkitARM must now be made accessible from anywhere by the system. To do so, run the following commands:
```bash
export DEVKITPRO=/opt/devkitpro
echo "export DEVKITPRO=$DEVKITPRO" >> ~/.bashrc
export DEVKITARM=$DEVKITPRO/devkitARM
echo "export DEVKITARM=$DEVKITARM" >> ~/.bashrc
echo "if [ -f ~/.bashrc ]; then . ~/.bashrc; fi" >> ~/.bash_profile
```
### Choosing where to store pokeemerald (macOS)
At this point, you can choose a folder to store pokeemerald into. If you're okay with storing pokeemerald in the user folder, then proceed to [Installation](#installation). Otherwise, you'll need to account for where pokeemerald is stored when changing directory to the pokeemerald folder.
For example, if you want to store pokeemerald (and agbcc) in **~/Desktop/decomps**, enter this command to **change directory** to the desired folder:
```bash
cd Desktop/decomps
```
Note that the directory **must exist** in the folder system. If you want to store pokeemerald in a dedicated folder that doesn't exist (e.g. the example provided above), then create the folder (e.g. using Finder) before executing the `cd` command.
<details>
<summary><i>Note..</i>.</summary>
> Note: If the path has spaces, then the path must be wrapped with quotations, e.g. `cd "Desktop/decomp folder"`
</details>
If this works, then proceed to [Installation](#installation). Otherwise, ask for help on Discord or IRC (see [README.md](README.md)).
## Linux
Open Terminal and enter the following commands, depending on which distro you're using.
### Debian/Ubuntu-based distributions
Run the following command to install the necessary packages:
```bash
sudo apt install build-essential binutils-arm-none-eabi git libpng-dev
```
Then proceed to [Choosing where to store pokeemerald (Linux)](#choosing-where-to-store-pokeemerald-linux).
<details>
<summary><i>Note for legacy repos...</i></summary>
> If the repository you plan to build has an **[older revision of the INSTALL.md](https://github.com/pret/pokeemerald/blob/571c598/INSTALL.md)**,
> then you will have to install devkitARM. Install all the above packages except binutils-arm-none-eabi, and follow the instructions to
> [install devkitARM on Debian/Ubuntu-based distributions](#installing-devkitarm-on-debianubuntu-based-distributions).
</details>
### Arch Linux
Run this command as root to install the necessary packages:
```bash
pacman -S base-devel arm-none-eabi-binutils arm-none-eabi-newlib git libpng
```
Then proceed to [Choosing where to store pokeemerald (Linux)](#choosing-where-to-store-pokeemerald-linux).
<details>
<summary><i>Note for legacy repos...</i></summary>
> If the repository you plan to build has an **[older revision of the INSTALL.md](https://github.com/pret/pokeemerald/blob/571c598/INSTALL.md)**,
> then you will have to install devkitARM. Install all the above packages except binutils-arm-none-eabi, and follow the instructions to
> [install devkitARM on Arch Linux](#installing-devkitarm-on-arch-linux).
</details>
### NixOS
Run the following command to start an interactive shell with the necessary packages:
```bash
nix-shell -p pkgsCross.arm-embedded.stdenv.cc git pkg-config libpng
```
Then proceed to [Choosing where to store pokeemerald (Linux)](#choosing-where-to-store-pokeemerald-linux).
### OpenBSD
Install requirements:
```bash
pkg_add gmake bash arm-none-eabi-binutils clang git
```
Clone pokeemerald & agbcc, and Build agbcc
```bash
git clone https://github.com/pret/pokeemerald
git clone https://github.com/pret/agbcc
cd agbcc && ./build.sh
./install.sh ../pokeemerald
```
Build the ROM:
```bash
cd ../pokeemerald
gmake
```
### Other distributions
_(Specific instructions for other distributions would be greatly appreciated!)_
1. Try to find the required software in its repositories:
- `gcc`
- `g++`
- `make`
- `git`
- `libpng-dev`
2. Follow the instructions [here](https://devkitpro.org/wiki/devkitPro_pacman) to install devkitPro pacman. As a reminder, the goal is to configure an existing pacman installation to recognize devkitPro's repositories.
3. Once devkitPro pacman is configured, run the following commands:
```bash
sudo pacman -Sy
sudo pacman -S gba-dev
```
The last command will ask for the selection of packages to install. Just press Enter to install all of them, followed by entering Y to proceed with the installation.
### Choosing where to store pokeemerald (Linux)
At this point, you can choose a folder to store pokeemerald (and agbcc) into. If so, you'll have to account for the modified folder path when changing directory to the pokeemerald folder.
If this works, then proceed to [Installation](#installation). Otherwise, ask for help on Discord or IRC (see [README.md](README.md)).
## Installation
<details>
<summary><i>Note for Windows users...</i></summary>
> Consider adding an exception for the `pokeemerald` and/or `decomps` folder in Windows Security using
> [these instructions](https://support.microsoft.com/help/4028485). This prevents Microsoft Defender from
> scanning them which might improve performance while building.
</details>
1. If pokeemerald is not already downloaded (some users may prefer to download pokeemerald via a git client like GitHub Desktop), run:
```bash
git clone https://github.com/pret/pokeemerald
```
<details>
<summary><i>Note for WSL1...</i></summary>
> If you get an error stating `fatal: could not set 'core.filemode' to 'false'`, then run the following commands:
> ```bash
> cd
> sudo umount /mnt/c
> sudo mount -t drvfs C: /mnt/c -o metadata,noatime
> cd <folder where pokeemerald is to be stored>
> ```
> Where *\<folder where pokeemerald is to be stored>* is the path of the folder [where you chose to store pokeemerald](#Choosing-where-to-store-pokeemerald-WSL1). Then run the `git clone` command again.
</details>
2. Install agbcc into pokeemerald. The commands to run depend on certain conditions. **You should only follow one of the listed instructions**:
- If agbcc has **not been built before** in the folder where you chose to store pokeemerald, run the following commands to build and install it into pokeemerald:
```bash
git clone https://github.com/pret/agbcc
cd agbcc
./build.sh
./install.sh ../pokeemerald
```
- **Otherwise**, if agbcc has been built before (e.g. if the git clone above fails), but was **last built on a different terminal** than the one currently used (only relevant to Windows, e.g. switching from msys2 to WSL1), then run the following commands to build and install it into pokeemerald:
```bash
cd agbcc
git clean -fX
./build.sh
./install.sh ../pokeemerald
```
- **Otherwise**, if agbcc has been built before on the same terminal, run the following commands to install agbcc into pokeemerald:
```bash
cd agbcc
./install.sh ../pokeemerald
```
<details>
<summary><i>Note...</i></summary>
> If building agbcc or pokeemerald results in an error, try deleting the agbcc folder and re-installing agbcc as if it has not been built before.
</details>
3. Once agbcc is installed, change directory back to the base directory where pokeemerald and agbcc are stored:
```bash
cd ..
```
Now you're ready to [build **pokeemerald**](#build-pokeemerald)
## Build pokeemerald
If you aren't in the pokeemerald directory already, then **change directory** to the pokeemerald folder:
```bash
cd pokeemerald
```
To build **pokeemerald.gba** (Note: to speed up builds, see [Parallel builds](#parallel-builds)):
```bash
make
```
If it has built successfully you will have the output file **pokeemerald.gba** in your project folder.
<details>
<summary>Note for Windows...</summary>
> If you switched terminals since the last build (e.g. from msys2 to WSL1), you must run `make clean-tools` once before any subsequent `make` commands.
</details>
# Building guidance
## Parallel builds
See [the GNU docs](https://www.gnu.org/software/make/manual/html_node/Parallel.html) and [this Stack Exchange thread](https://unix.stackexchange.com/questions/208568) for more information.
To speed up building, first get the value of `nproc` by running the following command:
```bash
nproc
```
Builds can then be sped up by running the following command:
```bash
make -j<output of nproc>
```
Replace `<output of nproc>` with the number that the `nproc` command returned.
`nproc` is not available on macOS. The alternative is `sysctl -n hw.ncpu` ([relevant Stack Overflow thread](https://stackoverflow.com/questions/1715580)).
## Compare ROM to the original
For contributing, or if you'd simply like to verify that your ROM is identical to the original game, run:
```bash
make compare
```
If it matches, you will see the following at the end of the output:
```bash
pokeemerald.gba: OK
```
If there are any changes from the original game, you will instead see:
```bash
pokeemerald.gba: FAILED
shasum: WARNING: 1 computed checksum did NOT match
```
## devkitARM's C compiler
This project supports the `arm-none-eabi-gcc` compiler included with devkitARM. If devkitARM (a.k.a. gba-dev) has already been installed as part of the platform-specific instructions, simply run:
```bash
make modern
```
Otherwise, follow the instructions below to install devkitARM.
### Installing devkitARM on WSL1
1. `gdebi-core` must be installed beforehand in order to install devkitPro pacman (which facilitates the installation of devkitARM). Install this with the following command:
```bash
sudo apt install gdebi-core
```
<details>
<summary><i>Note...</i></summary>
> If the above command does not work, try the above command but replacing `apt` with `apt-get`.
</details>
2. Once `gdebi-core` is done installing, download the devkitPro pacman package [here](https://github.com/devkitPro/pacman/releases). The file to download is `devkitpro-pacman.amd64.deb`.
3. Change directory to where the package was downloaded. For example, if the package file was saved to **C:\Users\\_\<user>_\Downloads** (the Downloads location for most users), enter this command, where *\<user> is your **Windows** username:
```bash
cd /mnt/c/Users/<user>/Downloads
```
4. Once the directory has been changed to the folder containing the devkitPro pacman package, run the following commands to install devkitARM.
```bash
sudo gdebi devkitpro-pacman.amd64.deb
sudo dkp-pacman -Sy
sudo dkp-pacman -S gba-dev
```
The last command will ask for the selection of packages to install. Just press Enter to install all of them, followed by entering Y to proceed with the installation.
<details>
<summary><i>Note...</i></summary>
> Note: `devkitpro-pacman.amd64.deb` is the expected filename of the devkitPro package downloaded (for the first command). If the downloaded package filename differs, then use that filename instead.
</details>
5. Run the following command to set devkitPro related environment variables (alternatively, close and re-open WSL):
```bash
source /etc/profile.d/devkit-env.sh
```
devkitARM is now installed.
### Installing devkitARM on Debian/Ubuntu-based distributions
1. If `gdebi-core` is not installed, run the following command:
```bash
sudo apt install gdebi-core
```
2. Download the devkitPro pacman package [here](https://github.com/devkitPro/pacman/releases). The file to download is `devkitpro-pacman.amd64.deb`.
3. Change directory to where the package was downloaded. Then, run the following commands to install devkitARM:
```bash
sudo gdebi devkitpro-pacman.amd64.deb
sudo dkp-pacman -Sy
sudo dkp-pacman -S gba-dev
```
The last command will ask for the selection of packages to install. Just press Enter to install all of them, followed by entering Y to proceed with the installation.
> Note: `devkitpro-pacman.amd64.deb` is the expected filename of the devkitPro package downloaded (for the first command). If the downloaded package filename differs, then use that filename instead.
4. Run the following command to set devkitPro related environment variables (alternatively, close and re-open the Terminal):
```bash
source /etc/profile.d/devkit-env.sh
```
devkitARM is now installed.
### Installing devkitARM on Arch Linux
1. Follow [devkitPro's instructions](https://devkitpro.org/wiki/devkitPro_pacman#Customising_Existing_Pacman_Install) to configure `pacman` to download devkitPro packages.
2. Install `gba-dev`: run the following command as root.
```console
pacman -S gba-dev
```
This will ask for the selection of packages to install. Just press Enter to install all of them, followed by entering Y to proceed with the installation.
3. Run the following command to set devkitPro related environment variables (alternatively, close and re-open the Terminal):
```bash
source /etc/profile.d/devkit-env.sh
```
devkitARM is now installed.
### Other toolchains
To build using a toolchain other than devkitARM, override the `TOOLCHAIN` environment variable with the path to your toolchain, which must contain the subdirectory `bin`.
```bash
make TOOLCHAIN="/path/to/toolchain/here"
```
The following is an example:
```bash
make TOOLCHAIN="/usr/local/arm-none-eabi"
```
To compile the `modern` target with this toolchain, the subdirectories `lib`, `include`, and `arm-none-eabi` must also be present.
### Building with debug info under a modern toolchain
To build **pokeemerald.elf** with debug symbols under a modern toolchain:
```bash
make modern DINFO=1
```
Note that this is not necessary for a non-modern build since those are built with debug symbols by default.
# Useful additional tools
* [porymap](https://github.com/huderlem/porymap) for viewing and editing maps
* [poryscript](https://github.com/huderlem/poryscript) for scripting ([VS Code extension](https://marketplace.visualstudio.com/items?itemName=karathan.poryscript))
* [Tilemap Studio](https://github.com/Rangi42/tilemap-studio) for viewing and editing tilemaps
Vendored
-47
View File
@@ -1,47 +0,0 @@
pipeline {
agent any
agent {
docker {
image 'ubuntu:22.04'
args '-u root'
}
}
stages {
stage('Install Dependencies') {
steps {
sh '''
apt update
apt install -y build-essential binutils-arm-none-eabi git libpng-dev cmake
'''
}
}
stage('Checkout') {
steps {
checkout scm
}
}
stage('Configure') {
steps {
sh '''
mkdir -p build
cd build
cmake ..
'''
}
}
stage('Build') {
steps {
sh '''
cd build
make -j$(nproc)
'''
}
}
}
}
-396
View File
@@ -1,396 +0,0 @@
# GBA rom header
TITLE := POKEMON EMER
GAME_CODE := BPEE
MAKER_CODE := 01
REVISION := 0
MODERN ?= 0
KEEP_TEMPS ?= 0
# `File name`.gba ('_modern' will be appended to the modern builds)
FILE_NAME := pokeemerald
BUILD_DIR := build
# Builds the ROM using a modern compiler
MODERN ?= 0
# Compares the ROM to a checksum of the original - only makes sense using when non-modern
COMPARE ?= 0
ifeq (modern,$(MAKECMDGOALS))
MODERN := 1
endif
ifeq (compare,$(MAKECMDGOALS))
COMPARE := 1
endif
# Default make rule
all: rom
# Toolchain selection
TOOLCHAIN := $(DEVKITARM)
# don't use dkP's base_tools anymore
# because the redefinition of $(CC) conflicts
# with when we want to use $(CC) to preprocess files
# thus, manually create the variables for the bin
# files, or use arm-none-eabi binaries on the system
# if dkP is not installed on this system
ifneq (,$(TOOLCHAIN))
ifneq ($(wildcard $(TOOLCHAIN)/bin),)
export PATH := $(TOOLCHAIN)/bin:$(PATH)
endif
endif
PREFIX := arm-none-eabi-
OBJCOPY := $(PREFIX)objcopy
OBJDUMP := $(PREFIX)objdump
AS := $(PREFIX)as
LD := $(PREFIX)ld
EXE :=
ifeq ($(OS),Windows_NT)
EXE := .exe
endif
# use arm-none-eabi-cpp for macOS
# as macOS's default compiler is clang
# and clang's preprocessor will warn on \u
# when preprocessing asm files, expecting a unicode literal
# we can't unconditionally use arm-none-eabi-cpp
# as installations which install binutils-arm-none-eabi
# don't come with it
ifneq ($(MODERN),1)
ifeq ($(shell uname -s),Darwin)
CPP := $(PREFIX)cpp
else
CPP := $(CC) -E
endif
else
CPP := $(PREFIX)cpp
endif
ROM_NAME := $(FILE_NAME).gba
OBJ_DIR_NAME := $(BUILD_DIR)/emerald
MODERN_ROM_NAME := $(FILE_NAME)_modern.gba
MODERN_OBJ_DIR_NAME := $(BUILD_DIR)/modern
ELF_NAME := $(ROM_NAME:.gba=.elf)
MAP_NAME := $(ROM_NAME:.gba=.map)
MODERN_ELF_NAME := $(MODERN_ROM_NAME:.gba=.elf)
MODERN_MAP_NAME := $(MODERN_ROM_NAME:.gba=.map)
# Pick our active variables
ifeq ($(MODERN),0)
ROM := $(ROM_NAME)
OBJ_DIR := $(OBJ_DIR_NAME)
else
ROM := $(MODERN_ROM_NAME)
OBJ_DIR := $(MODERN_OBJ_DIR_NAME)
endif
ELF := $(ROM:.gba=.elf)
MAP := $(ROM:.gba=.map)
SYM := $(ROM:.gba=.sym)
# Commonly used directories
C_SUBDIR = src
ASM_SUBDIR = asm
DATA_SRC_SUBDIR = src/data
DATA_ASM_SUBDIR = data
SONG_SUBDIR = sound/songs
MID_SUBDIR = sound/songs/midi
C_BUILDDIR = $(OBJ_DIR)/$(C_SUBDIR)
ASM_BUILDDIR = $(OBJ_DIR)/$(ASM_SUBDIR)
DATA_ASM_BUILDDIR = $(OBJ_DIR)/$(DATA_ASM_SUBDIR)
SONG_BUILDDIR = $(OBJ_DIR)/$(SONG_SUBDIR)
MID_BUILDDIR = $(OBJ_DIR)/$(MID_SUBDIR)
SHELL := bash -o pipefail
# Set flags for tools
ASFLAGS := -mcpu=arm7tdmi --defsym MODERN=$(MODERN)
INCLUDE_DIRS := include
INCLUDE_CPP_ARGS := $(INCLUDE_DIRS:%=-iquote %)
INCLUDE_SCANINC_ARGS := $(INCLUDE_DIRS:%=-I %)
O_LEVEL ?= 2
CPPFLAGS := $(INCLUDE_CPP_ARGS) -Wno-trigraphs -DMODERN=$(MODERN)
ifeq ($(MODERN),0)
CPPFLAGS += -I tools/agbcc/include -I tools/agbcc -nostdinc -undef -std=gnu89
CC1 := tools/agbcc/bin/agbcc$(EXE)
override CFLAGS += -mthumb-interwork -Wimplicit -Wparentheses -Werror -O$(O_LEVEL) -fhex-asm -g
LIBPATH := -L ../../tools/agbcc/lib
LIB := $(LIBPATH) -lgcc -lc -L../../libagbsyscall -lagbsyscall
else
# Note: The makefile must be set up to not call these if modern == 0
MODERNCC := $(PREFIX)gcc
PATH_MODERNCC := PATH="$(PATH)" $(MODERNCC)
CC1 := $(shell $(PATH_MODERNCC) --print-prog-name=cc1) -quiet
override CFLAGS += -mthumb -mthumb-interwork -O$(O_LEVEL) -mabi=apcs-gnu -mtune=arm7tdmi -march=armv4t -fno-toplevel-reorder -Wno-pointer-to-int-cast
LIBPATH := -L "$(dir $(shell $(PATH_MODERNCC) -mthumb -print-file-name=libgcc.a))" -L "$(dir $(shell $(PATH_MODERNCC) -mthumb -print-file-name=libnosys.a))" -L "$(dir $(shell $(PATH_MODERNCC) -mthumb -print-file-name=libc.a))"
LIB := $(LIBPATH) -lc -lnosys -lgcc -L../../libagbsyscall -lagbsyscall
endif
# Enable debug info if set
ifeq ($(DINFO),1)
override CFLAGS += -g
endif
# Variable filled out in other make files
AUTO_GEN_TARGETS :=
include make_tools.mk
# Tool executables
GFX := $(TOOLS_DIR)/gbagfx/gbagfx$(EXE)
AIF := $(TOOLS_DIR)/aif2pcm/aif2pcm$(EXE)
MID := $(TOOLS_DIR)/mid2agb/mid2agb$(EXE)
SCANINC := $(TOOLS_DIR)/scaninc/scaninc$(EXE)
PREPROC := $(TOOLS_DIR)/preproc/preproc$(EXE)
RAMSCRGEN := $(TOOLS_DIR)/ramscrgen/ramscrgen$(EXE)
FIX := $(TOOLS_DIR)/gbafix/gbafix$(EXE)
MAPJSON := $(TOOLS_DIR)/mapjson/mapjson$(EXE)
JSONPROC := $(TOOLS_DIR)/jsonproc/jsonproc$(EXE)
PERL := perl
SHA1 := $(shell { command -v sha1sum || command -v shasum; } 2>/dev/null) -c
MAKEFLAGS += --no-print-directory
# Clear the default suffixes
.SUFFIXES:
# Don't delete intermediate files
.SECONDARY:
# Delete files that weren't built properly
.DELETE_ON_ERROR:
RULES_NO_SCAN += libagbsyscall clean clean-assets tidy tidymodern tidynonmodern generated clean-generated
.PHONY: all rom modern compare
.PHONY: $(RULES_NO_SCAN)
infoshell = $(foreach line, $(shell $1 | sed "s/ /__SPACE__/g"), $(info $(subst __SPACE__, ,$(line))))
# Check if we need to scan dependencies based on the chosen rule OR user preference
NODEP ?= 0
# Check if we need to pre-build tools and generate assets based on the chosen rule.
SETUP_PREREQS ?= 1
# Disable dependency scanning for rules that don't need it.
ifneq (,$(MAKECMDGOALS))
ifeq (,$(filter-out $(RULES_NO_SCAN),$(MAKECMDGOALS)))
NODEP := 1
SETUP_PREREQS := 0
endif
endif
.SHELLSTATUS ?= 0
ifeq ($(SETUP_PREREQS),1)
# If set on: Default target or a rule requiring a scan
# Forcibly execute `make tools` since we need them for what we are doing.
$(foreach line, $(shell $(MAKE) -f make_tools.mk | sed "s/ /__SPACE__/g"), $(info $(subst __SPACE__, ,$(line))))
ifneq ($(.SHELLSTATUS),0)
$(error Errors occurred while building tools. See error messages above for more details)
endif
# Oh and also generate mapjson sources before we use `SCANINC`.
$(foreach line, $(shell $(MAKE) generated | sed "s/ /__SPACE__/g"), $(info $(subst __SPACE__, ,$(line))))
ifneq ($(.SHELLSTATUS),0)
$(error Errors occurred while generating map-related sources. See error messages above for more details)
endif
endif
# Collect sources
C_SRCS_IN := $(wildcard $(C_SUBDIR)/*.c $(C_SUBDIR)/*/*.c $(C_SUBDIR)/*/*/*.c)
C_SRCS := $(foreach src,$(C_SRCS_IN),$(if $(findstring .inc.c,$(src)),,$(src)))
C_OBJS := $(patsubst $(C_SUBDIR)/%.c,$(C_BUILDDIR)/%.o,$(C_SRCS))
C_ASM_SRCS := $(wildcard $(C_SUBDIR)/*.s $(C_SUBDIR)/*/*.s $(C_SUBDIR)/*/*/*.s)
C_ASM_OBJS := $(patsubst $(C_SUBDIR)/%.s,$(C_BUILDDIR)/%.o,$(C_ASM_SRCS))
ASM_SRCS := $(wildcard $(ASM_SUBDIR)/*.s)
ASM_OBJS := $(patsubst $(ASM_SUBDIR)/%.s,$(ASM_BUILDDIR)/%.o,$(ASM_SRCS))
# get all the data/*.s files EXCEPT the ones with specific rules
REGULAR_DATA_ASM_SRCS := $(filter-out $(DATA_ASM_SUBDIR)/maps.s $(DATA_ASM_SUBDIR)/map_events.s, $(wildcard $(DATA_ASM_SUBDIR)/*.s))
DATA_ASM_SRCS := $(wildcard $(DATA_ASM_SUBDIR)/*.s)
DATA_ASM_OBJS := $(patsubst $(DATA_ASM_SUBDIR)/%.s,$(DATA_ASM_BUILDDIR)/%.o,$(DATA_ASM_SRCS))
SONG_SRCS := $(wildcard $(SONG_SUBDIR)/*.s)
SONG_OBJS := $(patsubst $(SONG_SUBDIR)/%.s,$(SONG_BUILDDIR)/%.o,$(SONG_SRCS))
MID_SRCS := $(wildcard $(MID_SUBDIR)/*.mid)
MID_OBJS := $(patsubst $(MID_SUBDIR)/%.mid,$(MID_BUILDDIR)/%.o,$(MID_SRCS))
OBJS := $(C_OBJS) $(C_ASM_OBJS) $(ASM_OBJS) $(DATA_ASM_OBJS) $(SONG_OBJS) $(MID_OBJS)
OBJS_REL := $(patsubst $(OBJ_DIR)/%,%,$(OBJS))
SUBDIRS := $(sort $(dir $(OBJS)))
$(shell mkdir -p $(SUBDIRS))
# Pretend rules that are actually flags defer to `make all`
modern: all
compare: all
# Other rules
rom: $(ROM)
ifeq ($(COMPARE),1)
@$(SHA1) rom.sha1
endif
syms: $(SYM)
clean: tidy clean-tools clean-generated clean-assets
@$(MAKE) clean -C libagbsyscall
clean-assets:
rm -f $(MID_SUBDIR)/*.s
rm -f $(DATA_ASM_SUBDIR)/layouts/layouts.inc $(DATA_ASM_SUBDIR)/layouts/layouts_table.inc
rm -f $(DATA_ASM_SUBDIR)/maps/connections.inc $(DATA_ASM_SUBDIR)/maps/events.inc $(DATA_ASM_SUBDIR)/maps/groups.inc $(DATA_ASM_SUBDIR)/maps/headers.inc
find sound -iname '*.bin' -exec rm {} +
find . \( -iname '*.1bpp' -o -iname '*.4bpp' -o -iname '*.8bpp' -o -iname '*.gbapal' -o -iname '*.lz' -o -iname '*.rl' -o -iname '*.latfont' -o -iname '*.hwjpnfont' -o -iname '*.fwjpnfont' \) -exec rm {} +
find $(DATA_ASM_SUBDIR)/maps \( -iname 'connections.inc' -o -iname 'events.inc' -o -iname 'header.inc' \) -exec rm {} +
tidy: tidynonmodern tidymodern
tidynonmodern:
rm -f $(ROM_NAME) $(ELF_NAME) $(MAP_NAME)
rm -rf $(OBJ_DIR_NAME)
tidymodern:
rm -f $(MODERN_ROM_NAME) $(MODERN_ELF_NAME) $(MODERN_MAP_NAME)
rm -rf $(MODERN_OBJ_DIR_NAME)
# Other rules
include graphics_file_rules.mk
include map_data_rules.mk
include spritesheet_rules.mk
include json_data_rules.mk
include audio_rules.mk
# NOTE: Tools must have been built prior (FIXME)
# so you can't really call this rule directly
generated: $(AUTO_GEN_TARGETS)
@: # Silence the "Nothing to be done for `generated'" message, which some people were confusing for an error.
%.s: ;
%.png: ;
%.pal: ;
%.aif: ;
%.1bpp: %.png ; $(GFX) $< $@
%.4bpp: %.png ; $(GFX) $< $@
%.8bpp: %.png ; $(GFX) $< $@
%.gbapal: %.pal ; $(GFX) $< $@
%.gbapal: %.png ; $(GFX) $< $@
%.lz: % ; $(GFX) $< $@
%.rl: % ; $(GFX) $< $@
clean-generated:
@rm -f $(AUTO_GEN_TARGETS)
@echo "rm -f <AUTO_GEN_TARGETS>"
ifeq ($(MODERN),0)
$(C_BUILDDIR)/libc.o: CC1 := $(TOOLS_DIR)/agbcc/bin/old_agbcc$(EXE)
$(C_BUILDDIR)/libc.o: CFLAGS := -O2
$(C_BUILDDIR)/siirtc.o: CFLAGS := -mthumb-interwork
$(C_BUILDDIR)/agb_flash.o: CFLAGS := -O -mthumb-interwork
$(C_BUILDDIR)/agb_flash_1m.o: CFLAGS := -O -mthumb-interwork
$(C_BUILDDIR)/agb_flash_mx.o: CFLAGS := -O -mthumb-interwork
$(C_BUILDDIR)/m4a.o: CC1 := tools/agbcc/bin/old_agbcc$(EXE)
$(C_BUILDDIR)/record_mixing.o: CFLAGS += -ffreestanding
$(C_BUILDDIR)/librfu_intr.o: CC1 := $(TOOLS_DIR)/agbcc/bin/agbcc_arm$(EXE)
$(C_BUILDDIR)/librfu_intr.o: CFLAGS := -O2 -mthumb-interwork -quiet
else
$(C_BUILDDIR)/librfu_intr.o: CFLAGS := -mthumb-interwork -O2 -mabi=apcs-gnu -mtune=arm7tdmi -march=armv4t -fno-toplevel-reorder -Wno-pointer-to-int-cast
$(C_BUILDDIR)/berry_crush.o: override CFLAGS += -Wno-address-of-packed-member
endif
# Dependency rules (for the *.c & *.s sources to .o files)
# Have to be explicit or else missing files won't be reported.
# As a side effect, they're evaluated immediately instead of when the rule is invoked.
# It doesn't look like $(shell) can be deferred so there might not be a better way (Icedude_907: there is soon).
$(C_BUILDDIR)/%.o: $(C_SUBDIR)/%.c
ifneq ($(KEEP_TEMPS),1)
@echo "$(CC1) <flags> -o $@ $<"
@$(CPP) $(CPPFLAGS) $< | $(PREPROC) -i $< charmap.txt | $(CC1) $(CFLAGS) -o - - | cat - <(echo -e ".text\n\t.align\t2, 0") | $(AS) $(ASFLAGS) -o $@ -
else
@$(CPP) $(CPPFLAGS) $< -o $(C_BUILDDIR)/$*.i
@$(PREPROC) $(C_BUILDDIR)/$*.i charmap.txt | $(CC1) $(CFLAGS) -o $(C_BUILDDIR)/$*.s
@echo -e ".text\n\t.align\t2, 0\n" >> $(C_BUILDDIR)/$*.s
$(AS) $(ASFLAGS) -o $@ $(C_BUILDDIR)/$*.s
endif
$(C_BUILDDIR)/%.d: $(C_SUBDIR)/%.c
$(SCANINC) -M $@ $(INCLUDE_SCANINC_ARGS) -I tools/agbcc/include $<
ifneq ($(NODEP),1)
-include $(addprefix $(OBJ_DIR)/,$(C_SRCS:.c=.d))
endif
$(ASM_BUILDDIR)/%.o: $(ASM_SUBDIR)/%.s
$(AS) $(ASFLAGS) -o $@ $<
$(ASM_BUILDDIR)/%.d: $(ASM_SUBDIR)/%.s
$(SCANINC) -M $@ $(INCLUDE_SCANINC_ARGS) -I "" $<
ifneq ($(NODEP),1)
-include $(addprefix $(OBJ_DIR)/,$(ASM_SRCS:.s=.d))
endif
$(C_BUILDDIR)/%.o: $(C_SUBDIR)/%.s
$(PREPROC) $< charmap.txt | $(CPP) $(INCLUDE_SCANINC_ARGS) - | $(PREPROC) -ie $< charmap.txt | $(AS) $(ASFLAGS) -o $@
$(C_BUILDDIR)/%.d: $(C_SUBDIR)/%.s
$(SCANINC) -M $@ $(INCLUDE_SCANINC_ARGS) -I "" $<
ifneq ($(NODEP),1)
-include $(addprefix $(OBJ_DIR)/,$(C_ASM_SRCS:.s=.d))
endif
$(DATA_ASM_BUILDDIR)/%.o: $(DATA_ASM_SUBDIR)/%.s
$(PREPROC) $< charmap.txt | $(CPP) $(INCLUDE_SCANINC_ARGS) - | $(PREPROC) -ie $< charmap.txt | $(AS) $(ASFLAGS) -o $@
$(DATA_ASM_BUILDDIR)/%.d: $(DATA_ASM_SUBDIR)/%.s
$(SCANINC) -M $@ $(INCLUDE_SCANINC_ARGS) -I "" $<
ifneq ($(NODEP),1)
-include $(addprefix $(OBJ_DIR)/,$(REGULAR_DATA_ASM_SRCS:.s=.d))
endif
$(OBJ_DIR)/sym_bss.ld: sym_bss.txt
$(RAMSCRGEN) .bss $< ENGLISH > $@
$(OBJ_DIR)/sym_common.ld: sym_common.txt $(C_OBJS) $(wildcard common_syms/*.txt)
$(RAMSCRGEN) COMMON $< ENGLISH -c $(C_BUILDDIR),common_syms > $@
$(OBJ_DIR)/sym_ewram.ld: sym_ewram.txt
$(RAMSCRGEN) ewram_data $< ENGLISH > $@
# Linker script
ifeq ($(MODERN),0)
LD_SCRIPT := ld_script.ld
LD_SCRIPT_DEPS := $(OBJ_DIR)/sym_bss.ld $(OBJ_DIR)/sym_common.ld $(OBJ_DIR)/sym_ewram.ld
else
LD_SCRIPT := ld_script_modern.ld
LD_SCRIPT_DEPS :=
endif
# Final rules
libagbsyscall:
@$(MAKE) -C libagbsyscall TOOLCHAIN=$(TOOLCHAIN) MODERN=$(MODERN)
# Elf from object files
LDFLAGS = -Map ../../$(MAP)
$(ELF): $(LD_SCRIPT) $(LD_SCRIPT_DEPS) $(OBJS) libagbsyscall
@cd $(OBJ_DIR) && $(LD) $(LDFLAGS) -T ../../$< --print-memory-usage -o ../../$@ $(OBJS_REL) $(LIB) | cat
@echo "cd $(OBJ_DIR) && $(LD) $(LDFLAGS) -T ../../$< --print-memory-usage -o ../../$@ <objs> <libs> | cat"
$(FIX) $@ -t"$(TITLE)" -c$(GAME_CODE) -m$(MAKER_CODE) -r$(REVISION) --silent
# Builds the rom from the elf file
$(ROM): $(ELF)
$(OBJCOPY) -O binary $< $@
$(FIX) $@ -p --silent
# Symbol file (`make syms`)
$(SYM): $(ELF)
$(OBJDUMP) -t $< | sort -u | grep -E "^0[2389]" | $(PERL) -p -e 's/^(\w{8}) (\w).{6} \S+\t(\w{8}) (\S+)$$/\1 \2 \3 \4/g' > $@
-11
View File
@@ -1,11 +0,0 @@
# Pokémon Emerald
This is a decompilation of Pokémon Emerald.
It builds the following ROM:
* [**pokeemerald.gba**](https://datomatic.no-intro.org/index.php?page=show_record&s=23&n=1961) `sha1: f3ae088181bf583e55daf962a92bb46f4f1d07b7`
To set up the repository, see [INSTALL.md](INSTALL.md).
For contacts and other pret projects, see [pret.github.io](https://pret.github.io/).
-16
View File
@@ -1,16 +0,0 @@
.include "asm/macros/asm.inc"
.include "asm/macros/function.inc"
.include "asm/macros/movement.inc"
.include "asm/macros/map.inc"
.include "asm/macros/field_effect_script.inc"
.include "asm/macros/trainer_hill.inc"
.include "asm/macros/battle_tent.inc"
.include "asm/macros/battle_frontier/apprentice.inc"
.include "asm/macros/battle_frontier/battle_arena.inc"
.include "asm/macros/battle_frontier/battle_dome.inc"
.include "asm/macros/battle_frontier/battle_factory.inc"
.include "asm/macros/battle_frontier/battle_palace.inc"
.include "asm/macros/battle_frontier/battle_pike.inc"
.include "asm/macros/battle_frontier/battle_pyramid.inc"
.include "asm/macros/battle_frontier/battle_tower.inc"
.include "asm/macros/battle_frontier/frontier_util.inc"
-12
View File
@@ -1,12 +0,0 @@
.macro inc x:req
.set \x, \x + 1
.endm
.macro enum_start x=0
.set __enum__, \x
.endm
.macro enum constant:req
.equiv \constant, __enum__
inc __enum__
.endm
-619
View File
@@ -1,619 +0,0 @@
.macro if_random_less_than param0:req, param1:req
.byte 0x0
.byte \param0
.4byte \param1
.endm
.macro if_random_greater_than param0:req, param1:req
.byte 0x1
.byte \param0
.4byte \param1
.endm
.macro if_random_equal param0:req, param1:req
.byte 0x2
.byte \param0
.4byte \param1
.endm
.macro if_random_not_equal param0:req, param1:req
.byte 0x3
.byte \param0
.4byte \param1
.endm
.macro score param0:req
.byte 0x4
.byte \param0
.endm
.macro if_hp_less_than battler:req, param1:req, param2:req
.byte 0x5
.byte \battler
.byte \param1
.4byte \param2
.endm
.macro if_hp_more_than battler:req, param1:req, param2:req
.byte 0x6
.byte \battler
.byte \param1
.4byte \param2
.endm
.macro if_hp_equal battler:req, param1:req, param2:req
.byte 0x7
.byte \battler
.byte \param1
.4byte \param2
.endm
.macro if_hp_not_equal battler:req, param1:req, param2:req
.byte 0x8
.byte \battler
.byte \param1
.4byte \param2
.endm
.macro if_status battler:req, status1:req, param2:req
.byte 0x9
.byte \battler
.4byte \status1
.4byte \param2
.endm
.macro if_not_status battler:req, status1:req, param2:req
.byte 0xa
.byte \battler
.4byte \status1
.4byte \param2
.endm
.macro if_status2 battler:req, status2:req, param2:req
.byte 0xb
.byte \battler
.4byte \status2
.4byte \param2
.endm
.macro if_not_status2 battler:req, status2:req, param2:req
.byte 0xc
.byte \battler
.4byte \status2
.4byte \param2
.endm
.macro if_status3 battler:req, status3:req, param2:req
.byte 0xd
.byte \battler
.4byte \status3
.4byte \param2
.endm
.macro if_not_status3 battler:req, status3:req, param2:req
.byte 0xe
.byte \battler
.4byte \status3
.4byte \param2
.endm
.macro if_side_affecting battler:req, sidestatus:req, param2:req
.byte 0xf
.byte \battler
.4byte \sidestatus
.4byte \param2
.endm
.macro if_not_side_affecting battler:req, sidestatus:req, param2:req
.byte 0x10
.byte \battler
.4byte \sidestatus
.4byte \param2
.endm
.macro if_less_than param0:req, param1:req
.byte 0x11
.byte \param0
.4byte \param1
.endm
.macro if_more_than param0:req, param1:req
.byte 0x12
.byte \param0
.4byte \param1
.endm
.macro if_equal param0:req, param1:req
.byte 0x13
.byte \param0
.4byte \param1
.endm
.macro if_not_equal param0:req, param1:req
.byte 0x14
.byte \param0
.4byte \param1
.endm
.macro if_less_than_ptr param0:req, param1:req
.byte 0x15
.4byte \param0
.4byte \param1
.endm
.macro if_more_than_ptr param0:req, param1:req
.byte 0x16
.4byte \param0
.4byte \param1
.endm
.macro if_equal_ptr param0:req, param1:req
.byte 0x17
.4byte \param0
.4byte \param1
.endm
.macro if_not_equal_ptr param0:req, param1:req
.byte 0x18
.4byte \param0
.4byte \param1
.endm
.macro if_move param0:req, param1:req
.byte 0x19
.2byte \param0
.4byte \param1
.endm
.macro if_not_move param0:req, param1:req
.byte 0x1a
.2byte \param0
.4byte \param1
.endm
.macro if_in_bytes param0:req, param1:req
.byte 0x1b
.4byte \param0
.4byte \param1
.endm
.macro if_not_in_bytes param0:req, param1:req
.byte 0x1c
.4byte \param0
.4byte \param1
.endm
.macro if_in_hwords param0:req, param1:req
.byte 0x1d
.4byte \param0
.4byte \param1
.endm
.macro if_not_in_hwords param0:req, param1:req
.byte 0x1e
.4byte \param0
.4byte \param1
.endm
.macro if_user_has_attacking_move param0:req
.byte 0x1f
.4byte \param0
.endm
.macro if_user_has_no_attacking_moves param0:req
.byte 0x20
.4byte \param0
.endm
.macro get_turn_count
.byte 0x21
.endm
.macro get_type param0:req
.byte 0x22
.byte \param0
.endm
.macro get_considered_move_power
.byte 0x23
.endm
.macro get_how_powerful_move_is
.byte 0x24
.endm
.macro get_last_used_bank_move battler:req
.byte 0x25
.byte \battler
.endm
.macro if_equal_ param0:req, param1:req
.byte 0x26
.byte \param0
.4byte \param1
.endm
.macro if_not_equal_ param0:req, param1:req
.byte 0x27
.byte \param0
.4byte \param1
.endm
.macro if_user_goes param0:req, param1:req
.byte 0x28
.byte \param0
.4byte \param1
.endm
.macro if_user_doesnt_go param0:req, param1:req
.byte 0x29
.byte \param0
.4byte \param1
.endm
.macro nop_2A
.byte 0x2a
.endm
.macro nop_2B
.byte 0x2b
.endm
.macro count_usable_party_mons battler:req
.byte 0x2c
.byte \battler
.endm
.macro get_considered_move
.byte 0x2d
.endm
.macro get_considered_move_effect
.byte 0x2e
.endm
.macro get_ability battler:req
.byte 0x2f
.byte \battler
.endm
.macro get_highest_type_effectiveness
.byte 0x30
.endm
.macro if_type_effectiveness param0:req, param1:req
.byte 0x31
.byte \param0
.4byte \param1
.endm
.macro nop_32
.byte 0x32
.endm
.macro nop_33
.byte 0x33
.endm
.macro if_status_in_party battler:req, status1:req, param2:req
.byte 0x34
.byte \battler
.4byte \status1
.4byte \param2
.endm
.macro if_status_not_in_party battler:req, status1:req, param2:req
.byte 0x35
.byte \battler
.4byte \status1
.4byte \param2
.endm
.macro get_weather
.byte 0x36
.endm
.macro if_effect param0:req, param1:req
.byte 0x37
.byte \param0
.4byte \param1
.endm
.macro if_not_effect param0:req, param1:req
.byte 0x38
.byte \param0
.4byte \param1
.endm
.macro if_stat_level_less_than battler:req, stat:req, param2:req, param3:req
.byte 0x39
.byte \battler
.byte \stat
.byte \param2
.4byte \param3
.endm
.macro if_stat_level_more_than battler:req, stat:req, param2:req, param3:req
.byte 0x3a
.byte \battler
.byte \stat
.byte \param2
.4byte \param3
.endm
.macro if_stat_level_equal battler:req, stat:req, param2:req, param3:req
.byte 0x3b
.byte \battler
.byte \stat
.byte \param2
.4byte \param3
.endm
.macro if_stat_level_not_equal battler:req, stat:req, param2:req, param3:req
.byte 0x3c
.byte \battler
.byte \stat
.byte \param2
.4byte \param3
.endm
.macro if_can_faint param0:req
.byte 0x3d
.4byte \param0
.endm
.macro if_cant_faint param0:req
.byte 0x3e
.4byte \param0
.endm
.macro if_has_move battler:req, param1:req, param2:req
.byte 0x3f
.byte \battler
.2byte \param1
.4byte \param2
.endm
.macro if_doesnt_have_move battler:req, param1:req, param2:req
.byte 0x40
.byte \battler
.2byte \param1
.4byte \param2
.endm
.macro if_has_move_with_effect battler:req, param1:req, param2:req
.byte 0x41
.byte \battler
.byte \param1
.4byte \param2
.endm
.macro if_doesnt_have_move_with_effect battler:req, param1:req, param2:req
.byte 0x42
.byte \battler
.byte \param1
.4byte \param2
.endm
.macro if_any_move_disabled_or_encored battler:req, param1:req, param2:req
.byte 0x43
.byte \battler
.byte \param1
.4byte \param2
.endm
.macro if_curr_move_disabled_or_encored param0:req, param1:req
.byte 0x44
.byte \param0
.4byte \param1
.endm
.macro flee
.byte 0x45
.endm
.macro if_random_safari_flee param0:req
.byte 0x46
.4byte \param0
.endm
.macro watch
.byte 0x47
.endm
.macro get_hold_effect battler:req
.byte 0x48
.byte \battler
.endm
.macro get_gender battler:req
.byte 0x49
.byte \battler
.endm
.macro is_first_turn_for battler:req
.byte 0x4a
.byte \battler
.endm
.macro get_stockpile_count battler:req
.byte 0x4b
.byte \battler
.endm
.macro is_double_battle
.byte 0x4c
.endm
.macro get_used_held_item battler:req
.byte 0x4d
.byte \battler
.endm
.macro get_move_type_from_result
.byte 0x4e
.endm
.macro get_move_power_from_result
.byte 0x4f
.endm
.macro get_move_effect_from_result
.byte 0x50
.endm
.macro get_protect_count battler:req
.byte 0x51
.byte \battler
.endm
.macro nop_52
.byte 0x52
.endm
.macro nop_53
.byte 0x53
.endm
.macro nop_54
.byte 0x54
.endm
.macro nop_55
.byte 0x55
.endm
.macro nop_56
.byte 0x56
.endm
.macro nop_57
.byte 0x57
.endm
.macro call param0:req
.byte 0x58
.4byte \param0
.endm
.macro goto param0:req
.byte 0x59
.4byte \param0
.endm
.macro end
.byte 0x5a
.endm
.macro if_level_cond param0:req, param1:req
.byte 0x5b
.byte \param0
.4byte \param1
.endm
.macro if_target_taunted param0:req
.byte 0x5c
.4byte \param0
.endm
.macro if_target_not_taunted param0:req
.byte 0x5d
.4byte \param0
.endm
.macro if_target_is_ally param0:req
.byte 0x5e
.4byte \param0
.endm
.macro is_of_type battler:req, type:req
.byte 0x5f
.byte \battler
.byte \type
.endm
.macro check_ability battler:req, ability:req
.byte 0x60
.byte \battler
.byte \ability
.endm
.macro if_flash_fired battler:req, param1:req
.byte 0x61
.byte \battler
.4byte \param1
.endm
.macro if_holds_item battler:req, param1:req, param2:req
.byte 0x62
.byte \battler
.2byte \param1
.4byte \param2
.endm
@ useful script macros
.macro get_curr_move_type
get_type AI_TYPE_MOVE
.endm
.macro get_user_type1
get_type AI_TYPE1_USER
.endm
.macro get_user_type2
get_type AI_TYPE2_USER
.endm
.macro get_target_type1
get_type AI_TYPE1_TARGET
.endm
.macro get_target_type2
get_type AI_TYPE2_TARGET
.endm
.macro if_ability battler:req, ability:req, ptr:req
check_ability \battler, \ability
if_equal 1, \ptr
.endm
.macro if_no_ability battler:req, ability:req, ptr:req
check_ability \battler, \ability
if_equal 0, \ptr
.endm
.macro if_type battler:req, type:req, ptr:req
is_of_type \battler, \type
if_equal 1, \ptr
.endm
.macro if_no_type battler:req, type:req, ptr:req
is_of_type \battler, \type
if_equal 0, \ptr
.endm
.macro if_target_faster ptr:req
if_user_goes 1, \ptr
.endm
.macro if_user_faster ptr:req
if_user_goes 0, \ptr
.endm
.macro if_double_battle ptr:req
is_double_battle
if_equal 1, \ptr
.endm
.macro if_not_double_battle ptr:req
is_double_battle
if_equal 0, \ptr
.endm
.macro if_any_move_disabled battler:req, ptr:req
if_any_move_disabled_or_encored \battler, 0, \ptr
.endm
.macro if_any_move_encored battler:req, ptr:req
if_any_move_disabled_or_encored \battler, 1, \ptr
.endm
-285
View File
@@ -1,285 +0,0 @@
@ commands
.macro loadspritegfx tag:req
.byte 0x0
.2byte \tag
.endm
.macro unloadspritegfx tag:req
.byte 0x1
.2byte \tag
.endm
.macro createsprite template:req, anim_battler:req, subpriority_offset:req, argv:vararg
.byte 0x02
.4byte \template
.if \anim_battler == ANIM_TARGET
.byte ANIMSPRITE_IS_TARGET | (\subpriority_offset & 0x7F)
.else
.byte (\subpriority_offset & 0x7F)
.endif
.byte (.Lsprite_\@_2 - .Lsprite_\@_1) / 2
.Lsprite_\@_1:
.2byte \argv
.Lsprite_\@_2:
.endm
.macro createvisualtask addr:req, priority:req, argv:vararg
.byte 0x03
.4byte \addr
.byte \priority
.byte (.Lcreatetask_\@_2 - .Lcreatetask_\@_1) / 2
.Lcreatetask_\@_1:
.2byte \argv
.Lcreatetask_\@_2:
.endm
.macro delay frames:req
.byte 0x4
.byte \frames
.endm
.macro waitforvisualfinish
.byte 0x5
.endm
.macro nop
.byte 0x6
.endm
.macro nop2
.byte 0x7
.endm
.macro end
.byte 0x8
.endm
.macro playse se:req
.byte 0x9
.2byte \se
.endm
.macro monbg battler:req
.byte 0xa
.byte \battler
.endm
.macro clearmonbg battler:req
.byte 0xb
.byte \battler
.endm
.macro setalpha eva:req, evb:req
.byte 0x0C
.2byte ((\evb) << 8) | (\eva)
.endm
.macro blendoff
.byte 0xd
.endm
.macro call ptr:req
.byte 0xe
.4byte \ptr
.endm
.macro return
.byte 0xf
.endm
.macro setarg argId:req, value:req
.byte 0x10
.byte \argId
.2byte \value
.endm
.macro choosetwoturnanim ptr1:req, ptr2:req
.byte 0x11
.4byte \ptr1
.4byte \ptr2
.endm
.macro jumpifmoveturn value:req, ptr:req
.byte 0x12
.byte \value
.4byte \ptr
.endm
.macro goto ptr:req
.byte 0x13
.4byte \ptr
.endm
.macro fadetobg bg:req
.byte 0x14
.byte \bg
.endm
.macro restorebg
.byte 0x15
.endm
.macro waitbgfadeout
.byte 0x16
.endm
.macro waitbgfadein
.byte 0x17
.endm
.macro changebg bg:req
.byte 0x18
.byte \bg
.endm
.macro playsewithpan se:req, pan:req
.byte 0x19
.2byte \se
.byte \pan
.endm
.macro setpan pan:req
.byte 0x1a
.byte \pan
.endm
.macro panse se:req, currentPan:req, targetPan:req, incrementPan:req, delay:req
.byte 0x1b
.2byte \se
.byte \currentPan
.byte \targetPan
.byte \incrementPan
.byte \delay
.endm
.macro loopsewithpan se:req, pan:req, wait:req, times:req
.byte 0x1c
.2byte \se
.byte \pan
.byte \wait
.byte \times
.endm
.macro waitplaysewithpan se:req, pan:req, wait:req
.byte 0x1d
.2byte \se
.byte \pan
.byte \wait
.endm
.macro setbldcnt bldcnt:req
.byte 0x1e
.2byte \bldcnt
.endm
.macro createsoundtask addr:req, argv:vararg
.byte 0x1F
.4byte \addr
.byte (.Lcreatetask_1F_\@_2 - .Lcreatetask_1F_\@_1) / 2
.Lcreatetask_1F_\@_1:
.2byte \argv
.Lcreatetask_1F_\@_2:
.endm
.macro waitsound
.byte 0x20
.endm
.macro jumpargeq argId:req, value:req, ptr:req
.byte 0x21
.byte \argId
.2byte \value
.4byte \ptr
.endm
.macro monbg_static battler:req
.byte 0x22
.byte \battler
.endm
.macro clearmonbg_static battler:req
.byte 0x23
.byte \battler
.endm
.macro jumpifcontest ptr:req
.byte 0x24
.4byte \ptr
.endm
.macro fadetobgfromset bgOpponent:req, bgPlayer:req, bgContest:req
.byte 0x25
.byte \bgOpponent
.byte \bgPlayer
.byte \bgContest
.endm
.macro panse_adjustnone se:req, currentPan:req, targetPan:req, incrementPan:req, delay:req
.byte 0x26
.2byte \se
.byte \currentPan
.byte \targetPan
.byte \incrementPan
.byte \delay
.endm
.macro panse_adjustall se:req, currentPan:req, targetPan:req, incrementPan:req, delay:req
.byte 0x27
.2byte \se
.byte \currentPan
.byte \targetPan
.byte \incrementPan
.byte \delay
.endm
.macro splitbgprio battler:req
.byte 0x28
.byte \battler
.endm
.macro splitbgprio_all
.byte 0x29
.endm
.macro splitbgprio_foes battler:req
.byte 0x2a
.byte \battler
.endm
.macro invisible battler:req
.byte 0x2b
.byte \battler
.endm
.macro visible battler:req
.byte 0x2c
.byte \battler
.endm
.macro teamattack_moveback battler:req
.byte 0x2d
.byte \battler
.endm
.macro teamattack_movefwd battler:req
.byte 0x2e
.byte \battler
.endm
.macro stopsound
.byte 0x2f
.endm
@ useful macros
.macro jumpreteq value:req, ptr:req
jumpargeq ARG_RET_ID, \value, \ptr
.endm
.macro jumprettrue ptr:req
jumpreteq TRUE, \ptr
.endm
.macro jumpretfalse ptr:req
jumpreteq FALSE, \ptr
.endm
-162
View File
@@ -1,162 +0,0 @@
@ TRUE if the player has talked to the Apprentice and answered their level mode question
.macro apprentice_gavelvlmode
setvar VAR_0x8004, APPRENTICE_FUNC_GAVE_LVLMODE
special CallApprenticeFunction
.endm
@ Set the level mode the Apprentice should battle in
.macro apprentice_setlvlmode lvlmode:req
setvar VAR_0x8004, APPRENTICE_FUNC_SET_LVLMODE
setorcopyvar VAR_0x8005, \lvlmode
addvar VAR_0x8005, 1 @ Apprentice lvl mode is +1 from regular lvl mode value
special CallApprenticeFunction
.endm
@ Question was answered, increment the number of questions answered
.macro apprentice_answeredquestion
setvar VAR_0x8004, APPRENTICE_FUNC_ANSWERED_QUESTION
special CallApprenticeFunction
.endm
@ Show the response selection box to answer the Apprentice question. Menus are defined as APPRENTICE_ASK_*
.macro apprentice_menu which:req
setvar VAR_0x8004, APPRENTICE_FUNC_MENU
setvar VAR_0x8005, \which
special CallApprenticeFunction
waitstate
.endm
@ Shuffle and set the Apprentice party mons to pick between from their list of possible party species
.macro apprentice_shufflespecies
setvar VAR_0x8004, APPRENTICE_FUNC_SHUFFLE_SPECIES
special CallApprenticeFunction
.endm
@ Randomize the question data (e.g. moves to pick between) and shuffle the order to ask them in
.macro apprentice_randomizequestions
setvar VAR_0x8004, APPRENTICE_FUNC_RANDOMIZE_QUESTIONS
special CallApprenticeFunction
.endm
@ Print the APPRENTICE_MSG_* text for the current Apprentice
.macro apprentice_msg waitbuttonpress:req, which:req
setvar VAR_0x8004, APPRENTICE_FUNC_PRINT_MSG
setvar VAR_0x8005, \waitbuttonpress
setvar VAR_0x8006, \which
special CallApprenticeFunction
waitstate
.endm
@ Clear the data for the current Player Apprentice
.macro apprentice_reset
setvar VAR_0x8004, APPRENTICE_FUNC_RESET
special CallApprenticeFunction
.endm
@ Always returns TRUE. No side effect. May have been for debug or dummied for some other reason
.macro apprentice_shouldcheckgone
setvar VAR_0x8004, APPRENTICE_FUNC_CHECK_GONE
special CallApprenticeFunction
.endm
@ Return the APPRENTICE_QUESTION_* value for the current question to ask
.macro apprentice_getquestion
setvar VAR_0x8004, APPRENTICE_FUNC_GET_QUESTION
special CallApprenticeFunction
.endm
@ Get the number of mons that have been chosen for the Apprentice's party so far
.macro apprentice_getnumpartymons
setvar VAR_0x8004, APPRENTICE_FUNC_GET_NUM_PARTY_MONS
special CallApprenticeFunction
.endm
@ Set the Apprentice party mon at the given slot. VAR_0x8005 is used implicitly as which of the 2 mons was selected
.macro apprentice_setpartymon slot:req
copyvar VAR_0x8006, \slot
setvar VAR_0x8004, APPRENTICE_FUNC_SET_PARTY_MON
special CallApprenticeFunction
.endm
@ Allocate and set up data to track about the question
.macro apprentice_initquestion which:req
setvar VAR_0x8004, APPRENTICE_FUNC_INIT_QUESTION_DATA
setvar VAR_0x8005, \which
special CallApprenticeFunction
.endm
@ Free allocated question data
.macro apprentice_freequestion
setvar VAR_0x8004, APPRENTICE_FUNC_FREE_QUESTION_DATA
special CallApprenticeFunction
.endm
@ Buffer some APPRENTICE_BUFF_* string to the given stringvar (0 for STR_VAR_1, 1 for STR_VAR_2, 2 for STR_VAR_3)
.macro apprentice_buff stringvar:req, tobuff:req
setvar VAR_0x8004, APPRENTICE_FUNC_BUFFER_STRING
.if \stringvar == STR_VAR_1
setvar VAR_0x8005, 0
.elseif \stringvar == STR_VAR_2
setvar VAR_0x8005, 1
.elseif \stringvar == STR_VAR_3
setvar VAR_0x8005, 2
.else
setvar VAR_0x8005, \stringvar
.endif
.if \tobuff >= VARS_START
copyvar VAR_0x8006, \tobuff
.else
setvar VAR_0x8006, \tobuff
.endif
special CallApprenticeFunction
.endm
@ Set which move to use that the player chose (implicitly VAR_0x8005)
.macro apprentice_setmove
setvar VAR_0x8004, APPRENTICE_FUNC_SET_MOVE
special CallApprenticeFunction
.endm
@ Set which mon the Apprentice should lead with
.macro apprentice_setleadmon monId:req
copyvar VAR_0x8005, \monId
setvar VAR_0x8004, APPRENTICE_FUNC_SET_LEAD_MON
special CallApprenticeFunction
.endm
@ Open the Bag Menu for the player to choose an item to recommend as a held item
.macro apprentice_openbag
setvar VAR_0x8004, APPRENTICE_FUNC_OPEN_BAG
special CallApprenticeFunction
waitstate
.endm
@ Try and set the recommended held item. FALSE if the item has been recommended before, as Battle Frontier forbids using the same held item for multiple party mons
.macro apprentice_trysetitem
setvar VAR_0x8004, APPRENTICE_FUNC_TRY_SET_HELD_ITEM
special CallApprenticeFunction
.endm
@ Save the current Player Apprentice to the saveblock to make room for a new Apprentice
.macro apprentice_save
setvar VAR_0x8004, APPRENTICE_FUNC_SAVE
special CallApprenticeFunction
.endm
@ Set the object event gfx for the Apprentice based on their trainer class
.macro apprentice_setgfx
setvar VAR_0x8004, APPRENTICE_FUNC_SET_GFX
special CallApprenticeFunction
.endm
@ Always returns TRUE. No side effect. May have been for debug or dummied for some other reason
.macro apprentice_shouldleave
setvar VAR_0x8004, APPRENTICE_FUNC_SHOULD_LEAVE
special CallApprenticeFunction
.endm
@ Shift the other saved Apprentices over to make room for saving a new Apprentice
.macro apprentice_shiftsaved
setvar VAR_0x8004, APPRENTICE_FUNC_SHIFT_SAVED
special CallApprenticeFunction
.endm
@@ -1,49 +0,0 @@
@ Initialize the Battle Arena challenge
.macro arena_init
setvar VAR_0x8004, BATTLE_ARENA_FUNC_INIT
special CallBattleArenaFunction
.endm
@ Unused. Get the value of some ARENA_DATA_*. See GetArenaData for the data types that can be retrieved
.macro arena_get data:req
setvar VAR_0x8004, BATTLE_ARENA_FUNC_GET_DATA
setvar VAR_0x8005, \data
special CallBattleArenaFunction
.endm
@ Set some ARENA_DATA_* to val. See SetArenaData for the data types that can be set
.macro arena_set data:req, val:req
setvar VAR_0x8004, BATTLE_ARENA_FUNC_SET_DATA
setvar VAR_0x8005, \data
.if \val >= VARS_START
copyvar VAR_0x8006, \val
.else
setvar VAR_0x8006, \val
.endif
special CallBattleArenaFunction
.endm
@ Save the game and set the challenge status
.macro arena_save challengeStatus:req
setvar VAR_0x8004, BATTLE_ARENA_FUNC_SAVE
setvar VAR_0x8005, \challengeStatus
special CallBattleArenaFunction
.endm
@ Unused. Set the prize item to give from one of two lists of possible prizes, depending on streak.
.macro arena_setprize
setvar VAR_0x8004, BATTLE_ARENA_FUNC_SET_PRIZE
special CallBattleArenaFunction
.endm
@ Unused. Give the set prize item to the player. TRUE if room in Bag for prize, FALSE otherwise
.macro arena_giveprize
setvar VAR_0x8004, BATTLE_ARENA_FUNC_GIVE_PRIZE
special CallBattleArenaFunction
.endm
@ Buffer the opponents name to STR_VAR_1
.macro arena_gettrainername
setvar VAR_0x8004, BATTLE_ARENA_FUNC_GET_TRAINER_NAME
special CallBattleArenaFunction
.endm
-144
View File
@@ -1,144 +0,0 @@
@ Initialize the Battle Dome challenge
.macro dome_init
setvar VAR_0x8004, BATTLE_DOME_FUNC_INIT
special CallBattleDomeFunction
.endm
@ Get the value of some DOME_DATA_*. See GetDomeData for the data types that can be retrieved
.macro dome_get data:req
setvar VAR_0x8004, BATTLE_DOME_FUNC_GET_DATA
setvar VAR_0x8005, \data
special CallBattleDomeFunction
.endm
@ Set some DOME_DATA_* to val. See SetDomeData for the data types that can be set
.macro dome_set data:req, val=0xFFFF
setvar VAR_0x8004, BATTLE_DOME_FUNC_SET_DATA
setvar VAR_0x8005, \data
.if \val != 0xFFFF
setvar VAR_0x8006, \val
.endif
special CallBattleDomeFunction
.endm
@ Buffer the name of the current round to gStringVar1
.macro dome_getroundtext
setvar VAR_0x8004, BATTLE_DOME_FUNC_GET_ROUND_TEXT
special CallBattleDomeFunction
.endm
@ Buffer the name of the opponent to gStringVar2 and the name of the round to gStringVar1
.macro dome_getopponentname
setvar VAR_0x8004, BATTLE_DOME_FUNC_GET_OPPONENT_NAME
special CallBattleDomeFunction
.endm
@ Choose which of the opponents mons to use in battle and load them into the enemy party
.macro dome_initopponentparty
setvar VAR_0x8004, BATTLE_DOME_FUNC_INIT_OPPONENT_PARTY
special CallBattleDomeFunction
.endm
@ Show the page that gives information on the next opponent
.macro dome_showopponentinfo
setvar VAR_0x8004, BATTLE_DOME_FUNC_SHOW_OPPONENT_INFO
special CallBattleDomeFunction
.endm
@ Displays the tourney tree for the current tourney
.macro dome_showtourneytree
setvar VAR_0x8004, BATTLE_DOME_FUNC_SHOW_TOURNEY_TREE
special CallBattleDomeFunction
.endm
@ Displays the tourney tree for the results of the previous tourney. Before the player enters their first tourney this is a random tourney generated by dome_initresultstree
.macro dome_showprevtourneytree
setvar VAR_0x8004, BATTLE_DOME_FUNC_SHOW_PREV_TOURNEY_TREE
special CallBattleDomeFunction
.endm
@ Sets gTrainerBattleOpponent_A to the trainer ID of the next opponent
.macro dome_setopponent
setvar VAR_0x8004, BATTLE_DOME_FUNC_SET_OPPONENT_ID
special CallBattleDomeFunction
.endm
@ Set the object event gfx id for the opponent
.macro dome_setopponentgfx
setvar VAR_0x8004, BATTLE_DOME_FUNC_SET_OPPONENT_GFX
special CallBattleDomeFunction
.endm
@ A non-interactive version of the tourney tree shown when a round is completed
.macro dome_showstatictourneytree
setvar VAR_0x8004, BATTLE_DOME_FUNC_SHOW_STATIC_TOURNEY_TREE
special CallBattleDomeFunction
.endm
@ Decides the winners of NPC vs NPC matches, and eliminates either the player or their opponent depending on the playerStatus (DOME_PLAYER_*)
.macro dome_resolvewinners playerStatus:req
setvar VAR_0x8004, BATTLE_DOME_FUNC_RESOLVE_WINNERS
setvar VAR_0x8005, \playerStatus
special CallBattleDomeFunction
.endm
@ Save the game and set the challenge status
.macro dome_save challengeStatus:req
setvar VAR_0x8004, BATTLE_DOME_FUNC_SAVE
setvar VAR_0x8005, \challengeStatus
special CallBattleDomeFunction
.endm
@ Unused. Increment the win streaks for the current challenge by one
.macro dome_incrementstreaks
setvar VAR_0x8004, BATTLE_DOME_FUNC_INCREMENT_STREAK
special CallBattleDomeFunction
.endm
@ Sets the facility trainer/mon set pointers
.macro dome_settrainers
setvar VAR_0x8004, BATTLE_DOME_FUNC_SET_TRAINERS
special CallBattleDomeFunction
.endm
@ If any moves were copied using Sketch during the challenge then restore them to Sketch
.macro dome_resetsketch
setvar VAR_0x8004, BATTLE_DOME_FUNC_RESET_SKETCH
special CallBattleDomeFunction
.endm
@ Reset the held items of the mons that just battled to what they were prior to battling
.macro dome_restorehelditems
setvar VAR_0x8004, BATTLE_DOME_FUNC_RESTORE_HELD_ITEMS
special CallBattleDomeFunction
.endm
@ Reduce the players party to the selected mons, used to reduce down to the 2 selected for battle
.macro dome_reduceparty
setvar VAR_0x8004, BATTLE_DOME_FUNC_REDUCE_PARTY
special CallBattleDomeFunction
.endm
@ Compares the initial tournament ranking (seed) of the player to opponent A. Returns 1 if the player's seed is better, 2 if the opponent's seed is better.
.macro dome_compareseeds
setvar VAR_0x8004, BATTLE_DOME_FUNC_COMPARE_SEEDS
special CallBattleDomeFunction
.endm
@ Buffer the name of the winner for the last Dome challenge to STR_VAR_1
.macro dome_getwinnersname
setvar VAR_0x8004, BATTLE_DOME_FUNC_GET_WINNER_NAME
special CallBattleDomeFunction
.endm
@ Performs a random tourney to initialize the results board before the player has entered a challenge
.macro dome_initresultstree
setvar VAR_0x8004, BATTLE_DOME_FUNC_INIT_RESULTS_TREE
special CallBattleDomeFunction
.endm
@ Generates the tourney trainers and their parties, and seeds them in the tourney tree
.macro dome_inittrainers
setvar VAR_0x8004, BATTLE_DOME_FUNC_INIT_TRAINERS
special CallBattleDomeFunction
.endm
@@ -1,101 +0,0 @@
@ Initialize the Battle Factory challenge
.macro factory_init
setvar VAR_0x8004, BATTLE_FACTORY_FUNC_INIT
special CallBattleFactoryFunction
.endm
@ Get the value of some FACTORY_DATA_*. See GetBattleFactoryData for the data types that can be retrieved
.macro factory_get data:req
setvar VAR_0x8004, BATTLE_FACTORY_FUNC_GET_DATA
setvar VAR_0x8005, \data
special CallBattleFactoryFunction
.endm
@ Set some FACTORY_DATA_* to val. See SetBattleFactoryData for the data types that can be set
.macro factory_set data:req, val=0xFFFF
setvar VAR_0x8004, BATTLE_FACTORY_FUNC_SET_DATA
setvar VAR_0x8005, \data
.if \val == 0xFFFF
@ argument not provided
.elseif \val >= VARS_START
copyvar VAR_0x8006, \val
.else
setvar VAR_0x8006, \val
.endif
special CallBattleFactoryFunction
.endm
@ Save the game and set the challenge status
.macro factory_save challengeStatus:req
setvar VAR_0x8004, BATTLE_FACTORY_FUNC_SAVE
setvar VAR_0x8005, \challengeStatus
special CallBattleFactoryFunction
.endm
@ Select the initial rental mons for the challenge
.macro factory_rentmons
setvar VAR_0x8004, BATTLE_FACTORY_FUNC_SELECT_RENT_MONS
special CallBattleFactoryFunction
.endm
@ Select a mon to swap for from the previously defeated team
.macro factory_swapmons
setvar VAR_0x8004, BATTLE_FACTORY_FUNC_SWAP_RENT_MONS
special CallBattleFactoryFunction
.endm
@ Allows FACTORY_DATA_WIN_STREAK_SWAPS to be incremented once
.macro factory_setswapped
setvar VAR_0x8004, BATTLE_FACTORY_FUNC_SET_SWAPPED
special CallBattleFactoryFunction
.endm
@ Update gEnemyParty with the next set of rental mons
.macro factory_setopponentmons
setvar VAR_0x8004, BATTLE_FACTORY_FUNC_SET_OPPONENT_MONS
special CallBattleFactoryFunction
.endm
@ Populate gPlayerParty and gEnemyParty with the rental mons. Only needed when resuming a challenge, otherwise only factory_setopponentmons and factory_rentmons/factory_swapmons are needed
.macro factory_setparties arg:req
setvar VAR_0x8004, BATTLE_FACTORY_FUNC_SET_PARTIES
setvar VAR_0x8005, \arg
special CallBattleFactoryFunction
.endm
@ Set the object event gfx for the opponent trainer
.macro factory_setopponentgfx
setvar VAR_0x8004, BATTLE_FACTORY_FUNC_SET_OPPONENT_GFX
special CallBattleFactoryFunction
.endm
@ Generate the mons for the opponents team
.macro factory_generateopponentmons
setvar VAR_0x8004, BATTLE_FACTORY_FUNC_GENERATE_OPPONENT_MONS
special CallBattleFactoryFunction
.endm
@ Generate the random 6 mons to choose from for the initial rental
.macro factory_generaterentalmons
setvar VAR_0x8004, BATTLE_FACTORY_FUNC_GENERATE_RENTAL_MONS
special CallBattleFactoryFunction
.endm
@ Return the pokemon type most common in the opponents team, or NUMBER_OF_MON_TYPES if there is no standout type
.macro factory_getopponentmontype
setvar VAR_0x8004, BATTLE_FACTORY_FUNC_GET_OPPONENT_MON_TYPE
special CallBattleFactoryFunction
.endm
@ Return the FACTORY_STYLE_* dependent on what types of moves the opponents team has, or FACTORY_NUM_STYLES if multiple styles tie for the same amount of moves
.macro factory_getopponentstyle
setvar VAR_0x8004, BATTLE_FACTORY_FUNC_GET_OPPONENT_STYLE
special CallBattleFactoryFunction
.endm
@ Restore the held items for the players party to what they were pre-battle
.macro factory_resethelditems
setvar VAR_0x8004, BATTLE_FACTORY_FUNC_RESET_HELD_ITEMS
special CallBattleFactoryFunction
.endm
@@ -1,63 +0,0 @@
@ Initialize the Battle Palace challenge
.macro palace_init
setvar VAR_0x8004, BATTLE_PALACE_FUNC_INIT
special CallBattlePalaceFunction
.endm
@ Get the value of some PALACE_DATA_*. See GetPalaceData for the data types that can be retrieved
.macro palace_get data:req
setvar VAR_0x8004, BATTLE_PALACE_FUNC_GET_DATA
setvar VAR_0x8005, \data
special CallBattlePalaceFunction
.endm
@ Set some PALACE_DATA_* to val. See SetPalaceData for the data types that can be set
.macro palace_set data:req, val:req
setvar VAR_0x8004, BATTLE_PALACE_FUNC_SET_DATA
setvar VAR_0x8005, \data
setvar VAR_0x8006, \val
special CallBattlePalaceFunction
.endm
@ Get the id of the comment to be made while being led through the corridor
.macro palace_getcomment
setvar VAR_0x8004, BATTLE_PALACE_FUNC_GET_COMMENT_ID
special CallBattlePalaceFunction
.endm
@ Unused. Choose and set the opponent gfx id. The equivalent macro from Battle Tower is used instead
.macro palace_setopponent
setvar VAR_0x8004, BATTLE_PALACE_FUNC_SET_OPPONENT
special CallBattlePalaceFunction
.endm
@ Buffer the opponents intro speech to gStringVar4. Also used by Battle Arena and Factory
.macro palace_getopponentintro
setvar VAR_0x8004, BATTLE_PALACE_FUNC_GET_OPPONENT_INTRO
special CallBattlePalaceFunction
.endm
@ Increments the current win streak by 1
.macro palace_incrementstreak
setvar VAR_0x8004, BATTLE_PALACE_FUNC_INCREMENT_STREAK
special CallBattlePalaceFunction
.endm
@ Save the game and set the challenge status
.macro palace_save challengeStatus:req
setvar VAR_0x8004, BATTLE_PALACE_FUNC_SAVE
setvar VAR_0x8005, \challengeStatus
special CallBattlePalaceFunction
.endm
@ Unused. Set the prize item to give from one of two lists of possible prizes, depending on streak.
.macro palace_setprize
setvar VAR_0x8004, BATTLE_PALACE_FUNC_SET_PRIZE
special CallBattleArenaFunction
.endm
@ Unused. Give the set prize item to the player. TRUE if room in Bag for prize, FALSE otherwise
.macro palace_giveprize
setvar VAR_0x8004, BATTLE_PALACE_FUNC_GIVE_PRIZE
special CallBattleArenaFunction
.endm
-171
View File
@@ -1,171 +0,0 @@
@ Set sRoomType to the next PIKE_ROOM_* id
.macro pike_setnextroom
setvar VAR_0x8004, BATTLE_PIKE_FUNC_SET_ROOM_TYPE
special CallBattlePikeFunction
.endm
@ Get the value of some PIKE_DATA_*. See GetBattlePikeData for the data types that can be retrieved
.macro pike_get data:req
setvar VAR_0x8004, BATTLE_PIKE_FUNC_GET_DATA
setvar VAR_0x8005, \data
special CallBattlePikeFunction
.endm
@ Set some PIKE_DATA_* to val. See SetBattlePikeData for the data types that can be set
.macro pike_set data:req, val:req
setvar VAR_0x8004, BATTLE_PIKE_FUNC_SET_DATA
setvar VAR_0x8005, \data
.if \val >= VARS_START
copyvar VAR_0x8006, \val
.else
setvar VAR_0x8006, \val
.endif
special CallBattlePikeFunction
.endm
@ TRUE if the next room is the last (15th) room, FALSE otherwise
.macro pike_isfinalroom
setvar VAR_0x8004, BATTLE_PIKE_FUNC_IS_FINAL_ROOM
special CallBattlePikeFunction
.endm
@ Set the object event gfx for the room being entered
.macro pike_setroomobjects
setvar VAR_0x8004, BATTLE_PIKE_FUNC_SET_ROOM_OBJECTS
special CallBattlePikeFunction
.endm
@ Get the current room type (sRoomType)
.macro pike_getroomtype
setvar VAR_0x8004, BATTLE_PIKE_FUNC_GET_ROOM_TYPE
special CallBattlePikeFunction
.endm
@ Sets a bool that's never read
.macro pike_inwildmonroom
setvar VAR_0x8004, BATTLE_PIKE_FUNC_SET_IN_WILD_MON_ROOM
special CallBattlePikeFunction
.endm
@ Clears a bool that's never read
.macro pike_exitwildmonroom
setvar VAR_0x8004, BATTLE_PIKE_FUNC_CLEAR_IN_WILD_MON_ROOM
special CallBattlePikeFunction
.endm
@ Save the game and set the challenge status
.macro pike_save challengeStatus:req
setvar VAR_0x8004, BATTLE_PIKE_FUNC_SAVE
setvar VAR_0x8005, \challengeStatus
special CallBattlePikeFunction
.endm
@ Returns the PIKE_STATUS_* to be afflicted for the status room
.macro pike_getstatus
setvar VAR_0x8004, BATTLE_PIKE_FUNC_GET_ROOM_STATUS
special CallBattlePikeFunction
.endm
@ Returns the PIKE_STATUSMON_* that attacks the player for the status room
.macro pike_getstatusmon
setvar VAR_0x8004, BATTLE_PIKE_FUNC_GET_ROOM_STATUS_MON
special CallBattlePikeFunction
.endm
@ Randomly heals either one or two party mons and returns the number of mons healed
.macro pike_healonetwomons
setvar VAR_0x8004, BATTLE_PIKE_FUNC_HEAL_ONE_TWO_MONS
special CallBattlePikeFunction
.endm
@ Buffers a message for the lone NPC in the NPC room to gStringVar4
.macro pike_getnpcmsg
setvar VAR_0x8004, BATTLE_PIKE_FUNC_BUFFER_NPC_MSG
special CallBattlePikeFunction
.endm
@ Flashes the screen 3 times for when the Dusclops/Kirlia attacks the player
.macro pike_flashscreen
setvar VAR_0x8004, BATTLE_PIKE_FUNC_STATUS_SCREEN_FLASH
special CallBattlePikeFunction
.endm
@ TRUE if the player is currently in a Battle Pike challenge map
.macro pike_inchallenge
setvar VAR_0x8004, BATTLE_PIKE_FUNC_IS_IN
special CallBattlePikeFunction
.endm
@ Set which room to give a hint about. TRUE if its the Pike Queens room next
.macro pike_sethintroom
setvar VAR_0x8004, BATTLE_PIKE_FUNC_SET_HINT_ROOM
special CallBattlePikeFunction
.endm
@ Get PIKE_ROOM_(LEFT/CENTER/RIGHT) for which room to give a hint about
.macro pike_gethintroomid
setvar VAR_0x8004, BATTLE_PIKE_FUNC_GET_HINT_ROOM_ID
special CallBattlePikeFunction
.endm
@ Get the PIKE_HINT_* to give about the next room
.macro pike_gethint
setvar VAR_0x8004, BATTLE_PIKE_FUNC_GET_ROOM_TYPE_HINT
special CallBattlePikeFunction
.endm
@ Reset the frontier trainer ids for the start of the challenge
.macro pike_cleartrainerids
setvar VAR_0x8004, BATTLE_PIKE_FUNC_CLEAR_TRAINER_IDS
special CallBattlePikeFunction
.endm
@ Buffer the opponents battle intro speech to gStringVar4. \trainer 0 for Trainer A, 1 for Trainer B
.macro pike_gettrainerintro trainer:req
setvar VAR_0x8004, BATTLE_PIKE_FUNC_GET_TRAINER_INTRO
setvar VAR_0x8005, \trainer
special CallBattlePikeFunction
.endm
@ Get the status of the Pike Queen (Not ready, Silver/Gold streak before symbols, Silver/Gold streak after symbols)
.macro pike_getbrainstatus
setvar VAR_0x8004, BATTLE_PIKE_FUNC_GET_QUEEN_FIGHT_TYPE
special CallBattlePikeFunction
.endm
@ Heal 0-2 party mons depending on which room was chosen for the Pike Queen battle. Return the number healed
.macro pike_prequeenheal
setvar VAR_0x8004, BATTLE_PIKE_FUNC_HEAL_MONS_BEFORE_QUEEN
special CallBattlePikeFunction
.endm
@ When \set is TRUE, prevent healing rooms from appearing (for 1st room or when party is full health). \set FALSE to re-enable healing rooms
.macro pike_nohealing set:req
setvar VAR_0x8004, BATTLE_PIKE_FUNC_SET_HEAL_ROOMS_DISABLED
setvar VAR_0x8005, \set
special CallBattlePikeFunction
.endm
@ TRUE if the party is full health (full HP, PP, and no status), FALSE otherwise
.macro pike_ispartyfullhealth
setvar VAR_0x8004, BATTLE_PIKE_FUNC_IS_PARTY_FULL_HEALTH
special CallBattlePikeFunction
.endm
@ Save the party held items in pikeHeldItemsBackup
.macro pike_savehelditems
setvar VAR_0x8004, BATTLE_PIKE_FUNC_SAVE_HELD_ITEMS
special CallBattlePikeFunction
.endm
@ Restore the party held items from pikeHeldItemsBackup
.macro pike_resethelditems
setvar VAR_0x8004, BATTLE_PIKE_FUNC_RESET_HELD_ITEMS
special CallBattlePikeFunction
.endm
@ Initialize the Battle Pike challenge
.macro pike_init
setvar VAR_0x8004, BATTLE_PIKE_FUNC_INIT
special CallBattlePikeFunction
.endm
@@ -1,104 +0,0 @@
@ Initialize the Battle Pyramid challenge
.macro pyramid_init
setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_INIT
special CallBattlePyramidFunction
.endm
@ Get the value of some PYRAMID_DATA_*. See GetBattlePyramidData for the data types that can be retrieved
.macro pyramid_get data:req
setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_GET_DATA
setvar VAR_0x8005, \data
special CallBattlePyramidFunction
.endm
@ Set some PYRAMID_DATA_* to val. See SetBattlePyramidData for the data types that can be set
.macro pyramid_set data:req, val:req
setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_SET_DATA
setvar VAR_0x8005, \data
setvar VAR_0x8006, \val
special CallBattlePyramidFunction
.endm
@ Save the game and set the challenge status
.macro pyramid_save challengeStatus:req
setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_SAVE
setvar VAR_0x8005, \challengeStatus
special CallBattlePyramidFunction
.endm
@ Set the prize item to give from one of two lists of possible prizes, depending on streak.
.macro pyramid_setprize
setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_SET_PRIZE
special CallBattlePyramidFunction
.endm
@ Unused. Give the set prize item to the player. TRUE if room in Bag for prize, FALSE otherwise
.macro pyramid_giveprize
setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_GIVE_PRIZE
special CallBattlePyramidFunction
.endm
@ Set the random values for the floor (used to determine object positions, e.g.), and clear trainer flags
.macro pyramid_seedfloor
setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_SEED_FLOOR
special CallBattlePyramidFunction
.endm
@ Set the item to pick up depending on the random seed and quantity (always 1) to the arguments for STD_FIND_ITEM
.macro pyramid_setitem
setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_SET_ITEM
special CallBattlePyramidFunction
.endm
@ Hide the picked-up item (technically it moves the item far offscreen)
.macro pyramid_hideitem
setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_HIDE_ITEM
special CallBattlePyramidFunction
.endm
@ Set the facility trainers to gBattleFrontierTrainers
.macro pyramid_settrainers
setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_SET_TRAINERS
special CallBattlePyramidFunction
.endm
@ Show the post-battle hint text
.macro pyramid_showhint
setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_SHOW_HINT_TEXT
special CallBattlePyramidFunction
.endm
@ VAR_RESULT is 1 if player is on a Pyramid floor, 2 if on the Pyramid peak, 0 otherwise
.macro pyramid_getlocation
setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_CURRENT_LOCATION
special CallBattlePyramidFunction
.endm
@ Update the light around the player. 2 different modes, for setting or incrementing light. See PYRAMID_LIGHT_*
.macro pyramid_updatelight radius:req, mode:req, sound=0xFFFF
setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_UPDATE_LIGHT
setvar VAR_0x8005, \radius
setvar VAR_0x8006, \mode
.if \sound != 0xFFFF
setvar VAR_0x8007, \sound
.endif
special CallBattlePyramidFunction
.endm
@ Reset the held items to what they were at the start of the challenge
.macro pyramid_clearhelditems
setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_CLEAR_HELD_ITEMS
special CallBattlePyramidFunction
.endm
@ Set the palette depending on current floor number
.macro pyramid_setfloorpal
setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_SET_FLOOR_PALETTE
special CallBattlePyramidFunction
.endm
@ Reset sketched moves and update the party order in the saveblock
.macro pyramid_resetparty
setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_RESTORE_PARTY
special CallBattlePyramidFunction
.endm
@@ -1,91 +0,0 @@
@ Initialize the Battle Tower challenge
.macro tower_init
setvar VAR_0x8004, BATTLE_TOWER_FUNC_INIT
special CallBattleTowerFunc
.endm
@ Get the value of some TOWER_DATA_*. See GetTowerData for the data types that can be retrieved
.macro tower_get data:req
setvar VAR_0x8004, BATTLE_TOWER_FUNC_GET_DATA
setvar VAR_0x8005, \data
special CallBattleTowerFunc
.endm
@ Set some TOWER_DATA_* to val. See SetTowerData for the data types that can be set
.macro tower_set data:req, val=0xFFFF
setvar VAR_0x8004, BATTLE_TOWER_FUNC_SET_DATA
setvar VAR_0x8005, \data
.if \val != 0xFFFF
setvar VAR_0x8006, \val
.endif
special CallBattleTowerFunc
.endm
@ Choose and set the gfx for the next opponent. Also used by Battle Tents
.macro tower_setopponent
setvar VAR_0x8004, BATTLE_TOWER_FUNC_SET_OPPONENT
special CallBattleTowerFunc
.endm
@ Increments the battle number and returns the new one. Also clears E-Reader trainer if defeated, and saves the current win streak
.macro tower_setbattlewon
setvar VAR_0x8004, BATTLE_TOWER_FUNC_SET_BATTLE_WON
special CallBattleTowerFunc
.endm
@ Try to award ribbons for completing 56th straight Battle Tower win. VAR_RESULT is TRUE if ribbons were awarded.
.macro tower_giveribbons
setvar VAR_0x8004, BATTLE_TOWER_FUNC_GIVE_RIBBONS
special CallBattleTowerFunc
.endm
@ Save the game and set the challenge status
.macro tower_save challengeStatus:req
setvar VAR_0x8004, BATTLE_TOWER_FUNC_SAVE
setvar VAR_0x8005, \challengeStatus
special CallBattleTowerFunc
.endm
@ Buffer the opponent's easy chat intro speech to STR_VAR_4
.macro tower_getopponentintro opponent:req
setvar VAR_0x8004, BATTLE_TOWER_FUNC_GET_OPPONENT_INTRO
setvar VAR_0x8005, \opponent
special CallBattleTowerFunc
.endm
@ Load the parties, gfx, and other data (like Apprentice id) for the multi partner candidates
.macro tower_loadpartners
setvar VAR_0x8004, BATTLE_TOWER_FUNC_LOAD_PARTNERS
special CallBattleTowerFunc
.endm
@ Print message from potential multi partner. msgId is any PARTNER_MSGID_*
.macro tower_dopartnermsg msgId:req
setvar VAR_0x8004, BATTLE_TOWER_FUNC_PARTNER_MSG
setvar VAR_0x8005, \msgId
special CallBattleTowerFunc
.endm
@ Receives/loads the opponent data for a link multi challenge. Returns 6 when finished, and finishes immediately if not doing a link multi battle.
.macro tower_loadlinkopponents
setvar VAR_0x8004, BATTLE_TOWER_FUNC_LOAD_LINK_OPPONENTS
special CallBattleTowerFunc
.endm
@ Attempts to close link connection. Used when finishing a link multi challenge.
.macro tower_closelink
setvar VAR_0x8004, BATTLE_TOWER_FUNC_TRY_CLOSE_LINK
special CallBattleTowerFunc
.endm
@ Set VAR_OBJ_GFX_ID_E to the gfx id of the selected multi partner
.macro tower_setpartnergfx
setvar VAR_0x8004, BATTLE_TOWER_FUNC_SET_PARTNER_GFX
special CallBattleTowerFunc
.endm
@ Set the data used for the post-challenge Battle Tower interview
.macro tower_setinterviewdata
setvar VAR_0x8004, BATTLE_TOWER_FUNC_SET_INTERVIEW_DATA
special CallBattleTowerFunc
.endm
@@ -1,159 +0,0 @@
@ Get the status (CHALLENGE_STATUS_*) of the current challenge and store the result in VAR_TEMP_CHALLENGE_STATUS
.macro frontier_getstatus
setvar VAR_0x8004, FRONTIER_UTIL_FUNC_GET_STATUS
special CallFrontierUtilFunc
.endm
@ Get the value of some FRONTIER_DATA_*. See GetFrontierData for the data types that can be retrieved
.macro frontier_get data:req
setvar VAR_0x8004, FRONTIER_UTIL_FUNC_GET_DATA
setvar VAR_0x8005, \data
special CallFrontierUtilFunc
.endm
@ Set the value of some FRONTIER_DATA_*. Some data types do not need a val argument because the value is set directly from somewhere else. See SetFrontierData for the data types that can be set
.macro frontier_set data:req, val=0xFFFF
setvar VAR_0x8004, FRONTIER_UTIL_FUNC_SET_DATA
setvar VAR_0x8005, \data
.if \val == 0xFFFF
@ no value provided
.elseif \val >= VARS_START
copyvar VAR_0x8006, \val
.else
setvar VAR_0x8006, \val
.endif
special CallFrontierUtilFunc
.endm
@ Load the selected mons into gSelectedOrderFromParty and reduce the players party to these mons
.macro frontier_setpartyorder partySize:req
setvar VAR_0x8004, FRONTIER_UTIL_FUNC_SET_PARTY_ORDER
setvar VAR_0x8005, \partySize
special CallFrontierUtilFunc
.endm
@ Performs a soft reset
.macro frontier_reset
setvar VAR_0x8004, FRONTIER_UTIL_FUNC_SOFT_RESET
special CallFrontierUtilFunc
.endm
@ Loads gBattleFrontierTrainers into gFacilityTrainers
.macro frontier_settrainers
setvar VAR_0x8004, FRONTIER_UTIL_FUNC_SET_TRAINERS
special CallFrontierUtilFunc
.endm
@ Sets the selected party mons in the saveblock
.macro frontier_saveparty
setvar VAR_0x8004, FRONTIER_UTIL_FUNC_SAVE_PARTY
special CallFrontierUtilFunc
.endm
@ Shows the results window for the given facility and mode. Facilities with only 1 mode dont provide the mode argument
.macro frontier_results facility:req, mode=0xFF
setvar VAR_0x8004, FRONTIER_UTIL_FUNC_RESULTS_WINDOW
setvar VAR_0x8005, \facility
.if \mode != 0xFF
setvar VAR_0x8006, \mode
.endif
special CallFrontierUtilFunc
.endm
@ Checks if the Battle Frontier TV special should air, and if so attempts to set it up
.macro frontier_checkairshow
setvar VAR_0x8004, FRONTIER_UTIL_FUNC_CHECK_AIR_TV_SHOW
special CallFrontierUtilFunc
.endm
@ Get the status of the Frontier Brain (Not ready, Silver/Gold streak before symbols, Silver/Gold streak after symbols)
.macro frontier_getbrainstatus
setvar VAR_0x8004, FRONTIER_UTIL_FUNC_GET_BRAIN_STATUS
special CallFrontierUtilFunc
.endm
@ TRUE if the opponent is a Frontier Brain, FALSE otherwise
.macro frontier_isbrain
setvar VAR_0x8004, FRONTIER_UTIL_FUNC_IS_BRAIN
special CallFrontierUtilFunc
.endm
@ Awards battle points depending on the current challenge
.macro frontier_givepoints
setvar VAR_0x8004, FRONTIER_UTIL_FUNC_GIVE_BATTLE_POINTS
special CallFrontierUtilFunc
.endm
@ Returns 0-2 for the number of facility symbols the player has
.macro frontier_getsymbols
setvar VAR_0x8004, FRONTIER_UTIL_FUNC_GET_FACILITY_SYMBOLS
special CallFrontierUtilFunc
.endm
@ Awards a frontier symbol depending on the current challenge
.macro frontier_givesymbol
setvar VAR_0x8004, FRONTIER_UTIL_FUNC_GIVE_FACILITY_SYMBOL
special CallFrontierUtilFunc
.endm
@ TRUE if the given battleType is set in gBattleTypeFlags, FALSE otherwise
.macro frontier_isbattletype battleType:req
setvar VAR_0x8004, FRONTIER_UTIL_FUNC_CHECK_BATTLE_TYPE
setvar VAR_0x8005, \battleType
special CallFrontierUtilFunc
.endm
@ TRUE if there are insufficient eligible party mons to participate in the challenge, and buffers caught ineligible species to STR_VAR_1. FALSE otherwise. The return value is stored in VAR_0x8004 instead, and the current level mode is expected to be in VAR_RESULT
.macro frontier_checkineligible
setvar VAR_0x8004, FRONTIER_UTIL_FUNC_CHECK_INELIGIBLE
special CallFrontierUtilFunc
.endm
@ Validates the visiting E-Reader trainer. 0 if valid, 1 if not
.macro frontier_checkvisittrainer
setvar VAR_0x8004, FRONTIER_UTIL_FUNC_CHECK_VISIT_TRAINER
special CallFrontierUtilFunc
.endm
@ Increments the current win streak by 1
.macro frontier_incrementstreak
setvar VAR_0x8004, FRONTIER_UTIL_FUNC_INCREMENT_STREAK
special CallFrontierUtilFunc
.endm
@ Resets the party held items to what they were upon entering the challenge
.macro frontier_restorehelditems
setvar VAR_0x8004, FRONTIER_UTIL_FUNC_RESTORE_HELD_ITEMS
special CallFrontierUtilFunc
.endm
@ Move the recorded battle to save data
.macro frontier_savebattle
setvar VAR_0x8004, FRONTIER_UTIL_FUNC_SAVE_BATTLE
special CallFrontierUtilFunc
.endm
@ Buffer the name of gTrainerBattleOpponent_A in STR_VAR_1 (0) or STR_VAR_2 (1)
.macro frontier_gettrainername stringVar:req
setvar VAR_0x8004, FRONTIER_UTIL_FUNC_BUFFER_TRAINER_NAME
.if \stringVar == STR_VAR_1
setvar VAR_0x8005, 0
.elseif \stringVar == STR_VAR_2
setvar VAR_0x8005, 1
.else
setvar VAR_0x8005, \stringVar
.endif
special CallFrontierUtilFunc
.endm
@ If any moves were copied using Sketch during the challenge then restore them to Sketch
.macro frontier_resetsketch
setvar VAR_0x8004, FRONTIER_UTIL_FUNC_RESET_SKETCH_MOVES
special CallFrontierUtilFunc
.endm
@ Set the object event gfx of the Frontier Brain for the current facility
.macro frontier_setbrainobj
setvar VAR_0x8004, FRONTIER_UTIL_FUNC_SET_BRAIN_OBJECT
special CallFrontierUtilFunc
.endm
File diff suppressed because it is too large Load Diff
-167
View File
@@ -1,167 +0,0 @@
@ Verdanturf Tent
@ Initialize the Verdanturf Battle Tent challenge
.macro verdanturftent_init
setvar VAR_0x8004, VERDANTURF_TENT_FUNC_INIT
special CallVerdanturfTentFunction
.endm
@ Get the current prize item id
.macro verdanturftent_getprize
setvar VAR_0x8004, VERDANTURF_TENT_FUNC_GET_PRIZE
special CallVerdanturfTentFunction
.endm
@ Unused. Set the prize item to be given
.macro verdanturftent_setprize unusedArg:req, itemId:req
setvar VAR_0x8004, VERDANTURF_TENT_FUNC_SET_PRIZE
setvar VAR_0x8005, \unusedArg
setvar VAR_0x8006, \itemId
special CallVerdanturfTentFunction
.endm
@ Unused. Set the opponent trainer and gfx. SetNextBattleTentOpponent is used through tower_setopponent instead
.macro verdanturftent_setopponentgfx
setvar VAR_0x8004, VERDANTURF_TENT_FUNC_SET_OPPONENT_GFX
special CallVerdanturfTentFunction
.endm
@ Buffers the opponents intro speech to STR_VAR_4. Despite being a Verdanturf Tent function, it serves the same purpose for all 3 tents.
.macro battletent_getopponentintro
setvar VAR_0x8004, VERDANTURF_TENT_FUNC_GET_OPPONENT_INTRO
special CallVerdanturfTentFunction
.endm
@ Save the game and set the challenge status
.macro verdanturftent_save challengeStatus:req
setvar VAR_0x8004, VERDANTURF_TENT_FUNC_SAVE
setvar VAR_0x8005, \challengeStatus
special CallVerdanturfTentFunction
.endm
@ Set the prize item as randomly selected from a list. Randomness unnecessary, as the list is only 1 item
.macro verdanturftent_setrandomprize
setvar VAR_0x8004, VERDANTURF_TENT_FUNC_SET_RANDOM_PRIZE
special CallVerdanturfTentFunction
.endm
@ Give the current prize item. FALSE if no room for prize
.macro verdanturftent_giveprize
setvar VAR_0x8004, VERDANTURF_TENT_FUNC_GIVE_PRIZE
special CallVerdanturfTentFunction
.endm
@ Fallarbor Tent
@ Initialize the Fallarbor Battle Tent challenge
.macro fallarbortent_init
setvar VAR_0x8004, FALLARBOR_TENT_FUNC_INIT
special CallFallarborTentFunction
.endm
@ Get the current prize item id
.macro fallarbortent_getprize
setvar VAR_0x8004, FALLARBOR_TENT_FUNC_GET_PRIZE
special CallFallarborTentFunction
.endm
@ Unused. Set the prize item to be given
.macro fallarbortent_setprize unusedArg:req, itemId:req
setvar VAR_0x8004, FALLARBOR_TENT_FUNC_SET_PRIZE
setvar VAR_0x8005, \unusedArg
setvar VAR_0x8006, \itemId
special CallFallarborTentFunction
.endm
@ Save the game and set the challenge status
.macro fallarbortent_save challengeStatus:req
setvar VAR_0x8004, FALLARBOR_TENT_FUNC_SAVE
setvar VAR_0x8005, \challengeStatus
special CallFallarborTentFunction
.endm
@ Set the prize item as randomly selected from a list. Randomness unnecessary, as the list is only 1 item
.macro fallarbortent_setrandomprize
setvar VAR_0x8004, FALLARBOR_TENT_FUNC_SET_RANDOM_PRIZE
special CallFallarborTentFunction
.endm
@ Give the current prize item. FALSE if no room for prize
.macro fallarbortent_giveprize
setvar VAR_0x8004, FALLARBOR_TENT_FUNC_GIVE_PRIZE
special CallFallarborTentFunction
.endm
@ Buffer the opponent trainers name to STR_VAR_1
.macro fallarbortent_getopponentname
setvar VAR_0x8004, FALLARBOR_TENT_FUNC_GET_OPPONENT_NAME
special CallFallarborTentFunction
.endm
@ Slateport Tent
@ Initialize the Slateport Battle Tent challenge
.macro slateporttent_init
setvar VAR_0x8004, SLATEPORT_TENT_FUNC_INIT
special CallSlateportTentFunction
.endm
@ Get the current prize item id
.macro slateporttent_getprize
setvar VAR_0x8004, SLATEPORT_TENT_FUNC_GET_PRIZE
special CallSlateportTentFunction
.endm
@ Unused. Set the prize item to be given
.macro slateporttent_setprize unusedArg:req, itemId:req
setvar VAR_0x8004, SLATEPORT_TENT_FUNC_SET_PRIZE
setvar VAR_0x8005, \unusedArg
setvar VAR_0x8006, \itemId
special CallSlateportTentFunction
.endm
@ Save the game and set the challenge status
.macro slateporttent_save challengeStatus:req
setvar VAR_0x8004, SLATEPORT_TENT_FUNC_SAVE
setvar VAR_0x8005, \challengeStatus
special CallSlateportTentFunction
.endm
@ Set the prize item as randomly selected from a list. Randomness unnecessary, as the list is only 1 item
.macro slateporttent_setrandomprize
setvar VAR_0x8004, SLATEPORT_TENT_FUNC_SET_RANDOM_PRIZE
special CallSlateportTentFunction
.endm
@ Give the current prize item. FALSE if no room for prize
.macro slateporttent_giveprize
setvar VAR_0x8004, SLATEPORT_TENT_FUNC_GIVE_PRIZE
special CallSlateportTentFunction
.endm
@ Slateport Tent's version of factory_rentmons
.macro slateporttent_rentmons
setvar VAR_0x8004, SLATEPORT_TENT_FUNC_SELECT_RENT_MONS
special CallSlateportTentFunction
.endm
@ Slateport Tent's version of factory_swapmons
.macro slateporttent_swapmons
setvar VAR_0x8004, SLATEPORT_TENT_FUNC_SWAP_RENT_MONS
special CallSlateportTentFunction
.endm
@ Slateport Tent's version of factory_generateopponentmons
.macro slateporttent_generateopponentmons
setvar VAR_0x8004, SLATEPORT_TENT_FUNC_GENERATE_OPPONENT_MONS
special CallSlateportTentFunction
.endm
@ Slateport Tent's version of factory_generaterentalmons
.macro slateporttent_generaterentalmons
setvar VAR_0x8004, SLATEPORT_TENT_FUNC_GENERATE_RENTAL_MONS
special CallSlateportTentFunction
.endm
-871
View File
@@ -1,871 +0,0 @@
@ A large number of the Contest AI commands go unused, so their corresponding macros in this file are similarly unused
@ Add a positive/negative value to the score of the move being evaluated.
.macro score score:req
.byte 0x00
.byte \score
.endm
.macro get_appeal_num
.byte 0x01
.endm
.macro if_appeal_num_less_than num:req, destination:req
.byte 0x02
.byte \num
.4byte \destination
.endm
.macro if_appeal_num_more_than num:req, destination:req
.byte 0x03
.byte \num
.4byte \destination
.endm
.macro if_appeal_num_eq num:req, destination:req
.byte 0x04
.byte \num
.4byte \destination
.endm
.macro if_appeal_num_not_eq num:req, destination:req
.byte 0x05
.byte \num
.4byte \destination
.endm
.macro if_last_appeal destination:req
if_appeal_num_eq CONTEST_LAST_APPEAL, \destination
.endm
.macro if_not_last_appeal destination:req
if_appeal_num_not_eq CONTEST_LAST_APPEAL, \destination
.endm
@ audience excitement
.macro get_excitement
.byte 0x06
.endm
.macro if_excitement_less_than num:req, destination:req
.byte 0x07
.byte \num
.4byte \destination
.endm
.macro if_excitement_more_than num:req, destination:req
.byte 0x08
.byte \num
.4byte \destination
.endm
.macro if_excitement_eq num:req, destination:req
.byte 0x09
.byte \num
.4byte \destination
.endm
.macro if_excitement_not_eq num:req, destination:req
.byte 0x0A
.byte \num
.4byte \destination
.endm
@ the order that the user goes in the current appeal
.macro get_user_order
.byte 0x0B
.endm
.macro if_user_order_less_than num:req, destination:req
.byte 0x0C
.byte \num
.4byte \destination
.endm
.macro if_user_order_more_than num:req, destination:req
.byte 0x0D
.byte \num
.4byte \destination
.endm
.macro if_user_order_eq num:req, destination:req
.byte 0x0E
.byte \num
.4byte \destination
.endm
.macro if_user_order_not_eq num:req, destination:req
.byte 0x0F
.byte \num
.4byte \destination
.endm
@ user condition
.macro get_user_condition
.byte 0x10
.endm
.macro if_user_condition_less_than num:req, destination:req
.byte 0x11
.byte \num
.4byte \destination
.endm
.macro if_user_condition_more_than num:req, destination:req
.byte 0x12
.byte \num
.4byte \destination
.endm
.macro if_user_condition_eq num:req, destination:req
.byte 0x13
.byte \num
.4byte \destination
.endm
.macro if_user_condition_not_eq num:req, destination:req
.byte 0x14
.byte \num
.4byte \destination
.endm
@ appeal points
.macro get_point_total
.byte 0x15
.endm
.macro if_points_less_than num:req, destination:req
.byte 0x16
.2byte \num
.4byte \destination
.endm
.macro if_points_more_than num:req, destination:req
.byte 0x17
.2byte \num
.4byte \destination
.endm
.macro if_points_eq num:req, destination:req
.byte 0x18
.2byte \num
.4byte \destination
.endm
.macro if_points_not_eq num:req, destination:req
.byte 0x19
.2byte \num
.4byte \destination
.endm
@ preliminary (pre-appeal) judging points
.macro get_preliminary_points
.byte 0x1A
.endm
.macro if_preliminary_points_less_than num:req, destination:req
.byte 0x1B
.2byte \num
.4byte \destination
.endm
.macro if_preliminary_points_more_than num:req, destination:req
.byte 0x1C
.2byte \num
.4byte \destination
.endm
.macro if_preliminary_points_eq num:req, destination:req
.byte 0x1D
.2byte \num
.4byte \destination
.endm
.macro if_preliminary_points_not_eq num:req, destination:req
.byte 0x1E
.2byte \num
.4byte \destination
.endm
@ contest type
.macro get_contest_type
.byte 0x1F
.endm
.macro if_contest_type_eq type:req, destination:req
.byte 0x20
.byte \type
.4byte \destination
.endm
.macro if_contest_type_not_eq type:req, destination:req
.byte 0x21
.byte \type
.4byte \destination
.endm
@ move excitement (change in excitement due to move)
.macro get_move_excitement
.byte 0x22
.endm
.macro if_move_excitement_less_than num:req, destination:req
.byte 0x23
.byte \num
.4byte \destination
.endm
.macro if_move_excitement_more_than num:req, destination:req
.byte 0x24
.byte \num
.4byte \destination
.endm
.macro if_move_excitement_eq num:req, destination:req
.byte 0x25
.byte \num
.4byte \destination
.endm
.macro if_move_excitement_not_eq num:req, destination:req
.byte 0x26
.byte \num
.4byte \destination
.endm
@ move effect
.macro get_effect
.byte 0x27
.endm
.macro if_effect_eq effect:req, destination:req
.byte 0x28
.byte \effect
.4byte \destination
.endm
.macro if_effect_not_eq effect:req, destination:req
.byte 0x29
.byte \effect
.4byte \destination
.endm
@ move effect type
.macro get_effect_type
.byte 0x2A
.endm
.macro if_effect_type_eq type:req, destination:req
.byte 0x2B
.byte \type
.4byte \destination
.endm
.macro if_effect_type_not_eq type:req, destination:req
.byte 0x2C
.byte \type
.4byte \destination
.endm
@ whether the current move is the most appealing in the user's moveset
.macro check_most_appealing_move
.byte 0x2D
.endm
.macro if_most_appealing_move destination:req
.byte 0x2E
.4byte \destination
.endm
@ whether the current move is the most jamming in the user's moveset
.macro check_most_jamming_move
.byte 0x2F
.endm
.macro if_most_jamming_move destination:req
.byte 0x30
.4bye \destination
.endm
@ number of hearts the current move's appeal would provide
.macro get_num_move_hearts
.byte 0x31
.endm
.macro if_num_move_hearts_less_than num:req, destination:req
.byte 0x32
.byte \num
.4byte \destination
.endm
.macro if_num_move_hearts_more_than num:req, destination:req
.byte 0x33
.byte \num
.4byte \destination
.endm
.macro if_num_move_hearts_eq num:req, destination:req
.byte 0x34
.byte \num
.4byte \destination
.endm
.macro if_num_move_hearts_not_eq num:req, destination:req
.byte 0x35
.byte \num
.4byte \destination
.endm
@ number of hearts the current move's jam would remove
.macro get_num_move_jam_hearts
.byte 0x36
.endm
.macro if_num_move_jam_hearts_less_than num:req, destination:req
.byte 0x37
.byte \num
.4byte \destination
.endm
.macro if_num_move_jam_hearts_more_than num:req, destination:req
.byte 0x38
.byte \num
.4byte \destination
.endm
.macro if_num_move_jam_hearts_eq num:req, destination:req
.byte 0x39
.byte \num
.4byte \destination
.endm
.macro if_num_move_jam_hearts_not_eq num:req, destination:req
.byte 0x3A
.byte \num
.4byte \destination
.endm
@ number of times current move has been used
.macro get_move_used_count
.byte 0x3B
.endm
.macro if_move_used_count_less_than num:req, destination:req
.byte 0x3C
.byte \num
.4byte \destination
.endm
.macro if_move_used_count_more_than num:req, destination:req
.byte 0x3D
.byte \num
.4byte \destination
.endm
.macro if_move_used_count_eq num:req, destination:req
.byte 0x3E
.byte \num
.4byte \destination
.endm
.macro if_move_used_count_not_eq num:req, destination:req
.byte 0x3F
.byte \num
.4byte \destination
.endm
@ whether the current move is a combo starter (with another move in the moveset)
.macro check_combo_starter
.byte 0x40
.endm
.macro if_combo_starter destination:req
.byte 0x41
.4byte \destination
.endm
.macro if_not_combo_starter destination:req
.byte 0x42
.4byte \destination
.endm
@ whether the current move is a combo finisher (with another move in the moveset)
.macro check_combo_finisher
.byte 0x43
.endm
.macro if_combo_finisher destination:req
.byte 0x44
.4byte \destination
.endm
.macro if_not_combo_finisher destination:req
.byte 0x45
.4byte \destination
.endm
@ whether the current move would finish a combo
.macro check_would_finish_combo
.byte 0x46
.endm
.macro if_would_finish_combo destination:req
.byte 0x47
.4byte \destination
.endm
.macro if_would_not_finish_combo destination:req
.byte 0x48
.4byte \destination
.endm
@ condition of mon (indexed by order)
.macro get_condition mon:req
.byte 0x49
.byte \mon
.endm
.macro if_condition_less_than mon:req, num:req destination:req
.byte 0x4A
.byte \mon
.byte \num
.4byte \destination
.endm
.macro if_condition_more_than mon:req, num:req, destination:req
.byte 0x4B
.byte \mon
.byte \num
.4byte \destination
.endm
.macro if_condition_eq mon:req, num:req, destination:req
.byte 0x4C
.byte \mon
.byte \num
.4byte \destination
.endm
.macro if_condition_not_eq mon:req, num:req, destination:req
.byte 0x4D
.byte \mon
.byte \num
.4byte \destination
.endm
@ whether the mon used a combo starter move
@ Even though this value is always 1 or 0 (i.e. TRUE/FALSE),
@ there are less-than and greater-than comparison operations for some reason.
.macro get_used_combo_starter mon:req
.byte 0x4E
.byte \mon
.endm
.macro if_used_combo_starter_less_than mon:req, num:req, destination:req
.byte 0x4F
.byte \mon
.byte \num
.4byte \destination
.endm
.macro if_used_combo_starter_more_than mon:req, num:req, destination:req
.byte 0x50
.byte \mon
.byte \num
.4byte \destination
.endm
.macro if_used_combo_starter_eq mon:req, num:req, destination:req
.byte 0x51
.byte \mon
.byte \num
.4byte \destination
.endm
.macro if_used_combo_starter_not_eq mon:req, num:req, destination:req
.byte 0x52
.byte \mon
.byte \num
.4byte \destination
.endm
.macro if_used_combo_starter mon:req, destination:req
if_used_combo_starter_eq \mon, TRUE, \destination
.endm
.macro if_not_used_combo_starter mon:req, destination:req
if_used_combo_starter_eq \mon, FALSE, \destination
.endm
@ whether the mon can make an appeal
.macro check_can_participate mon:req
.byte 0x53
.byte \mon
.endm
.macro if_can_participate mon:req, destination:req
.byte 0x54
.byte \mon
.4byte \destination
.endm
.macro if_cannot_participate mon:req, destination:req
.byte 0x55
.byte \mon
.4byte \destination
.endm
@ whether the mon just completed a combo
.macro get_completed_combo mon:req
.byte 0x56
.byte \mon
.4byte \destination
.endm
.macro if_completed_combo mon:req, destination:req
.byte 0x57
.byte \mon
.4byte \destination
.endm
.macro if_not_completed_combo mon:req destination:req
.byte 0x58
.byte \mon
.4byte \destination
.endm
@ comparing appeal points to another mon
.macro get_points_diff mon:req
.byte 0x59
.byte \mon
.endm
.macro if_points_more_than_mon mon:req, destination:req
.byte 0x5A
.byte \mon
.4byte \destination
.endm
.macro if_points_less_than_mon mon:req, destination:req
.byte 0x5B
.byte \mon
.4byte \destination
.endm
.macro if_points_eq_mon mon:req, destination:req
.byte 0x5C
.byte \mon
.4byte \destination
.endm
.macro if_points_not_eq_mon mon:req, destination:req
.byte 0x5D
.byte \mon
.4byte \destination
.endm
@ comparing preliminary judging points to another mon
.macro get_preliminary_points_diff mon:req
.byte 0x5E
.byte \mon
.endm
.macro if_preliminary_points_more_than_mon mon:req, destination:req
.byte 0x5F
.byte \mon
.4byte \destination
.endm
.macro if_preliminary_points_less_than_mon mon:req, destination:req
.byte 0x60
.byte \mon
.4byte \destination
.endm
.macro if_preliminary_points_eq_mon mon:req, destination:req
.byte 0x61
.byte \mon
.4byte \destination
.endm
.macro if_preliminary_points_not_eq_mon mon:req, destination:req
.byte 0x62
.byte \mon
.4byte \destination
.endm
@ checking move history for move effect
.macro get_used_moves_effect mon:req, round:req
.byte 0x63
.byte \mon
.byte \round
.endm
.macro if_used_moves_effect_less_than mon:req, round:req, effect:req, destination:req
.byte 0x64
.byte \mon
.byte \round
.byte \effect
.4byte \destination
.endm
.macro if_used_moves_effect_more_than mon:req, round:req, effect:req, destination:req
.byte 0x65
.byte \mon
.byte \round
.byte \effect
.4byte \destination
.endm
.macro if_used_moves_effect_eq mon:req, round:req, effect:req, destination:req
.byte 0x66
.byte \mon
.byte \round
.byte \effect
.4byte \destination
.endm
.macro if_used_moves_effect_not_eq mon:req, round:req, effect:req, destination:req
.byte 0x67
.byte \mon
.byte \round
.byte \effect
.4byte \destination
.endm
@ checking move history for excitement
.macro get_used_moves_excitement mon:req, round:req
.byte 0x68
.byte \mon
.byte \round
.endm
.macro if_used_moves_excitement_less_than mon:req, round:req, num:req, destination:req
.byte 0x69
.byte \mon
.byte \round
.byte \num
.4byte \destination
.endm
.macro if_used_moves_excitement_more_than mon:req, round:req, num:req, destination:req
.byte 0x6A
.byte \mon
.byte \round
.byte \num
.4byte \destination
.endm
.macro if_used_moves_excitement_eq mon:req, round:req, num:req, destination:req
.byte 0x6B
.byte \mon
.byte \round
.byte \num
.4byte \destination
.endm
.macro if_used_moves_excitement_not_eq mon:req, round:req, num:req, destination:req
.byte 0x6C
.byte \mon
.byte \round
.byte \num
.4byte \destination
.endm
@ checking move history for effect type
.macro get_used_moves_effect_type mon:req, round:req
.byte 0x6D
.byte \mon
.byte \round
.endm
.macro if_used_moves_effect_type_eq mon:req, round:req, type:req, destination:req
.byte 0x6E
.byte \mon
.byte \round
.byte \type
.4byte \destination
.endm
.macro if_used_moves_effect_type_not_eq mon:req, round:req, type:req, destination:req
.byte 0x6F
.byte \mon
.byte \round
.byte \type
.4byte \destination
.endm
@ generic commands
.macro save_result varId:req
.byte 0x70
.byte \varId
.endm
.macro setvar varId:req, num:req
.byte 0x71
.byte \varId
.2byte \num
.endm
.macro add varId:req, num:req
.byte 0x72
.byte \varId
.2byte \num
.endm
.macro addvar varId1:req, varId2:req
.byte 0x73
.byte \varId1
.byte \varId2
.endm
@ Duplicate of above
.macro addvar_duplicate varId1:req, varId2:req
.byte 0x74
.byte \varId1
.byte \varId2
.endm
.macro if_less_than varId:req, num:req, destination:req
.byte 0x75
.byte \varId
.2byte \num
.4byte \destination
.endm
.macro if_greater_than varId:req, num:req, destination:req
.byte 0x76
.byte \varId
.2byte \num
.4byte \destination
.endm
.macro if_eq varId:req, num:req, destination:req
.byte 0x77
.byte \varId
.2byte \num
.4byte \destination
.endm
.macro if_not_eq varId:req, num:req, destination:req
.byte 0x78
.byte \varId
.2byte \num
.4byte \destination
.endm
.macro if_less_than_var varId1:req, varId2:req, destination:req
.byte 0x79
.byte \varId1
.byte \varId2
.4byte \destination
.endm
.macro if_greater_than_var varId1:req, varId2:req, destination:req
.byte 0x7A
.byte \varId1
.byte \varId2
.4byte \destination
.endm
.macro if_eq_var varId1:req, varId2:req, destination:req
.byte 0x7B
.byte \varId1
.byte \varId2
.4byte \destination
.endm
.macro if_not_eq_var varId1:req, varId2:req, destination:req
.byte 0x7C
.byte \varId1
.byte \varId2
.4byte \destination
.endm
@ NOTE: The random commands are broken (see ContestAICmd_if_random_less_than)
.macro if_random_less_than num:req, destination:req
.byte 0x7D
.byte \num
.4byte \destination
.endm
.macro if_random_greater_than num:req, destination:req
.byte 0x7E
.byte \num
.4byte \destination
.endm
.macro goto destination:req
.byte 0x7F
.4byte \destination
.endm
.macro call destination:req
.byte 0x80
.4byte \destination
.endm
.macro end
.byte 0x81
.endm
.macro check_user_has_exciting_move
.byte 0x82
.endm
.macro if_user_has_exciting_move destination:req
.byte 0x83
.4byte \destination
.endm
.macro if_user_doesnt_have_exciting_move destination:req
.byte 0x84
.4byte \destination
.endm
@ This is used incorrectly to check for an effect; see ContestAICmd_check_user_has_move
.macro check_user_has_move move:req
.byte 0x85
.2byte \move
.endm
.macro if_user_has_move move:req, destination:req
.byte 0x86
.2byte \move
.4byte \destination
.endm
.macro if_user_doesnt_have_move move:req, destination:req
.byte 0x87
.2byte \move
.4byte \destination
.endm
-1973
View File
File diff suppressed because it is too large Load Diff
-44
View File
@@ -1,44 +0,0 @@
@ The first .byte argument of each macro below is an index into gFieldEffectScriptFuncs
.macro field_eff_loadtiles address:req
.byte 0
.4byte \address
.endm
.macro field_eff_loadfadedpal address:req
.byte 1
.4byte \address
.endm
.macro field_eff_loadpal address:req
.byte 2
.4byte \address
.endm
.macro field_eff_callnative address:req
.byte 3
.4byte \address
.endm
.macro field_eff_end
.byte 4
.endm
.macro field_eff_loadgfx_callnative tiles_address:req, palette_address:req, function_address:req
.byte 5
.4byte \tiles_address
.4byte \palette_address
.4byte \function_address
.endm
.macro field_eff_loadtiles_callnative tiles_address:req, function_address:req
.byte 6
.4byte \tiles_address
.4byte \function_address
.endm
.macro field_eff_loadfadedpal_callnative palette_address:req, function_address:req
.byte 7
.4byte \palette_address
.4byte \function_address
.endm
-29
View File
@@ -1,29 +0,0 @@
.macro arm_func_start name:req
.align 2, 0
.global \name
.arm
.type \name, %function
.endm
.macro arm_func_end name:req
.size \name, .-\name
.endm
.macro thumb_func_start name:req
.align 2, 0
.global \name
.thumb
.thumb_func
.type \name, %function
.endm
.macro non_word_aligned_thumb_func_start name:req
.global \name
.thumb
.thumb_func
.type \name, %function
.endm
.macro thumb_func_end name:req
.size \name, .-\name
.endm
-51
View File
@@ -1,51 +0,0 @@
.macro song label:req, music_player:req, unknown:req
.4byte \label
.2byte \music_player
.2byte \unknown
.endm
.macro music_player info_struct:req, track_struct:req, num_tracks:req, unknown:req
.4byte \info_struct
.4byte \track_struct
.byte \num_tracks
.space 1 @ Padding
.2byte \unknown
.endm
.macro voice_group label:req, starting_note
.align 2
.ifb \starting_note
.global voicegroup_\label
voicegroup_\label:
.else
.set voicegroup_\label, . - \starting_note * 0xC
.endif
.endm
.macro keysplit label:req, starting_note
.ifb \starting_note
.global keysplit_\label
keysplit_\label:
.set _last_note, 0
.else
.set keysplit_\label, . - \starting_note
.set _last_note, \starting_note
.endif
.set _last_split, 0
.endm
.macro split index:req, ending_note:req
.if \ending_note < _last_note
.if _last_split == 0
.error "split's ending_note earlier than previous keysplit's starting_note"
.else
.error "split's ending_note earlier than previous split's ending_note"
.endif
.else
.rept \ending_note - _last_note
.byte \index
.endr
.endif
.set _last_note, \ending_note
.set _last_split, 1
.endm
-160
View File
@@ -1,160 +0,0 @@
@ Most of the macros in this file are for arranging map event data, and are output by mapjson using data from each map's JSON file.
@ Takes a MAP constant and outputs the map group and map number as separate bytes
.macro map map_id:req
.ifdef \map_id
.byte \map_id >> 8 @ map group
.byte \map_id & 0xFF @ map num
.else
.error "undefined map (check for typos)"
.endif
.endm
@ Defines a map script. 'type' is any MAP_SCRIPT_* constant (see include/constants/map_scripts.h)
.macro map_script type:req, script:req
.byte \type
.4byte \script
.endm
@ Defines an entry in a map script table (for either ON_WARP_INTO_MAP_TABLE or ON_FRAME_TABLE)
.macro map_script_2 var:req, compare:req, script:req
.2byte \var
.2byte \compare
.4byte \script
.endm
@ Defines an object event template for map data, to be used by a normal object. Mirrors the struct layout of ObjectEventTemplate in include/global.fieldmap.h
.macro object_event index:req, gfx:req, x:req, y:req, elevation:req, movement_type:req, x_radius:req, y_radius:req, trainer_type:req, sight_radius_tree_etc:req, script:req, event_flag:req
.byte \index
.byte \gfx
.byte OBJ_KIND_NORMAL
.space 1 @ Padding
.2byte \x, \y
.byte \elevation
.byte \movement_type
.byte ((\y_radius << 4) | \x_radius)
.space 1 @ Padding
.2byte \trainer_type
.2byte \sight_radius_tree_etc
.4byte \script
.2byte \event_flag
.space 2 @ Padding
inc _num_npcs
.endm
@ Defines an object event template for map data, to be used by a clone object. Mirrors the struct layout of ObjectEventTemplate in include/global.fieldmap.h
@ NOTE: The handling for this type of event does not exist in Emerald by default; it is exclusive to FRLG.
.macro clone_event index:req, gfx:req, x:req, y:req, target_local_id:req, target_map_id:req
.byte \index
.byte \gfx
.byte OBJ_KIND_CLONE
.space 1 @ Padding
.2byte \x, \y
.byte \target_local_id
.space 3 @ Padding
.2byte \target_map_id & 0xFF @ map num
.2byte \target_map_id >> 8 @ map group
.space 8 @ Padding
inc _num_npcs
.endm
@ Defines a warp event for map data. Mirrors the struct layout of WarpEvent in include/global.fieldmap.h
.macro warp_def x:req, y:req, elevation:req, warpId:req, map_id:req
.2byte \x, \y
.byte \elevation
.byte \warpId
.byte \map_id & 0xFF @ map num
.byte \map_id >> 8 @ map group
inc _num_warps
.endm
@ Defines a coord event for map data. Mirrors the struct layout of CoordEvent in include/global.fieldmap.h
.macro coord_event x:req, y:req, elevation:req, var:req, varValue:req, script:req
.2byte \x, \y
.byte \elevation
.space 1 @ Padding
.2byte \var
.2byte \varValue
.space 2 @ Padding
.4byte \script
inc _num_traps
.endm
@ Defines a weather coord event for map data. Any coord event is treated as a weather coord event if its script is NULL
.macro coord_weather_event x:req, y:req, elevation:req, weather:req
coord_event \x, \y, \elevation, \weather, 0, NULL
.endm
@ Defines a generic background event for map data. Mirrors the struct layout of BgEvent in include/global.fieldmap.h
@ 'kind' is any BG_EVENT_* constant (see include/constants/event_bg.h).
@ 'arg6' and 'arg7' are used differently depending on the bg event type. See macros below
.macro bg_event x:req, y:req, elevation:req, kind:req, arg6:req, arg7
.2byte \x, \y
.byte \elevation
.byte \kind
.space 2 @ Padding
.if \kind != BG_EVENT_HIDDEN_ITEM
.4byte \arg6
.else
.2byte \arg6
.2byte \arg7
.endif
inc _num_signs
.endm
@ Defines a background sign event for map data. 'facing_dir' is any of the BG_EVENT_PLAYER_FACING_* constants (see include/constants/event_bg.h)
.macro bg_sign_event x:req, y:req, elevation:req, facing_dir:req, script:req
bg_event \x, \y, \elevation, \facing_dir, \script
.endm
@ Defines a background hidden item event for map data
.macro bg_hidden_item_event x:req, y:req, elevation:req, item:req, flag:req
bg_event \x, \y, \elevation, BG_EVENT_HIDDEN_ITEM, \item, ((\flag) - FLAG_HIDDEN_ITEMS_START)
.endm
@ Defines a background secret base event for map data
.macro bg_secret_base_event x:req, y:req, elevation:req, secret_base_id:req
bg_event \x, \y, \elevation, BG_EVENT_SECRET_BASE, \secret_base_id
.endm
@ Defines the table of event data for a map. Mirrors the struct layout of MapEvents in include/global.fieldmap.h
.macro map_events npcs:req, warps:req, traps:req, signs:req
.byte _num_npcs, _num_warps, _num_traps, _num_signs
.4byte \npcs, \warps, \traps, \signs
reset_map_events
.endm
@ Resets the event counters used to track how many events a map has. Run when the events table is created by map_events
.macro reset_map_events
.set _num_npcs, 0
.set _num_warps, 0
.set _num_traps, 0
.set _num_signs, 0
.endm
@ Initialize the event counters for the first map
reset_map_events
@ Directions for connecting maps
@ The map.json files will only have e.g. "down" as direction data, and this will be appended to "connection_" by the connection macro
.equiv connection_down, CONNECTION_SOUTH
.equiv connection_up, CONNECTION_NORTH
.equiv connection_left, CONNECTION_WEST
.equiv connection_right, CONNECTION_EAST
.equiv connection_dive, CONNECTION_DIVE
.equiv connection_emerge, CONNECTION_EMERGE
@ Defines a map connection. Mirrors the struct layout of MapConnection in include/global.fieldmap.h
.macro connection direction:req, offset:req, map:req
.byte connection_\direction
.space 3 @ Padding
.4byte \offset
map \map
.space 2 @ Padding
.endm
@ Defines the flags for a map header. Mirrors the layout of the bitfield in struct MapHeader in include/global.fieldmap.h
.macro map_header_flags allow_cycling:req, allow_escaping:req, allow_running:req, show_map_name:req
.byte ((\show_map_name & 1) << 3) | ((\allow_running & 1) << 2) | ((\allow_escaping & 1) << 1) | \allow_cycling
.endm
-166
View File
@@ -1,166 +0,0 @@
.macro create_movement_action name:req, value:req
.macro \name
.byte \value
.endm
.endm
create_movement_action face_down, MOVEMENT_ACTION_FACE_DOWN
create_movement_action face_up, MOVEMENT_ACTION_FACE_UP
create_movement_action face_left, MOVEMENT_ACTION_FACE_LEFT
create_movement_action face_right, MOVEMENT_ACTION_FACE_RIGHT
create_movement_action walk_slow_down, MOVEMENT_ACTION_WALK_SLOW_DOWN
create_movement_action walk_slow_up, MOVEMENT_ACTION_WALK_SLOW_UP
create_movement_action walk_slow_left, MOVEMENT_ACTION_WALK_SLOW_LEFT
create_movement_action walk_slow_right, MOVEMENT_ACTION_WALK_SLOW_RIGHT
create_movement_action walk_down, MOVEMENT_ACTION_WALK_NORMAL_DOWN
create_movement_action walk_up, MOVEMENT_ACTION_WALK_NORMAL_UP
create_movement_action walk_left, MOVEMENT_ACTION_WALK_NORMAL_LEFT
create_movement_action walk_right, MOVEMENT_ACTION_WALK_NORMAL_RIGHT
create_movement_action jump_2_down, MOVEMENT_ACTION_JUMP_2_DOWN
create_movement_action jump_2_up, MOVEMENT_ACTION_JUMP_2_UP
create_movement_action jump_2_left, MOVEMENT_ACTION_JUMP_2_LEFT
create_movement_action jump_2_right, MOVEMENT_ACTION_JUMP_2_RIGHT
create_movement_action delay_1, MOVEMENT_ACTION_DELAY_1
create_movement_action delay_2, MOVEMENT_ACTION_DELAY_2
create_movement_action delay_4, MOVEMENT_ACTION_DELAY_4
create_movement_action delay_8, MOVEMENT_ACTION_DELAY_8
create_movement_action delay_16, MOVEMENT_ACTION_DELAY_16
create_movement_action walk_fast_down, MOVEMENT_ACTION_WALK_FAST_DOWN
create_movement_action walk_fast_up, MOVEMENT_ACTION_WALK_FAST_UP
create_movement_action walk_fast_left, MOVEMENT_ACTION_WALK_FAST_LEFT
create_movement_action walk_fast_right, MOVEMENT_ACTION_WALK_FAST_RIGHT
create_movement_action walk_in_place_slow_down, MOVEMENT_ACTION_WALK_IN_PLACE_SLOW_DOWN
create_movement_action walk_in_place_slow_up, MOVEMENT_ACTION_WALK_IN_PLACE_SLOW_UP
create_movement_action walk_in_place_slow_left, MOVEMENT_ACTION_WALK_IN_PLACE_SLOW_LEFT
create_movement_action walk_in_place_slow_right, MOVEMENT_ACTION_WALK_IN_PLACE_SLOW_RIGHT
create_movement_action walk_in_place_down, MOVEMENT_ACTION_WALK_IN_PLACE_NORMAL_DOWN
create_movement_action walk_in_place_up, MOVEMENT_ACTION_WALK_IN_PLACE_NORMAL_UP
create_movement_action walk_in_place_left, MOVEMENT_ACTION_WALK_IN_PLACE_NORMAL_LEFT
create_movement_action walk_in_place_right, MOVEMENT_ACTION_WALK_IN_PLACE_NORMAL_RIGHT
create_movement_action walk_in_place_fast_down, MOVEMENT_ACTION_WALK_IN_PLACE_FAST_DOWN
create_movement_action walk_in_place_fast_up, MOVEMENT_ACTION_WALK_IN_PLACE_FAST_UP
create_movement_action walk_in_place_fast_left, MOVEMENT_ACTION_WALK_IN_PLACE_FAST_LEFT
create_movement_action walk_in_place_fast_right, MOVEMENT_ACTION_WALK_IN_PLACE_FAST_RIGHT
create_movement_action walk_in_place_faster_down, MOVEMENT_ACTION_WALK_IN_PLACE_FASTER_DOWN
create_movement_action walk_in_place_faster_up, MOVEMENT_ACTION_WALK_IN_PLACE_FASTER_UP
create_movement_action walk_in_place_faster_left, MOVEMENT_ACTION_WALK_IN_PLACE_FASTER_LEFT
create_movement_action walk_in_place_faster_right, MOVEMENT_ACTION_WALK_IN_PLACE_FASTER_RIGHT
create_movement_action ride_water_current_down, MOVEMENT_ACTION_RIDE_WATER_CURRENT_DOWN
create_movement_action ride_water_current_up, MOVEMENT_ACTION_RIDE_WATER_CURRENT_UP
create_movement_action ride_water_current_left, MOVEMENT_ACTION_RIDE_WATER_CURRENT_LEFT
create_movement_action ride_water_current_right, MOVEMENT_ACTION_RIDE_WATER_CURRENT_RIGHT
create_movement_action walk_faster_down, MOVEMENT_ACTION_WALK_FASTER_DOWN
create_movement_action walk_faster_up, MOVEMENT_ACTION_WALK_FASTER_UP
create_movement_action walk_faster_left, MOVEMENT_ACTION_WALK_FASTER_LEFT
create_movement_action walk_faster_right, MOVEMENT_ACTION_WALK_FASTER_RIGHT
create_movement_action slide_down, MOVEMENT_ACTION_SLIDE_DOWN
create_movement_action slide_up, MOVEMENT_ACTION_SLIDE_UP
create_movement_action slide_left, MOVEMENT_ACTION_SLIDE_LEFT
create_movement_action slide_right, MOVEMENT_ACTION_SLIDE_RIGHT
create_movement_action player_run_down, MOVEMENT_ACTION_PLAYER_RUN_DOWN
create_movement_action player_run_up, MOVEMENT_ACTION_PLAYER_RUN_UP
create_movement_action player_run_left, MOVEMENT_ACTION_PLAYER_RUN_LEFT
create_movement_action player_run_right, MOVEMENT_ACTION_PLAYER_RUN_RIGHT
create_movement_action start_anim_in_direction, MOVEMENT_ACTION_START_ANIM_IN_DIRECTION
create_movement_action jump_special_down, MOVEMENT_ACTION_JUMP_SPECIAL_DOWN
create_movement_action jump_special_up, MOVEMENT_ACTION_JUMP_SPECIAL_UP
create_movement_action jump_special_left, MOVEMENT_ACTION_JUMP_SPECIAL_LEFT
create_movement_action jump_special_right, MOVEMENT_ACTION_JUMP_SPECIAL_RIGHT
create_movement_action face_player, MOVEMENT_ACTION_FACE_PLAYER
create_movement_action face_away_player, MOVEMENT_ACTION_FACE_AWAY_PLAYER
create_movement_action lock_facing_direction, MOVEMENT_ACTION_LOCK_FACING_DIRECTION
create_movement_action unlock_facing_direction, MOVEMENT_ACTION_UNLOCK_FACING_DIRECTION
create_movement_action jump_down, MOVEMENT_ACTION_JUMP_DOWN
create_movement_action jump_up, MOVEMENT_ACTION_JUMP_UP
create_movement_action jump_left, MOVEMENT_ACTION_JUMP_LEFT
create_movement_action jump_right, MOVEMENT_ACTION_JUMP_RIGHT
create_movement_action jump_in_place_down, MOVEMENT_ACTION_JUMP_IN_PLACE_DOWN
create_movement_action jump_in_place_up, MOVEMENT_ACTION_JUMP_IN_PLACE_UP
create_movement_action jump_in_place_left, MOVEMENT_ACTION_JUMP_IN_PLACE_LEFT
create_movement_action jump_in_place_right, MOVEMENT_ACTION_JUMP_IN_PLACE_RIGHT
create_movement_action jump_in_place_down_up, MOVEMENT_ACTION_JUMP_IN_PLACE_DOWN_UP
create_movement_action jump_in_place_up_down, MOVEMENT_ACTION_JUMP_IN_PLACE_UP_DOWN
create_movement_action jump_in_place_left_right, MOVEMENT_ACTION_JUMP_IN_PLACE_LEFT_RIGHT
create_movement_action jump_in_place_right_left, MOVEMENT_ACTION_JUMP_IN_PLACE_RIGHT_LEFT
create_movement_action face_original_direction, MOVEMENT_ACTION_FACE_ORIGINAL_DIRECTION
create_movement_action nurse_joy_bow, MOVEMENT_ACTION_NURSE_JOY_BOW_DOWN
create_movement_action enable_jump_landing_ground_effect, MOVEMENT_ACTION_ENABLE_JUMP_LANDING_GROUND_EFFECT
create_movement_action disable_jump_landing_ground_effect, MOVEMENT_ACTION_DISABLE_JUMP_LANDING_GROUND_EFFECT
create_movement_action disable_anim, MOVEMENT_ACTION_DISABLE_ANIMATION
create_movement_action restore_anim, MOVEMENT_ACTION_RESTORE_ANIMATION
create_movement_action set_invisible, MOVEMENT_ACTION_SET_INVISIBLE
create_movement_action set_visible, MOVEMENT_ACTION_SET_VISIBLE
create_movement_action emote_exclamation_mark, MOVEMENT_ACTION_EMOTE_EXCLAMATION_MARK
create_movement_action emote_question_mark, MOVEMENT_ACTION_EMOTE_QUESTION_MARK
create_movement_action emote_heart, MOVEMENT_ACTION_EMOTE_HEART
create_movement_action reveal_trainer, MOVEMENT_ACTION_REVEAL_TRAINER
create_movement_action rock_smash_break, MOVEMENT_ACTION_ROCK_SMASH_BREAK
create_movement_action cut_tree, MOVEMENT_ACTION_CUT_TREE
create_movement_action set_fixed_priority, MOVEMENT_ACTION_SET_FIXED_PRIORITY
create_movement_action clear_fixed_priority, MOVEMENT_ACTION_CLEAR_FIXED_PRIORITY
create_movement_action init_affine_anim, MOVEMENT_ACTION_INIT_AFFINE_ANIM
create_movement_action clear_affine_anim, MOVEMENT_ACTION_CLEAR_AFFINE_ANIM
create_movement_action hide_reflection, MOVEMENT_ACTION_HIDE_REFLECTION
create_movement_action show_reflection, MOVEMENT_ACTION_SHOW_REFLECTION
create_movement_action walk_down_start_affine, MOVEMENT_ACTION_WALK_DOWN_START_AFFINE
create_movement_action walk_down_affine, MOVEMENT_ACTION_WALK_DOWN_AFFINE
create_movement_action acro_wheelie_face_down, MOVEMENT_ACTION_ACRO_WHEELIE_FACE_DOWN
create_movement_action acro_wheelie_face_up, MOVEMENT_ACTION_ACRO_WHEELIE_FACE_UP
create_movement_action acro_wheelie_face_left, MOVEMENT_ACTION_ACRO_WHEELIE_FACE_LEFT
create_movement_action acro_wheelie_face_right, MOVEMENT_ACTION_ACRO_WHEELIE_FACE_RIGHT
create_movement_action acro_pop_wheelie_down, MOVEMENT_ACTION_ACRO_POP_WHEELIE_DOWN
create_movement_action acro_pop_wheelie_up, MOVEMENT_ACTION_ACRO_POP_WHEELIE_UP
create_movement_action acro_pop_wheelie_left, MOVEMENT_ACTION_ACRO_POP_WHEELIE_LEFT
create_movement_action acro_pop_wheelie_right, MOVEMENT_ACTION_ACRO_POP_WHEELIE_RIGHT
create_movement_action acro_end_wheelie_face_down, MOVEMENT_ACTION_ACRO_END_WHEELIE_FACE_DOWN
create_movement_action acro_end_wheelie_face_up, MOVEMENT_ACTION_ACRO_END_WHEELIE_FACE_UP
create_movement_action acro_end_wheelie_face_left, MOVEMENT_ACTION_ACRO_END_WHEELIE_FACE_LEFT
create_movement_action acro_end_wheelie_face_right, MOVEMENT_ACTION_ACRO_END_WHEELIE_FACE_RIGHT
create_movement_action acro_wheelie_hop_face_down, MOVEMENT_ACTION_ACRO_WHEELIE_HOP_FACE_DOWN
create_movement_action acro_wheelie_hop_face_up, MOVEMENT_ACTION_ACRO_WHEELIE_HOP_FACE_UP
create_movement_action acro_wheelie_hop_face_left, MOVEMENT_ACTION_ACRO_WHEELIE_HOP_FACE_LEFT
create_movement_action acro_wheelie_hop_face_right, MOVEMENT_ACTION_ACRO_WHEELIE_HOP_FACE_RIGHT
create_movement_action acro_wheelie_hop_down, MOVEMENT_ACTION_ACRO_WHEELIE_HOP_DOWN
create_movement_action acro_wheelie_hop_up, MOVEMENT_ACTION_ACRO_WHEELIE_HOP_UP
create_movement_action acro_wheelie_hop_left, MOVEMENT_ACTION_ACRO_WHEELIE_HOP_LEFT
create_movement_action acro_wheelie_hop_right, MOVEMENT_ACTION_ACRO_WHEELIE_HOP_RIGHT
create_movement_action acro_wheelie_jump_down, MOVEMENT_ACTION_ACRO_WHEELIE_JUMP_DOWN
create_movement_action acro_wheelie_jump_up, MOVEMENT_ACTION_ACRO_WHEELIE_JUMP_UP
create_movement_action acro_wheelie_jump_left, MOVEMENT_ACTION_ACRO_WHEELIE_JUMP_LEFT
create_movement_action acro_wheelie_jump_right, MOVEMENT_ACTION_ACRO_WHEELIE_JUMP_RIGHT
create_movement_action acro_wheelie_in_place_down, MOVEMENT_ACTION_ACRO_WHEELIE_IN_PLACE_DOWN
create_movement_action acro_wheelie_in_place_up, MOVEMENT_ACTION_ACRO_WHEELIE_IN_PLACE_UP
create_movement_action acro_wheelie_in_place_left, MOVEMENT_ACTION_ACRO_WHEELIE_IN_PLACE_LEFT
create_movement_action acro_wheelie_in_place_right, MOVEMENT_ACTION_ACRO_WHEELIE_IN_PLACE_RIGHT
create_movement_action acro_pop_wheelie_move_down, MOVEMENT_ACTION_ACRO_POP_WHEELIE_MOVE_DOWN
create_movement_action acro_pop_wheelie_move_up, MOVEMENT_ACTION_ACRO_POP_WHEELIE_MOVE_UP
create_movement_action acro_pop_wheelie_move_left, MOVEMENT_ACTION_ACRO_POP_WHEELIE_MOVE_LEFT
create_movement_action acro_pop_wheelie_move_right, MOVEMENT_ACTION_ACRO_POP_WHEELIE_MOVE_RIGHT
create_movement_action acro_wheelie_move_down, MOVEMENT_ACTION_ACRO_WHEELIE_MOVE_DOWN
create_movement_action acro_wheelie_move_up, MOVEMENT_ACTION_ACRO_WHEELIE_MOVE_UP
create_movement_action acro_wheelie_move_left, MOVEMENT_ACTION_ACRO_WHEELIE_MOVE_LEFT
create_movement_action acro_wheelie_move_right, MOVEMENT_ACTION_ACRO_WHEELIE_MOVE_RIGHT
create_movement_action acro_end_wheelie_move_down, MOVEMENT_ACTION_ACRO_END_WHEELIE_MOVE_DOWN
create_movement_action acro_end_wheelie_move_up, MOVEMENT_ACTION_ACRO_END_WHEELIE_MOVE_UP
create_movement_action acro_end_wheelie_move_left, MOVEMENT_ACTION_ACRO_END_WHEELIE_MOVE_LEFT
create_movement_action acro_end_wheelie_move_right, MOVEMENT_ACTION_ACRO_END_WHEELIE_MOVE_RIGHT
create_movement_action walk_diag_northwest, MOVEMENT_ACTION_WALK_NORMAL_DIAGONAL_UP_LEFT
create_movement_action walk_diag_northeast, MOVEMENT_ACTION_WALK_NORMAL_DIAGONAL_UP_RIGHT
create_movement_action walk_diag_southwest, MOVEMENT_ACTION_WALK_NORMAL_DIAGONAL_DOWN_LEFT
create_movement_action walk_diag_southeast, MOVEMENT_ACTION_WALK_NORMAL_DIAGONAL_DOWN_RIGHT
create_movement_action walk_slow_diag_northwest, MOVEMENT_ACTION_WALK_SLOW_DIAGONAL_UP_LEFT
create_movement_action walk_slow_diag_northeast, MOVEMENT_ACTION_WALK_SLOW_DIAGONAL_UP_RIGHT
create_movement_action walk_slow_diag_southwest, MOVEMENT_ACTION_WALK_SLOW_DIAGONAL_DOWN_LEFT
create_movement_action walk_slow_diag_southeast, MOVEMENT_ACTION_WALK_SLOW_DIAGONAL_DOWN_RIGHT
create_movement_action lock_anim, MOVEMENT_ACTION_LOCK_ANIM
create_movement_action unlock_anim, MOVEMENT_ACTION_UNLOCK_ANIM
create_movement_action walk_left_affine, MOVEMENT_ACTION_WALK_LEFT_AFFINE
create_movement_action walk_right_affine, MOVEMENT_ACTION_WALK_RIGHT_AFFINE
create_movement_action levitate, MOVEMENT_ACTION_LEVITATE
create_movement_action stop_levitate, MOVEMENT_ACTION_STOP_LEVITATE
create_movement_action destroy_extra_task, MOVEMENT_ACTION_STOP_LEVITATE_AT_TOP
create_movement_action figure_8, MOVEMENT_ACTION_FIGURE_8
create_movement_action fly_up, MOVEMENT_ACTION_FLY_UP
create_movement_action fly_down, MOVEMENT_ACTION_FLY_DOWN
create_movement_action step_end, MOVEMENT_ACTION_STEP_END
-152
View File
@@ -1,152 +0,0 @@
.macro voice_directsound base_midi_key:req, pan:req, sample_data_pointer:req, attack:req, decay:req, sustain:req, release:req
.byte 0
_voice_directsound \base_midi_key, \pan, \sample_data_pointer, \attack, \decay, \sustain, \release
.endm
.macro voice_directsound_no_resample base_midi_key:req, pan:req, sample_data_pointer:req, attack:req, decay:req, sustain:req, release:req
.byte 8
_voice_directsound \base_midi_key, \pan, \sample_data_pointer, \attack, \decay, \sustain, \release
.endm
.macro voice_directsound_alt base_midi_key:req, pan:req, sample_data_pointer:req, attack:req, decay:req, sustain:req, release:req
.byte 16
_voice_directsound \base_midi_key, \pan, \sample_data_pointer, \attack, \decay, \sustain, \release
.endm
.macro _voice_directsound base_midi_key:req, pan:req, sample_data_pointer:req, attack:req, decay:req, sustain:req, release:req
.byte \base_midi_key
.byte 0
.if \pan != 0
.byte (0x80 | \pan)
.else
.byte 0
.endif
.4byte \sample_data_pointer
.byte \attack
.byte \decay
.byte \sustain
.byte \release
.endm
.macro voice_square_1 base_midi_key:req, pan:req, sweep:req, duty_cycle:req, attack:req, decay:req, sustain:req, release:req
_voice_square_1 1, \base_midi_key, \pan, \sweep, \duty_cycle, \attack, \decay, \sustain, \release
.endm
.macro voice_square_1_alt base_midi_key:req, pan:req, sweep:req, duty_cycle:req, attack:req, decay:req, sustain:req, release:req
_voice_square_1 9, \base_midi_key, \pan, \sweep, \duty_cycle, \attack, \decay, \sustain, \release
.endm
.macro _voice_square_1 type:req, base_midi_key:req, pan:req, sweep:req, duty_cycle:req, attack:req, decay:req, sustain:req, release:req
.byte \type
.byte \base_midi_key
.if \pan != 0
.byte (0x80 | \pan)
.else
.byte 0
.endif
.byte \sweep
.byte (\duty_cycle & 0x3)
.byte 0, 0, 0
.byte (\attack & 0x7)
.byte (\decay & 0x7)
.byte (\sustain & 0xF)
.byte (\release & 0x7)
.endm
.macro voice_square_2 base_midi_key:req, pan:req, duty_cycle:req, attack:req, decay:req, sustain:req, release:req
_voice_square_2 2, \base_midi_key, \pan, \duty_cycle, \attack, \decay, \sustain, \release
.endm
.macro voice_square_2_alt base_midi_key:req, pan:req, duty_cycle:req, attack:req, decay:req, sustain:req, release:req
_voice_square_2 10, \base_midi_key, \pan, \duty_cycle, \attack, \decay, \sustain, \release
.endm
.macro _voice_square_2 type:req, base_midi_key:req, pan:req, duty_cycle:req, attack:req, decay:req, sustain:req, release:req
.byte \type
.byte \base_midi_key
.if \pan != 0
.byte (0x80 | \pan)
.else
.byte 0
.endif
.byte 0
.byte (\duty_cycle & 0x3)
.byte 0, 0, 0
.byte (\attack & 0x7)
.byte (\decay & 0x7)
.byte (\sustain & 0xF)
.byte (\release & 0x7)
.endm
.macro voice_programmable_wave base_midi_key:req, pan:req, wave_samples_pointer:req, attack:req, decay:req, sustain:req, release:req
_voice_programmable_wave 3, \base_midi_key, \pan, \wave_samples_pointer, \attack, \decay, \sustain, \release
.endm
.macro voice_programmable_wave_alt base_midi_key:req, pan:req, wave_samples_pointer:req, attack:req, decay:req, sustain:req, release:req
_voice_programmable_wave 11, \base_midi_key, \pan, \wave_samples_pointer, \attack, \decay, \sustain, \release
.endm
.macro _voice_programmable_wave type:req, base_midi_key:req, pan:req, wave_samples_pointer:req, attack:req, decay:req, sustain:req, release:req
.byte \type
.byte \base_midi_key
.if \pan != 0
.byte (0x80 | \pan)
.else
.byte 0
.endif
.byte 0
.4byte \wave_samples_pointer
.byte (\attack & 0x7)
.byte (\decay & 0x7)
.byte (\sustain & 0xF)
.byte (\release & 0x7)
.endm
.macro voice_noise base_midi_key:req, pan:req, period:req, attack:req, decay:req, sustain:req, release:req
_voice_noise 4, \base_midi_key, \pan, \period, \attack, \decay, \sustain, \release
.endm
.macro voice_noise_alt base_midi_key:req, pan:req, period:req, attack:req, decay:req, sustain:req, release:req
_voice_noise 12, \base_midi_key, \pan, \period, \attack, \decay, \sustain, \release
.endm
.macro _voice_noise type:req, base_midi_key:req, pan:req, period:req, attack:req, decay:req, sustain:req, release:req
.byte \type
.byte \base_midi_key
.if \pan != 0
.byte (0x80 | \pan)
.else
.byte 0
.endif
.byte 0
.byte (\period & 0x1)
.byte 0, 0, 0
.byte (\attack & 0x7)
.byte (\decay & 0x7)
.byte (\sustain & 0xF)
.byte (\release & 0x7)
.endm
.macro voice_keysplit voice_group_pointer:req, keysplit_table_pointer:req
.byte 0x40, 0, 0, 0
.4byte \voice_group_pointer
.4byte \keysplit_table_pointer
.endm
.macro voice_keysplit_all voice_group_pointer:req
.byte 0x80, 0, 0, 0
.4byte \voice_group_pointer
.4byte 0
.endm
.macro cry sample:req
.byte 0x20, 60, 0, 0
.4byte \sample
.byte 0xff, 0, 0xff, 0
.endm
.macro cry_reverse sample:req
.byte 0x30, 60, 0, 0
.4byte \sample
.byte 0xff, 0, 0xff, 0
.endm
-108
View File
@@ -1,108 +0,0 @@
@ Initialize the Trainer Hill challenge and start the timer
.macro trainerhill_start
setvar VAR_0x8004, TRAINER_HILL_FUNC_START
special CallTrainerHillFunction
.endm
@ 0 if not spoken to yet, 1 if spoken to but not received prize, 2 if received prize
.macro trainerhill_getownerstate
setvar VAR_0x8004, TRAINER_HILL_FUNC_GET_OWNER_STATE
special CallTrainerHillFunction
.endm
@ Try to give prize. 0 if given successfully, 1 if no room for prize, 2 if giving prize should be skipped
.macro trainerhill_giveprize
setvar VAR_0x8004, TRAINER_HILL_FUNC_GIVE_PRIZE
special CallTrainerHillFunction
.endm
@ Check the final challenge time. 0 if new record, 1 if not, 2 if time has already been checked
.macro trainerhill_finaltime
setvar VAR_0x8004, TRAINER_HILL_FUNC_CHECK_FINAL_TIME
special CallTrainerHillFunction
.endm
@ Resume the timer. Wont resume if owner has been spoken to or max time has been reached
.macro trainerhill_resumetimer
setvar VAR_0x8004, TRAINER_HILL_FUNC_RESUME_TIMER
special CallTrainerHillFunction
.endm
@ Set player lost the challenge (trainerHill.hasLost) to TRUE
.macro trainerhill_lost
setvar VAR_0x8004, TRAINER_HILL_FUNC_SET_LOST
special CallTrainerHillFunction
.endm
@ Get the current challenge status (TRAINER_HILL_PLAYER_STATUS_*)
.macro trainerhill_getstatus
setvar VAR_0x8004, TRAINER_HILL_FUNC_GET_CHALLENGE_STATUS
special CallTrainerHillFunction
.endm
@ Buffer the current timer to string vars (mins to STR_VAR_1, secs to STR_VAR_2, fraction of sec to STR_VAR_3)
.macro trainerhill_gettime
setvar VAR_0x8004, TRAINER_HILL_FUNC_GET_CHALLENGE_TIME
special CallTrainerHillFunction
.endm
@ FALSE if fewer than all 4 floors used, TRUE otherwise. Only FALSE in JP-exclusive modes
.macro trainerhill_allfloorsused
setvar VAR_0x8004, TRAINER_HILL_FUNC_GET_ALL_FLOORS_USED
special CallTrainerHillFunction
.endm
@ Unknown, dummied. E-Reader association is assumed. Only side effect is setting VAR_RESULT to 0.
.macro trainerhill_getusingereader
setvar VAR_0x8004, TRAINER_HILL_FUNC_GET_IN_EREADER_MODE
special CallTrainerHillFunction
.endm
@ TRUE if currently in a Trainer Hill challenge
.macro trainerhill_inchallenge
setvar VAR_0x8004, TRAINER_HILL_FUNC_IN_CHALLENGE
special CallTrainerHillFunction
.endm
@ Show the post battle text for the spoken to Trainer Hill trainer
.macro trainerhill_postbattletext
setvar VAR_0x8004, TRAINER_HILL_FUNC_POST_BATTLE_TEXT
special CallTrainerHillFunction
.endm
@ Set all Trainer Hill trainers defeated
.macro trainerhill_settrainerflags
setvar VAR_0x8004, TRAINER_HILL_FUNC_SET_ALL_TRAINER_FLAGS
special CallTrainerHillFunction
.endm
@ TRUE if the game has been saved for the challenge, FALSE otherwise
.macro trainerhill_getsaved
setvar VAR_0x8004, TRAINER_HILL_FUNC_GET_GAME_SAVED
special CallTrainerHillFunction
.endm
@ Set that the game has been saved for the challenge
.macro trainerhill_setsaved
setvar VAR_0x8004, TRAINER_HILL_FUNC_SET_GAME_SAVED
special CallTrainerHillFunction
.endm
@ Clear that the game has been saved for the challenge
.macro trainerhill_clearsaved
setvar VAR_0x8004, TRAINER_HILL_FUNC_CLEAR_GAME_SAVED
special CallTrainerHillFunction
.endm
@ FALSE if the Trainer Hill challenge was lost, TRUE otherwise
.macro trainerhill_getwon
setvar VAR_0x8004, TRAINER_HILL_FUNC_GET_WON
special CallTrainerHillFunction
.endm
@ Set the challenge mode to HILL_MODE_* (Normal, Variety, Unique, or Expert)
.macro trainerhill_setmode mode:req
setvar VAR_0x8004, TRAINER_HILL_FUNC_SET_MODE
copyvar VAR_0x8005, \mode
special CallTrainerHillFunction
.endm
-116
View File
@@ -1,116 +0,0 @@
Param
(
[Parameter(Position = 0)]
[string]$Start,
[Parameter(Position = 1)]
[string]$Offset,
[Parameter()]
[string[]]$DiffTool
)
$ErrorActionPreference = "Stop"
$offset_default_value = "0x100"
$diff_tool_default_value = "diff"
$help = "
$($args[0]) [OPTIONS] Start [Offset]
Performs a diff on the assembly of a function in a rom. 'Start' is the start
location of the function, and 'Offset' is the number of bytes to disassemble.
The assembly is saved to *.dump files.
'Offset' is optional, and defaults to $offset_default_value. If this value is
very large (0x10000+), objdump may hang / freeze.
Requirements:
- A clean copy of the rom named 'baserom.gba'.
- $$ENV:DEVKITARM to point to the installation of devkitpro. By default, it is
installed to 'C:\devkitpro\devkitARM'.
Options:
-DiffTool <tool> The tool to use for diffing. Defaults to '$diff_tool_default_value'. For VSCode,
you can use -DiffTool 'code --diff'. (Quotes are necessary around 'code --diff')
"
if ((-not (Test-Path variable:Start)) -or [string]::IsNullOrWhiteSpace($Start))
{
Write-Host $help
exit
}
if (-not (Test-Path variable:DiffTool) -or [string]::IsNullOrWhiteSpace($DiffTool))
{
$DiffTool = $diff_tool_default_value
}
if (-not (Test-Path variable:Offset) -or [string]::IsNullOrWhiteSpace($Offset))
{
$Offset = $offset_default_value
}
if (-Not (Test-Path env:DEVKITARM))
{
Write-Host "ENV:DEVKITARM variable not set."
Write-Host $help
exit
}
if (-Not (Test-Path $env:DEVKITARM))
{
Write-Host "DEVKITARM path '$env:DEVKITARM' does not exist."
Write-Host $help
exit
}
if (-Not (Test-Path ".\pokeemerald.gba"))
{
Write-Host "File 'pokeemerald.gba' not found."
Write-Host $help
exit
}
if (-Not (Test-Path ".\baserom.gba"))
{
Write-Host "File 'baserom.gba' not found."
}
try
{
$start_num = [System.Convert]::ToUInt64($Start, 16)
}
catch
{
Write-Host "Error parsing '$start_num' as a hex number."
Write-Host $help
exit
}
try
{
$offset_num = [System.Convert]::ToUInt64($Offset, 16)
}
catch
{
Write-Host "Error parsing '$offset_num' as a hex number."
Write-Host $help
exit
}
if ($start_num -gt 0x1000000)
{
Write-Host "Warning: Start address is larger than the ROM file. Hint: ignore the leading number in the address."
}
$end_str = [System.Convert]::ToString($start_num + $offset_num, 16)
$end_str = "0x$end_str"
$start_str = "0x$Start"
Write-Host "$start_str - $end_str"
$objdump = Join-Path -Path $env:DEVKITARM -ChildPath "arm-none-eabi\bin\objdump.exe"
&$objdump -D -bbinary -marmv4t -Mforce-thumb --start-address="$start_str" --stop-address="$end_str" .\baserom.gba > .\baserom.dump
&$objdump -D -bbinary -marmv4t -Mforce-thumb --start-address="$start_str" --stop-address="$end_str" .\pokeemerald.gba > .\pokeemerald.dump
Invoke-Expression "$DiffTool .\baserom.dump .\pokeemerald.dump"
-19
View File
@@ -1,19 +0,0 @@
#!/usr/bin/env bash
if [[ -d "$DEVKITARM/bin/" ]]; then
OBJDUMP_BIN="$DEVKITARM/bin/arm-none-eabi-objdump"
else
OBJDUMP_BIN="arm-none-eabi-objdump"
fi
OBJDUMP="$OBJDUMP_BIN -D -bbinary -marmv4t -Mforce-thumb"
if [ $(($1)) -ge $((0x8000000)) ]; then
OPTIONS="--adjust-vma=0x8000000 --start-address=$(($1)) --stop-address=$(($1 + $2))"
else
OPTIONS="--start-address=$(($1)) --stop-address=$(($1 + $2))"
fi
$OBJDUMP $OPTIONS baserom.gba > baserom.dump
$OBJDUMP $OPTIONS pokeemerald.gba > pokeemerald.dump
diff -u baserom.dump pokeemerald.dump
-45
View File
@@ -1,45 +0,0 @@
# This file contains rules for making assemblies for most music in the game.
CRY_SUBDIR := sound/direct_sound_samples/cries
MID_ASM_DIR := $(MID_SUBDIR)
CRY_BIN_DIR := $(CRY_SUBDIR)
SOUND_BIN_DIR := sound
SPECIAL_OUTDIRS := $(MID_ASM_DIR) $(CRY_BIN_DIR)
SPECIAL_OUTDIRS += $(SOUND_BIN_DIR) $(SOUND_BIN_DIR)/direct_sound_samples/phonemes $(SOUND_BIN_DIR)/direct_sound_samples/cries
$(shell mkdir -p $(SPECIAL_OUTDIRS) )
# Assembly song compilation
$(SONG_BUILDDIR)/%.o: $(SONG_SUBDIR)/%.s
$(AS) $(ASFLAGS) -I sound -o $@ $<
$(MID_BUILDDIR)/%.o: $(MID_ASM_DIR)/%.s
$(AS) $(ASFLAGS) -I sound -o $@ $<
# Compressed cries
$(CRY_BIN_DIR)/%.bin: $(CRY_SUBDIR)/%.aif
$(AIF) $< $@ --compress
# Uncompressed sounds
$(SOUND_BIN_DIR)/%.bin: sound/%.aif
$(AIF) $< $@
# For each line in midi.cfg, we do some trickery to convert it into a make rule for the `.mid` file described on the line
# Data following the colon in said file corresponds to arguments passed into mid2agb
MID_CFG_PATH := $(MID_SUBDIR)/midi.cfg
# $1: Source path no extension, $2 Options
define MID_RULE
$(MID_ASM_DIR)/$1.s: $(MID_SUBDIR)/$1.mid $(MID_CFG_PATH)
$(MID) $$< $$@ $2
endef
# source path, remaining text (options)
define MID_EXPANSION
$(eval $(call MID_RULE,$(basename $(patsubst %:,%,$(word 1,$1))),$(wordlist 2,999,$1)))
endef
$(foreach line,$(shell cat $(MID_CFG_PATH) | sed "s/ /__SPACE__/g"),$(call MID_EXPANSION,$(subst __SPACE__, ,$(line))))
# Warn users building without a .cfg - build will fail at link time
$(MID_ASM_DIR)/%.s: $(MID_SUBDIR)/%.mid
$(warning $< does not have an associated entry in midi.cfg! It cannot be built)
-8
View File
@@ -1,8 +0,0 @@
#!/bin/sh
echo "This script is deprecated. Next time, run \"make tools\" instead."
for dname in tools/*; do
if [ -f ${dname}/Makefile ]; then
make -C ${dname} CXX=${1:-g++} --no-print-directory
fi
done
-1089
View File
File diff suppressed because it is too large Load Diff
-3
View File
@@ -1,3 +0,0 @@
.include "constants/gba_constants.inc"
.include "constants/global.inc"
.include "constants/tms_hms.inc"
-518
View File
@@ -1,518 +0,0 @@
#ifndef GUARD_CONSTANTS_GBA_CONSTANTS_INC
#define GUARD_CONSTANTS_GBA_CONSTANTS_INC
.set PSR_USR_MODE, 0x00000010
.set PSR_FIQ_MODE, 0x00000011
.set PSR_IRQ_MODE, 0x00000012
.set PSR_SVC_MODE, 0x00000013
.set PSR_ABT_MODE, 0x00000017
.set PSR_UND_MODE, 0x0000001b
.set PSR_SYS_MODE, 0x0000001f
.set PSR_MODE_MASK, 0x0000001f
.set PSR_T_BIT, 0x00000020
.set PSR_F_BIT, 0x00000040
.set PSR_I_BIT, 0x00000080
.set EWRAM_START, 0x02000000
.set EWRAM_END, EWRAM_START + 0x40000
.set IWRAM_START, 0x03000000
.set IWRAM_END, IWRAM_START + 0x8000
.set PLTT, 0x5000000
.set BG_PLTT, PLTT
.set OBJ_PLTT, PLTT + 0x200
.set VRAM, 0x6000000
.set BG_VRAM, VRAM
.set OBJ_VRAM0, VRAM + 0x10000 @ text-mode BG
.set OBJ_VRAM1, VRAM + 0x14000 @ bitmap-mode BG
.set OAM, 0x7000000
.set SOUND_INFO_PTR, 0x3007FF0
.set INTR_CHECK, 0x3007FF8
.set INTR_VECTOR, 0x3007FFC
.set INTR_FLAG_VBLANK, 1 << 0
.set INTR_FLAG_HBLANK, 1 << 1
.set INTR_FLAG_VCOUNT, 1 << 2
.set INTR_FLAG_TIMER0, 1 << 3
.set INTR_FLAG_TIMER1, 1 << 4
.set INTR_FLAG_TIMER2, 1 << 5
.set INTR_FLAG_TIMER3, 1 << 6
.set INTR_FLAG_SERIAL, 1 << 7
.set INTR_FLAG_DMA0, 1 << 8
.set INTR_FLAG_DMA1, 1 << 9
.set INTR_FLAG_DMA2, 1 << 10
.set INTR_FLAG_DMA3, 1 << 11
.set INTR_FLAG_KEYPAD, 1 << 12
.set INTR_FLAG_GAMEPAK, 1 << 13
.set VCOUNT_VBLANK, 160
.set TOTAL_SCANLINES, 228
.set REG_BASE, 0x4000000 @ I/O register base address
@ I/O register offsets
.set OFFSET_REG_DISPCNT, 0x0
.set OFFSET_REG_DISPSTAT, 0x4
.set OFFSET_REG_VCOUNT, 0x6
.set OFFSET_REG_BG0CNT, 0x8
.set OFFSET_REG_BG1CNT, 0xa
.set OFFSET_REG_BG2CNT, 0xc
.set OFFSET_REG_BG3CNT, 0xe
.set OFFSET_REG_BG0HOFS, 0x10
.set OFFSET_REG_BG0VOFS, 0x12
.set OFFSET_REG_BG1HOFS, 0x14
.set OFFSET_REG_BG1VOFS, 0x16
.set OFFSET_REG_BG2HOFS, 0x18
.set OFFSET_REG_BG2VOFS, 0x1a
.set OFFSET_REG_BG3HOFS, 0x1c
.set OFFSET_REG_BG3VOFS, 0x1e
.set OFFSET_REG_BG2PA, 0x20
.set OFFSET_REG_BG2PB, 0x22
.set OFFSET_REG_BG2PC, 0x24
.set OFFSET_REG_BG2PD, 0x26
.set OFFSET_REG_BG2X_L, 0x28
.set OFFSET_REG_BG2X_H, 0x2a
.set OFFSET_REG_BG2Y_L, 0x2c
.set OFFSET_REG_BG2Y_H, 0x2e
.set OFFSET_REG_BG3PA, 0x30
.set OFFSET_REG_BG3PB, 0x32
.set OFFSET_REG_BG3PC, 0x34
.set OFFSET_REG_BG3PD, 0x36
.set OFFSET_REG_BG3X_L, 0x38
.set OFFSET_REG_BG3X_H, 0x3a
.set OFFSET_REG_BG3Y_L, 0x3c
.set OFFSET_REG_BG3Y_H, 0x3e
.set OFFSET_REG_WIN0H, 0x40
.set OFFSET_REG_WIN1H, 0x42
.set OFFSET_REG_WIN0V, 0x44
.set OFFSET_REG_WIN1V, 0x46
.set OFFSET_REG_WININ, 0x48
.set OFFSET_REG_WINOUT, 0x4a
.set OFFSET_REG_MOSAIC, 0x4c
.set OFFSET_REG_BLDCNT, 0x50
.set OFFSET_REG_BLDALPHA, 0x52
.set OFFSET_REG_BLDY, 0x54
.set OFFSET_REG_SOUND1CNT, 0x60
.set OFFSET_REG_SOUND1CNT_L, 0x60
.set OFFSET_REG_NR10, 0x60
.set OFFSET_REG_SOUND1CNT_H, 0x62
.set OFFSET_REG_NR11, 0x62
.set OFFSET_REG_NR12, 0x63
.set OFFSET_REG_SOUND1CNT_X, 0x64
.set OFFSET_REG_NR13, 0x64
.set OFFSET_REG_NR14, 0x65
.set OFFSET_REG_SOUND2CNT, 0x68
.set OFFSET_REG_SOUND2CNT_L, 0x68
.set OFFSET_REG_NR21, 0x68
.set OFFSET_REG_NR22, 0x69
.set OFFSET_REG_SOUND2CNT_H, 0x6c
.set OFFSET_REG_NR23, 0x6c
.set OFFSET_REG_NR24, 0x6d
.set OFFSET_REG_SOUND3CNT, 0x70
.set OFFSET_REG_SOUND3CNT_L, 0x70
.set OFFSET_REG_NR30, 0x70
.set OFFSET_REG_SOUND3CNT_H, 0x72
.set OFFSET_REG_NR31, 0x72
.set OFFSET_REG_NR32, 0x73
.set OFFSET_REG_SOUND3CNT_X, 0x74
.set OFFSET_REG_NR33, 0x74
.set OFFSET_REG_NR34, 0x75
.set OFFSET_REG_SOUND4CNT, 0x78
.set OFFSET_REG_SOUND4CNT_L, 0x78
.set OFFSET_REG_NR41, 0x78
.set OFFSET_REG_NR42, 0x79
.set OFFSET_REG_SOUND4CNT_H, 0x7c
.set OFFSET_REG_NR43, 0x7c
.set OFFSET_REG_NR44, 0x7d
.set OFFSET_REG_SOUNDCNT, 0x80
.set OFFSET_REG_SOUNDCNT_L, 0x80
.set OFFSET_REG_NR50, 0x80
.set OFFSET_REG_NR51, 0x81
.set OFFSET_REG_SOUNDCNT_H, 0x82
.set OFFSET_REG_SOUNDCNT_X, 0x84
.set OFFSET_REG_NR52, 0x84
.set OFFSET_REG_SOUNDBIAS, 0x88
.set OFFSET_REG_WAVE_RAM, 0x90
.set OFFSET_REG_WAVE_RAM0, 0x90
.set OFFSET_REG_WAVE_RAM0_L, 0x90
.set OFFSET_REG_WAVE_RAM0_H, 0x92
.set OFFSET_REG_WAVE_RAM1, 0x94
.set OFFSET_REG_WAVE_RAM1_L, 0x94
.set OFFSET_REG_WAVE_RAM1_H, 0x96
.set OFFSET_REG_WAVE_RAM2, 0x98
.set OFFSET_REG_WAVE_RAM2_L, 0x98
.set OFFSET_REG_WAVE_RAM2_H, 0x9a
.set OFFSET_REG_WAVE_RAM3, 0x9c
.set OFFSET_REG_WAVE_RAM3_L, 0x9c
.set OFFSET_REG_WAVE_RAM3_H, 0x9e
.set OFFSET_REG_FIFO, 0xa0
.set OFFSET_REG_FIFO_A, 0xa0
.set OFFSET_REG_FIFO_A_L, 0xa0
.set OFFSET_REG_FIFO_A_H, 0xa2
.set OFFSET_REG_FIFO_B, 0xa4
.set OFFSET_REG_FIFO_B_L, 0xa4
.set OFFSET_REG_FIFO_B_H, 0xa6
.set OFFSET_REG_DMA0, 0xb0
.set OFFSET_REG_DMA0SAD, 0xb0
.set OFFSET_REG_DMA0SAD_L, 0xb0
.set OFFSET_REG_DMA0SAD_H, 0xb2
.set OFFSET_REG_DMA0DAD, 0xb4
.set OFFSET_REG_DMA0DAD_L, 0xb4
.set OFFSET_REG_DMA0DAD_H, 0xb6
.set OFFSET_REG_DMA0CNT, 0xb8
.set OFFSET_REG_DMA0CNT_L, 0xb8
.set OFFSET_REG_DMA0CNT_H, 0xba
.set OFFSET_REG_DMA1, 0xbc
.set OFFSET_REG_DMA1SAD, 0xbc
.set OFFSET_REG_DMA1SAD_L, 0xbc
.set OFFSET_REG_DMA1SAD_H, 0xbe
.set OFFSET_REG_DMA1DAD, 0xc0
.set OFFSET_REG_DMA1DAD_L, 0xc0
.set OFFSET_REG_DMA1DAD_H, 0xc2
.set OFFSET_REG_DMA1CNT, 0xc4
.set OFFSET_REG_DMA1CNT_L, 0xc4
.set OFFSET_REG_DMA1CNT_H, 0xc6
.set OFFSET_REG_DMA2, 0xc8
.set OFFSET_REG_DMA2SAD, 0xc8
.set OFFSET_REG_DMA2SAD_L, 0xc8
.set OFFSET_REG_DMA2SAD_H, 0xca
.set OFFSET_REG_DMA2DAD, 0xcc
.set OFFSET_REG_DMA2DAD_L, 0xcc
.set OFFSET_REG_DMA2DAD_H, 0xce
.set OFFSET_REG_DMA2CNT, 0xd0
.set OFFSET_REG_DMA2CNT_L, 0xd0
.set OFFSET_REG_DMA2CNT_H, 0xd2
.set OFFSET_REG_DMA3, 0xd4
.set OFFSET_REG_DMA3SAD, 0xd4
.set OFFSET_REG_DMA3SAD_L, 0xd4
.set OFFSET_REG_DMA3SAD_H, 0xd6
.set OFFSET_REG_DMA3DAD, 0xd8
.set OFFSET_REG_DMA3DAD_L, 0xd8
.set OFFSET_REG_DMA3DAD_H, 0xda
.set OFFSET_REG_DMA3CNT, 0xdc
.set OFFSET_REG_DMA3CNT_L, 0xdc
.set OFFSET_REG_DMA3CNT_H, 0xde
.set OFFSET_REG_TM0CNT, 0x100
.set OFFSET_REG_TM0CNT_L, 0x100
.set OFFSET_REG_TM0CNT_H, 0x102
.set OFFSET_REG_TM1CNT, 0x104
.set OFFSET_REG_TM1CNT_L, 0x104
.set OFFSET_REG_TM1CNT_H, 0x106
.set OFFSET_REG_TM2CNT, 0x108
.set OFFSET_REG_TM2CNT_L, 0x108
.set OFFSET_REG_TM2CNT_H, 0x10a
.set OFFSET_REG_TM3CNT, 0x10c
.set OFFSET_REG_TM3CNT_L, 0x10c
.set OFFSET_REG_TM3CNT_H, 0x10e
.set OFFSET_REG_SIOCNT, 0x128
.set OFFSET_REG_SIODATA8, 0x12a
.set OFFSET_REG_SIODATA32, 0x120
.set OFFSET_REG_SIOMLT_SEND, 0x12a
.set OFFSET_REG_SIOMLT_RECV, 0x120
.set OFFSET_REG_SIOMULTI0, 0x120
.set OFFSET_REG_SIOMULTI1, 0x122
.set OFFSET_REG_SIOMULTI2, 0x124
.set OFFSET_REG_SIOMULTI3, 0x126
.set OFFSET_REG_KEYINPUT, 0x130
.set OFFSET_REG_KEYCNT, 0x132
.set OFFSET_REG_RCNT, 0x134
.set OFFSET_REG_JOYCNT, 0x140
.set OFFSET_REG_JOYSTAT, 0x158
.set OFFSET_REG_JOY_RECV, 0x150
.set OFFSET_REG_JOY_RECV_L, 0x150
.set OFFSET_REG_JOY_RECV_H, 0x152
.set OFFSET_REG_JOY_TRANS, 0x154
.set OFFSET_REG_JOY_TRANS_L, 0x154
.set OFFSET_REG_JOY_TRANS_H, 0x156
.set OFFSET_REG_IME, 0x208
.set OFFSET_REG_IE, 0x200
.set OFFSET_REG_IF, 0x202
.set OFFSET_REG_WAITCNT, 0x204
@ I/O register addresses
.set REG_DISPCNT, REG_BASE + OFFSET_REG_DISPCNT
.set REG_DISPSTAT, REG_BASE + OFFSET_REG_DISPSTAT
.set REG_VCOUNT, REG_BASE + OFFSET_REG_VCOUNT
.set REG_BG0CNT, REG_BASE + OFFSET_REG_BG0CNT
.set REG_BG1CNT, REG_BASE + OFFSET_REG_BG1CNT
.set REG_BG2CNT, REG_BASE + OFFSET_REG_BG2CNT
.set REG_BG3CNT, REG_BASE + OFFSET_REG_BG3CNT
.set REG_BG0HOFS, REG_BASE + OFFSET_REG_BG0HOFS
.set REG_BG0VOFS, REG_BASE + OFFSET_REG_BG0VOFS
.set REG_BG1HOFS, REG_BASE + OFFSET_REG_BG1HOFS
.set REG_BG1VOFS, REG_BASE + OFFSET_REG_BG1VOFS
.set REG_BG2HOFS, REG_BASE + OFFSET_REG_BG2HOFS
.set REG_BG2VOFS, REG_BASE + OFFSET_REG_BG2VOFS
.set REG_BG3HOFS, REG_BASE + OFFSET_REG_BG3HOFS
.set REG_BG3VOFS, REG_BASE + OFFSET_REG_BG3VOFS
.set REG_BG2PA, REG_BASE + OFFSET_REG_BG2PA
.set REG_BG2PB, REG_BASE + OFFSET_REG_BG2PB
.set REG_BG2PC, REG_BASE + OFFSET_REG_BG2PC
.set REG_BG2PD, REG_BASE + OFFSET_REG_BG2PD
.set REG_BG2X_L, REG_BASE + OFFSET_REG_BG2X_L
.set REG_BG2X_H, REG_BASE + OFFSET_REG_BG2X_H
.set REG_BG2Y_L, REG_BASE + OFFSET_REG_BG2Y_L
.set REG_BG2Y_H, REG_BASE + OFFSET_REG_BG2Y_H
.set REG_BG3PA, REG_BASE + OFFSET_REG_BG3PA
.set REG_BG3PB, REG_BASE + OFFSET_REG_BG3PB
.set REG_BG3PC, REG_BASE + OFFSET_REG_BG3PC
.set REG_BG3PD, REG_BASE + OFFSET_REG_BG3PD
.set REG_BG3X_L, REG_BASE + OFFSET_REG_BG3X_L
.set REG_BG3X_H, REG_BASE + OFFSET_REG_BG3X_H
.set REG_BG3Y_L, REG_BASE + OFFSET_REG_BG3Y_L
.set REG_BG3Y_H, REG_BASE + OFFSET_REG_BG3Y_H
.set REG_WIN0H, REG_BASE + OFFSET_REG_WIN0H
.set REG_WIN1H, REG_BASE + OFFSET_REG_WIN1H
.set REG_WIN0V, REG_BASE + OFFSET_REG_WIN0V
.set REG_WIN1V, REG_BASE + OFFSET_REG_WIN1V
.set REG_WININ, REG_BASE + OFFSET_REG_WININ
.set REG_WINOUT, REG_BASE + OFFSET_REG_WINOUT
.set REG_MOSAIC, REG_BASE + OFFSET_REG_MOSAIC
.set REG_BLDCNT, REG_BASE + OFFSET_REG_BLDCNT
.set REG_BLDALPHA, REG_BASE + OFFSET_REG_BLDALPHA
.set REG_BLDY, REG_BASE + OFFSET_REG_BLDY
.set REG_SOUND1CNT, REG_BASE + OFFSET_REG_SOUND1CNT
.set REG_SOUND1CNT_L, REG_BASE + OFFSET_REG_SOUND1CNT_L
.set REG_NR10, REG_BASE + OFFSET_REG_NR10
.set REG_SOUND1CNT_H, REG_BASE + OFFSET_REG_SOUND1CNT_H
.set REG_NR11, REG_BASE + OFFSET_REG_NR11
.set REG_NR12, REG_BASE + OFFSET_REG_NR12
.set REG_SOUND1CNT_X, REG_BASE + OFFSET_REG_SOUND1CNT_X
.set REG_NR13, REG_BASE + OFFSET_REG_NR13
.set REG_NR14, REG_BASE + OFFSET_REG_NR14
.set REG_SOUND2CNT, REG_BASE + OFFSET_REG_SOUND2CNT
.set REG_SOUND2CNT_L, REG_BASE + OFFSET_REG_SOUND2CNT_L
.set REG_NR21, REG_BASE + OFFSET_REG_NR21
.set REG_NR22, REG_BASE + OFFSET_REG_NR22
.set REG_SOUND2CNT_H, REG_BASE + OFFSET_REG_SOUND2CNT_H
.set REG_NR23, REG_BASE + OFFSET_REG_NR23
.set REG_NR24, REG_BASE + OFFSET_REG_NR24
.set REG_SOUND3CNT, REG_BASE + OFFSET_REG_SOUND3CNT
.set REG_SOUND3CNT_L, REG_BASE + OFFSET_REG_SOUND3CNT_L
.set REG_NR30, REG_BASE + OFFSET_REG_NR30
.set REG_SOUND3CNT_H, REG_BASE + OFFSET_REG_SOUND3CNT_H
.set REG_NR31, REG_BASE + OFFSET_REG_NR31
.set REG_NR32, REG_BASE + OFFSET_REG_NR32
.set REG_SOUND3CNT_X, REG_BASE + OFFSET_REG_SOUND3CNT_X
.set REG_NR33, REG_BASE + OFFSET_REG_NR33
.set REG_NR34, REG_BASE + OFFSET_REG_NR34
.set REG_SOUND4CNT, REG_BASE + OFFSET_REG_SOUND4CNT
.set REG_SOUND4CNT_L, REG_BASE + OFFSET_REG_SOUND4CNT_L
.set REG_NR41, REG_BASE + OFFSET_REG_NR41
.set REG_NR42, REG_BASE + OFFSET_REG_NR42
.set REG_SOUND4CNT_H, REG_BASE + OFFSET_REG_SOUND4CNT_H
.set REG_NR43, REG_BASE + OFFSET_REG_NR43
.set REG_NR44, REG_BASE + OFFSET_REG_NR44
.set REG_SOUNDCNT, REG_BASE + OFFSET_REG_SOUNDCNT
.set REG_SOUNDCNT_L, REG_BASE + OFFSET_REG_SOUNDCNT_L
.set REG_NR50, REG_BASE + OFFSET_REG_NR50
.set REG_NR51, REG_BASE + OFFSET_REG_NR51
.set REG_SOUNDCNT_H, REG_BASE + OFFSET_REG_SOUNDCNT_H
.set REG_SOUNDCNT_X, REG_BASE + OFFSET_REG_SOUNDCNT_X
.set REG_NR52, REG_BASE + OFFSET_REG_NR52
.set REG_SOUNDBIAS, REG_BASE + OFFSET_REG_SOUNDBIAS
.set REG_WAVE_RAM, REG_BASE + OFFSET_REG_WAVE_RAM
.set REG_WAVE_RAM0, REG_BASE + OFFSET_REG_WAVE_RAM0
.set REG_WAVE_RAM0_L, REG_BASE + OFFSET_REG_WAVE_RAM0_L
.set REG_WAVE_RAM0_H, REG_BASE + OFFSET_REG_WAVE_RAM0_H
.set REG_WAVE_RAM1, REG_BASE + OFFSET_REG_WAVE_RAM1
.set REG_WAVE_RAM1_L, REG_BASE + OFFSET_REG_WAVE_RAM1_L
.set REG_WAVE_RAM1_H, REG_BASE + OFFSET_REG_WAVE_RAM1_H
.set REG_WAVE_RAM2, REG_BASE + OFFSET_REG_WAVE_RAM2
.set REG_WAVE_RAM2_L, REG_BASE + OFFSET_REG_WAVE_RAM2_L
.set REG_WAVE_RAM2_H, REG_BASE + OFFSET_REG_WAVE_RAM2_H
.set REG_WAVE_RAM3, REG_BASE + OFFSET_REG_WAVE_RAM3
.set REG_WAVE_RAM3_L, REG_BASE + OFFSET_REG_WAVE_RAM3_L
.set REG_WAVE_RAM3_H, REG_BASE + OFFSET_REG_WAVE_RAM3_H
.set REG_FIFO, REG_BASE + OFFSET_REG_FIFO
.set REG_FIFO_A, REG_BASE + OFFSET_REG_FIFO_A
.set REG_FIFO_A_L, REG_BASE + OFFSET_REG_FIFO_A_L
.set REG_FIFO_A_H, REG_BASE + OFFSET_REG_FIFO_A_H
.set REG_FIFO_B, REG_BASE + OFFSET_REG_FIFO_B
.set REG_FIFO_B_L, REG_BASE + OFFSET_REG_FIFO_B_L
.set REG_FIFO_B_H, REG_BASE + OFFSET_REG_FIFO_B_H
.set REG_DMA0, REG_BASE + OFFSET_REG_DMA0
.set REG_DMA0SAD, REG_BASE + OFFSET_REG_DMA0SAD
.set REG_DMA0SAD_L, REG_BASE + OFFSET_REG_DMA0SAD_L
.set REG_DMA0SAD_H, REG_BASE + OFFSET_REG_DMA0SAD_H
.set REG_DMA0DAD, REG_BASE + OFFSET_REG_DMA0DAD
.set REG_DMA0DAD_L, REG_BASE + OFFSET_REG_DMA0DAD_L
.set REG_DMA0DAD_H, REG_BASE + OFFSET_REG_DMA0DAD_H
.set REG_DMA0CNT, REG_BASE + OFFSET_REG_DMA0CNT
.set REG_DMA0CNT_L, REG_BASE + OFFSET_REG_DMA0CNT_L
.set REG_DMA0CNT_H, REG_BASE + OFFSET_REG_DMA0CNT_H
.set REG_DMA1, REG_BASE + OFFSET_REG_DMA1
.set REG_DMA1SAD, REG_BASE + OFFSET_REG_DMA1SAD
.set REG_DMA1SAD_L, REG_BASE + OFFSET_REG_DMA1SAD_L
.set REG_DMA1SAD_H, REG_BASE + OFFSET_REG_DMA1SAD_H
.set REG_DMA1DAD, REG_BASE + OFFSET_REG_DMA1DAD
.set REG_DMA1DAD_L, REG_BASE + OFFSET_REG_DMA1DAD_L
.set REG_DMA1DAD_H, REG_BASE + OFFSET_REG_DMA1DAD_H
.set REG_DMA1CNT, REG_BASE + OFFSET_REG_DMA1CNT
.set REG_DMA1CNT_L, REG_BASE + OFFSET_REG_DMA1CNT_L
.set REG_DMA1CNT_H, REG_BASE + OFFSET_REG_DMA1CNT_H
.set REG_DMA2, REG_BASE + OFFSET_REG_DMA2
.set REG_DMA2SAD, REG_BASE + OFFSET_REG_DMA2SAD
.set REG_DMA2SAD_L, REG_BASE + OFFSET_REG_DMA2SAD_L
.set REG_DMA2SAD_H, REG_BASE + OFFSET_REG_DMA2SAD_H
.set REG_DMA2DAD, REG_BASE + OFFSET_REG_DMA2DAD
.set REG_DMA2DAD_L, REG_BASE + OFFSET_REG_DMA2DAD_L
.set REG_DMA2DAD_H, REG_BASE + OFFSET_REG_DMA2DAD_H
.set REG_DMA2CNT, REG_BASE + OFFSET_REG_DMA2CNT
.set REG_DMA2CNT_L, REG_BASE + OFFSET_REG_DMA2CNT_L
.set REG_DMA2CNT_H, REG_BASE + OFFSET_REG_DMA2CNT_H
.set REG_DMA3, REG_BASE + OFFSET_REG_DMA3
.set REG_DMA3SAD, REG_BASE + OFFSET_REG_DMA3SAD
.set REG_DMA3SAD_L, REG_BASE + OFFSET_REG_DMA3SAD_L
.set REG_DMA3SAD_H, REG_BASE + OFFSET_REG_DMA3SAD_H
.set REG_DMA3DAD, REG_BASE + OFFSET_REG_DMA3DAD
.set REG_DMA3DAD_L, REG_BASE + OFFSET_REG_DMA3DAD_L
.set REG_DMA3DAD_H, REG_BASE + OFFSET_REG_DMA3DAD_H
.set REG_DMA3CNT, REG_BASE + OFFSET_REG_DMA3CNT
.set REG_DMA3CNT_L, REG_BASE + OFFSET_REG_DMA3CNT_L
.set REG_DMA3CNT_H, REG_BASE + OFFSET_REG_DMA3CNT_H
.set REG_TM0CNT, REG_BASE + OFFSET_REG_TM0CNT
.set REG_TM0CNT_L, REG_BASE + OFFSET_REG_TM0CNT_L
.set REG_TM0CNT_H, REG_BASE + OFFSET_REG_TM0CNT_H
.set REG_TM1CNT, REG_BASE + OFFSET_REG_TM1CNT
.set REG_TM1CNT_L, REG_BASE + OFFSET_REG_TM1CNT_L
.set REG_TM1CNT_H, REG_BASE + OFFSET_REG_TM1CNT_H
.set REG_TM2CNT, REG_BASE + OFFSET_REG_TM2CNT
.set REG_TM2CNT_L, REG_BASE + OFFSET_REG_TM2CNT_L
.set REG_TM2CNT_H, REG_BASE + OFFSET_REG_TM2CNT_H
.set REG_TM3CNT, REG_BASE + OFFSET_REG_TM3CNT
.set REG_TM3CNT_L, REG_BASE + OFFSET_REG_TM3CNT_L
.set REG_TM3CNT_H, REG_BASE + OFFSET_REG_TM3CNT_H
.set REG_SIOCNT, REG_BASE + OFFSET_REG_SIOCNT
.set REG_SIODATA8, REG_BASE + OFFSET_REG_SIODATA8
.set REG_SIODATA32, REG_BASE + OFFSET_REG_SIODATA32
.set REG_SIOMLT_SEND, REG_BASE + OFFSET_REG_SIOMLT_SEND
.set REG_SIOMLT_RECV, REG_BASE + OFFSET_REG_SIOMLT_RECV
.set REG_SIOMULTI0, REG_BASE + OFFSET_REG_SIOMULTI0
.set REG_SIOMULTI1, REG_BASE + OFFSET_REG_SIOMULTI1
.set REG_SIOMULTI2, REG_BASE + OFFSET_REG_SIOMULTI2
.set REG_SIOMULTI3, REG_BASE + OFFSET_REG_SIOMULTI3
.set REG_KEYINPUT, REG_BASE + OFFSET_REG_KEYINPUT
.set REG_KEYCNT, REG_BASE + OFFSET_REG_KEYCNT
.set REG_RCNT, REG_BASE + OFFSET_REG_RCNT
.set REG_JOYCNT, REG_BASE + OFFSET_REG_JOYCNT
.set REG_JOYSTAT, REG_BASE + OFFSET_REG_JOYSTAT
.set REG_JOY_RECV, REG_BASE + OFFSET_REG_JOY_RECV
.set REG_JOY_RECV_L, REG_BASE + OFFSET_REG_JOY_RECV_L
.set REG_JOY_RECV_H, REG_BASE + OFFSET_REG_JOY_RECV_H
.set REG_JOY_TRANS, REG_BASE + OFFSET_REG_JOY_TRANS
.set REG_JOY_TRANS_L, REG_BASE + OFFSET_REG_JOY_TRANS_L
.set REG_JOY_TRANS_H, REG_BASE + OFFSET_REG_JOY_TRANS_H
.set REG_IME, REG_BASE + OFFSET_REG_IME
.set REG_IE, REG_BASE + OFFSET_REG_IE
.set REG_IF, REG_BASE + OFFSET_REG_IF
.set REG_WAITCNT, REG_BASE + OFFSET_REG_WAITCNT
@ DMA register constants
.set DMA_DEST_INC, 0x0000
.set DMA_DEST_DEC, 0x0020
.set DMA_DEST_FIXED, 0x0040
.set DMA_DEST_RELOAD, 0x0060
.set DMA_SRC_INC, 0x0000
.set DMA_SRC_DEC, 0x0080
.set DMA_SRC_FIXED, 0x0100
.set DMA_REPEAT, 0x0200
.set DMA_16BIT, 0x0000
.set DMA_32BIT, 0x0400
.set DMA_DREQ_ON, 0x0800
.set DMA_START_NOW, 0x0000
.set DMA_START_VBLANK, 0x1000
.set DMA_START_HBLANK, 0x2000
.set DMA_START_SPECIAL, 0x3000
.set DMA_INTR_ENABLE, 0x4000
.set DMA_ENABLE, 0x8000
@ OAM attribute constants
.set OAM_OBJ_NORMAL, 0x00000000
.set OAM_OBJ_BLEND, 0x00000400
.set OAM_OBJ_WINDOW, 0x00000800
.set OAM_AFFINE_NONE, 0x00000000
.set OAM_AFFINE_NORMAL_SIZE, 0x00000100
.set OAM_OBJ_DISABLED, 0x00000200
.set OAM_AFFINE_DOUBLE_SIZE, 0x00000300
.set OAM_MOSAIC_OFF, 0x00000000
.set OAM_MOSAIC_ON, 0x00001000
.set OAM_4BPP, 0x00000000
.set OAM_8BPP, 0x00002000
.set OAM_H_FLIP, 0x10000000
.set OAM_V_FLIP, 0x20000000
.set OAM_SQUARE, 0x00000000
.set OAM_H_RECTANGLE, 0x00004000
.set OAM_V_RECTANGLE, 0x00008000
.set OAM_SIZE_0, 0x00000000
.set OAM_SIZE_1, 0x40000000
.set OAM_SIZE_2, 0x80000000
.set OAM_SIZE_3, 0xc0000000
.set OAM_SIZE_8x8, OAM_SIZE_0 | OAM_SQUARE
.set OAM_SIZE_16x16, OAM_SIZE_1 | OAM_SQUARE
.set OAM_SIZE_32x32, OAM_SIZE_2 | OAM_SQUARE
.set OAM_SIZE_64x64, OAM_SIZE_3 | OAM_SQUARE
.set OAM_SIZE_16x8, OAM_SIZE_0 | OAM_H_RECTANGLE
.set OAM_SIZE_32x8, OAM_SIZE_1 | OAM_H_RECTANGLE
.set OAM_SIZE_32x16, OAM_SIZE_2 | OAM_H_RECTANGLE
.set OAM_SIZE_64x32, OAM_SIZE_3 | OAM_H_RECTANGLE
.set OAM_SIZE_8x16, OAM_SIZE_0 | OAM_V_RECTANGLE
.set OAM_SIZE_8x32, OAM_SIZE_1 | OAM_V_RECTANGLE
.set OAM_SIZE_16x32, OAM_SIZE_2 | OAM_V_RECTANGLE
.set OAM_SIZE_32x64, OAM_SIZE_3 | OAM_V_RECTANGLE
@ BLDCNT
.set BLDCNT_TGT1_BG0, 1 << 0
.set BLDCNT_TGT1_BG1, 1 << 1
.set BLDCNT_TGT1_BG2, 1 << 2
.set BLDCNT_TGT1_BG3, 1 << 3
.set BLDCNT_TGT1_OBJ, 1 << 4
.set BLDCNT_TGT1_BD, 1 << 5
.set BLDCNT_TGT1_ALL, BLDCNT_TGT1_BG0 | BLDCNT_TGT1_BG1 | BLDCNT_TGT1_BG2 | BLDCNT_TGT1_BG3 | BLDCNT_TGT1_OBJ | BLDCNT_TGT1_BD
.set BLDCNT_EFFECT_NONE, 0 << 6
.set BLDCNT_EFFECT_BLEND, 1 << 6
.set BLDCNT_EFFECT_LIGHTEN, 2 << 6
.set BLDCNT_EFFECT_DARKEN, 3 << 6
.set BLDCNT_TGT2_BG0, 1 << 8
.set BLDCNT_TGT2_BG1, 1 << 9
.set BLDCNT_TGT2_BG2, 1 << 10
.set BLDCNT_TGT2_BG3, 1 << 11
.set BLDCNT_TGT2_OBJ, 1 << 12
.set BLDCNT_TGT2_BD, 1 << 13
.set BLDCNT_TGT2_ALL, BLDCNT_TGT2_BG0 | BLDCNT_TGT2_BG1 | BLDCNT_TGT2_BG2 | BLDCNT_TGT2_BG3 | BLDCNT_TGT2_OBJ | BLDCNT_TGT2_BD
#endif @ GUARD_CONSTANTS_GBA_CONSTANTS_INC
-27
View File
@@ -1,27 +0,0 @@
#ifndef GUARD_CONSTANTS_GLOBAL_INC
#define GUARD_CONSTANTS_GLOBAL_INC
.set TRUE, 1
.set FALSE, 0
.set NULL, 0
.set SPRITE_SIZE_8x8, (OAM_SIZE_0 >> 28) | (OAM_SQUARE >> 14)
.set SPRITE_SIZE_16x16, (OAM_SIZE_1 >> 28) | (OAM_SQUARE >> 14)
.set SPRITE_SIZE_32x32, (OAM_SIZE_2 >> 28) | (OAM_SQUARE >> 14)
.set SPRITE_SIZE_64x64, (OAM_SIZE_3 >> 28) | (OAM_SQUARE >> 14)
.set SPRITE_SIZE_16x8, (OAM_SIZE_0 >> 28) | (OAM_H_RECTANGLE >> 14)
.set SPRITE_SIZE_32x8, (OAM_SIZE_1 >> 28) | (OAM_H_RECTANGLE >> 14)
.set SPRITE_SIZE_32x16, (OAM_SIZE_2 >> 28) | (OAM_H_RECTANGLE >> 14)
.set SPRITE_SIZE_64x32, (OAM_SIZE_3 >> 28) | (OAM_H_RECTANGLE >> 14)
.set SPRITE_SIZE_8x16, (OAM_SIZE_0 >> 28) | (OAM_V_RECTANGLE >> 14)
.set SPRITE_SIZE_8x32, (OAM_SIZE_1 >> 28) | (OAM_V_RECTANGLE >> 14)
.set SPRITE_SIZE_16x32, (OAM_SIZE_2 >> 28) | (OAM_V_RECTANGLE >> 14)
.set SPRITE_SIZE_32x64, (OAM_SIZE_3 >> 28) | (OAM_V_RECTANGLE >> 14)
.set OBJ_IMAGE_ANIM_H_FLIP, 1 << 6
.set OBJ_IMAGE_ANIM_V_FLIP, 1 << 7
#endif @ GUARD_CONSTANTS_GLOBAL_INC
-257
View File
@@ -1,257 +0,0 @@
#ifndef GUARD_CONSTANTS_M4A_CONSTANTS_INC
#define GUARD_CONSTANTS_M4A_CONSTANTS_INC
.equiv ID_NUMBER, 0x68736d53
.equiv PCM_DMA_BUF_SIZE, 1584
.equiv MAX_DIRECTSOUND_CHANNELS, 12
.equiv C_V, 0x40
.equiv TONEDATA_TYPE_CGB, 0x07
.equiv TONEDATA_TYPE_FIX, 0x08
.equiv TONEDATA_TYPE_REV, 0x10
.equiv TONEDATA_TYPE_CMP, 0x20
.equiv TONEDATA_TYPE_SPL, 0x40 @ key split
.equiv TONEDATA_TYPE_RHY, 0x80 @ rhythm
.equiv TONEDATA_P_S_PAN, 0xc0
.equiv SOUND_CHANNEL_SF_START, 0x80
.equiv SOUND_CHANNEL_SF_STOP, 0x40
.equiv SOUND_CHANNEL_SF_SPECIAL, 0x20
.equiv SOUND_CHANNEL_SF_LOOP, 0x10
.equiv SOUND_CHANNEL_SF_IEC, 0x04
.equiv SOUND_CHANNEL_SF_ENV, 0x03
.equiv SOUND_CHANNEL_SF_ENV_ATTACK, 0x03
.equiv SOUND_CHANNEL_SF_ENV_DECAY, 0x02
.equiv SOUND_CHANNEL_SF_ENV_SUSTAIN, 0x01
.equiv SOUND_CHANNEL_SF_ENV_RELEASE, 0x00
.equiv SOUND_CHANNEL_SF_ON, (SOUND_CHANNEL_SF_START | SOUND_CHANNEL_SF_STOP | SOUND_CHANNEL_SF_IEC | SOUND_CHANNEL_SF_ENV)
.equiv CGB_CHANNEL_MO_PIT, 0x02
.equiv CGB_CHANNEL_MO_VOL, 0x01
.equiv WAVE_DATA_FLAG_LOOP, 0xC0
.equiv MPT_FLG_VOLSET, 0x01
.equiv MPT_FLG_VOLCHG, 0x03
.equiv MPT_FLG_PITSET, 0x04
.equiv MPT_FLG_PITCHG, 0x0C
.equiv MPT_FLG_START, 0x40
.equiv MPT_FLG_EXIST, 0x80
.macro struct_begin
.struct 0
.endm
.macro struct_field name, size
\name:
.struct \name + \size
.endm
struct_begin
struct_field o_WaveData_type, 2
struct_field o_WaveData_d1, 1
struct_field o_WaveData_flags, 1
struct_field o_WaveData_freq, 4
struct_field o_WaveData_loopStart, 4
struct_field o_WaveData_size, 4
struct_field o_WaveData_data, 0
struct_field WaveData_size, 0
struct_begin
struct_field o_ToneData_type, 1
struct_field o_ToneData_key, 1
struct_field o_ToneData_length, 1
struct_field o_ToneData_pan_sweep, 1
struct_field o_ToneData_wav, 4
struct_field o_ToneData_attack, 1
struct_field o_ToneData_decay, 1
struct_field o_ToneData_sustain, 1
struct_field o_ToneData_release, 1
struct_field ToneData_size, 0
struct_begin
struct_field o_SoundInfo_ident, 4
struct_field o_SoundInfo_pcmDmaCounter, 1
struct_field o_SoundInfo_reverb, 1
struct_field o_SoundInfo_maxChans, 1
struct_field o_SoundInfo_masterVolume, 1
struct_field o_SoundInfo_freq, 1
struct_field o_SoundInfo_mode, 1
struct_field o_SoundInfo_c15, 1
struct_field o_SoundInfo_pcmDmaPeriod, 1
struct_field o_SoundInfo_maxLines, 1
struct_field o_SoundInfo_gap, 3
struct_field o_SoundInfo_pcmSamplesPerVBlank, 4
struct_field o_SoundInfo_pcmFreq, 4
struct_field o_SoundInfo_divFreq, 4
struct_field o_SoundInfo_cgbChans, 4
struct_field o_SoundInfo_MPlayMainHead, 4
struct_field o_SoundInfo_musicPlayerHead, 4
struct_field o_SoundInfo_CgbSound, 4
struct_field o_SoundInfo_CgbOscOff, 4
struct_field o_SoundInfo_MidiKeyToCgbFreq, 4
struct_field o_SoundInfo_MPlayJumpTable, 4
struct_field o_SoundInfo_plynote, 4
struct_field o_SoundInfo_ExtVolPit, 4
struct_field o_SoundInfo_gap2, 16
struct_field o_SoundInfo_chans, MAX_DIRECTSOUND_CHANNELS * 64
struct_field o_SoundInfo_pcmBuffer, PCM_DMA_BUF_SIZE * 2
struct_field SoundInfo_size, 0
struct_begin
struct_field o_SoundChannel_statusFlags, 1
struct_field o_SoundChannel_type, 1
struct_field o_SoundChannel_rightVolume, 1
struct_field o_SoundChannel_leftVolume, 1
struct_field o_SoundChannel_attack, 1
struct_field o_SoundChannel_decay, 1
struct_field o_SoundChannel_sustain, 1
struct_field o_SoundChannel_release, 1
struct_field o_SoundChannel_key, 1
struct_field o_SoundChannel_envelopeVolume, 1
struct_field o_SoundChannel_envelopeVolumeRight, 1
struct_field o_SoundChannel_envelopeVolumeLeft, 1
struct_field o_SoundChannel_pseudoEchoVolume, 1
struct_field o_SoundChannel_pseudoEchoLength, 1
struct_field o_SoundChannel_dummy1, 1
struct_field o_SoundChannel_dummy2, 1
struct_field o_SoundChannel_gateTime, 1
struct_field o_SoundChannel_midiKey, 1
struct_field o_SoundChannel_velocity, 1
struct_field o_SoundChannel_priority, 1
struct_field o_SoundChannel_rhythmPan, 1
struct_field o_SoundChannel_dummy3, 3
struct_field o_SoundChannel_count, 4
struct_field o_SoundChannel_fw, 4
struct_field o_SoundChannel_frequency, 4
struct_field o_SoundChannel_wav, 4
struct_field o_SoundChannel_currentPointer, 4
struct_field o_SoundChannel_track, 4
struct_field o_SoundChannel_prevChannelPointer, 4
struct_field o_SoundChannel_nextChannelPointer, 4
struct_field o_SoundChannel_dummy4, 4
struct_field o_SoundChannel_xpi, 2
struct_field o_SoundChannel_xpc, 2
struct_field SoundChannel_size, 0
struct_begin
struct_field o_MusicPlayerTrack_flags, 1
struct_field o_MusicPlayerTrack_wait, 1
struct_field o_MusicPlayerTrack_patternLevel, 1
struct_field o_MusicPlayerTrack_repN, 1
struct_field o_MusicPlayerTrack_gateTime, 1
struct_field o_MusicPlayerTrack_key, 1
struct_field o_MusicPlayerTrack_velocity, 1
struct_field o_MusicPlayerTrack_runningStatus, 1
struct_field o_MusicPlayerTrack_keyM, 1
struct_field o_MusicPlayerTrack_pitM, 1
struct_field o_MusicPlayerTrack_keyShift, 1
struct_field o_MusicPlayerTrack_keyShiftX, 1
struct_field o_MusicPlayerTrack_tune, 1
struct_field o_MusicPlayerTrack_pitX, 1
struct_field o_MusicPlayerTrack_bend, 1
struct_field o_MusicPlayerTrack_bendRange, 1
struct_field o_MusicPlayerTrack_volMR, 1
struct_field o_MusicPlayerTrack_volML, 1
struct_field o_MusicPlayerTrack_vol, 1
struct_field o_MusicPlayerTrack_volX, 1
struct_field o_MusicPlayerTrack_pan, 1
struct_field o_MusicPlayerTrack_panX, 1
struct_field o_MusicPlayerTrack_modM, 1
struct_field o_MusicPlayerTrack_mod, 1
struct_field o_MusicPlayerTrack_modT, 1
struct_field o_MusicPlayerTrack_lfoSpeed, 1
struct_field o_MusicPlayerTrack_lfoSpeedC, 1
struct_field o_MusicPlayerTrack_lfoDelay, 1
struct_field o_MusicPlayerTrack_lfoDelayC, 1
struct_field o_MusicPlayerTrack_priority, 1
struct_field o_MusicPlayerTrack_pseudoEchoVolume, 1
struct_field o_MusicPlayerTrack_pseudoEchoLength, 1
struct_field o_MusicPlayerTrack_chan, 4
struct_field o_MusicPlayerTrack_ToneData_type, 1
struct_field o_MusicPlayerTrack_ToneData_key, 1
struct_field o_MusicPlayerTrack_ToneData_length, 1
struct_field o_MusicPlayerTrack_ToneData_pan_sweep, 1
struct_field o_MusicPlayerTrack_ToneData_wav, 4
struct_field o_MusicPlayerTrack_ToneData_attack, 1
struct_field o_MusicPlayerTrack_ToneData_decay, 1
struct_field o_MusicPlayerTrack_ToneData_sustain, 1
struct_field o_MusicPlayerTrack_ToneData_release, 1
struct_field o_MusicPlayerTrack_gap, 10
struct_field o_MusicPlayerTrack_unk_3A, 2
struct_field o_MusicPlayerTrack_unk_3C, 4
struct_field o_MusicPlayerTrack_cmdPtr, 4
struct_field o_MusicPlayerTrack_patternStack, 12
struct_field MusicPlayerTrack_size, 0
.equiv o_MusicPlayerTrack_ToneData_keySplitTable, o_MusicPlayerTrack_ToneData_attack
struct_begin
struct_field o_MusicPlayerInfo_songHeader, 4
struct_field o_MusicPlayerInfo_status, 4
struct_field o_MusicPlayerInfo_trackCount, 1
struct_field o_MusicPlayerInfo_priority, 1
struct_field o_MusicPlayerInfo_cmd, 1
struct_field o_MusicPlayerInfo_unk_B, 1
struct_field o_MusicPlayerInfo_clock, 4
struct_field o_MusicPlayerInfo_gap, 8
struct_field o_MusicPlayerInfo_memAccArea, 4
struct_field o_MusicPlayerInfo_tempoD, 2
struct_field o_MusicPlayerInfo_tempoU, 2
struct_field o_MusicPlayerInfo_tempoI, 2
struct_field o_MusicPlayerInfo_tempoC, 2
struct_field o_MusicPlayerInfo_fadeOI, 2
struct_field o_MusicPlayerInfo_fadeOC, 2
struct_field o_MusicPlayerInfo_fadeOV, 2
struct_field o_MusicPlayerInfo_padding, 2
struct_field o_MusicPlayerInfo_tracks, 4
struct_field o_MusicPlayerInfo_tone, 4
struct_field o_MusicPlayerInfo_ident, 4
struct_field o_MusicPlayerInfo_func, 4
struct_field o_MusicPlayerInfo_intp, 4
struct_field MusicPlayerInfo_size, 0
struct_begin
struct_field o_CgbChannel_statusFlags, 1
struct_field o_CgbChannel_type, 1
struct_field o_CgbChannel_rightVolume, 1
struct_field o_CgbChannel_leftVolume, 1
struct_field o_CgbChannel_attack, 1
struct_field o_CgbChannel_decay, 1
struct_field o_CgbChannel_sustain, 1
struct_field o_CgbChannel_release, 1
struct_field o_CgbChannel_key, 1
struct_field o_CgbChannel_envelopeVolume, 1
struct_field o_CgbChannel_envelopeGoal, 1
struct_field o_CgbChannel_envelopeCounter, 1
struct_field o_CgbChannel_pseudoEchoVolume, 1
struct_field o_CgbChannel_pseudoEchoLength, 1
struct_field o_CgbChannel_dummy1, 1
struct_field o_CgbChannel_dummy2, 1
struct_field o_CgbChannel_gateTime, 1
struct_field o_CgbChannel_midiKey, 1
struct_field o_CgbChannel_velocity, 1
struct_field o_CgbChannel_priority, 1
struct_field o_CgbChannel_rhythmPan, 1
struct_field o_CgbChannel_dummy3, 3
struct_field o_CgbChannel_dummy5, 1
struct_field o_CgbChannel_sustainGoal, 1
struct_field o_CgbChannel_n4, 1
struct_field o_CgbChannel_pan, 1
struct_field o_CgbChannel_panMask, 1
struct_field o_CgbChannel_modify, 1
struct_field o_CgbChannel_length, 1
struct_field o_CgbChannel_sweep, 1
struct_field o_CgbChannel_frequency, 4
struct_field o_CgbChannel_wavePointer, 4
struct_field o_CgbChannel_currentPointer, 4
struct_field o_CgbChannel_track, 4
struct_field o_CgbChannel_prevChannelPointer, 4
struct_field o_CgbChannel_nextChannelPointer, 4
struct_field o_CgbChannel_dummy4, 8
struct_field CgbChannel_size, 0
#endif @ GUARD_CONSTANTS_M4A_CONSTANTS_INC
-22
View File
@@ -1,22 +0,0 @@
#ifndef GUARD_CONSTANTS_TMS_HMS_INC
#define GUARD_CONSTANTS_TMS_HMS_INC
#include "constants/tms_hms.h"
/* Expands to:
* enum_start ITEM_TM01
* enum ITEM_TM_FOCUS_PUNCH
* ...
* enum_start ITEM_HM01
* enum ITEM_HM_CUT
* ... */
#define EQUIV_TM(id) enum ITEM_TM_ ## id;
#define EQUIV_HM(id) enum ITEM_HM_ ## id;
enum_start ITEM_TM01
FOREACH_TM(EQUIV_TM)
enum_start ITEM_HM01
FOREACH_HM(EQUIV_HM)
#undef EQUIV_TM
#undef EQUIV_HM
#endif @ GUARD_CONSTANTS_TMS_HMS_INC
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
-202
View File
@@ -1,202 +0,0 @@
#include "constants/battle.h"
#include "constants/battle_script_commands.h"
#include "constants/battle_anim.h"
#include "constants/battle_string_ids.h"
#include "constants/items.h"
#include "constants/songs.h"
#include "constants/game_stat.h"
.include "asm/macros.inc"
.include "asm/macros/battle_script.inc"
.include "constants/constants.inc"
.section script_data, "aw", %progbits
.align 2
gBattlescriptsForBallThrow::
.4byte BattleScript_BallThrow @ ITEM_NONE
.4byte BattleScript_BallThrow @ ITEM_MASTER_BALL
.4byte BattleScript_BallThrow @ ITEM_ULTRA_BALL
.4byte BattleScript_BallThrow @ ITEM_GREAT_BALL
.4byte BattleScript_BallThrow @ ITEM_POKE_BALL
.4byte BattleScript_SafariBallThrow @ ITEM_SAFARI_BALL
.4byte BattleScript_BallThrow @ ITEM_NET_BALL
.4byte BattleScript_BallThrow @ ITEM_DIVE_BALL
.4byte BattleScript_BallThrow @ ITEM_NEST_BALL
.4byte BattleScript_BallThrow @ ITEM_REPEAT_BALL
.4byte BattleScript_BallThrow @ ITEM_TIMER_BALL
.4byte BattleScript_BallThrow @ ITEM_LUXURY_BALL
.4byte BattleScript_BallThrow @ ITEM_PREMIER_BALL
.align 2
gBattlescriptsForUsingItem::
.4byte BattleScript_PlayerUsesItem
.4byte BattleScript_OpponentUsesHealItem @ AI_ITEM_FULL_RESTORE
.4byte BattleScript_OpponentUsesHealItem @ AI_ITEM_HEAL_HP
.4byte BattleScript_OpponentUsesStatusCureItem @ AI_ITEM_CURE_CONDITION
.4byte BattleScript_OpponentUsesXItem @ AI_ITEM_X_STAT
.4byte BattleScript_OpponentUsesGuardSpec @ AI_ITEM_GUARD_SPEC
.align 2
gBattlescriptsForRunningByItem::
.4byte BattleScript_RunByUsingItem
.align 2
gBattlescriptsForSafariActions::
.4byte BattleScript_ActionWatchesCarefully
.4byte BattleScript_ActionGetNear
.4byte BattleScript_ActionThrowPokeblock
.4byte BattleScript_ActionWallyThrow
BattleScript_BallThrow::
jumpifword CMP_COMMON_BITS, gBattleTypeFlags, BATTLE_TYPE_WALLY_TUTORIAL, BattleScript_BallThrowByWally
printstring STRINGID_PLAYERUSEDITEM
handleballthrow
BattleScript_BallThrowByWally::
printstring STRINGID_WALLYUSEDITEM
handleballthrow
BattleScript_SafariBallThrow::
printstring STRINGID_PLAYERUSEDITEM
updatestatusicon BS_ATTACKER
handleballthrow
BattleScript_SuccessBallThrow::
jumpifhalfword CMP_EQUAL, gLastUsedItem, ITEM_SAFARI_BALL, BattleScript_PrintCaughtMonInfo
incrementgamestat GAME_STAT_POKEMON_CAPTURES
BattleScript_PrintCaughtMonInfo::
printstring STRINGID_GOTCHAPKMNCAUGHTPLAYER
trysetcaughtmondexflags BattleScript_TryNicknameCaughtMon
printstring STRINGID_PKMNDATAADDEDTODEX
waitstate
setbyte gBattleCommunication, 0
displaydexinfo
BattleScript_TryNicknameCaughtMon::
printstring STRINGID_GIVENICKNAMECAPTURED
waitstate
setbyte gBattleCommunication, 0
trygivecaughtmonnick BattleScript_GiveCaughtMonEnd
givecaughtmon
printfromtable gCaughtMonStringIds
waitmessage B_WAIT_TIME_LONG
goto BattleScript_SuccessBallThrowEnd
BattleScript_GiveCaughtMonEnd::
givecaughtmon
BattleScript_SuccessBallThrowEnd::
setbyte gBattleOutcome, B_OUTCOME_CAUGHT
finishturn
BattleScript_WallyBallThrow::
printstring STRINGID_GOTCHAPKMNCAUGHTWALLY
setbyte gBattleOutcome, B_OUTCOME_CAUGHT
finishturn
BattleScript_ShakeBallThrow::
printfromtable gBallEscapeStringIds
waitmessage B_WAIT_TIME_LONG
jumpifword CMP_NO_COMMON_BITS, gBattleTypeFlags, BATTLE_TYPE_SAFARI, BattleScript_ShakeBallThrowEnd
jumpifbyte CMP_NOT_EQUAL, gNumSafariBalls, 0, BattleScript_ShakeBallThrowEnd
printstring STRINGID_OUTOFSAFARIBALLS
waitmessage B_WAIT_TIME_LONG
setbyte gBattleOutcome, B_OUTCOME_NO_SAFARI_BALLS
BattleScript_ShakeBallThrowEnd::
finishaction
BattleScript_TrainerBallBlock::
waitmessage B_WAIT_TIME_LONG
printstring STRINGID_TRAINERBLOCKEDBALL
waitmessage B_WAIT_TIME_LONG
printstring STRINGID_DONTBEATHIEF
waitmessage B_WAIT_TIME_LONG
finishaction
BattleScript_PlayerUsesItem::
moveendcase MOVEEND_MIRROR_MOVE
end
BattleScript_OpponentUsesHealItem::
printstring STRINGID_EMPTYSTRING3
pause B_WAIT_TIME_MED
playse SE_USE_ITEM
printstring STRINGID_TRAINER1USEDITEM
waitmessage B_WAIT_TIME_LONG
useitemonopponent
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE
healthbarupdate BS_ATTACKER
datahpupdate BS_ATTACKER
printstring STRINGID_PKMNSITEMRESTOREDHEALTH
waitmessage B_WAIT_TIME_LONG
updatestatusicon BS_ATTACKER
moveendcase MOVEEND_MIRROR_MOVE
finishaction
BattleScript_OpponentUsesStatusCureItem::
printstring STRINGID_EMPTYSTRING3
pause B_WAIT_TIME_MED
playse SE_USE_ITEM
printstring STRINGID_TRAINER1USEDITEM
waitmessage B_WAIT_TIME_LONG
useitemonopponent
printfromtable gTrainerItemCuredStatusStringIds
waitmessage B_WAIT_TIME_LONG
updatestatusicon BS_ATTACKER
moveendcase MOVEEND_MIRROR_MOVE
finishaction
BattleScript_OpponentUsesXItem::
printstring STRINGID_EMPTYSTRING3
pause B_WAIT_TIME_MED
playse SE_USE_ITEM
printstring STRINGID_TRAINER1USEDITEM
waitmessage B_WAIT_TIME_LONG
useitemonopponent
printfromtable gStatUpStringIds
waitmessage B_WAIT_TIME_LONG
moveendcase MOVEEND_MIRROR_MOVE
finishaction
BattleScript_OpponentUsesGuardSpec::
printstring STRINGID_EMPTYSTRING3
pause B_WAIT_TIME_MED
playse SE_USE_ITEM
printstring STRINGID_TRAINER1USEDITEM
waitmessage B_WAIT_TIME_LONG
useitemonopponent
printfromtable gMistUsedStringIds
waitmessage B_WAIT_TIME_LONG
moveendcase MOVEEND_MIRROR_MOVE
finishaction
BattleScript_RunByUsingItem::
playse SE_FLEE
setbyte gBattleOutcome, B_OUTCOME_RAN
finishturn
BattleScript_ActionWatchesCarefully:
printstring STRINGID_PKMNWATCHINGCAREFULLY
waitmessage B_WAIT_TIME_LONG
end2
BattleScript_ActionGetNear:
printfromtable gSafariGetNearStringIds
waitmessage B_WAIT_TIME_LONG
end2
BattleScript_ActionThrowPokeblock:
printstring STRINGID_THREWPOKEBLOCKATPKMN
waitmessage B_WAIT_TIME_LONG
playanimation BS_ATTACKER, B_ANIM_POKEBLOCK_THROW, NULL
printfromtable gSafariPokeblockResultStringIds
waitmessage B_WAIT_TIME_LONG
end2
BattleScript_ActionWallyThrow:
printstring STRINGID_RETURNMON
waitmessage B_WAIT_TIME_LONG
returnatktoball
waitstate
trainerslidein BS_TARGET
waitstate
printstring STRINGID_YOUTHROWABALLNOWRIGHT
waitmessage B_WAIT_TIME_LONG
end2
-920
View File
@@ -1,920 +0,0 @@
#include "config.h"
#include "constants/global.h"
#include "constants/contest.h"
.include "asm/macros.inc"
.include "asm/macros/contest_ai_script.inc"
.include "constants/constants.inc"
.section script_data, "aw", %progbits
enum_start
enum MON_1
enum MON_2
enum MON_3
enum MON_4
.align 2
gContestAI_ScriptsTable::
.4byte AI_CheckBadMove @ CONTEST_AI_CHECK_BAD_MOVE
.4byte AI_CheckCombo @ CONTEST_AI_CHECK_COMBO
.4byte AI_CheckBoring @ CONTEST_AI_CHECK_BORING
.4byte AI_CheckExcitement @ CONTEST_AI_CHECK_EXCITEMENT
.4byte AI_CheckOrder @ CONTEST_AI_CHECK_ORDER
.4byte AI_CheckGoodMove @ CONTEST_AI_CHECK_GOOD_MOVE
.4byte AI_Erratic @ CONTEST_AI_ERRATIC
.4byte AI_Nothing @ CONTEST_AI_DUMMY_1
.4byte AI_Nothing @ CONTEST_AI_DUMMY_2
.4byte AI_Nothing @ CONTEST_AI_DUMMY_3
.4byte AI_Nothing @ CONTEST_AI_DUMMY_4
.4byte AI_Nothing @ CONTEST_AI_DUMMY_5
.4byte AI_Nothing @ CONTEST_AI_DUMMY_6
.4byte AI_Nothing @ CONTEST_AI_DUMMY_7
.4byte AI_Nothing @ CONTEST_AI_DUMMY_8
.4byte AI_Nothing @ CONTEST_AI_DUMMY_9
.4byte AI_Nothing @ CONTEST_AI_DUMMY_10
.4byte AI_Nothing @ CONTEST_AI_DUMMY_11
.4byte AI_Nothing @ CONTEST_AI_DUMMY_12
.4byte AI_Nothing @ CONTEST_AI_DUMMY_13
.4byte AI_Nothing @ CONTEST_AI_DUMMY_14
.4byte AI_Nothing @ CONTEST_AI_DUMMY_15
.4byte AI_Nothing @ CONTEST_AI_DUMMY_16
.4byte AI_Nothing @ CONTEST_AI_DUMMY_17
.4byte AI_Nothing @ CONTEST_AI_DUMMY_18
.4byte AI_Nothing @ CONTEST_AI_DUMMY_19
.4byte AI_Nothing @ CONTEST_AI_DUMMY_20
.4byte AI_Nothing @ CONTEST_AI_DUMMY_21
.4byte AI_Nothing @ CONTEST_AI_DUMMY_22
.4byte AI_Nothing @ CONTEST_AI_DUMMY_23
.4byte AI_Nothing @ CONTEST_AI_DUMMY_24
.4byte AI_Nothing @ CONTEST_AI_DUMMY_25
@ Unused. Encourages improving condition on the 1st appeal, or startling mons if the users turn is later
AI_CheckTiming:
if_appeal_num_not_eq 0, AI_CheckTiming_SkipCondition
if_effect_not_eq CONTEST_EFFECT_IMPROVE_CONDITION_PREVENT_NERVOUSNESS, AI_CheckTiming_SkipCondition
score +10
AI_CheckTiming_SkipCondition:
call AI_CheckTiming_TryStartle
end
AI_CheckTiming_TryStartle:
if_user_order_more_than MON_2, AI_CheckTiming_End
if_effect_type_not_eq CONTEST_EFFECT_TYPE_STARTLE_MON, AI_CheckTiming_End
if_effect_type_not_eq CONTEST_EFFECT_TYPE_STARTLE_MONS, AI_CheckTiming_End
score +10
AI_CheckTiming_End:
end
@ Unused, doesnt make much sense
@ Encourages using an avoid being startled move
@ The various appeal and turn checks are pointless, it will always encourage these moves
AI_AvoidStartle:
if_appeal_num_eq 0, AI_AvoidStartle_1stAppeal
if_appeal_num_eq 1, AI_AvoidStartle_2ndAppeal
if_appeal_num_eq 2, AI_AvoidStartle_3rdAppeal
if_appeal_num_eq 3, AI_AvoidStartle_4thAppeal
if_last_appeal AI_AvoidStartle_LastAppeal
end
AI_AvoidStartle_1stAppeal:
if_user_order_not_eq MON_1, AI_AvoidStartle_EncourageIfAvoidMove
if_user_order_not_eq MON_2, AI_AvoidStartle_EncourageIfAvoidMove2
if_user_order_not_eq MON_3, AI_AvoidStartle_EncourageIfAvoidMove
if_user_order_not_eq MON_4, AI_AvoidStartle_EncourageIfAvoidMove
end
AI_AvoidStartle_EncourageIfAvoidMove:
if_effect_type_eq CONTEST_EFFECT_TYPE_AVOID_STARTLE, AI_AvoidStartle_Encourage
end
AI_AvoidStartle_EncourageIfAvoidMove2:
if_effect_type_eq CONTEST_EFFECT_TYPE_AVOID_STARTLE, AI_AvoidStartle_Encourage
end
AI_AvoidStartle_EncourageIfAvoidMove3:
if_effect_type_eq CONTEST_EFFECT_TYPE_AVOID_STARTLE, AI_AvoidStartle_Encourage
end
AI_AvoidStartle_2ndAppeal:
if_user_order_not_eq MON_1, AI_AvoidStartle_EncourageIfAvoidMove
if_user_order_not_eq MON_2, AI_AvoidStartle_EncourageIfAvoidMove
if_user_order_not_eq MON_3, AI_AvoidStartle_EncourageIfAvoidMove
if_user_order_not_eq MON_4, AI_AvoidStartle_EncourageIfAvoidMove
end
AI_AvoidStartle_3rdAppeal:
if_user_order_not_eq MON_1, AI_AvoidStartle_EncourageIfAvoidMove
if_user_order_not_eq MON_2, AI_AvoidStartle_EncourageIfAvoidMove
if_user_order_not_eq MON_3, AI_AvoidStartle_EncourageIfAvoidMove
if_user_order_not_eq MON_4, AI_AvoidStartle_EncourageIfAvoidMove
end
AI_AvoidStartle_4thAppeal:
if_user_order_not_eq MON_1, AI_AvoidStartle_EncourageIfAvoidMove
if_user_order_not_eq MON_2, AI_AvoidStartle_EncourageIfAvoidMove
if_user_order_not_eq MON_3, AI_AvoidStartle_EncourageIfAvoidMove
if_user_order_not_eq MON_4, AI_AvoidStartle_EncourageIfAvoidMove
end
AI_AvoidStartle_LastAppeal:
if_user_order_not_eq MON_1, AI_AvoidStartle_EncourageIfAvoidMove
if_user_order_not_eq MON_2, AI_AvoidStartle_EncourageIfAvoidMove
if_user_order_not_eq MON_3, AI_AvoidStartle_EncourageIfAvoidMove
if_user_order_not_eq MON_4, AI_AvoidStartle_EncourageIfAvoidMove
end
AI_AvoidStartle_Encourage:
score +10
end
AI_AvoidStartle_End:
end
@ Unused
AI_PreferMostAppealingMove:
if_most_appealing_move AI_PreferMostAppealingMove_Encourage
end
AI_PreferMostAppealingMove_Encourage:
score +10
end
@ Discourages using the same move multiple times if it would get boring
AI_CheckBoring:
if_effect_eq CONTEST_EFFECT_REPETITION_NOT_BORING, AI_CheckBoring_NotBoring
if_move_used_count_eq 1, AI_CheckBoring_1stRepeat
if_move_used_count_eq 2, AI_CheckBoring_2ndRepeat
if_move_used_count_eq 3, AI_CheckBoring_3rdRepeat
if_move_used_count_eq 4, AI_CheckBoring_4thRepeat
@ No repeats
end
AI_CheckBoring_1stRepeat:
score -5
end
AI_CheckBoring_2ndRepeat:
score -15
end
AI_CheckBoring_3rdRepeat:
score -20
end
AI_CheckBoring_4thRepeat:
score -25
end
AI_CheckBoring_NotBoring:
end
@ Strongly encourages using an exciting move if user is in a position to receive the max excitement bonus
@ Encourages using exciting moves in general
@ If the user doesnt have a good exciting move to use, then encourage lowering excitement to prevent
@ opponents from benefitting from the excitement
AI_CheckExcitement:
if_move_excitement_less_than 0, AI_CheckExcitement_Negative
if_move_excitement_eq 0, AI_CheckExcitement_Neutral
if_move_excitement_eq 1, AI_CheckExcitement_Positive
end
AI_CheckExcitement_Negative:
if_excitement_eq 4, AI_CheckExcitement_Negative_1AwayFromMax
if_excitement_eq 3, AI_CheckExcitement_Negative_2AwayFromMax
if_user_has_exciting_move AI_CheckExcitement_End
score +15
end
AI_CheckExcitement_Negative_1AwayFromMax:
if_user_order_not_eq MON_1, AI_CheckExcitement_Negative_1AwayFromMax_Not1stUp
if_random_less_than 51, AI_CheckExcitement_End
score +20
end
AI_CheckExcitement_Negative_1AwayFromMax_Not1stUp:
if_random_less_than 127, AI_CheckExcitement_End
score -10
end
AI_CheckExcitement_Negative_2AwayFromMax:
if_user_order_not_eq MON_1, AI_CheckExcitement_Negative_2AwayFromMax_Not1stUp
if_last_appeal AI_CheckExcitement_Negative_2AwayFromMax_LastAppeal
if_random_less_than 51, AI_CheckExcitement_End
score +10
end
AI_CheckExcitement_Negative_2AwayFromMax_LastAppeal:
score +15
end
AI_CheckExcitement_Negative_2AwayFromMax_Not1stUp:
if_random_less_than 127, AI_CheckExcitement_End
score +10
end
AI_CheckExcitement_Neutral:
if_random_less_than 127, AI_CheckExcitement_End
score +10
end
AI_CheckExcitement_Positive:
if_move_used_count_more_than 0, AI_CheckExcitement_Positive_Repeat
if_user_order_not_eq MON_1, AI_CheckExcitement_Positive_Not1stUpForMax
if_excitement_not_eq 4, AI_CheckExcitement_Positive_Not1stUpForMax
score +30
end
AI_CheckExcitement_Positive_Not1stUpForMax:
if_random_less_than 100, AI_CheckExcitement_End
score +10
end
AI_CheckExcitement_Positive_Repeat:
if_effect_not_eq CONTEST_EFFECT_REPETITION_NOT_BORING, AI_CheckExcitement_End
if_user_order_not_eq MON_1, AI_CheckExcitement_Positive_Not1stUpForMax
if_excitement_not_eq 4, AI_CheckExcitement_Positive_Not1stUpForMax
score +30
end
AI_CheckExcitement_End:
end
@ Strongly encourages using a move if it would finish a combo
@ Encourages using a move if it would start a combo, esp if the user goes earlier
@ Discourages starting a combo in the last round
@ Discourages using a combo finisher when its combo starter hasnt been used yet
AI_CheckCombo:
if_would_finish_combo AI_CheckCombo_WouldFinish
call AI_CheckCombo_CheckStarter
call AI_CheckCombo_CheckFinisherWithoutStarter
end
AI_CheckCombo_CheckStarter:
if_move_used_count_not_eq 0, AI_CheckCombo_End
if_not_combo_starter AI_CheckCombo_End
if_user_order_eq MON_1, AI_CheckCombo_Starter1stUp
if_user_order_eq MON_2, AI_CheckCombo_Starter2ndUp
if_user_order_eq MON_3, AI_CheckCombo_Starter3rdUp
if_user_order_eq MON_4, AI_CheckCombo_StarterLast
end
AI_CheckCombo_CheckFinisherWithoutStarter:
if_not_combo_finisher AI_CheckCombo_End
score -10
end
AI_CheckCombo_WouldFinish:
score +25
end
AI_CheckCombo_Starter1stUp:
if_last_appeal AI_CheckCombo_StarterOnLastAppeal
if_random_less_than 150, AI_CheckCombo_End
score +10
end
AI_CheckCombo_Starter2ndUp:
if_last_appeal AI_CheckCombo_StarterOnLastAppeal
if_random_less_than 125, AI_CheckCombo_End
score +10
end
AI_CheckCombo_Starter3rdUp:
if_last_appeal AI_CheckCombo_StarterOnLastAppeal
if_random_less_than 50, AI_CheckCombo_End
score +10
end
AI_CheckCombo_StarterLast:
if_last_appeal AI_CheckCombo_StarterOnLastAppeal
score +10
end
AI_CheckCombo_StarterOnLastAppeal:
if_random_less_than 125, AI_CheckCombo_End
score -15
end
AI_CheckCombo_End:
end
@ Checks if move should be encouraged based on its effect
AI_CheckGoodMove:
if_effect_eq CONTEST_EFFECT_BETTER_WITH_GOOD_CONDITION, AI_CGM_BetterWithGoodCondition
if_effect_eq CONTEST_EFFECT_NEXT_APPEAL_EARLIER, AI_CGM_NextAppealEarlier
if_effect_eq CONTEST_EFFECT_NEXT_APPEAL_LATER, AI_CGM_NextAppealLater
if_effect_eq CONTEST_EFFECT_REPETITION_NOT_BORING, AI_CGM_RepetitionNotBoring
if_effect_eq CONTEST_EFFECT_IMPROVE_CONDITION_PREVENT_NERVOUSNESS, AI_CGM_ImproveCondition
if_effect_eq CONTEST_EFFECT_DONT_EXCITE_AUDIENCE, AI_CGM_DontExciteAudience
if_effect_eq CONTEST_EFFECT_APPEAL_AS_GOOD_AS_PREV_ONES, AI_CGM_AppealAsGoodAsPrevOnes
if_effect_eq CONTEST_EFFECT_APPEAL_AS_GOOD_AS_PREV_ONE, AI_CGM_AppealAsGoodAsPrevOne
if_effect_eq CONTEST_EFFECT_BETTER_WHEN_AUDIENCE_EXCITED, AI_CGM_BetterWhenAudienceExcited
if_effect_eq CONTEST_EFFECT_WORSEN_CONDITION_OF_PREV_MONS, AI_CGM_WorsenConditionOfPrevMons
if_effect_eq CONTEST_EFFECT_SHIFT_JUDGE_ATTENTION, AI_CGM_TargetMonWithJudgesAttention
if_effect_eq CONTEST_EFFECT_STARTLE_MON_WITH_JUDGES_ATTENTION, AI_CGM_TargetMonWithJudgesAttention
if_effect_eq CONTEST_EFFECT_MAKE_FOLLOWING_MONS_NERVOUS, AI_CGM_MakeFollowingMonsNervous
if_effect_eq CONTEST_EFFECT_JAMS_OTHERS_BUT_MISS_ONE_TURN, AI_CGM_JamsOthersButMissOneTurn
end
AI_CGM_BetterWithGoodCondition:
if_user_condition_eq 3, AI_CGM_BetterWithGoodCondition_3
if_user_condition_eq 2, AI_CGM_BetterWithGoodCondition_2
if_user_condition_eq 1, AI_CGM_BetterWithGoodCondition_1
if_user_condition_eq 0, AI_CGM_BetterWithGoodCondition_0
end
AI_CGM_BetterWithGoodCondition_3:
score +20
end
AI_CGM_BetterWithGoodCondition_2:
if_random_less_than 125, AI_CGM_End
score +15
end
AI_CGM_BetterWithGoodCondition_1:
if_random_less_than 125, AI_CGM_End
score +5
end
AI_CGM_BetterWithGoodCondition_0:
score -20
end
AI_CGM_NextAppealEarlier:
if_user_doesnt_have_move CONTEST_EFFECT_BETTER_IF_FIRST, AI_CGM_End
if_random_less_than 50, AI_CGM_End
score +20
end
AI_CGM_NextAppealLater:
if_user_doesnt_have_move CONTEST_EFFECT_BETTER_IF_LAST, AI_CGM_End
if_random_less_than 50, AI_CGM_End
score +20
end
AI_CGM_RepetitionNotBoring:
if_user_order_not_eq MON_4, AI_CGM_End
if_random_less_than 50, AI_CGM_End
score +15
end
AI_CGM_Unused:
if_last_appeal AI_CGM_Unused_LastAppeal
if_random_less_than 220, AI_CGM_Unused_Discourage
score +10
end
AI_CGM_Unused_LastAppeal:
if_random_less_than 20, AI_CGM_End
score +15
end
AI_CGM_Unused_Discourage:
score -20
end
@ Enourages improving condition, esp if user has moves better with good condition or on 1st appeal
@ Discourages improving condition if at max condition, or if last appeal
AI_CGM_ImproveCondition:
if_user_doesnt_have_move CONTEST_EFFECT_BETTER_WITH_GOOD_CONDITION, AI_CGM_ImproveCondition_CheckAppealNum
if_user_condition_eq 3, AI_CGM_ImproveCondition_AtMax
if_random_less_than 50, AI_CGM_End
score +15
end
AI_CGM_ImproveCondition_AtMax:
score -10
end
AI_CGM_ImproveCondition_CheckAppealNum:
if_last_appeal AI_CGM_ImproveCondition_LastAppeal
if_appeal_num_eq 0, AI_CGM_ImproveCondition_FirstAppeal
if_move_used_count_eq 1, AI_CGM_End
if_random_less_than 125, AI_CGM_End
score +10
end
AI_CGM_ImproveCondition_FirstAppeal:
if_random_less_than 100, AI_CGM_End
score +10
end
AI_CGM_ImproveCondition_LastAppeal:
score -10
end
@ Encourage stopping audience excitement early in the appeal, or last appeal if no better options
AI_CGM_DontExciteAudience:
if_move_used_count_eq 1, AI_CGM_End
if_user_order_eq MON_1, AI_CGM_DontExciteAudience_EarlyTurn
if_user_order_eq MON_2, AI_CGM_DontExciteAudience_EarlyTurn
if_not_last_appeal AI_CGM_End
if_user_has_exciting_move AI_CGM_End
if_excitement_less_than 1, AI_CGM_End
score +10
end
AI_CGM_DontExciteAudience_EarlyTurn:
if_random_less_than 127, AI_CGM_End
score +10
end
@ Encourages move the later the user goes
AI_CGM_AppealAsGoodAsPrevOnes:
if_user_order_eq MON_2, AI_CGM_AppealAsGoodAsPrevOnes_2ndUp
if_user_order_eq MON_3, AI_CGM_AppealAsGoodAsPrevOnes_3rdUp
if_user_order_eq MON_4, AI_CGM_AppealAsGoodAsPrevOnes_Last
end
AI_CGM_AppealAsGoodAsPrevOnes_2ndUp:
score +5
end
AI_CGM_AppealAsGoodAsPrevOnes_3rdUp:
score +15
end
AI_CGM_AppealAsGoodAsPrevOnes_Last:
score +20
end
@ Encourages move more for each opponent who will have a turn before the user
AI_CGM_AppealAsGoodAsPrevOne:
if_user_order_eq MON_1, AI_CGM_AppealAsGoodAsPrevOne_1stUp
if_user_order_eq MON_2, AI_CGM_AppealAsGoodAsPrevOne_2ndUp
if_user_order_eq MON_3, AI_CGM_AppealAsGoodAsPrevOne_3rdUp
if_user_order_eq MON_4, AI_CGM_AppealAsGoodAsPrevOne_Last
end
AI_CGM_AppealAsGoodAsPrevOne_1stUp:
score -10
end
AI_CGM_AppealAsGoodAsPrevOne_2ndUp:
if_cannot_participate MON_1, AI_CGM_End
score +5
end
AI_CGM_AppealAsGoodAsPrevOne_3rdUp:
if_cannot_participate MON_1, AI_CGM_AppealAsGoodAsPrevOne_3rdUp_CheckMon2
score +5
goto AI_CGM_AppealAsGoodAsPrevOne_3rdUp_CheckMon2
end
AI_CGM_AppealAsGoodAsPrevOne_3rdUp_CheckMon2:
if_cannot_participate MON_2, AI_CGM_End
score +5
end
AI_CGM_AppealAsGoodAsPrevOne_Last:
if_cannot_participate MON_1, AI_CGM_AppealAsGoodAsPrevOne_Last_CheckMon2
score +5
goto AI_CGM_AppealAsGoodAsPrevOne_Last_CheckMon2
end
AI_CGM_AppealAsGoodAsPrevOne_Last_CheckMon2:
if_cannot_participate MON_2, AI_CGM_AppealAsGoodAsPrevOne_Last_CheckMon3
score +5
goto AI_CGM_AppealAsGoodAsPrevOne_Last_CheckMon3
end
AI_CGM_AppealAsGoodAsPrevOne_Last_CheckMon3:
if_cannot_participate MON_3, AI_CGM_End
score +5
end
@ Encourage move if audience is close to full exictement and user goes first
@ See bug note, only does this on 1st appeal (when it will never happen)
AI_CGM_BetterWhenAudienceExcited:
if_user_order_eq MON_1, AI_CGM_BetterWhenAudienceExcited_1stUp
if_user_order_more_than MON_1, AI_CGM_BetterWhenAudienceExcited_Not1stUp
end
AI_CGM_BetterWhenAudienceExcited_1stUp:
@ BUG: Should be if_appeal_num_eq 0
@ 1st up on 1st appeal excitement will always be 0
#ifdef BUGFIX
if_appeal_num_eq 0, AI_CGM_BetterWhenAudienceExcited_1stAppeal
#else
if_appeal_num_not_eq 0, AI_CGM_BetterWhenAudienceExcited_1stAppeal
#endif
if_excitement_eq 4, AI_CGM_BetterWhenAudienceExcited_1AwayFromMax
if_excitement_eq 3, AI_CGM_BetterWhenAudienceExcited_2AwayFromMax
end
AI_CGM_BetterWhenAudienceExcited_1stAppeal:
if_random_less_than 125, AI_CGM_End
score -15
end
AI_CGM_BetterWhenAudienceExcited_1AwayFromMax:
if_random_less_than 125, AI_CGM_End
score +20
end
AI_CGM_BetterWhenAudienceExcited_2AwayFromMax:
if_random_less_than 125, AI_CGM_End
score +15
end
AI_CGM_BetterWhenAudienceExcited_Not1stUp:
if_random_less_than 178, AI_CGM_End
score +10
end
@ Encourage move more for each condition star the prev mons have
AI_CGM_WorsenConditionOfPrevMons:
if_user_order_eq MON_1, AI_CGM_End
goto AI_CGM_WorsenConditionOfPrevMons_CheckMon1
end
AI_CGM_WorsenConditionOfPrevMons_CheckMon1:
if_cannot_participate MON_1, AI_CGM_WorsenConditionOfPrevMons_TryCheckMon2
if_condition_eq MON_1, 0, AI_CGM_WorsenConditionOfPrevMons_TryCheckMon2
if_condition_eq MON_1, 1, AI_CGM_WorsenConditionOfPrevMons_Mon1Has1Star
if_condition_eq MON_1, 2, AI_CGM_WorsenConditionOfPrevMons_Mon1Has2Stars
if_condition_eq MON_1, 3, AI_CGM_WorsenConditionOfPrevMons_Mon1Has3Stars
end
AI_CGM_WorsenConditionOfPrevMons_Mon1Has1Star:
if_random_less_than 125, AI_CGM_WorsenConditionOfPrevMons_CheckMon2
score +5
if_user_order_more_than MON_2, AI_CGM_WorsenConditionOfPrevMons_CheckMon2
end
AI_CGM_WorsenConditionOfPrevMons_Mon1Has2Stars:
if_random_less_than 125, AI_CGM_WorsenConditionOfPrevMons_CheckMon2
score +10
if_user_order_more_than MON_2, AI_CGM_WorsenConditionOfPrevMons_CheckMon2
end
AI_CGM_WorsenConditionOfPrevMons_Mon1Has3Stars:
if_random_less_than 125, AI_CGM_WorsenConditionOfPrevMons_CheckMon2
score +15
if_user_order_more_than MON_2, AI_CGM_WorsenConditionOfPrevMons_CheckMon2
end
AI_CGM_WorsenConditionOfPrevMons_TryCheckMon2:
if_user_order_more_than MON_2, AI_CGM_WorsenConditionOfPrevMons_CheckMon2
end
AI_CGM_WorsenConditionOfPrevMons_CheckMon2:
if_cannot_participate MON_2, AI_CGM_WorsenConditionOfPrevMons_TryCheckMon3
if_condition_eq MON_2, 0, AI_CGM_WorsenConditionOfPrevMons_TryCheckMon3
if_condition_eq MON_2, 1, AI_CGM_WorsenConditionOfPrevMons_Mon2Has1Star
if_condition_eq MON_2, 2, AI_CGM_WorsenConditionOfPrevMons_Mon2Has2Stars
if_condition_eq MON_2, 3, AI_CGM_WorsenConditionOfPrevMons_Mon2Has3Stars
end
AI_CGM_WorsenConditionOfPrevMons_Mon2Has1Star:
if_random_less_than 125, AI_CGM_WorsenConditionOfPrevMons_CheckMon3
score +5
if_user_order_more_than MON_3, AI_CGM_WorsenConditionOfPrevMons_CheckMon3
end
AI_CGM_WorsenConditionOfPrevMons_Mon2Has2Stars:
if_random_less_than 125, AI_CGM_WorsenConditionOfPrevMons_CheckMon3
score +10
if_user_order_more_than MON_3, AI_CGM_WorsenConditionOfPrevMons_CheckMon3
end
AI_CGM_WorsenConditionOfPrevMons_Mon2Has3Stars:
if_random_less_than 125, AI_CGM_WorsenConditionOfPrevMons_CheckMon3
score +15
if_user_order_more_than MON_3, AI_CGM_WorsenConditionOfPrevMons_CheckMon3
end
AI_CGM_WorsenConditionOfPrevMons_TryCheckMon3:
if_user_order_more_than MON_3, AI_CGM_WorsenConditionOfPrevMons_CheckMon3
end
AI_CGM_WorsenConditionOfPrevMons_CheckMon3:
if_cannot_participate MON_3, AI_CGM_WorsenConditionOfPrevMons_end
if_condition_eq MON_3, 0, AI_CGM_WorsenConditionOfPrevMons_end
if_condition_eq MON_3, 1, AI_CGM_WorsenConditionOfPrevMons_Mon3Has1Star
if_condition_eq MON_3, 2, AI_CGM_WorsenConditionOfPrevMons_Mon3Has2Stars
if_condition_eq MON_3, 3, AI_CGM_WorsenConditionOfPrevMons_Mon3Has3Stars
end
AI_CGM_WorsenConditionOfPrevMons_Mon3Has1Star:
if_random_less_than 125, AI_CGM_End
score +5
end
AI_CGM_WorsenConditionOfPrevMons_Mon3Has2Stars:
if_random_less_than 125, AI_CGM_End
score +10
end
AI_CGM_WorsenConditionOfPrevMons_Mon3Has3Stars:
if_random_less_than 125, AI_CGM_End
score +15
end
AI_CGM_WorsenConditionOfPrevMons_end:
end
@ Encourage if a prev mon has started a combo, esp if they havent completed it yet
@ BUG: Incorrectly uses if_used_combo_starter below, instead of if_not_used_combo_starter
@ As a result it encourages move if a prev mon has not begun a combo
AI_CGM_TargetMonWithJudgesAttention:
if_user_order_eq MON_1, AI_CGM_End
goto AI_CGM_TargetMonWithJudgesAttention_CheckMon1
end
AI_CGM_TargetMonWithJudgesAttention_CheckMon1:
if_cannot_participate MON_1, AI_CGM_TargetMonWithJudgesAttention_CheckMon2
#ifdef BUGFIX
if_not_used_combo_starter MON_1, AI_CGM_TargetMonWithJudgesAttention_CheckMon2
#else
if_used_combo_starter MON_1, AI_CGM_TargetMonWithJudgesAttention_CheckMon2
#endif
if_random_less_than 125, AI_CGM_TargetMonWithJudgesAttention_CheckMon2
score +2
if_not_completed_combo MON_1, AI_CGM_TargetMonWithJudgesAttention_CheckMon2
score +8
end
AI_CGM_TargetMonWithJudgesAttention_CheckMon2:
if_user_order_eq MON_2, AI_CGM_End
if_cannot_participate MON_2, AI_CGM_TargetMonWithJudgesAttention_CheckMon3
#ifdef BUGFIX
if_not_used_combo_starter MON_2, AI_CGM_TargetMonWithJudgesAttention_CheckMon3
#else
if_used_combo_starter MON_2, AI_CGM_TargetMonWithJudgesAttention_CheckMon3
#endif
if_random_less_than 125, AI_CGM_TargetMonWithJudgesAttention_CheckMon3
score +2
if_not_completed_combo MON_2, AI_CGM_TargetMonWithJudgesAttention_CheckMon3
score +8
end
AI_CGM_TargetMonWithJudgesAttention_CheckMon3:
if_user_order_eq MON_3, AI_CGM_End
if_cannot_participate MON_3, AI_CGM_End
#ifdef BUGFIX
if_not_used_combo_starter MON_3, AI_CGM_End
#else
if_used_combo_starter MON_3, AI_CGM_End
#endif
if_random_less_than 125, AI_CGM_End
score +2
if_not_completed_combo MON_3, AI_CGM_End
score +8
end
@ Encourage making mons nervous that have started a combo and can appeal after the user
AI_CGM_MakeFollowingMonsNervous:
if_user_order_eq MON_4, AI_CGM_End
goto AI_CGM_MakeFollowingMonsNervous_CheckMon4
end
AI_CGM_MakeFollowingMonsNervous_CheckMon4:
if_cannot_participate MON_4, AI_CGM_MakeFollowingMonsNervous_CheckMon3
if_not_used_combo_starter MON_4, AI_CGM_MakeFollowingMonsNervous_CheckMon3
score +5
if_random_less_than 125, AI_CGM_TargetMonWithJudgesAttention_CheckMon2
score +5
end
AI_CGM_MakeFollowingMonsNervous_CheckMon3:
if_user_order_eq MON_3, AI_CGM_End
if_cannot_participate MON_3, AI_CGM_MakeFollowingMonsNervous_CheckMon2
if_not_used_combo_starter MON_3, AI_CGM_MakeFollowingMonsNervous_CheckMon2
score +5
if_random_less_than 125, AI_CGM_TargetMonWithJudgesAttention_CheckMon3
score +5
end
AI_CGM_MakeFollowingMonsNervous_CheckMon2:
if_user_order_eq MON_2, AI_CGM_End
if_cannot_participate MON_2, AI_CGM_End
if_not_used_combo_starter MON_2, AI_CGM_End
score +5
if_random_less_than 125, AI_CGM_End
score +5
end
@ Encourages move if users turn is later, or if its the last appeal
AI_CGM_JamsOthersButMissOneTurn:
if_last_appeal AI_CGM_JamsOthersButMissOneTurn_LastAppeal
goto AI_CGM_JamsOthersButMissOneTurn_TurnOrder
end
AI_CGM_JamsOthersButMissOneTurn_LastAppeal:
score +5
goto AI_CGM_JamsOthersButMissOneTurn_TurnOrder
end
AI_CGM_JamsOthersButMissOneTurn_TurnOrder:
if_user_order_eq MON_1, AI_CGM_JamsOthersButMissOneTurn_1stUp
if_user_order_eq MON_2, AI_CGM_JamsOthersButMissOneTurn_2ndUp
if_user_order_eq MON_3, AI_CGM_JamsOthersButMissOneTurn_3rdUp
if_user_order_eq MON_4, AI_CGM_JamsOthersButMissOneTurn_Last
end
AI_CGM_JamsOthersButMissOneTurn_1stUp:
score -15
end
AI_CGM_JamsOthersButMissOneTurn_2ndUp:
if_random_less_than 125, AI_CGM_End
score -10
end
AI_CGM_JamsOthersButMissOneTurn_3rdUp:
if_random_less_than 125, AI_CGM_End
score +5
end
AI_CGM_JamsOthersButMissOneTurn_Last:
if_random_less_than 125, AI_CGM_End
score +15
end
AI_CGM_End:
end
@ Randomly encourage moves in Cute, Smart, and Tough contests.
AI_Erratic:
if_contest_type_eq CONTEST_CATEGORY_CUTE, AI_Erratic_CuteSmartTough
if_contest_type_eq CONTEST_CATEGORY_SMART, AI_Erratic_CuteSmartTough
if_contest_type_eq CONTEST_CATEGORY_TOUGH, AI_Erratic_CuteSmartTough
end
AI_Erratic_CuteSmartTough:
if_random_less_than 125, AI_Erratic_End
score +10
end
AI_Erratic_End:
end
@ Checks if move should be discouraged based on its effect
AI_CheckBadMove:
if_effect_eq CONTEST_EFFECT_STARTLE_FRONT_MON, AI_CBM_DependsOnPrevMon
if_effect_eq CONTEST_EFFECT_STARTLE_PREV_MON, AI_CBM_DependsOnPrevMon
if_effect_eq CONTEST_EFFECT_BADLY_STARTLE_FRONT_MON, AI_CBM_DependsOnPrevMon
if_effect_eq CONTEST_EFFECT_STARTLE_PREV_MON_2, AI_CBM_DependsOnPrevMon
if_effect_eq CONTEST_EFFECT_APPEAL_AS_GOOD_AS_PREV_ONE, AI_CBM_DependsOnPrevMon
if_effect_eq CONTEST_EFFECT_BETTER_IF_SAME_TYPE, AI_CBM_DependsOnPrevMon
if_effect_eq CONTEST_EFFECT_BETTER_IF_DIFF_TYPE, AI_CBM_DependsOnPrevMon
if_effect_eq CONTEST_EFFECT_AFFECTED_BY_PREV_APPEAL, AI_CBM_DependsOnPrevMon
if_effect_eq CONTEST_EFFECT_SLIGHTLY_STARTLE_PREV_MONS, AI_CBM_DependsOnPrevMons
if_effect_eq CONTEST_EFFECT_STARTLE_PREV_MONS, AI_CBM_DependsOnPrevMons
if_effect_eq CONTEST_EFFECT_BADLY_STARTLE_PREV_MONS, AI_CBM_DependsOnPrevMons
if_effect_eq CONTEST_EFFECT_STARTLE_PREV_MONS_2, AI_CBM_DependsOnPrevMons
if_effect_eq CONTEST_EFFECT_STARTLE_MON_WITH_JUDGES_ATTENTION, AI_CBM_DependsOnPrevMons
if_effect_eq CONTEST_EFFECT_SHIFT_JUDGE_ATTENTION, AI_CBM_DependsOnPrevMons
if_effect_eq CONTEST_EFFECT_JAMS_OTHERS_BUT_MISS_ONE_TURN, AI_CBM_DependsOnPrevMons
if_effect_eq CONTEST_EFFECT_STARTLE_MONS_SAME_TYPE_APPEAL, AI_CBM_DependsOnPrevMons
if_effect_eq CONTEST_EFFECT_BADLY_STARTLE_MONS_WITH_GOOD_APPEALS, AI_CBM_DependsOnPrevMons
if_effect_eq CONTEST_EFFECT_STARTLE_MONS_COOL_APPEAL, AI_CBM_DependsOnPrevMons
if_effect_eq CONTEST_EFFECT_STARTLE_MONS_BEAUTY_APPEAL, AI_CBM_DependsOnPrevMons
if_effect_eq CONTEST_EFFECT_STARTLE_MONS_CUTE_APPEAL, AI_CBM_DependsOnPrevMons
if_effect_eq CONTEST_EFFECT_STARTLE_MONS_SMART_APPEAL, AI_CBM_DependsOnPrevMons
if_effect_eq CONTEST_EFFECT_STARTLE_MONS_TOUGH_APPEAL, AI_CBM_DependsOnPrevMons
if_effect_eq CONTEST_EFFECT_BADLY_STARTLES_MONS_IN_GOOD_CONDITION, AI_CBM_DependsOnPrevMons
if_effect_eq CONTEST_EFFECT_WORSEN_CONDITION_OF_PREV_MONS, AI_CBM_DependsOnPrevMons
if_effect_eq CONTEST_EFFECT_APPEAL_AS_GOOD_AS_PREV_ONES, AI_CBM_DependsOnPrevMons
if_effect_eq CONTEST_EFFECT_MAKE_FOLLOWING_MON_NERVOUS, AI_CBM_DependsOnNextMon
if_effect_eq CONTEST_EFFECT_MAKE_FOLLOWING_MONS_NERVOUS, AI_CBM_DependsOnNextMons
if_effect_eq CONTEST_EFFECT_DONT_EXCITE_AUDIENCE, AI_CBM_DependsOnNextMons
if_effect_eq CONTEST_EFFECT_IMPROVE_CONDITION_PREVENT_NERVOUSNESS, AI_CBM_ImproveCondition
if_effect_eq CONTEST_EFFECT_AVOID_STARTLE_ONCE, AI_CBM_AvoidStartle
if_effect_eq CONTEST_EFFECT_AVOID_STARTLE, AI_CBM_AvoidStartle
if_effect_eq CONTEST_EFFECT_AVOID_STARTLE_SLIGHTLY, AI_CBM_AvoidStartle
if_effect_eq CONTEST_EFFECT_GREAT_APPEAL_BUT_NO_MORE_MOVES, AI_CBM_NoMoreMoves
end
@ If previous mon is skipping turn (or user is first), discourage move
AI_CBM_DependsOnPrevMon:
if_user_order_eq MON_1, AI_CBM_DependsOnPrevMon_1stUp
if_user_order_eq MON_2, AI_CBM_DependsOnPrevMon_2ndUp
if_user_order_eq MON_3, AI_CBM_DependsOnPrevMon_3rdUp
if_user_order_eq MON_4, AI_CBM_DependsOnPrevMon_Last
end
AI_CBM_DependsOnPrevMon_1stUp:
score -10
end
AI_CBM_DependsOnPrevMon_2ndUp:
if_can_participate MON_1, AI_CBM_End
score -10
end
AI_CBM_DependsOnPrevMon_3rdUp:
if_can_participate MON_2, AI_CBM_End
score -10
end
AI_CBM_DependsOnPrevMon_Last:
if_can_participate MON_3, AI_CBM_End
score -10
end
@ If previous mons are all skipping turns (or user is first), discourage move
AI_CBM_DependsOnPrevMons:
if_user_order_eq MON_1, AI_CBM_DependsOnPrevMons_1stUp
if_user_order_eq MON_2, AI_CBM_DependsOnPrevMons_2ndUp
if_user_order_eq MON_3, AI_CBM_DependsOnPrevMons_3rdUp
if_user_order_eq MON_4, AI_CBM_DependsOnPrevMons_Last
end
AI_CBM_DependsOnPrevMons_1stUp:
score -20
end
AI_CBM_DependsOnPrevMons_2ndUp:
if_can_participate MON_1, AI_CBM_End
score -15
end
AI_CBM_DependsOnPrevMons_3rdUp:
if_can_participate MON_1, AI_CBM_End
if_can_participate MON_2, AI_CBM_End
score -15
end
AI_CBM_DependsOnPrevMons_Last:
if_can_participate MON_1, AI_CBM_End
if_can_participate MON_2, AI_CBM_End
if_can_participate MON_3, AI_CBM_End
score -15
end
@ If next mon is skipping turn (or user is last), discourage move
AI_CBM_DependsOnNextMon:
if_user_order_eq MON_1, AI_CBM_DependsOnNextMon_1stUp
if_user_order_eq MON_2, AI_CBM_DependsOnNextMon_2ndUp
if_user_order_eq MON_3, AI_CBM_DependsOnNextMon_3rdUp
score -10
end
AI_CBM_DependsOnNextMon_1stUp:
if_can_participate MON_2, AI_CBM_End
score -10
end
AI_CBM_DependsOnNextMon_2ndUp:
if_can_participate MON_3, AI_CBM_End
score -10
end
AI_CBM_DependsOnNextMon_3rdUp:
if_can_participate MON_4, AI_CBM_End
score -10
end
@ If next mons are all skipping turns (or user is last), discourage move
AI_CBM_DependsOnNextMons:
if_user_order_eq MON_1, AI_CBM_DependsOnNextMons_1stUp
if_user_order_eq MON_2, AI_CBM_DependsOnNextMons_2ndUp
if_user_order_eq MON_3, AI_CBM_DependsOnNextMons_3rdUp
score -10
end
AI_CBM_DependsOnNextMons_1stUp:
if_can_participate MON_2, AI_CBM_End
if_can_participate MON_3, AI_CBM_End
if_can_participate MON_4, AI_CBM_End
score -10
end
AI_CBM_DependsOnNextMons_2ndUp:
if_can_participate MON_3, AI_CBM_End
if_can_participate MON_4, AI_CBM_End
score -10
end
AI_CBM_DependsOnNextMons_3rdUp:
if_can_participate MON_4, AI_CBM_End
score -10
end
@ If at max condition, discourage move
AI_CBM_ImproveCondition:
if_user_condition_less_than 3, AI_CBM_End
score -20
end
@ If there are no upcoming mons who can make an appeal (or if user is last), discourage move
@ Identical to AI_CBM_DependsOnNextMons
AI_CBM_AvoidStartle:
if_user_order_eq MON_1, AI_CBM_AvoidStartle_1stUp
if_user_order_eq MON_2, AI_CBM_AvoidStartle_2ndUp
if_user_order_eq MON_3, AI_CBM_AvoidStartle_3rdUp
score -10
end
AI_CBM_AvoidStartle_1stUp:
if_can_participate MON_2, AI_CBM_End
if_can_participate MON_3, AI_CBM_End
if_can_participate MON_4, AI_CBM_End
score -10
end
AI_CBM_AvoidStartle_2ndUp:
if_can_participate MON_3, AI_CBM_End
if_can_participate MON_4, AI_CBM_End
score -10
end
AI_CBM_AvoidStartle_3rdUp:
if_can_participate MON_4, AI_CBM_End
score -10
end
@ Very good if its the last appeal, otherwise discourage move
AI_CBM_NoMoreMoves:
if_appeal_num_eq 0, AI_CBM_NoMoreMoves_1stAppeal
if_appeal_num_eq 1, AI_CBM_NoMoreMoves_2ndAppeal
if_appeal_num_eq 2, AI_CBM_NoMoreMoves_3rdAppeal
if_appeal_num_eq 3, AI_CBM_NoMoreMoves_4thAppeal
if_last_appeal AI_CBM_NoMoreMoves_LastAppeal
end
AI_CBM_NoMoreMoves_1stAppeal:
if_random_less_than 20, AI_CBM_End
score -15
end
AI_CBM_NoMoreMoves_2ndAppeal:
if_random_less_than 40, AI_CBM_End
score -15
end
AI_CBM_NoMoreMoves_3rdAppeal:
if_random_less_than 60, AI_CBM_End
score -15
end
AI_CBM_NoMoreMoves_4thAppeal:
if_random_less_than 80, AI_CBM_End
score -15
end
AI_CBM_NoMoreMoves_LastAppeal:
if_random_less_than 20, AI_CBM_End
score +20
end
AI_CBM_End:
end
@ Encourages/discourages move affected by the move order
@ e.g. use BETTER_IF_FIRST moves if user is first, dont use AVOID_STARTLE moves if last
AI_CheckOrder:
if_user_order_eq MON_1, AI_CheckOrder_1stUp
if_user_order_eq MON_2, AI_CheckOrder_2ndUp
if_user_order_eq MON_3, AI_CheckOrder_3rdUp
if_user_order_eq MON_4, AI_CheckOrder_Last
end
AI_CheckOrder_1stUp:
if_effect_eq CONTEST_EFFECT_BETTER_IF_FIRST, AI_CheckOrder_1stUp_Encourage
if_effect_eq CONTEST_EFFECT_BETTER_WHEN_LATER, AI_CheckOrder_1stUp_Discourage
if_effect_type_eq CONTEST_EFFECT_TYPE_AVOID_STARTLE, AI_CheckOrder_1stUp_RandomEncourage
end
AI_CheckOrder_1stUp_Encourage:
score +15
end
AI_CheckOrder_1stUp_Discourage:
score -15
end
AI_CheckOrder_1stUp_RandomEncourage:
if_random_less_than 100, AI_CBM_End
score +10
end
AI_CheckOrder_2ndUp:
if_effect_eq CONTEST_EFFECT_BETTER_WHEN_LATER, AI_CheckOrder_2ndUp_Discourage
if_effect_type_eq CONTEST_EFFECT_TYPE_AVOID_STARTLE, AI_CheckOrder_2ndUp_RandomEncourage
end
AI_CheckOrder_2ndUp_Discourage:
score -5
end
AI_CheckOrder_2ndUp_RandomEncourage:
if_random_less_than 125, AI_CBM_End
score +10
end
AI_CheckOrder_3rdUp:
if_effect_eq CONTEST_EFFECT_BETTER_WHEN_LATER, AI_CheckOrder_3rdUp_Encourage
if_effect_eq CONTEST_EFFECT_APPEAL_AS_GOOD_AS_PREV_ONES, AI_CheckOrder_3rdUp_Encourage
if_effect_eq CONTEST_EFFECT_USER_MORE_EASILY_STARTLED, AI_CheckOrder_3rdUp_Encourage
end
AI_CheckOrder_3rdUp_Encourage:
score +5
end
AI_CheckOrder_Last:
if_effect_eq CONTEST_EFFECT_BETTER_WHEN_LATER, AI_CheckOrder_Last_StronglyEncourage
if_effect_eq CONTEST_EFFECT_BETTER_IF_LAST, AI_CheckOrder_Last_StronglyEncourage
if_effect_eq CONTEST_EFFECT_APPEAL_AS_GOOD_AS_PREV_ONES, AI_CheckOrder_Last_StronglyEncourage
if_effect_eq CONTEST_EFFECT_USER_MORE_EASILY_STARTLED, AI_CheckOrder_Last_StronglyEncourage
if_effect_eq CONTEST_EFFECT_JAMS_OTHERS_BUT_MISS_ONE_TURN, AI_CheckOrder_Last_Encourage
if_effect_type_eq CONTEST_EFFECT_TYPE_AVOID_STARTLE, AI_CheckOrder_Last_Discourage
if_effect_type_eq CONTEST_EFFECT_TYPE_STARTLE_MONS, AI_CheckOrder_Last_RandomEncourage
end
AI_CheckOrder_Last_StronglyEncourage:
score +15
end
AI_CheckOrder_Last_Discourage:
score -10
end
AI_CheckOrder_Last_RandomEncourage:
if_random_less_than 125, AI_CBM_End
score +10
end
AI_CheckOrder_Last_Encourage:
score +5
end
AI_Nothing:
end
-1059
View File
File diff suppressed because it is too large Load Diff
-345
View File
@@ -1,345 +0,0 @@
.include "asm/macros.inc"
.include "constants/constants.inc"
.section script_data, "aw", %progbits
.align 2
gFieldEffectScriptPointers::
.4byte gFieldEffectScript_ExclamationMarkIcon1 @ FLDEFF_EXCLAMATION_MARK_ICON
.4byte gFieldEffectScript_UseCutOnTallGrass @ FLDEFF_USE_CUT_ON_GRASS
.4byte gFieldEffectScript_UseCutOnTree @ FLDEFF_USE_CUT_ON_TREE
.4byte gFieldEffectScript_Shadow @ FLDEFF_SHADOW
.4byte gFieldEffectScript_TallGrass @ FLDEFF_TALL_GRASS
.4byte gFieldEffectScript_Ripple @ FLDEFF_RIPPLE
.4byte gFieldEffectScript_FieldMoveShowMon @ FLDEFF_FIELD_MOVE_SHOW_MON
.4byte gFieldEffectScript_Ash @ FLDEFF_ASH
.4byte gFieldEffectScript_SurfBlob @ FLDEFF_SURF_BLOB
.4byte gFieldEffectScript_UseSurf @ FLDEFF_USE_SURF
.4byte gFieldEffectScript_GroundImpactDust @ FLDEFF_DUST
.4byte gFieldEffectScript_UseSecretPowerCave @ FLDEFF_USE_SECRET_POWER_CAVE
.4byte gFieldEffectScript_JumpTallGrass @ FLDEFF_JUMP_TALL_GRASS
.4byte gFieldEffectScript_SandFootprints @ FLDEFF_SAND_FOOTPRINTS
.4byte gFieldEffectScript_JumpBigSplash @ FLDEFF_JUMP_BIG_SPLASH
.4byte gFieldEffectScript_Splash @ FLDEFF_SPLASH
.4byte gFieldEffectScript_JumpSmallSplash @ FLDEFF_JUMP_SMALL_SPLASH
.4byte gFieldEffectScript_LongGrass @ FLDEFF_LONG_GRASS
.4byte gFieldEffectScript_JumpLongGrass @ FLDEFF_JUMP_LONG_GRASS
.4byte gFieldEffectScript_UnusedGrass @ FLDEFF_UNUSED_GRASS
.4byte gFieldEffectScript_UnusedGrass2 @ FLDEFF_UNUSED_GRASS_2
.4byte gFieldEffectScript_UnusedSand @ FLDEFF_UNUSED_SAND
.4byte gFieldEffectScript_WaterSurfacing @ FLDEFF_WATER_SURFACING
.4byte gFieldEffectScript_BerryTreeGrowthSparkle @ FLDEFF_BERRY_TREE_GROWTH_SPARKLE
.4byte gFieldEffectScript_DeepSandFootprints @ FLDEFF_DEEP_SAND_FOOTPRINTS
.4byte gFieldEffectScript_PokeCenterHeal @ FLDEFF_POKECENTER_HEAL
.4byte gFieldEffectScript_UseSecretPowerTree @ FLDEFF_USE_SECRET_POWER_TREE
.4byte gFieldEffectScript_UseSecretPowerShrub @ FLDEFF_USE_SECRET_POWER_SHRUB
.4byte gFieldEffectScript_TreeDisguise @ FLDEFF_TREE_DISGUISE
.4byte gFieldEffectScript_MountainDisguise @ FLDEFF_MOUNTAIN_DISGUISE
.4byte gFieldEffectScript_NPCUseFly @ FLDEFF_NPCFLY_OUT
.4byte gFieldEffectScript_UseFly @ FLDEFF_USE_FLY
.4byte gFieldEffectScript_FlyIn @ FLDEFF_FLY_IN
.4byte gFieldEffectScript_QuestionMarkIcon @ FLDEFF_QUESTION_MARK_ICON
.4byte gFieldEffectScript_FeetInFlowingWater @ FLDEFF_FEET_IN_FLOWING_WATER
.4byte gFieldEffectScript_BikeTireTracks @ FLDEFF_BIKE_TIRE_TRACKS
.4byte gFieldEffectScript_SandDisguisePlaceholder @ FLDEFF_SAND_DISGUISE
.4byte gFieldEffectScript_UseRockSmash @ FLDEFF_USE_ROCK_SMASH
.4byte gFieldEffectScript_UseDig @ FLDEFF_USE_DIG
.4byte gFieldEffectScript_SandPile @ FLDEFF_SAND_PILE
.4byte gFieldEffectScript_UseStrength @ FLDEFF_USE_STRENGTH
.4byte gFieldEffectScript_ShortGrass @ FLDEFF_SHORT_GRASS
.4byte gFieldEffectScript_HotSpringsWater @ FLDEFF_HOT_SPRINGS_WATER
.4byte gFieldEffectScript_UseWaterfall @ FLDEFF_USE_WATERFALL
.4byte gFieldEffectScript_UseDive @ FLDEFF_USE_DIVE
.4byte gFieldEffectScript_PokeballTrail @ FLDEFF_POKEBALL_TRAIL
.4byte gFieldEffectScript_HeartIcon @ FLDEFF_HEART_ICON
.4byte gFieldEffectScript_Nop47 @ FLDEFF_NOP_47
.4byte gFieldEffectScript_Nop48 @ FLDEFF_NOP_48
.4byte gFieldEffectScript_AshPuff @ FLDEFF_ASH_PUFF
.4byte gFieldEffectScript_AshLaunch @ FLDEFF_ASH_LAUNCH
.4byte gFieldEffectScript_SweetScent @ FLDEFF_SWEET_SCENT
.4byte gFieldEffectScript_SandPillar @ FLDEFF_SAND_PILLAR
.4byte gFieldEffectScript_Bubbles @ FLDEFF_BUBBLES
.4byte gFieldEffectScript_Sparkle @ FLDEFF_SPARKLE
.4byte gFieldEffectScript_ShowSecretPowerCave @ FLDEFF_SECRET_POWER_CAVE
.4byte gFieldEffectScript_ShowSecretPowerTree @ FLDEFF_SECRET_POWER_TREE
.4byte gFieldEffectScript_ShowSecretPowerShrub @ FLDEFF_SECRET_POWER_SHRUB
.4byte gFieldEffectScript_ShowCutGrass @ FLDEFF_CUT_GRASS
.4byte gFieldEffectScript_FieldMoveShowMonInit @ FLDEFF_FIELD_MOVE_SHOW_MON_INIT
.4byte gFieldEffectScript_UsePuzzleEffect @ FLDEFF_USE_TOMB_PUZZLE_EFFECT
.4byte gFieldEffectScript_SecretBaseBootPC @ FLDEFF_PCTURN_ON
.4byte gFieldEffectScript_HallOfFameRecord @ FLDEFF_HALL_OF_FAME_RECORD
.4byte gFieldEffectScript_UseTeleport @ FLDEFF_USE_TELEPORT
.4byte gFieldEffectScript_RayquazaSpotlight @ FLDEFF_RAYQUAZA_SPOTLIGHT
.4byte gFieldEffectScript_DestroyDeoxysRock @ FLDEFF_DESTROY_DEOXYS_ROCK
.4byte gFieldEffectScript_MoveDeoxysRock @ FLDEFF_MOVE_DEOXYS_ROCK
gFieldEffectScript_ExclamationMarkIcon1::
field_eff_callnative FldEff_ExclamationMarkIcon
field_eff_end
gFieldEffectScript_UseCutOnTallGrass::
field_eff_callnative FldEff_UseCutOnGrass
field_eff_end
gFieldEffectScript_UseCutOnTree::
field_eff_callnative FldEff_UseCutOnTree
field_eff_end
gFieldEffectScript_Shadow::
field_eff_callnative FldEff_Shadow
field_eff_end
gFieldEffectScript_TallGrass::
field_eff_loadfadedpal_callnative gSpritePalette_GeneralFieldEffect1, FldEff_TallGrass
field_eff_end
gFieldEffectScript_Ripple::
field_eff_loadfadedpal_callnative gSpritePalette_GeneralFieldEffect1, FldEff_Ripple
field_eff_end
gFieldEffectScript_FieldMoveShowMon::
field_eff_callnative FldEff_FieldMoveShowMon
field_eff_end
gFieldEffectScript_Ash::
field_eff_loadfadedpal_callnative gSpritePalette_GeneralFieldEffect1, FldEff_Ash
field_eff_end
gFieldEffectScript_SurfBlob::
field_eff_callnative FldEff_SurfBlob
field_eff_end
gFieldEffectScript_UseSurf::
field_eff_callnative FldEff_UseSurf
field_eff_end
gFieldEffectScript_GroundImpactDust::
field_eff_loadfadedpal_callnative gSpritePalette_GeneralFieldEffect0, FldEff_Dust
field_eff_end
gFieldEffectScript_UseSecretPowerCave::
field_eff_callnative FldEff_UseSecretPowerCave
field_eff_end
gFieldEffectScript_JumpTallGrass::
field_eff_loadfadedpal_callnative gSpritePalette_GeneralFieldEffect1, FldEff_JumpTallGrass
field_eff_end
gFieldEffectScript_SandFootprints::
field_eff_loadfadedpal_callnative gSpritePalette_GeneralFieldEffect0, FldEff_SandFootprints
field_eff_end
gFieldEffectScript_JumpBigSplash::
field_eff_loadfadedpal_callnative gSpritePalette_GeneralFieldEffect0, FldEff_JumpBigSplash
field_eff_end
gFieldEffectScript_Splash::
field_eff_loadfadedpal_callnative gSpritePalette_GeneralFieldEffect0, FldEff_Splash
field_eff_end
gFieldEffectScript_JumpSmallSplash::
field_eff_loadfadedpal_callnative gSpritePalette_GeneralFieldEffect0, FldEff_JumpSmallSplash
field_eff_end
gFieldEffectScript_LongGrass::
field_eff_loadfadedpal_callnative gSpritePalette_GeneralFieldEffect1, FldEff_LongGrass
field_eff_end
gFieldEffectScript_JumpLongGrass::
field_eff_loadfadedpal_callnative gSpritePalette_GeneralFieldEffect1, FldEff_JumpLongGrass
field_eff_end
gFieldEffectScript_UnusedGrass::
field_eff_loadfadedpal_callnative gSpritePalette_GeneralFieldEffect1, FldEff_UnusedGrass
field_eff_end
gFieldEffectScript_UnusedGrass2::
field_eff_loadfadedpal_callnative gSpritePalette_GeneralFieldEffect1, FldEff_UnusedGrass2
field_eff_end
gFieldEffectScript_UnusedSand::
field_eff_loadfadedpal_callnative gSpritePalette_GeneralFieldEffect0, FldEff_UnusedSand
field_eff_end
gFieldEffectScript_WaterSurfacing::
field_eff_loadfadedpal_callnative gSpritePalette_GeneralFieldEffect0, FldEff_WaterSurfacing
field_eff_end
gFieldEffectScript_BerryTreeGrowthSparkle::
field_eff_callnative FldEff_BerryTreeGrowthSparkle
field_eff_end
gFieldEffectScript_DeepSandFootprints::
field_eff_loadfadedpal_callnative gSpritePalette_GeneralFieldEffect0, FldEff_DeepSandFootprints
field_eff_end
gFieldEffectScript_PokeCenterHeal::
field_eff_loadfadedpal gSpritePalette_PokeballGlow
field_eff_loadfadedpal_callnative gSpritePalette_GeneralFieldEffect0, FldEff_PokecenterHeal
field_eff_end
gFieldEffectScript_UseSecretPowerTree::
field_eff_callnative FldEff_UseSecretPowerTree
field_eff_end
gFieldEffectScript_UseSecretPowerShrub::
field_eff_callnative FldEff_UseSecretPowerShrub
field_eff_end
gFieldEffectScript_TreeDisguise::
field_eff_callnative ShowTreeDisguiseFieldEffect
field_eff_end
gFieldEffectScript_MountainDisguise::
field_eff_callnative ShowMountainDisguiseFieldEffect
field_eff_end
gFieldEffectScript_NPCUseFly::
field_eff_callnative FldEff_NPCFlyOut
field_eff_end
gFieldEffectScript_UseFly::
field_eff_callnative FldEff_UseFly
field_eff_end
gFieldEffectScript_FlyIn::
field_eff_callnative FldEff_FlyIn
field_eff_end
gFieldEffectScript_QuestionMarkIcon::
field_eff_callnative FldEff_QuestionMarkIcon
field_eff_end
gFieldEffectScript_FeetInFlowingWater::
field_eff_loadfadedpal_callnative gSpritePalette_GeneralFieldEffect0, FldEff_FeetInFlowingWater
field_eff_end
gFieldEffectScript_BikeTireTracks::
field_eff_loadfadedpal_callnative gSpritePalette_GeneralFieldEffect0, FldEff_BikeTireTracks
field_eff_end
gFieldEffectScript_SandDisguisePlaceholder::
field_eff_callnative ShowSandDisguiseFieldEffect
field_eff_end
gFieldEffectScript_UseRockSmash::
field_eff_callnative FldEff_UseRockSmash
field_eff_end
gFieldEffectScript_UseStrength::
field_eff_callnative FldEff_UseStrength
field_eff_end
gFieldEffectScript_UseDig::
field_eff_callnative FldEff_UseDig
field_eff_end
gFieldEffectScript_SandPile::
field_eff_loadfadedpal_callnative gSpritePalette_GeneralFieldEffect0, FldEff_SandPile
field_eff_end
gFieldEffectScript_ShortGrass::
field_eff_loadfadedpal_callnative gSpritePalette_GeneralFieldEffect1, FldEff_ShortGrass
field_eff_end
gFieldEffectScript_HotSpringsWater::
field_eff_loadfadedpal_callnative gSpritePalette_GeneralFieldEffect1, FldEff_HotSpringsWater
field_eff_end
gFieldEffectScript_UseWaterfall::
field_eff_callnative FldEff_UseWaterfall
field_eff_end
gFieldEffectScript_UseDive::
field_eff_callnative FldEff_UseDive
field_eff_end
gFieldEffectScript_PokeballTrail::
field_eff_loadpal gSpritePalette_Pokeball
field_eff_callnative FldEff_PokeballTrail
field_eff_end
gFieldEffectScript_HeartIcon::
field_eff_loadfadedpal_callnative gSpritePalette_GeneralFieldEffect0, FldEff_HeartIcon
field_eff_end
gFieldEffectScript_Nop47::
field_eff_callnative FldEff_Nop47
field_eff_end
gFieldEffectScript_Nop48::
field_eff_callnative FldEff_Nop48
field_eff_end
gFieldEffectScript_AshPuff::
field_eff_loadfadedpal_callnative gSpritePalette_Ash, FldEff_AshPuff
field_eff_end
gFieldEffectScript_AshLaunch::
field_eff_loadfadedpal_callnative gSpritePalette_Ash, FldEff_AshLaunch
field_eff_end
gFieldEffectScript_SweetScent::
field_eff_callnative FldEff_SweetScent
field_eff_end
gFieldEffectScript_SandPillar::
field_eff_loadfadedpal_callnative gSpritePalette_SandPillar, FldEff_SandPillar
field_eff_end
gFieldEffectScript_Bubbles::
field_eff_loadfadedpal_callnative gSpritePalette_GeneralFieldEffect0, FldEff_Bubbles
field_eff_end
gFieldEffectScript_Sparkle::
field_eff_loadfadedpal_callnative gSpritePalette_SmallSparkle, FldEff_Sparkle
field_eff_end
gFieldEffectScript_ShowSecretPowerCave::
field_eff_loadfadedpal_callnative gSpritePalette_SecretPower_Cave, FldEff_SecretPowerCave
field_eff_end
gFieldEffectScript_ShowSecretPowerTree::
field_eff_loadfadedpal_callnative gSpritePalette_SecretPower_Plant, FldEff_SecretPowerTree
field_eff_end
gFieldEffectScript_ShowSecretPowerShrub::
field_eff_loadfadedpal_callnative gSpritePalette_SecretPower_Plant, FldEff_SecretPowerShrub
field_eff_end
gFieldEffectScript_ShowCutGrass::
field_eff_loadfadedpal_callnative gSpritePalette_CutGrass, FldEff_CutGrass
field_eff_end
gFieldEffectScript_FieldMoveShowMonInit::
field_eff_callnative FldEff_FieldMoveShowMonInit
field_eff_end
gFieldEffectScript_UsePuzzleEffect::
field_eff_callnative FldEff_UsePuzzleEffect
field_eff_end
gFieldEffectScript_SecretBaseBootPC::
field_eff_callnative FldEff_SecretBasePCTurnOn
field_eff_end
gFieldEffectScript_HallOfFameRecord::
field_eff_loadfadedpal gSpritePalette_PokeballGlow
field_eff_loadfadedpal_callnative gSpritePalette_HofMonitor, FldEff_HallOfFameRecord
field_eff_end
gFieldEffectScript_UseTeleport::
field_eff_callnative FldEff_UseTeleport
field_eff_end
gFieldEffectScript_RayquazaSpotlight::
field_eff_callnative FldEff_RayquazaSpotlight
field_eff_end
gFieldEffectScript_DestroyDeoxysRock::
field_eff_callnative FldEff_DestroyDeoxysRock
field_eff_end
gFieldEffectScript_MoveDeoxysRock::
field_eff_callnative FldEff_MoveDeoxysRock
field_eff_end
-2
View File
@@ -1,2 +0,0 @@
layouts.inc
layouts_table.inc
@@ -1 +0,0 @@

Binary file not shown.
@@ -1 +0,0 @@

@@ -1,3 +0,0 @@
    22222
2 662222222
2 6222222222222222226201222220111122222012222201111222220122222011112222201222220111122262%#&2222%$"#&2222-+6.2222-2,*+6.262222222222222222222222222222222222
@@ -1 +0,0 @@

@@ -1 +0,0 @@
!!011112!!011)011112)0112011112201122%#$"&22%#$22-+6,*2.22-+6,22222222222222222222222226222222222222262220111111122222011111112
@@ -1 +0,0 @@
pppp
-1
View File
@@ -1 +0,0 @@
(((`(`(((((b`(((((((((((`(''`(eif(b`((¡(((((((`('/`(((((b`('¡(¡(ef(`(/'hiiiiij`(''¡('¡((((`(*/ÉÉÉÃÄÅ`(//¡(/¡((((`(È* ]]]ËÌ2Íhiiiiiiii(((`(((33È*2*2¾2*2¿2ÉÉÉÉÉÉÉÉef(hiiiiif(2(2ei ÌÍÌÍÌÍÌÍ(((ÉÉÉÃÄů0Ï0ÃijÉÉÉÉÉÉÉÉ((( ]]]ËÌ2ͯ0Ï0ËÌ2Í]]]]]]]](((33*2*2Ⱦ2*2¿2*2Ⱦ2*2¿2È*2*2*2*2*2*2*2((((È((È(2(2(2(2È(2(2(2È(2È(2(2(2(2iiiiiiiiiiiif(2(2eiiiiiiiÉÉÉÉÉÉÉÉÉÉÉɯ0Ï0ÉÉÉÉÉÉÉËËËËËËËËËËËË ¯0Ï0 ËËËËËËËÊÊÊÊÊÊÊÊÊÊÊÊ Î2Ï2 ÊÊÊÊÊÊÊžžžžžžžžžžžž4žž4žžžžžžžžžžžžžžžžžžžžžžžžžžžžžž£žžžžžžžžžžžžžžžžžžžžžž½¾¾¾¾¾¾¾£žžžžžžžžžžžžžžpppppppp½¾¾¾¾¾¾¾¾¾¾¾¾¾¾
@@ -1 +0,0 @@

@@ -1 +0,0 @@
 ¨  ©¨ ±°°±±°2222222222222­622422222242222220111111122¬6­6201111111222220111111122222%#$"#$"#&22‰-36,*36,*+6.22Vš2222222222GVx2222222222
@@ -1 +0,0 @@

@@ -1 +0,0 @@
6''''c'''''76'''''¯'''''76'''''c'''''7>////—6ž/////?>/////·2ž/////GF/////—6ž/////?>h;2;2;2;2;2;2;2;2;2;2;2?>:2;2;2665;2™6š6;2;2;2;2ON:2;2;2;2;2;2;2g2;2;2™6š6;2?>=28282828282a282828282ª6?>«682a2^6_682b 6¢682828282;2;2<28282b6828282828282 6¢682?>=282V6W68282828282a28282?>=28282`2828282828282828282?>=282828282`282828282828282?>«682^6_6828282828282`282?>=2`2828282828282828282a282?>«682V6W682828282b6828282a2?>=28282828282828282828282?>=2828282828282828282828282?>=282^6_6828282a282828282ª6?6''''''''''''76'''''''''''''76'''''''''''''7>////////////?>/////////////?>/////////////?>:2g2;2;2;2;25;2;2;2;2;2?>:2;2;2;2;2;2;2;2;2;2;2;2;2?>:2;2;2g2;2;2;2;2;2;2™6š6;2?>=282828282a2828282V6W682?>=28282828282`2828282b682ª6?>«682828282V6W6828282 6¢682?>=28282828282828282^6_682?>=28282a2`28282828282828282?>=282828282^6_68282a2828282?>«682`2828282828282828282?>=2V6W682828282828282828282?>=28282828282828282828282ª6?>=282828282d2e282828282ª6?>=2^6_6828282d2e2828282a282?>=2`282b68282d2e282828282a2?
@@ -1 +0,0 @@

@@ -1 +0,0 @@
6'''''''7>///////?>:2;2;2;2;2;2;2?>=282a282828282?>=2`28282828282?>=282828282a282?>=2828282828282?>=28282d2e282b?
@@ -1 +0,0 @@

@@ -1 +0,0 @@
6@kc''7>Hs—6ž//?>PQ:2;2;2;2;2?>XY=282828282?>2;2<28282a282?>=2828282828282?>=282b82a28282?>=2828282828282?=26'''=2'''7>///=2///?>:2;2;2<2;2;2;2?>=2828282828282?>=2VW82a28282?>=2^_a2828282?>=2828282828282?>=28282d2e28282?
@@ -1 +0,0 @@

@@ -1 +0,0 @@
6@AB''''76@AB'CDE7>HIJ////?>HIJ/KLM?>PQ:2;2;2;2;2GFPQ:2;2;2TU?>XY=282VWª6ONXY=28282\]?>:2;2<282^_82;2;2;2;2f28282;2;2?>=2828282828282?>=28282828282ª6?>«6828282828282?>«682828282`282?>=28282d2e282b?>=28282d2e28282?
@@ -1 +0,0 @@

@@ -1 +0,0 @@
6''c''76@kc''7>//—6ž//?>Hs—6ž//?>:2;2;2;2;2;2;2?>PQ:2;2;2;2;2?>=2828282828282?>XY=2828282ª6?>«682828282a282?>:2;2<282828282?>=2828282828282?>=2828282`28282?>=2b8282828282?>«6828282828282?>=2828282a28282?>=2828282828282?=26@AB'''E76'''=2CDE7>HIJ////?>///=2KLM?>PQ:2;2;2;2;2GF:2;2;2<2;2TU?>XY=282`28282ON=282828282\]?>:2;2<2b828282;2;2<282828282;2;2?>=2828282828282?>=2VW828282ª6?>=2a28282828282?>=2^_82828282?>«68282d2e28282?>=28282d2e28282?
@@ -1 +0,0 @@

@@ -1 +0,0 @@
6@kŻmE@kc''@kŻmE7>Hsť·2žuMHsť—6ž//Hsť·2žuM?>PQ:2;2;2TUPQ:2;2;2;2;2PQ:2;2;2TU?>XY=28282\]XY=28282a282XY=2a282\]?>:2;2<2a282;2;2:2;2<2828282Ş6:2;2<28282;2;2?>=2VW828282Ş6=2€82=28282a2828282?>=2^_82`28282=2pVp82=2`2828282b82?>«6828282828282=2VGV82=28282828282Ş6?
@@ -1 +0,0 @@

@@ -1 +0,0 @@
мнлнлнмнувтжтжужо2о2о2о2о2о2п2я2о2Ь2р2с2и2и2о2о2Ь2и2и2и2и2и2и2о2Ь2и2и2и2р2с2и2о2З2и2и2и2и2и2и2п2В2О2и2й2к2и2Ы2о2
@@ -1 +0,0 @@

@@ -1 +0,0 @@
ΜΞΨΩΪΞΝΞΜΞΝΞΜΞΜΞΝΞΝΞΜΤΦΫά2έΦΥΦΤΦΥΧΤΧΤΦΥΧΥΦΤΟ2Ο2Ο2Ο2Ο2Ο2Ο2Ο2Ο2Ο2Ο2Π2Ρ2Ο2Ο2Ο2ψ2Ι22Σ2Ι2Ρ2Ο2Ο2Ο2Ο2Ο2Ο2Ο2Ο2Ο2Ο2Ο2Ο2Ο2Ο2ψ2Ι2Ι2Ι2Ι2Ι2Ο2Ο2Ο2Ο2Ο2Ο2Π2Ρ2Ο2Ο2Ο2Ο2Ο2Ο2ψ2Ι2Ι2Ι2Ι2Ι2Ι2Ο2Ο2Ο2Ο2Ο2Ο2Ο2Ο2Ο2Ο2Ο2Ο2Ο2Ο2χ2ο2Ι2Ι2Ι2Ι22Π2Ρ2Ο2Ο2Ο2Ο2Ο2Ο2Ο2Ο2Ο2Ο2Ο2Π2Ρ2χ2ο2Ι2Ι2Ι2Ι2
-1
View File
@@ -1 +0,0 @@

-1
View File
@@ -1 +0,0 @@
f222f222ff6662222226662222226662f2222222222222######"f22222222#######"2222222 !B!B!B!B!B!B"P22222222BBBBBBP22˜2™2™2š2222222fP222BBBBBB22˜2¡2¡2¡2¢22222ffPf2BBBBBB22 2¡2¡2¡2¡2š2222222222BBBBB22 2¡2¡2¡2¡2¢2222222222222¨2¡2¡2¡2¡2¢222f2222222222222222f22¨2©2©2©2ª22222Pf22222222222222222P2222222222f22222222222222222####"22222222222222222 ##################"22222222666666222222226666662222222 #666666###"2<22#XYZ##
-1
View File
@@ -1 +0,0 @@

Binary file not shown.
-1
View File
@@ -1 +0,0 @@

-55
View File
@@ -1,55 +0,0 @@
STSTÃÄÅ [\21$#![\0!21!!ËÌ2Í"
cd:292)2)2)2cd82)2:292)2)2Æ2)2Ç2)2'

!!! k2l2¡2(2(2(2(2k2l2¡2(2(2(2(2(2(2(2(2(27

2)2(2(2(2(2(2(2(2(2(2(2(2(2(2(2(2(2(2(2)2

'//¡2(2(2]iiiiiiiiii^™2(2(2(2(2(2

/'/¡2(2(2`q1q1q1q1q1q1q1q1q1q1¤¡2(2(2(2(2(2

'/±2©2(2(2`q1p1p1p1p1p1p1p1p1q1¤¡2(2(2(2(2(2

/±2©2(2(2(2hiiiiiiiiii¬¡2(2(2(2(2

)2©2(2(2(2(2*2*2*2*2*2*2*2*2*2*2*2*2©2(2(2(2(2'

)2(2(2(2(2(2(2(2(2(2(2(2(2(2(2(2(2(2(2(2(2(2(2/

)2(2(2]iiiiiif(2(2eiiiiii^™2(2'

)2(2(2`t||||||¯0Ï0||||||¤¡2(2/

)2(2(2`us¤¡2(2*2

)2(2(2`upppppppppppps¤¡2(2(2

Š2ƒ2(2`upppppppppppps¤¡2(2(2

ˆ¡2ªuppppppppppppsy¡2(2(2

¡2*­BBBBtppppprBBBBB*©2(2(2

)2*2©2((BBBBuypppxsBBBBB((22ƒ2

)2(2(2t|||}ppp{||||™2ˆ

)2(2(2`u˜pppšs¤¡2

)2(2(2`upppppppppppps¤¡2*2*2

Š2ƒ2(2`upppppppppppps¤¡2(2(2

ˆ¡2`upppppppppppps¤¡22ƒ2

¡2ªuppppppppppppsy¡2ˆ

)2*2©2*­BBBBBtppprBBBBBB*©2

)2(2(2((BBBBBuypxsB(B(B(B(B(B((2*2*2

mmmmmmmmougsnmmmmmmmmm

qqqqqqqqu¿ÈÉʾsqqqqqqqqq
¿llllllll¿lllll¾lllllllll¾
-1
View File
@@ -1 +0,0 @@

-83
View File
@@ -1,83 +0,0 @@
àààÃÄÅààÃÄÅààààààà³´µààààààààààà 01!ËÌ2Í
11ËÌ2Í!ØÙØÙ
!!»¼2½!!

ØÙ!!!ØÙØÙ
àÃÄÅST8292)2Æ2)2Ç2
9292Æ2)2Ç2)2ÚÛÚÛ
')2Æ2)2Ç2)2'

ÚÛ)2)2)2ÚÛÚÛ

!ËÌ2Í[\ )2(2(2(2(2(2
)2(2(2(2(2(2ÜÝ7ÚÛ
/¡2(2(2(2(2/

ÜÝ7¡2(2ß2ÜÝ7ÚÛ

)2Æ2)2Ç2cd2)2(2(2(2(2(2
)2(2(2(2(2ß2*2*2ÜÝ7
)2ß2(2(2(2ß2(2

)2*2©2(2(2*2*2ÜÝ7

)2(2(2(2k2l2¡2(2(2(2(2(2(2  2Y2Y2Y2Y2Y2Y2Y2Y2Y2  2Y2Y2Y2Y2Y2Y2 
)2ß2(2(2ß2(2(2ß2(2

)2(2(2(22A2B2222(2(2(2ààÕÔÕàààààààà+,-.
iiiiiii^

)2(2(2(2IJ222(2(2(2
ãã$#$!!!
0013456

`®2§2§2§2§2§2§2¦

)2(2(2(2222A2B22(2(2(2
êêæ3ó7ô7æõCæ66
828292;<=>

hiiiiiii¬

)2(2(2(2222IJ(2(2(2
3€3å3Ã7Å7åýCå3å3å3
)263(2CDEF

)2ß2(2(2ß2(2(2ß2(2

)2(2(2(2222222(2(2(2
3€3å3û3ü3åúå3ß2å3
)2(2(2KLMN

iiiiiii^
  2Y2Y2Y2Y2Y2Y2Y2Y2Y2Y2Y2Y2 î3í3í3í3í3í3í3í3í3í3 )2(2(2(2UV)2

`®2§2§2§2§2§2§2¦
ààààààààààààààààààààààà)2ß2(2(2(2(2(2

hiiiiiii¬

!!!!!!!!!!!!! !!!!!!!!!!  2Y2Y2Y2Y2Y2Y2 
)2ß2(2(2ß2(2(2ß2(2

)2)2)2)2)2)2)2)2)2)2)2)2)22)222222222à3ààààààà
iiiiiii^

)2(2ß2(2(2(2(2(2(2(2(2(2(2(2(2é3 
22ñá7 !!!!!!!

`®2§2§2§2§2§2§2¦

iiiiiiiiiiiii^è22ùèD322222)2)2

hiiiiiii¬

`®2§2§2§2§2§2§2§2§2§2§2§2§2¦222222222222222(2(2

)2ß2(2(2ß2(2(2ß2(2

`¯2O1O1O1O1O1O1O1O1O1O1O1O1¤2A2B2222A2B2é3é322222(2(2
  2Y2Y2Y2Y2Y2Y2Y2Y2 
hiiiiiiiiiiiii¬2IJ222IJèè22222(2ß2
ààààààààà
)2*2ß2*2*2*2*2*2*2*2*2*2*2*2*2222222222222222(2(2
-1
View File
@@ -1 +0,0 @@

-51
View File
@@ -1,51 +0,0 @@
ST³´µ³´µ+,-.+,-.222 [\01»¼2½
!!»¼2½3456!!3456!!!
à³´µàcd8292Æ2)2Ç2
)2)2Æ2)2Ç2;<=>)2)2;<=>)2)2)2

!»¼2½!
k2l2¡2(2(2(2(2
)2(2(2(2(2CDEF¡2(2CDEF¡2(2(2

)2Æ2)2Ç2)2
)2(2(2(2(2(2(2
)2(2(2(2(2KLMN¡2(2KLMN¡2(2(2

)2(2(2(2(2
)2(2(22A2B22
)2(2(2(2(2(2UV¡2(2(2(2UV¡2(2(2(2

)2(2(2
)2(2(22IJ
)2(22ƒ2(2(2*2*2©2(2(2(2*2*2©2(2(2(2

)2//(2
)2(2(22222
)2(2ˆ¡2(22ƒ2(2(22ƒ2(22ƒ2(2(2(2

)277/ß2
)2ß2(22222
)2(2¡20ˆ¡2(2ˆ2ˆ¡2ß2(2
  2Y2Y2Y2Y2  2Y2Y2Y2Y2Y2Y2 )2(2*2*2©282¡2(2:2¡2(2(2
àààààààààààà)2(2(2(2(2(2*2*2©2(2*2*2©2*2*2©2(2(2

!!!!! 012!!!!
)2(2(2(2(2(2(2(2(2(2(2(2(2(2(2(2(2(2

)2)2)2)2)228292:2)2)2)2)2
)2(2(2(2(2(2(2(2(2(2(2(2(2(2(2(2(2 
)2(2(2(2(2(2(2(2(2(2(2ß2(2 )2(2(2ß2(2(2(2'2Y2Y2Y2Y2Y2Y2Y2Y2
)2(2(2(2(2(2(2(2(2(2(2(2(2)2(2(2(2(2(2'/àààààààà

Žiiiiiiiiiiif )2(2(2(2(2(2/// !!!!!!!!

iiiiiii^2)2)2)2)2)2)2)2)2

VVVVVVVVpppš¦¡2(2(2(2(2(2(2ß2(2

GGGGGGGVVVVVVVVpppppy¡2(2(2(2(2

GGGGGGGGGGGGGGVVVVVp*2©2(2(2(2(2''//

GGGGGGGGGGGGGGGGGGVp™2(2(2(2(2//)2ß2
 GGGGGGGGGGGGGGGGGGVp¦Œ2Y2Y2Y2Y2 2 2 2Y2 GGGGGGGGGGGGGGGGGGVpbàààààààà Žiiiiiiiiiiiiiiiiiiiiij !!!!!!!! 
@@ -1 +0,0 @@

Binary file not shown.
@@ -1 +0,0 @@

@@ -1,95 +0,0 @@
ÃÄÅÃÄÅààààààààà 01!ËÌ2Í
01ËÌ2Í!!!!!!!Ø3Ù3Ø3Ù3

ØÙ!!!ØÙØÙ
àÃÄÅSTÃÄÅST8292)2Æ2)2Ç2
8292Æ2)2Ç2)2)2)2)2)2)2)2Ü7Ý7Ú7Û7//

ÚÛ)2)2)2ÚÛÚÛ

!ËÌ2Í[\01!!
ËÌ2Í[\
)2(2(2(2(2(2
)2(2(2(2(22A2B222(2(2*2*2Ü7Ý777

ÜÝ7¡2(2ß2ÜÝ7ÚÛ

)2Æ2)2Ç2cd8292)2)2
'Æ2)2Ç2cd
)2(2(2(2(2(2
)2(2(2(2(22IJ2(2(2(2(2*2*2*2*2

)2*2©2(2(2*2*2ÜÝ7

)2(2(2(2k2l2(2ß2(2(2
/¡2(2(2k2l2
)2(2(2(2ß2(2
)2(2(2(2(222222(2(2(2ß2(2(2(2(2

)2ß2(2(2ß2(2(2ß2(2

)2(2(2(2(2(2(2(2(2(2
'¡2(2(2(2(2
)22A2B222  2Y2Y2Y2Y2Y2Y2Y2Y22Y2Y2Y2Y2Y2Y2Y2Y2 
âmmmmmmmo

)2(2(2(2(2(2(2ß2(2(2
/6¡2(2(2(2(2
)22IJ2ààÕÔÕàààààààààààà
vq0q0q0q0q0q0q0w
  2Y2Y2Y2Y2Y2Y2Y2Y2Y2 )2©2ß2(2(2(2
)222222
ãã$#$!!
001!Ø3Ù3Ø3Ù3

~yyyyyyy
àààààààààà)2(2(2(2(2(2
)2(2(2(2(2(2
ê7ê7æ3óôæ3õ
828292)2ÜÝÚÛ

)2ß2(2(2ß2(2(2ß2(2
 !!!!!!!!!!  2Y2Y2Y2Y2Y2  2Y2Y2Y2Y2Y2 3€3å3ÃÅåýCå3å3
)2(2(2(2*2*2ÜÝ

âmmmmmmmo
+,-.àààààààà3€3å3û3ü3å3úå3ß2
)2(2ß2(2(2ß2*2*2

vq0q0q0q0q0q0q0w

345601
0011!! î3í3í3í3í3í3í3í3í3  2Y2Y2Y2Y2Y2Y2Y2 
~yyyyyyy

;<=>8292
82829292)2)2ààààààààààààààààà
)2ß2(2(2ß2(2(2ß2(2

CDEF)2…2
)2(2ß2(2(2(2 !!!!!!!!! !!!!!!!!

âmmmmmmmo

KLMN)2(2
)2(2(2(2(2(22)2)2)2)2)2)2)2)2)22)2)2)2)2)2)2)2)2

vq0q0q0q0q0q0q0w

)2UV)2ß2(2  2Y2Y2Y2Y2Y2Y2Y2Y22é3222222222222(2(2

~yyyyyyy

)2)2)2)2(2(2àààààààààá 
2A2B222@2B2é3é32(2(2

)2ß2(2(2ß2(2(2ß2(2

)2(2(2(2Ø3Ù3
!!!!!!!!! è2IJ22HJèè2(2(2
  2Y2Y2Y2Y2Y2Y2Y2Y2 
)2(2Ø3Ù3ÜÝ
)2)2)2)2)2)2)2)2)222222222222222(2ß2
ààààààààà
Ø3Ù3Ú7Û7(2(2
)2(2ß2(2(2(2(2(2(2(22222222222222(2(2
@@ -1 +0,0 @@

@@ -1,49 +0,0 @@
ST³´µ³´µ|}~|}~ [\01»¼2½
!!»¼2½3456!!3456!!!
à³´µàcd8292Æ2)2Ç2
)2)2Æ2)2Ç2;<=>)2)2;<=>)2)2)2

»¼2½! k2l2¡2(2(2(2(2
)2(2(2(2(2CDEF(2(2CDEF¡2(2(2

'Æ2)2Ç2)22)2(2(2(2(2(2(2
)2(2(2(2(2KLMN(2(2KLMN¡2ß2(2

/(2(2(2(22A2B222(2(2(2
)22ƒ2(2(2(2UV¡2(2(2(2UV¡2(2(2(2

/(2(2(2(22IJ2(2(2(2
)2ˆ2¡2(2(2(2(2(2(2(2*2*2©2(2(2(2

)2(2(2(2(222222(2(2(2
)2:2¡2(2(2(2(2(2(22ƒ2(22ƒ2(2(2

)2(2(2(2(222222(2(2(2
)2*2*2©2(2(2(2(2(2(2(2ˆ2ˆ¡2(2
  2Y22Y2Y2Y2Y2Y2Y2Y2Y2Y2Y2  2Y2Y2Y2Y2Y2Y2Y22(2(2:2¡2(2
àààààààààààààààààààà(2(2*2*2©2*2*2©2(2

01
!!!!!!!!!!
!!!!!!!! (2(2(2(2(2(2(2(2(2

8292
)2)2)2)2)2)2)2)2)2)2 )2)2)2)2)2)2)2)22(2(2(2(2(22Y2Y2Y2 
)2(2
)2(2(2(2(2(2(2(2ß2(2)2(2ß2(2(2(2(2(2(2(2(2(2(2(2ààà
)2ß2
)2(2(2(2(2(2(2(2(2(2 Žiiiiiiiiiiii^ !!!

)2(2
)2(2(2(2piiiif2€¦2)2)2)2

)2(2 )2(2(2(2`˜pppppVVVVVVb¡2(2ß2(2

)2(2)2(2(2(2`ppppppVVVVVGGGGGVb¡2(2(2(2

)2(2 )2(2(2(2xpppVVVGGGGGGGGGGVb¡2(2(2(2

)2(22)2(2(2(2*2pVVGGGGGGGGGGGGGVb¡2(2(2(2

)2(2(2(2(2(2(2VGGGGGGGGGGGGGGGVb¡2(2(2(2
  2Y2Y2Y2Y2Y22`VGGGGGGGGGGGGGGGVb{3(2(2(2 àààààà`VGGGGGGGGGGGGGGGVbààà !!!!!! hiiiiiiiiiiiiiiiiiiij !!! 
-1
View File
@@ -1 +0,0 @@

-1
View File
@@ -1 +0,0 @@
666666666666666666666666666666666666666666666666666666666666666666?262666666262666666262666666262666666226666662266666626U266666622262226666662226222666666 6 6 6"22U22  6 6 6666666666"22222 666666666666"222 6666666666662<2666666666666 6XYZ 6666666666666 6 6 6 6 6 6 6666666666666 6 6 6 6 6 6 6 6 6666666666666666666666666666
-1
View File
@@ -1 +0,0 @@

-1
View File
@@ -1 +0,0 @@
22222666666666666666666666666666666666666222226666666666666666666666666666666666666222266'6622226'666666662222666666622222266222222266662222'226666666'2222222222222222266662222 6 6"2662222  B B"222222222266662222662U222 "222222222666622226622222222222222 BB"2222222266662222 6 6"222222  B B B B B B B B B BBB B B B B B B"222266662222 2 6"22222   6 6 6 6"BBBBBBBBBBBB"22266662222U2222   6"B"2266662222U222266B2266662222U222266B2266662222222266B222222222222266662222'2222'66B22  6 6 6 6"2222266662222222  6 6 6B2  " ""2222666622222  6 6666BB B B B B B BU"222666622222  6 6 6 6 6BBBBBBBBBBU    6 6 6 66622222  B B B B BBBB             6 6 6 6 6"6622222BBBBBBBB     "   " " " "6622222BUBBUUU662222222222BBUBBUUU6622222BBBBBBU        662222222222BBBBBBUBBBBBBBB6666666662222222222BBBBBBBUB         2222222222BBBBBBBBB        22222BBBBBBBBB22266666  2222222222BBBBBBBBB226     62222222222BUBBBBBB2226     2222 6 6"2222BBBBBBBB'       6    2222 6"62222BBBBBBBBB  "     62222 2" 6" 6"222BUBBBBBBBBU6666622222U6222BBBBBBBBUBBBBBBBBB62222U6U222BBBBBB66666622226622  B B2222222BBBBBB662222U622BB22BB2226U22226622BBBBBBB22BB2226666662222U22B22BB22266666622222222B22222B       66666622222222B22222B'        66666622222222U2222U6        6666662222222222222266U6        66666622222222222222'U66U66222222222222222666622222222222222222666622222222U222222222666666622222<22222222222226666666666666666666662222 XYZ             6666666666666666666662222                      6666666666666666662222  6  6  6  6  6  6   6                       666622222666666666666666666666666666666666666666662222266666666666666666666666666666666666666666
@@ -1 +0,0 @@

-1
View File
@@ -1 +0,0 @@
hijjjkllmjjjoOpqrrrstturrrwWxyzzz{||}zzz_22L2M22„2„2…2M2N22†2‡ŚŠ2U2T2U2U2b2c2U2U2V2U2ŚŠ2U2`2U2U2d2e2U2U2a2U2ŚŠ2U2T2U2U2f2g2U2U2V2U2‰2U2\2]2]2]2]2]2]2^2U2Ž2Ź!2!2

Some files were not shown because too many files have changed in this diff Show More