2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-08 16:24:55 +00:00

Merge branch 'master' into omegapirate

# Conflicts:
#	Runtime/GuiSys/CAuiImagePane.cpp
This commit is contained in:
2020-04-19 22:12:18 -04:00
37 changed files with 149 additions and 130 deletions

View File

@@ -69,9 +69,9 @@ void CAuiImagePane::DoDrawImagePane(const zeus::CColor& color, const CTexture& t
const zeus::CVector2f res(xb8_tex0Tok->GetWidth(), xb8_tex0Tok->GetHeight());
const zeus::CVector2f tmp = res / x138_tileSize;
const zeus::CVector2f tmpRecip = x138_tileSize / res;
const float x0 = tmpRecip.x() * (frame % int(tmp.x()));
const float x0 = tmpRecip.x() * static_cast<float>(frame % static_cast<int>(tmp.x()));
const float x1 = x0 + tmpRecip.x();
const float y0 = tmpRecip.y() * (frame % int(tmp.y()));
const float y0 = tmpRecip.y() * static_cast<float>(frame % static_cast<int>(tmp.y()));
const float y1 = y0 + tmpRecip.y();
vec.push_back(zeus::CVector2f(x0, y0));
vec.push_back(zeus::CVector2f(x0, y1));
@@ -96,7 +96,7 @@ void CAuiImagePane::DoDrawImagePane(const zeus::CColor& color, const CTexture& t
} else {
const float tmp = (1.f - x14c_deResFactor) * alpha;
const float tmp3 = 1.f - tmp * tmp * tmp;
const float mip = tmp3 * (tex.GetNumMips() - 1);
const float mip = tmp3 * static_cast<float>(tex.GetNumMips() - 1);
quad.drawVerts(useColor, verts, mip);
}
}
@@ -117,11 +117,11 @@ void CAuiImagePane::Draw(const CGuiWidgetDrawParms& params) {
// SetZUpdate(xac_drawFlags == EGuiModelDrawFlags::Shadeless || xac_drawFlags == EGuiModelDrawFlags::Opaque);
float blur0 = 1.f;
float blur1 = 0.f;
int frame0 = x144_frameTimer;
const int frame0 = static_cast<int>(x144_frameTimer);
int frame1 = 0;
if (x140_interval < 1.f && x140_interval > 0.f) {
zeus::CVector2f tmp = zeus::CVector2f(xb8_tex0Tok->GetWidth(), xb8_tex0Tok->GetHeight()) / x138_tileSize;
frame1 = (frame0 + 1) % int(tmp.x() * tmp.y());
frame1 = (frame0 + 1) % static_cast<int>(tmp.x() * tmp.y());
if (x148_fadeDuration == 0.f)
blur1 = 1.f;
else

View File

@@ -220,7 +220,7 @@ void CCompoundTargetReticle::Update(float dt, const CStateManager& mgr) {
std::max(x214_fullChargeFadeTimer - dt / g_tweakTargeting->GetFullChargeFadeDuration(), 0.f);
}
const bool missileActive = gun->GetMissleMode() == CPlayerGun::EMissleMode::Active;
const bool missileActive = gun->GetMissleMode() == CPlayerGun::EMissileMode::Active;
if (missileActive != x1f4_missileActive) {
if (x1f8_missileBracketTimer != 0.f) {
x1f8_missileBracketTimer = FLT_EPSILON - x1f8_missileBracketTimer;

View File

@@ -9,12 +9,12 @@
#include "Runtime/CToken.hpp"
#include "Runtime/RetroTypes.hpp"
#include "Runtime/GuiSys/CGuiWidget.hpp"
#include "Runtime/GuiSys/CRasterFont.hpp"
#include "Runtime/GuiSys/CTextRenderBuffer.hpp"
#include <zeus/CColor.hpp>
namespace urde {
class CRasterFont;
class CSimplePool;
class CTextExecuteBuffer;
class CTextRenderBuffer;
@@ -34,8 +34,6 @@ enum class EVerticalJustification {
RightMono
};
enum class EColorType { Main, Outline, Geometry, Foreground, Background };
enum class ETextDirection { Horizontal, Vertical };
class CGuiTextProperties {

View File

@@ -8,7 +8,6 @@
#include "Runtime/GCNTypes.hpp"
#include "Runtime/IOStreams.hpp"
#include "Runtime/Graphics/CTexture.hpp"
#include "Runtime/GuiSys/CGuiTextSupport.hpp"
#include <zeus/CVector2i.hpp>
@@ -17,6 +16,8 @@ class CDrawStringOptions;
class CTextRenderBuffer;
class IObjectStore;
enum class EColorType { Main, Outline, Geometry, Foreground, Background };
/* NOTE: Is this a good place for CGlyph and CKernPair? */
class CGlyph {
private:

View File

@@ -6,12 +6,11 @@
#include "Runtime/GCNTypes.hpp"
#include "Runtime/GuiSys/CDrawStringOptions.hpp"
#include "Runtime/GuiSys/CGuiTextSupport.hpp"
#include "Runtime/GuiSys/CRasterFont.hpp"
#include <zeus/CColor.hpp>
namespace urde {
class CRasterFont;
class CSaveableState {
friend class CColorOverrideInstruction;
friend class CFontInstruction;