[Decompilation] [th01] Orb physics
"Physics". Not only did ZUN restrict the X velocity to the 5 discrete
states of -8, -4, 0, 4, and 8 (because hey, unaligned blitting is slow
anyway?), but gravity is also only applied every 5 frames.
We're still missing quite a bit of usage code, but these are the core
functions. One of which turned out to be undecompilable, due to… a
rigorously defined instruction order when performing arithmetic between
`double`s and `float`s?! Still, spelling out all this stuff in ASM
seems much better than somehow splitting the data segment, just so that
we can immediately use literals there.
Part of P0097, funded by Ember2528.
2020-06-09 18:39:44 +00:00
|
|
|
/* ReC98
|
|
|
|
* -----
|
|
|
|
* 2nd part of code segment #1 of TH01's REIIDEN.EXE
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma codeseg main_01__TEXT main_01
|
|
|
|
|
|
|
|
extern "C" {
|
|
|
|
#include "ReC98.h"
|
2020-09-26 12:37:25 +00:00
|
|
|
#include "th01/hardware/egc.h"
|
|
|
|
#include "th01/main/playfld.hpp"
|
|
|
|
#include "th01/main/player/player.hpp"
|
2020-10-12 14:07:04 +00:00
|
|
|
#include "th01/main/stage/palette.hpp"
|
2020-09-26 12:37:25 +00:00
|
|
|
}
|
[Decompilation] [th01] Orb physics
"Physics". Not only did ZUN restrict the X velocity to the 5 discrete
states of -8, -4, 0, 4, and 8 (because hey, unaligned blitting is slow
anyway?), but gravity is also only applied every 5 frames.
We're still missing quite a bit of usage code, but these are the core
functions. One of which turned out to be undecompilable, due to… a
rigorously defined instruction order when performing arithmetic between
`double`s and `float`s?! Still, spelling out all this stuff in ASM
seems much better than somehow splitting the data segment, just so that
we can immediately use literals there.
Part of P0097, funded by Ember2528.
2020-06-09 18:39:44 +00:00
|
|
|
|
2020-10-12 14:07:04 +00:00
|
|
|
#include "th01/main/stage/palette.cpp"
|
2020-09-26 12:37:25 +00:00
|
|
|
#include "th01/main/player/inv_spr.cpp"
|
[Decompilation] [th01] Orb physics
"Physics". Not only did ZUN restrict the X velocity to the 5 discrete
states of -8, -4, 0, 4, and 8 (because hey, unaligned blitting is slow
anyway?), but gravity is also only applied every 5 frames.
We're still missing quite a bit of usage code, but these are the core
functions. One of which turned out to be undecompilable, due to… a
rigorously defined instruction order when performing arithmetic between
`double`s and `float`s?! Still, spelling out all this stuff in ASM
seems much better than somehow splitting the data segment, just so that
we can immediately use literals there.
Part of P0097, funded by Ember2528.
2020-06-09 18:39:44 +00:00
|
|
|
|
2020-09-26 12:37:25 +00:00
|
|
|
extern "C" {
|
|
|
|
#include "th01/main/player/orb.cpp"
|
[Decompilation] [th01] Orb physics
"Physics". Not only did ZUN restrict the X velocity to the 5 discrete
states of -8, -4, 0, 4, and 8 (because hey, unaligned blitting is slow
anyway?), but gravity is also only applied every 5 frames.
We're still missing quite a bit of usage code, but these are the core
functions. One of which turned out to be undecompilable, due to… a
rigorously defined instruction order when performing arithmetic between
`double`s and `float`s?! Still, spelling out all this stuff in ASM
seems much better than somehow splitting the data segment, just so that
we can immediately use literals there.
Part of P0097, funded by Ember2528.
2020-06-09 18:39:44 +00:00
|
|
|
}
|