Expanded bag item documentation (Generation I): Difference between revisions
Jump to navigation
Jump to search
Content added Content deleted
>Torchickens No edit summary |
>Sherkel (BCD section) |
||
Line 8: | Line 8: | ||
! Bag item/quantity !! Disassembly label !! Red/Blue address !! Yellow address !! Details |
! Bag item/quantity !! Disassembly label !! Red/Blue address !! Yellow address !! Details |
||
|- |
|- |
||
| Item 21 quantity || wPlayerMoney || D347 || D346 || Byte 1 of the player's current money. |
| Item 21 quantity || wPlayerMoney || D347 || D346 || Byte 1 of the player's current money (this value is read as BCD; see below.) |
||
|- |
|- |
||
| Item 22 || wPlayerMoney || D348 || D347 || Byte 2 of the player's current money. |
| Item 22 || wPlayerMoney || D348 || D347 || Byte 2 of the player's current money (this value is read as BCD; see below.) |
||
|- |
|- |
||
| Item 22 quantity || wPlayerMoney || D349 || D348 || Byte 3 of the player's current money. |
| Item 22 quantity || wPlayerMoney || D349 || D348 || Byte 3 of the player's current money (this value is read as BCD; see below.) |
||
|- |
|- |
||
| Item 23 || wRivalName || D34A || D34D || The 1st letter of the rival's name. |
| Item 23 || wRivalName || D34A || D34D || The 1st letter of the rival's name. |
||
Line 72: | Line 72: | ||
|} |
|} |
||
|} |
|} |
||
==Binary-coded decimal (BCD)=== |
|||
Binary-coded decimal is a system for encoding numbers in which hexadecimal values are read as their visual counterpart in decimal. For instance, $64 in BCD would be interpreted as 64, not 100. It is used most notably for storing the player's money. This means that a value such as $000200 (item 21 has quantity 0, item 22 is an Ultra Ball with quantity 0) will give the player 200 money. |
|||
{{stub}} |
{{stub}} |