Commit Graph

976 Commits

Author SHA1 Message Date
Rangi bb4a6e5f55 wCursorCurTile -> wCursorCurrentTile 2018-09-09 17:15:49 -04:00
Rangi 603bcfe2ae wPreviousLandmark → wPrevLandmark 2018-09-09 15:27:23 -04:00
Rangi 9ee2b59208 hMultiplicand is four bytes internally, but the high byte is always 0 since allowing four-byte multiplicands could overflow hProduct. 2018-09-09 15:10:38 -04:00
Rangi ae022e1420 Curr -> Cur 2018-09-09 15:09:51 -04:00
Rangi b42ba692c4 ; fallthrough 2018-08-26 22:34:59 -04:00
Rangi 0e1445b796 spaces->tab, and remove redundant comment 2018-08-26 16:15:43 -04:00
Rangi 557ce82073 hQuotient is a four-byte buffer (fixes #558) 2018-08-26 13:49:38 -04:00
Rangi cb32c895e4 Explain wCreditsBlankFrame2bpp 2018-08-26 13:23:40 -04:00
Rangi d2053c12c2 wCreditsFaux2bpp -> wCreditsBlankFrame2bpp, with the right buffer size
Remove some unused WRAM labels
2018-08-26 13:08:01 -04:00
Rangi 296402bd31 _Divide results go in hQuotient and hRemainder, not in hDividend and hDivisor
Note that the result quotient is four bytes, but hQuotient is a three-byte buffer. This is because no Divide caller ever needed a four-byte quotient, so the buffer didn't include the high byte.
2018-08-25 22:58:26 -04:00
Rangi 4c8c5c10a8 Use rgbasm's GameBoy graphics literal for initializing wCreditsFaux2bpp
In the 2BPP format, two bytes %ABCDEFGH %abcdefgh define eight pixels %Aa %Bb %Cc %Dd %Ee %Ff %Gg %Hh.
Four valid colors: %00 = 0 = white, %01 = 1 = dark, %10 = 2 = light, %11 = 3 = black.
Thus `22222222 = pixels %10 %10 %10 %10 %10 %10 %10 %10 = bytes %11111111 %00000000 = $ff00.
2018-08-25 22:38:57 -04:00
Rangi b2adcd6d6f Reorganize math-related HRAM union (ffb3) 2018-08-25 21:49:26 -04:00
Rangi a71901020b These are signed offsets, not addresses (thanks, PikalaxALT) 2018-08-25 14:43:02 -04:00
Rangi 7aa1c1f388 Remove HRAM label address comments 2018-08-25 14:39:24 -04:00
Rangi 1c0fff7668 hLabel - $ff00 -> LOW(hLabel) 2018-08-25 14:34:25 -04:00
Rangi eb1e3636bb Use labels instead of constants for HRAM
Use explicit ldh instruction to access HRAM locations, don't rely on optimizing ld
2018-08-25 14:28:22 -04:00
mid-kid 50da83cb23 CheckDestinyBond -> CheckFaint
Its main function is fainting the opponent and ending the move effect.
Updated the comment accordingly.
2018-08-17 20:16:37 +02:00
mid-kid 79cf90ab5e Fix some StatUp-related labels 2018-08-17 17:48:41 +02:00
mid-kid 2e147d1128 GetDamageStatsCritical -> CheckDamageStatsCritical
Clarified its usage, as the comments surrounding it were factually
wrong.
2018-08-16 16:11:28 +02:00
mid-kid 3cf49b7245 Fix more uses of EFFECTIVE 2018-08-07 14:38:41 +02:00
mid-kid bc0595564e Fix constants in BattleCommand_MirrorCoat 2018-08-07 09:46:21 +02:00
mid-kid f98a95b8ee wWeeklyFlags -> wDailyFlags2
These are by far not always checked each week, and as such shouldn't be
called that.
Since they're almost always used through the `bit` instruction, it's
very inconvenient to just make wDailyFlags a `dw` instead.
2018-08-07 09:46:21 +02:00
mid-kid 23cdf06e5e RestorePPofDepositedPokemon -> RestorePPOfDepositedPokemon 2018-08-07 09:46:21 +02:00
mid-kid 86c1b05fbc Split print_move_description and mon_menu 2018-08-07 09:46:21 +02:00
Rangi 366330e981 Pokedex_PutScrollbarOAM data values 2018-07-29 16:15:06 -04:00
Rangi 1d96a79a37 No wCurMove alias for wCurSpecies 2018-07-29 16:04:38 -04:00
Rangi b5a9e83a94 Fix reviewed issues.
Pokedex_PrintListing has a comment noting how it depends on wCurSpecies == wNamedObjectIndexBuffer; an assert would be more convenient, but is not possible since WRAM label addresses are not defined yet here.
2018-07-29 16:00:11 -04:00
Rangi c9cb67141b Make reviewed fixes; standardize on " + " 2018-07-29 01:40:23 -04:00
Rangi 8498394701 wSwitchMon 2018-07-29 01:27:33 -04:00
Rangi 8aa08addba wLuckyNumberDigitsBuffer 2018-07-29 01:13:25 -04:00
Rangi 0c746447e7 Improve wTrainerHUDTiles usage 2018-07-29 01:09:12 -04:00
Rangi 5145d69506 ; entries correspond to PLAYEREVENT_* constants 2018-07-29 00:57:28 -04:00
Rangi 9dec80b07e Add meaningful aliases for wd265
Introduce MONICON_* constants
Introduce BATTLEPLAYERACTION_* constants
2018-07-29 00:25:52 -04:00
Rangi cdfdfed17b Crystal fixed TruncateHL_BC in single player 2018-07-27 21:32:14 -04:00
mid-kid 9aa6b55d7b Merge branch 'master' of https://github.com/pret/pokecrystal 2018-07-27 11:24:59 +02:00
mid-kid a91b59ab5d Remove a documented bug that's not really a bug
I mean, technically, being able to read beyond a data table's size is
bad practice, but there's so many cases of this that it's not worth
mentioning.

For most of these cases, at least, it's safe to assume the index won't
ever get high enough to surpass such a table's length, because it's
either hardcoded or decided by the game without the use of
uncontrollable data. As such, they don't expose any actual bugs.
2018-07-26 23:34:05 +02:00
mid-kid e43c89bc80 Consistently use the diff format in bugs_and_glitches 2018-07-26 23:34:03 +02:00
Rangi 2b88951f9f MON_STAT_EXP - 1 → MON_EXP + 2 2018-07-24 14:14:04 -04:00
Rangi d5b98f5206 wPokeAnimStruct matches wPokeAnimStructEnd 2018-07-23 00:37:48 -04:00
Rangi 4f0c9cecf9 StringCmp → CompareBytes; CompareLong → CompareBytesLong
hStringCmpString[1/2] → h[EnemyMon/PartyMon1]Speed
2018-07-23 00:25:53 -04:00
Rangi a1806d6e81 Consistent routine naming convention: 'Foo' wraps '_Foo' 2018-07-23 00:13:43 -04:00
Rangi bdde60c64b ANIM_MON_UNUSED → ANIM_MON_HOF 2018-07-22 23:42:50 -04:00
IIMarckus 8aebc7ba56 Merge branch 'master' of hyperdriveguy/pokecrystal 2018-07-21 00:41:56 -06:00
Hyperdriveguy 57fc81d44e Add Counter and Mirror Coat bugfix 2018-07-20 17:39:53 -07:00
mid-kid 1cb364cc18 Fix usage of NUM_UNOWN 2018-07-18 19:06:56 +02:00
mid-kid 1fc7430a2b Fix misnamed character codes
Some character codes were erroneously named after their text command
counterparts. This has caused a lot of confusion with naming their
functions and with other things.

I've also removed the `dict2` macro and expanded the `dict` macro. This
really isn't something we should be doing for macros but I can't deny it
looks a lot neater than repeated code.
2018-07-18 10:55:30 +02:00
mid-kid 778d57ba21 Remove some more address comments 2018-07-18 10:55:30 +02:00
mid-kid 23708441ef Make proper cmdqueue constants 2018-07-18 10:55:30 +02:00
mid-kid 04d0490c4c Fix anim_ret_command 2018-07-18 10:55:30 +02:00
Rangi b23f0b2bda Fewer uses of 'Thing2 - Thing1' for sizeof(Thing) 2018-07-16 15:58:07 -04:00