mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-07-08 20:24:47 -04:00
Frame Interp: d_meter_haihai, d_msg_out_font, d_meter_button
* fix menu option haihai cursor and description icon animation speeds under frame interpolation * also fix d_meter_button
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
#include "d/d_msg_out_font.h"
|
||||
#include "d/d_msg_string.h"
|
||||
#include "d/d_pane_class.h"
|
||||
#include "dusk/frame_interpolation.h"
|
||||
#include <cstring>
|
||||
|
||||
#if VERSION == VERSION_GCN_JPN
|
||||
@@ -280,15 +281,20 @@ void dMeterButton_c::draw() {
|
||||
|
||||
s16 temp_r6 = g_drawHIO.mEmpButton.mRepeatHitFrameNum;
|
||||
s16 temp_r6_2 = g_drawHIO.mEmpButton.mRepeatHitFrameNum / 2;
|
||||
field_0x4b8[i]++;
|
||||
#ifdef TARGET_PC
|
||||
if (dusk::frame_interp::get_ui_tick_pending())
|
||||
#endif
|
||||
{
|
||||
field_0x4b8[i]++;
|
||||
|
||||
if (field_0x4b8[i] >= temp_r6) {
|
||||
field_0x4b8[i] = 0;
|
||||
if (field_0x4b8[i] >= temp_r6) {
|
||||
field_0x4b8[i] = 0;
|
||||
|
||||
if (field_0x4bc[i] == 0) {
|
||||
field_0x4bc[i] = 1;
|
||||
} else {
|
||||
field_0x4bc[i] = 0;
|
||||
if (field_0x4bc[i] == 0) {
|
||||
field_0x4bc[i] = 1;
|
||||
} else {
|
||||
field_0x4bc[i] = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+37
-21
@@ -11,6 +11,7 @@
|
||||
#include "d/d_com_inf_game.h"
|
||||
#include "d/d_meter_HIO.h"
|
||||
#include "d/d_pane_class.h"
|
||||
#include "dusk/frame_interpolation.h"
|
||||
|
||||
dMeterHaihai_c::dMeterHaihai_c(u8 i_type) {
|
||||
mType = i_type;
|
||||
@@ -286,14 +287,19 @@ void dMeterHaihai_c::updateHaihai() {
|
||||
void dMeterHaihai_c::playBckAnime(J2DAnmTransformKey* i_bck) {
|
||||
if (checkPlayAnime(1)) {
|
||||
if (i_bck != NULL) {
|
||||
if (mType == 4) {
|
||||
mBckFrame += g_drawHIO.mWiiLockArrowBCKAnimSpeed;
|
||||
} else {
|
||||
mBckFrame += g_drawHIO.mScrollArrowBCKAnimSpeed;
|
||||
}
|
||||
#ifdef TARGET_PC
|
||||
if (dusk::frame_interp::get_ui_tick_pending())
|
||||
#endif
|
||||
{
|
||||
if (mType == 4) {
|
||||
mBckFrame += g_drawHIO.mWiiLockArrowBCKAnimSpeed;
|
||||
} else {
|
||||
mBckFrame += g_drawHIO.mScrollArrowBCKAnimSpeed;
|
||||
}
|
||||
|
||||
if (mBckFrame >= i_bck->getFrameMax()) {
|
||||
mBckFrame -= i_bck->getFrameMax();
|
||||
if (mBckFrame >= i_bck->getFrameMax()) {
|
||||
mBckFrame -= i_bck->getFrameMax();
|
||||
}
|
||||
}
|
||||
} else {
|
||||
mBtkFrame = 1.0f;
|
||||
@@ -309,14 +315,19 @@ void dMeterHaihai_c::playBckAnime(J2DAnmTransformKey* i_bck) {
|
||||
void dMeterHaihai_c::playBtkAnime(J2DAnmTextureSRTKey* i_btk) {
|
||||
if (checkPlayAnime(2)) {
|
||||
if (i_btk != NULL) {
|
||||
if (mType == 4) {
|
||||
mBtkFrame += g_drawHIO.mWiiLockArrowBTKAnimSpeed;
|
||||
} else {
|
||||
mBtkFrame += g_drawHIO.mScrollArrowBTKAnimSpeed;
|
||||
}
|
||||
#ifdef TARGET_PC
|
||||
if (dusk::frame_interp::get_ui_tick_pending())
|
||||
#endif
|
||||
{
|
||||
if (mType == 4) {
|
||||
mBtkFrame += g_drawHIO.mWiiLockArrowBTKAnimSpeed;
|
||||
} else {
|
||||
mBtkFrame += g_drawHIO.mScrollArrowBTKAnimSpeed;
|
||||
}
|
||||
|
||||
if (mBtkFrame >= i_btk->getFrameMax()) {
|
||||
mBtkFrame -= i_btk->getFrameMax();
|
||||
if (mBtkFrame >= i_btk->getFrameMax()) {
|
||||
mBtkFrame -= i_btk->getFrameMax();
|
||||
}
|
||||
}
|
||||
} else {
|
||||
mBtkFrame = 1.0f;
|
||||
@@ -331,14 +342,19 @@ void dMeterHaihai_c::playBtkAnime(J2DAnmTextureSRTKey* i_btk) {
|
||||
void dMeterHaihai_c::playBpkAnime(J2DAnmColor* i_bpk) {
|
||||
if (checkPlayAnime(0)) {
|
||||
if (i_bpk != NULL) {
|
||||
if (mType == 4) {
|
||||
mBpkFrame += g_drawHIO.mWiiLockArrowBPKAnimSpeed;
|
||||
} else {
|
||||
mBpkFrame += g_drawHIO.mScrollArrowBPKAnimSpeed;
|
||||
}
|
||||
#ifdef TARGET_PC
|
||||
if (dusk::frame_interp::get_ui_tick_pending())
|
||||
#endif
|
||||
{
|
||||
if (mType == 4) {
|
||||
mBpkFrame += g_drawHIO.mWiiLockArrowBPKAnimSpeed;
|
||||
} else {
|
||||
mBpkFrame += g_drawHIO.mScrollArrowBPKAnimSpeed;
|
||||
}
|
||||
|
||||
if (mBpkFrame >= i_bpk->getFrameMax()) {
|
||||
mBpkFrame -= i_bpk->getFrameMax();
|
||||
if (mBpkFrame >= i_bpk->getFrameMax()) {
|
||||
mBpkFrame -= i_bpk->getFrameMax();
|
||||
}
|
||||
}
|
||||
} else {
|
||||
mBpkFrame = 1.0f;
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
#include "JSystem/JUtility/JUTTexture.h"
|
||||
#include "d/d_meter2_info.h"
|
||||
#include "d/d_msg_object.h"
|
||||
#include "dusk/frame_interpolation.h"
|
||||
#include "f_op/f_op_msg_mng.h"
|
||||
|
||||
COutFontSet_c::COutFontSet_c() {
|
||||
@@ -311,6 +312,15 @@ void COutFont_c::draw(J2DTextBox* i_textbox, f32 param_1, f32 param_2, f32 param
|
||||
sp256[i] = field_0x1b4[i];
|
||||
}
|
||||
|
||||
#ifdef TARGET_PC
|
||||
bool uiTickPending = dusk::frame_interp::get_ui_tick_pending();
|
||||
if (!uiTickPending) {
|
||||
for (int i = 0; i < 70; i++) {
|
||||
sp256[i] = -1;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
for (int i = 0; i < 35; i++) {
|
||||
u8 type = mpOfs[i]->getType();
|
||||
J2DTextBox* tbox = mpOfs[i]->getTextBoxPtr();
|
||||
@@ -505,9 +515,14 @@ void COutFont_c::draw(J2DTextBox* i_textbox, f32 param_1, f32 param_2, f32 param
|
||||
case 20:
|
||||
case 21:
|
||||
case 22:
|
||||
field_0x1b4[type]++;
|
||||
if (field_0x1b4[type] >= 28) {
|
||||
field_0x1b4[type] = 0;
|
||||
#ifdef TARGET_PC
|
||||
if (uiTickPending)
|
||||
#endif
|
||||
{
|
||||
field_0x1b4[type]++;
|
||||
if (field_0x1b4[type] >= 28) {
|
||||
field_0x1b4[type] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
mpPane[type]->rotate(0.5f * sizeX, 0.5f * sizeY, ROTATE_Z,
|
||||
|
||||
Reference in New Issue
Block a user