mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-08 21:47:42 +00:00
Windows fixes
This commit is contained in:
@@ -8,7 +8,7 @@ if(MSVC)
|
||||
|
||||
# Shaddup MSVC
|
||||
add_definitions(-DUNICODE=1 -D_UNICODE=1 -D__SSE__=1 -D_CRT_SECURE_NO_WARNINGS=1 -DD_SCL_SECURE_NO_WARNINGS=1
|
||||
/IGNORE:4221 /wd4800 /wd4005 /wd4311 /wd4267 /wd4244 /wd4200 /wd4305 ${VS_DEFINES})
|
||||
/IGNORE:4221 /wd4800 /wd4005 /wd4311 /wd4267 /wd4244 /wd4200 /wd4305 /wd4067 /wd4146 ${VS_DEFINES})
|
||||
|
||||
# Link-time Code Generation for Release builds
|
||||
set(CMAKE_C_FLAGS_RELEASE "/DNDEBUG /O2 /Oy /GL /Gy /MD")
|
||||
|
||||
@@ -889,7 +889,7 @@ bool TXTR::CookPC(const hecl::ProjectPath& inPath, const hecl::ProjectPath& outP
|
||||
switch (colorType)
|
||||
{
|
||||
case PNG_COLOR_TYPE_GRAY:
|
||||
for (int i=0 ; i<width ; ++i)
|
||||
for (unsigned i=0 ; i<width ; ++i)
|
||||
{
|
||||
size_t outbase = (r*width+i)*4;
|
||||
bufOut[outbase] = rowBuf[i];
|
||||
|
||||
@@ -240,8 +240,8 @@ void SplashScreen::resized(const boo::SWindowRect& root, const boo::SWindowRect&
|
||||
boo::SWindowRect badgeRect = centerRect;
|
||||
badgeRect.location[0] += LINE_WIDTH * pf;
|
||||
badgeRect.location[1] += BADGE_MARGIN * pf;
|
||||
badgeRect.size[0] = BADGE_WIDTH;
|
||||
badgeRect.size[1] = BADGE_HEIGHT;
|
||||
badgeRect.size[0] = BADGE_WIDTH * pf;
|
||||
badgeRect.size[1] = BADGE_HEIGHT * pf;
|
||||
|
||||
boo::SWindowRect textRect = centerRect;
|
||||
textRect.location[0] += TEXT_MARGIN * pf;
|
||||
|
||||
@@ -15,10 +15,9 @@ else()
|
||||
set(CMAKE_FIND_APPBUNDLE FIRST)
|
||||
find_program(INKSCAPE_BIN inkscape)
|
||||
endif()
|
||||
if(INKSCAPE_BIN STREQUAL "INKSCAPE_BIN-NOTFOUND")
|
||||
message(STATUS "Inkscape not found; downloading icons")
|
||||
file(DOWNLOAD "https://www.dropbox.com/s/wnj17dwgcsky0o9/icons.bin"
|
||||
${CMAKE_CURRENT_BINARY_DIR}/icons.bin SHOW_PROGRESS)
|
||||
if(NOT INKSCAPE_BIN)
|
||||
add_custom_command(OUTPUT icons.bin COMMAND ${CMAKE_COMMAND} ARGS -P
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/IconDownload.cmake)
|
||||
else()
|
||||
message(STATUS "Inkscape found; will render icons locally")
|
||||
add_custom_command(OUTPUT icons.bin COMMAND $<TARGET_FILE:packicons>
|
||||
|
||||
3
Editor/icons/IconDownload.cmake
Normal file
3
Editor/icons/IconDownload.cmake
Normal file
@@ -0,0 +1,3 @@
|
||||
message(STATUS "Inkscape not found; downloading icons to '${CMAKE_CURRENT_BINARY_DIR}/icons.bin'")
|
||||
file(DOWNLOAD "https://www.dropbox.com/s/wnj17dwgcsky0o9/icons.bin"
|
||||
${CMAKE_CURRENT_BINARY_DIR}/icons.bin SHOW_PROGRESS)
|
||||
@@ -32,7 +32,7 @@ private:
|
||||
u32 x34_size;
|
||||
u8* x38_moStart;
|
||||
u8* x3c_vertexStart;
|
||||
u32 x40_surfaceStart;
|
||||
u8* x40_surfaceStart;
|
||||
std::unique_ptr<u8[]> x44_buf;
|
||||
public:
|
||||
CMapArea(CInputStream&, u32);
|
||||
|
||||
@@ -32,9 +32,9 @@ public:
|
||||
void SetLayerActive(int areaIdx, int layerIdx, bool active)
|
||||
{
|
||||
if (active)
|
||||
x0_areaLayers[areaIdx].m_layerBits |= 1 << layerIdx;
|
||||
x0_areaLayers[areaIdx].m_layerBits |= uint64_t(1) << layerIdx;
|
||||
else
|
||||
x0_areaLayers[areaIdx].m_layerBits &= ~(1 << layerIdx);
|
||||
x0_areaLayers[areaIdx].m_layerBits &= ~(uint64_t(1) << layerIdx);
|
||||
}
|
||||
|
||||
void InitializeWorldLayers(const std::vector<CWorldLayers::Area>& layers);
|
||||
|
||||
@@ -59,7 +59,7 @@ CCharLayoutInfo::CCharLayoutInfo(CInputStream& in)
|
||||
x8_segIdList(in)
|
||||
{
|
||||
atUint32 mapCount = in.readUint32Big();
|
||||
for (int i=0 ; i<mapCount ; ++i)
|
||||
for (atUint32 i=0 ; i<mapCount ; ++i)
|
||||
{
|
||||
std::string key = in.readString();
|
||||
x18_segIdMap.emplace(key, in);
|
||||
|
||||
@@ -29,7 +29,7 @@ void CFBStreamedAnimReaderTotals::Initialize(const CFBStreamedCompression& sourc
|
||||
|
||||
if (source.m_pc)
|
||||
{
|
||||
for (int b=0 ; b<boneChanCount ; ++b)
|
||||
for (unsigned b=0 ; b<boneChanCount ; ++b)
|
||||
{
|
||||
xc_segIds2[b] = *reinterpret_cast<const u32*>(chans);
|
||||
chans += 8;
|
||||
@@ -59,7 +59,7 @@ void CFBStreamedAnimReaderTotals::Initialize(const CFBStreamedCompression& sourc
|
||||
}
|
||||
else
|
||||
{
|
||||
for (int b=0 ; b<boneChanCount ; ++b)
|
||||
for (unsigned b=0 ; b<boneChanCount ; ++b)
|
||||
{
|
||||
xc_segIds2[b] = *reinterpret_cast<const u32*>(chans);
|
||||
chans += 6;
|
||||
@@ -111,7 +111,7 @@ void CFBStreamedAnimReaderTotals::IncrementInto(CBitLevelLoader& loader,
|
||||
|
||||
if (source.m_pc)
|
||||
{
|
||||
for (int b=0 ; b<boneChanCount ; ++b)
|
||||
for (unsigned b=0 ; b<boneChanCount ; ++b)
|
||||
{
|
||||
chans += 8;
|
||||
|
||||
@@ -138,7 +138,7 @@ void CFBStreamedAnimReaderTotals::IncrementInto(CBitLevelLoader& loader,
|
||||
}
|
||||
else
|
||||
{
|
||||
for (int b=0 ; b<boneChanCount ; ++b)
|
||||
for (unsigned b=0 ; b<boneChanCount ; ++b)
|
||||
{
|
||||
chans += 6;
|
||||
|
||||
@@ -167,7 +167,7 @@ void CFBStreamedAnimReaderTotals::IncrementInto(CBitLevelLoader& loader,
|
||||
|
||||
void CFBStreamedAnimReaderTotals::CalculateDown()
|
||||
{
|
||||
for (int b=0 ; b<x24_boneChanCount ; ++b)
|
||||
for (unsigned b=0 ; b<x24_boneChanCount ; ++b)
|
||||
{
|
||||
const s32* cumulativesIn = &x4_cumulativeInts32[8*b];
|
||||
float* compOut = &x10_computedFloats32[8*b];
|
||||
@@ -213,7 +213,7 @@ void CFBStreamedPairOfTotals::SetTime(CBitLevelLoader& loader, const CCharAnimTi
|
||||
int prior = -1;
|
||||
int next = -1;
|
||||
int cur = 0;
|
||||
for (int b=0 ; b<timeBitmap[0] ; ++b)
|
||||
for (unsigned b=0 ; b<timeBitmap[0] ; ++b)
|
||||
{
|
||||
int word = b / 32;
|
||||
int bit = b % 32;
|
||||
@@ -243,7 +243,7 @@ void CFBStreamedPairOfTotals::SetTime(CBitLevelLoader& loader, const CCharAnimTi
|
||||
curTime += interval;
|
||||
}
|
||||
|
||||
if (prior != -1 && prior < Prior().x1c_curKey)
|
||||
if (prior != -1 && u32(prior) < Prior().x1c_curKey)
|
||||
{
|
||||
Prior().Initialize(*x0_source);
|
||||
Next().Initialize(*x0_source);
|
||||
@@ -251,7 +251,7 @@ void CFBStreamedPairOfTotals::SetTime(CBitLevelLoader& loader, const CCharAnimTi
|
||||
}
|
||||
|
||||
if (next != -1)
|
||||
while (next > Next().x1c_curKey)
|
||||
while (u32(next) > Next().x1c_curKey)
|
||||
DoIncrement(loader);
|
||||
|
||||
if (!Prior().IsCalculated())
|
||||
|
||||
@@ -41,7 +41,7 @@ const u8* CFBStreamedCompression::GetBitstreamPointer() const
|
||||
|
||||
if (m_pc)
|
||||
{
|
||||
for (int b=0 ; b<boneChanCount ; ++b)
|
||||
for (unsigned b=0 ; b<boneChanCount ; ++b)
|
||||
{
|
||||
chans += 20;
|
||||
|
||||
@@ -53,7 +53,7 @@ const u8* CFBStreamedCompression::GetBitstreamPointer() const
|
||||
}
|
||||
else
|
||||
{
|
||||
for (int b=0 ; b<boneChanCount ; ++b)
|
||||
for (unsigned b=0 ; b<boneChanCount ; ++b)
|
||||
{
|
||||
chans += 15;
|
||||
|
||||
@@ -102,7 +102,7 @@ u8* CFBStreamedCompression::ReadBoneChannelDescriptors(u8* out, CInputStream& in
|
||||
|
||||
if (m_pc)
|
||||
{
|
||||
for (int b=0 ; b<boneChanCount ; ++b)
|
||||
for (unsigned b=0 ; b<boneChanCount ; ++b)
|
||||
{
|
||||
*reinterpret_cast<u32*>(out) = in.readUint32Big();
|
||||
out += 4;
|
||||
@@ -132,7 +132,7 @@ u8* CFBStreamedCompression::ReadBoneChannelDescriptors(u8* out, CInputStream& in
|
||||
}
|
||||
else
|
||||
{
|
||||
for (int b=0 ; b<boneChanCount ; ++b)
|
||||
for (unsigned b=0 ; b<boneChanCount ; ++b)
|
||||
{
|
||||
*reinterpret_cast<u32*>(out) = in.readUint32Big();
|
||||
out += 4;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#include "CGunWeapon.hpp"
|
||||
#include "GameGlobalObjects.hpp"
|
||||
#include "CSimplePool.hpp"
|
||||
#include "Particle/CGenDescription.hpp"
|
||||
|
||||
namespace urde
|
||||
{
|
||||
@@ -42,7 +43,7 @@ s32 GetWeaponIndex(EWeaponType type)
|
||||
|
||||
CGunWeapon::CGunWeapon(ResId ancsId, EWeaponType type, TUniqueId uid, EMaterialTypes mType, const zeus::CVector3f& vec)
|
||||
: x4_(vec),
|
||||
x104_gunCharacter(g_SimplePool->GetObj({ancsId, FOURCC('ANCS')})),
|
||||
x104_gunCharacter(g_SimplePool->GetObj(SObjectTag{FOURCC('ANCS'), ancsId})),
|
||||
x13c_armCharacter(g_SimplePool->GetObj(skSuitArmNames[0])),
|
||||
x1c0_weaponType(type),
|
||||
x1c4_uid(uid),
|
||||
|
||||
@@ -21,7 +21,7 @@ enum class EGunAnimType
|
||||
|
||||
class CActorLights;
|
||||
class CGunController;
|
||||
class CModelFlags;
|
||||
struct CModelFlags;
|
||||
class CStateManager;
|
||||
class CGunWeapon
|
||||
{
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#include "CPowerBeam.hpp"
|
||||
#include "Particle/CGenDescription.hpp"
|
||||
|
||||
namespace urde
|
||||
{
|
||||
|
||||
2
amuse
2
amuse
Submodule amuse updated: eb948dfd63...9cf96ad6f9
2
hecl
2
hecl
Submodule hecl updated: 389c6a2e3d...f610566b0b
2
nod
2
nod
Submodule nod updated: bcfe1a5d33...512a8a122d
2
specter
2
specter
Submodule specter updated: ac2ebd5499...78471d73fe
Reference in New Issue
Block a user