Glossary

From Glitch City Wiki
Revision as of 05:18, 4 September 2019 by >Bbbbbbbbba (Let me get the page started.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
0-based
See: Zero-based numbering on Wikipedia
A form of indexing, where what would be called "the first item" in normal English has an index value of 0, and "the second item" has an index value of 1, etc. It is sometimes considered more "natural" in computer science. An example in daily life is the European scheme of floor numbering, where the ground floor can be considered as the 0th floor.
1-based
A form of indexing, where what would be called "the first item" in normal English has an index value of 1, and "the second item" has an index value of 2, etc.
Count byte
A byte representing the number of items in a list. Usually notable when the list itself has a terminator, since the code may determine the end of the list by the terminator at some places, and by the count byte at other places. Desynchronizing the count byte and the actual number of items in the list (according to the terminator) can cause glitches.
Jump table
A table of addresses pointing to assembly code (typically entry points of functions). A relatively well-known example of a jump table is ItemUsePtrTable in Generation I. An invalid index into a jump table will usually cause glitches, possibly arbitrary code execution exploits.
Party count
The value of the count byte for a party Pokémon list. Normally, it is just the number of Pokémon in the party.
Terminator
A value that signifies the end of a list or a string. To avoid ambiguity, it must be an otherwise invalid value for that list or string. Common values for terminators are 0x00 or 0xFF. Notably, in Generation I and II, the control character 0x50 usually acts as the terminator, although there are other control characters that also terminate the string (in addition to their other functions).