mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-06-06 02:58:18 -04:00
fb9178cac9
* Disable waitForTick and waitBlanking * Initial frame interpolation implementation * Initial batch of speed fixes * Fix Iron Boots * Strip dead code once used for debugging * Interpolate shadows * Revert overzealous/redundant lookups * Fix JUTFader * Fix field map cursor * Fix various particle effects * Fix Midna when riding Wolf Link * Fix title logo * Title Logo 2: Electric Boogaloo * Fixed grass and flowers * "Unlock Framerate" config option (WIP) * Wrap more things in TARGET_PC * Finish wrapping things in TARGET_PC * Missed one * Disable dComIfGd_drawXluListInvisible when interpolating --------- Co-authored-by: Luke Street <luke@street.dev>
50 lines
1.4 KiB
C++
50 lines
1.4 KiB
C++
#include "d/dolzel.h" // IWYU pragma: keep
|
|
|
|
#include "d/d_select_icon.h"
|
|
#include "JSystem/J2DGraph/J2DAnimation.h"
|
|
#include "dusk/frame_interpolation.h"
|
|
|
|
dSi_HIO_c::dSi_HIO_c() {}
|
|
|
|
void dSelect_icon_c::animation() {
|
|
if (field_0x10->getAlpha() != 0) {
|
|
#ifdef TARGET_PC
|
|
const u32 ui_advance_ticks = dusk::frame_interp::get_presentation_ui_advance_ticks();
|
|
for (u32 i = 0; i < ui_advance_ticks; ++i) {
|
|
#endif
|
|
field_0x20 += field_0x2c;
|
|
if (field_0x20 >= field_0x1c->getFrameMax()) {
|
|
field_0x20 = 0.0f;
|
|
}
|
|
field_0x1c->setFrame(field_0x20);
|
|
|
|
field_0x28 += field_0x2c;
|
|
if (field_0x28 >= field_0x24->getFrameMax()) {
|
|
field_0x28 = 0.0f;
|
|
}
|
|
#ifdef TARGET_PC
|
|
}
|
|
// Set even if not advancing
|
|
field_0x1c->setFrame(field_0x20);
|
|
#endif
|
|
|
|
field_0x24->setFrame(field_0x28);
|
|
field_0x8->animation();
|
|
field_0x10->paneScale(field_0x14, field_0x14);
|
|
}
|
|
}
|
|
|
|
void dSelect_icon_c::setAlpha(u8 param_0) {
|
|
field_0x10->setAlpha(param_0);
|
|
}
|
|
|
|
void dSelect_icon_c::setPos(J2DPane* param_0, f32 transX, f32 transY) {
|
|
field_0x14 = param_0->getWidth() / 100.0f;
|
|
field_0x18 = param_0->getHeight() / 100.0f;
|
|
|
|
field_0x10->paneScale(field_0x14, field_0x14);
|
|
field_0xc->getPanePtr()->translate(transX, transY);
|
|
}
|
|
|
|
static dSi_HIO_c g_siHIO;
|