Crystal Beans From Dungeon Explorer:Switch Functions: Difference between revisions
Jump to navigation
Jump to search
(Created page) |
FCandChill (talk | contribs) mNo edit summary |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{{subpage|game=Crystal Beans From Dungeon Explorer:Core engine ROM map}} | |||
==Overview== | ==Overview== | ||
The '''ShortSwitch()''' (at 0x0089CF) and '''LongSwitch()''' (at 0x0089E9) functions are used to simulate the ''switch'' statement in C for the objects subtype. | The '''ShortSwitch()''' (at <tt>0x0089CF</tt>) and '''LongSwitch()''' (at <tt>0x0089E9</tt>) functions are used to simulate the ''switch'' statement in C for the objects subtype. | ||
They both work the same way excepted that the '''ShortSwitch()''' function uses 16-bits pointers to jump to the destination and the '''LongSwitch()''' function uses 24-bits pointers. | They both work the same way excepted that the '''ShortSwitch()''' function uses 16-bits pointers to jump to the destination and the '''LongSwitch()''' function uses 24-bits pointers. |
Latest revision as of 05:49, 9 June 2016
This is a sub-page for Crystal Beans From Dungeon Explorer:Core engine ROM map.
Overview
The ShortSwitch() (at 0x0089CF) and LongSwitch() (at 0x0089E9) functions are used to simulate the switch statement in C for the objects subtype.
They both work the same way excepted that the ShortSwitch() function uses 16-bits pointers to jump to the destination and the LongSwitch() function uses 24-bits pointers.
These function do not return to the instruction following their call but rather to the instruction following the calling function.
Example
CALL SomeFunction ; ShortSwitch will return here after jumping to its target . . . SomeFunction: CALL ShortSwitch .DW Case00, Case01