From 7ad630da2688ff429019257300df22e332957610 Mon Sep 17 00:00:00 2001 From: Timur Gagiev Date: Thu, 29 Oct 2020 06:28:06 +0300 Subject: [PATCH 001/190] GBA optimizations --- src/platform/gba/common.h | 20 ++++++++++ src/platform/gba/render.iwram.cpp | 61 ++++++++++++++++--------------- 2 files changed, 52 insertions(+), 29 deletions(-) diff --git a/src/platform/gba/common.h b/src/platform/gba/common.h index 48213311..1632596c 100644 --- a/src/platform/gba/common.h +++ b/src/platform/gba/common.h @@ -71,6 +71,26 @@ typedef int16 Index; #define ALIGN4 #else #define ALIGN4 __attribute__ ((aligned (4))) + + // TODO profiling + #define REG_TM2D *(vu16*)(REG_BASE+0x0108) + #define REG_TM3D *(vu16*)(REG_BASE+0x010C) + #define TM_ENABLE 0x800000 + #define TM_CASCADE 0x0004 + + INLINE void profile_start() + { + REG_TM2D= 0; REG_TM3D= 0; + REG_TM2CNT= 0; REG_TM3CNT= 0; + REG_TM3CNT= TM_ENABLE | TM_CASCADE; + REG_TM2CNT= TM_ENABLE; + } + + INLINE uint32 profile_stop() + { + REG_TM2CNT= 0; + return (REG_TM3D<<16)|REG_TM2D; + } #endif enum InputKey { diff --git a/src/platform/gba/render.iwram.cpp b/src/platform/gba/render.iwram.cpp index b470b94d..03152bad 100644 --- a/src/platform/gba/render.iwram.cpp +++ b/src/platform/gba/render.iwram.cpp @@ -30,7 +30,6 @@ int32 gFacesCount = 0; Face* gFacesSorted[MAX_FACES]; EWRAM_DATA Face gFaces[MAX_FACES]; -const uint8* curTile; uint16 mipMask; Rect clip; @@ -302,7 +301,7 @@ void transform(const vec3s &v, int32 vg) { const Matrix &m = matrixStack[matrixStackIndex]; Vertex &res = gVertices[gVerticesCount++]; - + // TODO https://mikro.naprvyraz.sk/docs/Coding/1/3D-ROTAT.TXT int32 z = DP43(m[2], v); if (z < VIEW_MIN_F || z >= VIEW_MAX_F) { // TODO znear clip @@ -328,9 +327,9 @@ void transform(const vec3s &v, int32 vg) { z >>= FOV_SHIFT; #if 1 - x >>= 11; - y >>= 11; - z >>= 11; + x >>= (10 + SCALE); + y >>= (10 + SCALE); + z >>= (10 + SCALE); #ifdef WIN32 if (abs(z) >= DIV_TABLE_SIZE) { @@ -488,14 +487,16 @@ VertexUV* clipPoly(VertexUV* poly, VertexUV* tmp, int32 &pCount) { #ifdef DEBUG_OVERDRAW #define FETCH_GT() 32 #define FETCH_G(palIndex) 32 +#define FETCH_GT_PAL() 32 +#define FETCH_G_PAL(palIndex) 32 #else -#define FETCH_T() curTile[(t & 0xFF00) | (t >> 24)] -#define FETCH_T_MIP() curTile[(t & 0xFF00) | (t >> 24) & mipMask] +#define FETCH_T() tile[(t & 0xFF00) | (t >> 24)] +#define FETCH_T_MIP() tile[(t & 0xFF00) | (t >> 24) & mipMask] #define FETCH_GT() lightmap[(g & 0x1F00) | FETCH_T()] #define FETCH_G(palIndex) lightmap[(g & 0x1F00) | palIndex] -#endif #define FETCH_GT_PAL() palette[FETCH_GT()] #define FETCH_G_PAL(palIndex) palette[FETCH_G(palIndex)] +#endif struct Edge { int32 h; @@ -591,7 +592,7 @@ struct Edge { } }; -INLINE void scanlineG(uint16* buffer, int32 x1, int32 x2, uint8 palIndex, uint32 g, uint32 dgdx) { +INLINE void scanlineG(const uint8 *tile, uint16* buffer, int32 x1, int32 x2, uint8 palIndex, uint32 g, uint32 dgdx) { #ifdef USE_MODE_5 uint16* pixel = buffer + x1; @@ -673,7 +674,7 @@ INLINE void scanlineG(uint16* buffer, int32 x1, int32 x2, uint8 palIndex, uint32 #endif } -INLINE void scanlineGT(uint16* buffer, int32 x1, int32 x2, uint32 g, uint32 t, uint32 dgdx, uint32 dtdx) { +INLINE void scanlineGT(const uint8 *tile, uint16* buffer, int32 x1, int32 x2, uint32 g, uint32 t, uint32 dgdx, uint32 dtdx) { #ifdef USE_MODE_5 uint16* pixel = buffer + x1; @@ -768,7 +769,7 @@ INLINE void scanlineGT(uint16* buffer, int32 x1, int32 x2, uint32 g, uint32 t, u #endif } -void rasterizeG(int16 y, int32 palIndex, Edge &L, Edge &R) { +void rasterizeG(const uint8 *tile, int16 y, int32 palIndex, Edge &L, Edge &R) { uint16 *buffer = (uint16*)fb + y * (WIDTH / PIXEL_SIZE); while (1) @@ -804,7 +805,7 @@ void rasterizeG(int16 y, int32 palIndex, Edge &L, Edge &R) { uint32 dgdx = d * ((R.g - L.g) >> 8) >> 16; - scanlineG(buffer, x1, x2, palIndex, L.g >> 8, dgdx); + scanlineG(tile, buffer, x1, x2, palIndex, L.g >> 8, dgdx); } buffer += WIDTH / PIXEL_SIZE; @@ -815,7 +816,7 @@ void rasterizeG(int16 y, int32 palIndex, Edge &L, Edge &R) { } } -void rasterizeGT(int16 y, Edge &L, Edge &R) { +void rasterizeGT(const uint8 *tile, int16 y, Edge &L, Edge &R) { uint16 *buffer = (uint16*)fb + y * (WIDTH / PIXEL_SIZE); while (1) @@ -855,7 +856,7 @@ void rasterizeGT(int16 y, Edge &L, Edge &R) { uint32 v = d * ((R.t & 0xFFFF) - (L.t & 0xFFFF)); uint32 dtdx = (u & 0xFFFF0000) | (v >> 16); - scanlineGT(buffer, x1, x2, L.g >> 8, L.t, dgdx, dtdx); + scanlineGT(tile, buffer, x1, x2, L.g >> 8, L.t, dgdx, dtdx); }; buffer += WIDTH / PIXEL_SIZE; @@ -866,7 +867,7 @@ void rasterizeGT(int16 y, Edge &L, Edge &R) { } } -void drawTriangle(const Face* face, VertexUV *v) { +void drawTriangle(const uint8* tile, const Face* face, VertexUV *v) { VertexUV *v1 = v + 0, *v2 = v + 1, *v3 = v + 2; @@ -905,13 +906,13 @@ void drawTriangle(const Face* face, VertexUV *v) { } if (face->flags & FACE_COLORED) { - rasterizeG(v1->v.y, face->flags & FACE_TEXTURE, L, R); + rasterizeG(tile, v1->v.y, face->flags & FACE_TEXTURE, L, R); } else { - rasterizeGT(v1->v.y, L, R); + rasterizeGT(tile, v1->v.y, L, R); } } -void drawQuad(const Face* face, VertexUV *v) { +void drawQuad(const uint8* tile, const Face* face, VertexUV *v) { VertexUV *v1 = v + 0, *v2 = v + 1, *v3 = v + 2, @@ -955,13 +956,13 @@ void drawQuad(const Face* face, VertexUV *v) { } while (poly[b] != v1); if (face->flags & FACE_COLORED) { - rasterizeG(v1->v.y, face->flags & FACE_TEXTURE, L, R); + rasterizeG(tile, v1->v.y, face->flags & FACE_TEXTURE, L, R); } else { - rasterizeGT(v1->v.y, L, R); + rasterizeGT(tile, v1->v.y, L, R); } } -void drawPoly(Face* face, VertexUV *v) { +void drawPoly(const uint8* tile, Face* face, VertexUV* v) { VertexUV tmp[16]; int32 count = (face->flags & FACE_TRIANGLE) ? 3 : 4; @@ -977,9 +978,9 @@ void drawPoly(Face* face, VertexUV *v) { face->indices[3] = 3; if (count == 3) { - drawTriangle(face, v); + drawTriangle(tile, face, v); } else { - drawQuad(face, v); + drawQuad(tile, face, v); } return; } @@ -1008,9 +1009,9 @@ void drawPoly(Face* face, VertexUV *v) { R.build(v, count, t, b, count - 1); if (face->flags & FACE_COLORED) { - rasterizeG(v[t].v.y, face->flags & FACE_TEXTURE, L, R); + rasterizeG(tile, v[t].v.y, face->flags & FACE_TEXTURE, L, R); } else { - rasterizeGT(v[t].v.y, L, R); + rasterizeGT(tile, v[t].v.y, L, R); } } @@ -1166,6 +1167,8 @@ void flush() { //const uint16 mips[] = { 0xFFFF, 0xFEFE, 0xFCFC, 0xF8F8 }; + const uint8* gTile = NULL; + for (int32 i = 0; i < gFacesCount; i++) { Face *face = gFacesSorted[i]; @@ -1178,7 +1181,7 @@ void flush() { if (!(flags & FACE_COLORED)) { const Texture &tex = textures[face->flags & FACE_TEXTURE]; - curTile = tiles[tex.tile]; + gTile = tiles[tex.tile]; v[0].uv = tex.uv0; v[1].uv = tex.uv1; v[2].uv = tex.uv2; @@ -1194,12 +1197,12 @@ void flush() { } if (flags & FACE_CLIPPED) { - drawPoly(face, v); + drawPoly(gTile, face, v); } else { if (flags & FACE_TRIANGLE) { - drawTriangle(face, v); + drawTriangle(gTile, face, v); } else { - drawQuad(face, v); + drawQuad(gTile, face, v); } }; } From 8cc844e9ea2c587e5cf88cfe30865da23b6b379d Mon Sep 17 00:00:00 2001 From: Timur Gagiev Date: Sun, 1 Nov 2020 10:56:17 +0300 Subject: [PATCH 002/190] Xbox One port (UWP) --- src/cache.h | 8 +- src/core.h | 18 +- src/gapi/d3d11.h | 17 +- src/inventory.h | 74 +-- src/level.h | 28 +- src/libs/tinf/tinflate.c | 2 +- .../xb1/Assets/LargeTile.scale-200.png | Bin 0 -> 11210 bytes .../xb1/Assets/SmallTile.scale-200.png | Bin 0 -> 2296 bytes .../xb1/Assets/SplashScreen.scale-200.png | Bin 0 -> 11991 bytes .../Assets/Square150x150Logo.scale-200.png | Bin 0 -> 5198 bytes ...x44Logo.altform-unplated_targetsize-48.png | Bin 0 -> 706 bytes .../xb1/Assets/Square44x44Logo.scale-200.png | Bin 0 -> 1519 bytes .../Assets/Square44x44Logo.targetsize-48.png | Bin 0 -> 706 bytes .../xb1/Assets/StoreLogo.scale-200.png | Bin 0 -> 1589 bytes .../xb1/Assets/Wide310x150Logo.scale-200.png | Bin 0 -> 5645 bytes src/platform/xb1/OpenLara.sln | 51 ++ src/platform/xb1/OpenLara.vcxproj | 332 ++++++++++++ src/platform/xb1/OpenLara.vcxproj.filters | 103 ++++ src/platform/xb1/OpenLara.vcxproj.user | 23 + src/platform/xb1/OpenLara_TemporaryKey.pfx | Bin 0 -> 2512 bytes src/platform/xb1/Package.StoreAssociation.xml | 371 +++++++++++++ src/platform/xb1/Package.appxmanifest | 33 ++ src/platform/xb1/main.cpp | 503 ++++++++++++++++++ src/shader.h | 2 +- src/shaders/common.hlsl | 13 +- src/shaders/compile_d3d11.bat | 4 + src/shaders/sky.hlsl | 116 ++++ src/shaders/water_compose.hlsl | 4 +- src/shaders/water_rays.hlsl | 6 +- src/sound.h | 2 +- src/utils.h | 239 ++++++++- 31 files changed, 1867 insertions(+), 82 deletions(-) create mode 100644 src/platform/xb1/Assets/LargeTile.scale-200.png create mode 100644 src/platform/xb1/Assets/SmallTile.scale-200.png create mode 100644 src/platform/xb1/Assets/SplashScreen.scale-200.png create mode 100644 src/platform/xb1/Assets/Square150x150Logo.scale-200.png create mode 100644 src/platform/xb1/Assets/Square44x44Logo.altform-unplated_targetsize-48.png create mode 100644 src/platform/xb1/Assets/Square44x44Logo.scale-200.png create mode 100644 src/platform/xb1/Assets/Square44x44Logo.targetsize-48.png create mode 100644 src/platform/xb1/Assets/StoreLogo.scale-200.png create mode 100644 src/platform/xb1/Assets/Wide310x150Logo.scale-200.png create mode 100644 src/platform/xb1/OpenLara.sln create mode 100644 src/platform/xb1/OpenLara.vcxproj create mode 100644 src/platform/xb1/OpenLara.vcxproj.filters create mode 100644 src/platform/xb1/OpenLara.vcxproj.user create mode 100644 src/platform/xb1/OpenLara_TemporaryKey.pfx create mode 100644 src/platform/xb1/Package.StoreAssociation.xml create mode 100644 src/platform/xb1/Package.appxmanifest create mode 100644 src/platform/xb1/main.cpp create mode 100644 src/shaders/sky.hlsl diff --git a/src/cache.h b/src/cache.h index 6605252d..5a6721ff 100644 --- a/src/cache.h +++ b/src/cache.h @@ -12,6 +12,10 @@ #define USE_SCREEN_TEX #endif +#if defined(_GAPI_D3D8) || defined(_GAPI_D3D9) || defined(_GAPI_D3D11) + #define EARLY_CLEAR +#endif + struct ShaderCache { enum Effect { FX_NONE = 0, FX_UNDERWATER = 1, FX_ALPHA_TEST = 2 }; @@ -86,8 +90,8 @@ struct ShaderCache { void prepareSky(int fx) { compile(Core::passSky, Shader::DEFAULT, fx, rsBase); if (Core::support.tex3D) { - compile(Core::passSky, Shader::SKY_CLOUDS, fx, rsBase); - compile(Core::passSky, Shader::SKY_CLOUDS_AZURE, fx, rsBase); + compile(Core::passSky, Shader::SKY_CLOUDS, fx, rsBase); + compile(Core::passSky, Shader::SKY_AZURE, fx, rsBase); } } diff --git a/src/core.h b/src/core.h index 621e639e..adba0a4b 100644 --- a/src/core.h +++ b/src/core.h @@ -13,7 +13,16 @@ #define USE_CUBEMAP_MIPS -#ifdef WIN32 +#ifdef __UWP__ + #define _OS_UWP 1 + #define _GAPI_D3D11 1 + + #ifdef __XB1__ + #define _OS_XB1 + #endif + + #undef OS_PTHREAD_MT +#elif WIN32 #define _OS_WIN 1 #define _GAPI_GL 1 //#define _GAPI_D3D9 1 @@ -137,6 +146,12 @@ #define NOMINMAX #include #include +#elif _X360 + #define _OS_X360 1 + // TODO +#elif _XB1 + #define _OS_XB1 1 + #define _GAPI_D3D11 1 #endif #ifndef _OS_PSP @@ -1014,6 +1029,7 @@ namespace Core { GAPI::deinit(); NAPI::deinit(); Sound::deinit(); + Stream::deinit(); } void setVSync(bool enable) { diff --git a/src/gapi/d3d11.h b/src/gapi/d3d11.h index 801a7e16..bb2426ea 100644 --- a/src/gapi/d3d11.h +++ b/src/gapi/d3d11.h @@ -37,7 +37,11 @@ extern ID3D11Device *device; extern ID3D11DeviceContext *deviceContext; +#ifdef _OS_XB1 +extern IDXGISwapChain1 *swapChain; +#else extern IDXGISwapChain *swapChain; +#endif namespace GAPI { using namespace Core; @@ -134,7 +138,7 @@ namespace GAPI { #define SHADER_U(S,P) (underwater ? SHADER(S##_u,P) : SHADER(S,P)) #define SHADER_AU(S,P) ((underwater && alphatest) ? SHADER(S##_au,P) : (alphatest ? SHADER(S##_a,P) : SHADER_U(S,P))) - const uint8 *vSrc, *fSrc; + const uint8 *vSrc = NULL, *fSrc = NULL; switch (pass) { case passCompose : switch (type) { @@ -161,7 +165,14 @@ namespace GAPI { default : ASSERT(false); } break; - case passSky : SHADER ( gui, v ); SHADER ( gui, f ); break; // TODO + case passSky : + switch (type) { + case 0 : SHADER ( sky, v ); SHADER ( sky, f ); break; + case 1 : SHADER ( sky_clouds, v ); SHADER ( sky_clouds, f ); break; + case 2 : SHADER ( sky_azure, v ); SHADER ( sky_azure, f ); break; + default : ASSERT(false); + } + break; case passWater : switch (type) { case 0 : SHADER ( water_drop, v ); SHADER ( water_drop, f ); break; @@ -179,7 +190,7 @@ namespace GAPI { case 1 : SHADER ( filter_downsample, v ); SHADER ( filter_downsample, f ); break; case 3 : SHADER ( filter_grayscale, v ); SHADER ( filter_grayscale, f ); break; case 4 : SHADER ( filter_blur, v ); SHADER ( filter_blur, f ); break; - case 5 : SHADER ( filter_anaglyph, v ); SHADER ( filter_anaglyph, f ); break; // TODO anaglyph + case 5 : SHADER ( filter_anaglyph, v ); SHADER ( filter_anaglyph, f ); break; default : ASSERT(false); } break; diff --git a/src/inventory.h b/src/inventory.h index 7debb50e..c9a12f90 100644 --- a/src/inventory.h +++ b/src/inventory.h @@ -82,8 +82,10 @@ struct OptionItem { int maxWidth = UI::getTextSize(STR[color + value]).x; maxWidth = maxWidth / 2 + 8; x += w * 0.5f; - if (checkValue(value - 1)) UI::specOut(vec2(x - maxWidth - 16.0f, y), 108); - if (checkValue(value + 1)) UI::specOut(vec2(x + maxWidth, y), 109); + if (maxValue != 0xFF) { + if (checkValue(value - 1)) UI::specOut(vec2(x - maxWidth - 16.0f, y), 108); + if (checkValue(value + 1)) UI::specOut(vec2(x + maxWidth, y), 109); + } } return y + LINE_HEIGHT; } @@ -123,23 +125,51 @@ struct OptionItem { } }; -#define SETTINGS(x) OFFSETOF(Core::Settings, x) +#define SETTINGS(x) int32(OFFSETOF(Core::Settings, x)) + +#if defined(_OS_PSP) || defined(_OS_PSV) || defined(_OS_3DS) || defined(_OS_GCW0) || defined(_OS_CLOVER) || defined(_OS_PSC) || defined(_OS_XBOX) || defined(_OS_XB1) + #define INV_GAMEPAD_ONLY +#else + #define INV_QUALITY +#endif + +#if !(defined(_OS_PSP) || defined(_OS_PSV) || defined(_OS_3DS) || defined(_OS_GCW0) || defined(_OS_XBOX) || defined(_OS_XB1)) + #define INV_STEREO +#endif + +#if defined(_OS_PSP) || defined(_OS_PSV) || defined(_OS_3DS) || defined(_OS_GCW0) + #define INV_SINGLE_PLAYER +#endif + +#if defined(_OS_PSP) || defined(_OS_PSV) || defined(_OS_3DS) || defined(_OS_CLOVER) || defined(_OS_XBOX) + #define INV_GAMEPAD_NO_TRIGGER +#endif + +#ifdef INV_SINGLE_PLAYER + #define INV_CTRL_START_OPTION 1 +#else + #define INV_CTRL_START_OPTION 2 +#endif + +#if defined(_OS_WIN) || defined(_OS_LINUX) || defined(_OS_RPI) || defined(_OS_GCW0) || defined(_OS_XBOX) || defined(_OS_XB1) + #define INV_VIBRATION +#endif static const OptionItem optDetail[] = { OptionItem( OptionItem::TYPE_TITLE, STR_SELECT_DETAIL ), OptionItem( ), +#ifdef INV_QUALITY OptionItem( OptionItem::TYPE_PARAM, STR_OPT_DETAIL_FILTER, SETTINGS( detail.filter ), STR_QUALITY_LOW, 0, 2 ), OptionItem( OptionItem::TYPE_PARAM, STR_OPT_DETAIL_LIGHTING, SETTINGS( detail.lighting ), STR_QUALITY_LOW, 0, 2 ), OptionItem( OptionItem::TYPE_PARAM, STR_OPT_DETAIL_SHADOWS, SETTINGS( detail.shadows ), STR_QUALITY_LOW, 0, 2 ), OptionItem( OptionItem::TYPE_PARAM, STR_OPT_DETAIL_WATER, SETTINGS( detail.water ), STR_QUALITY_LOW, 0, 2 ), +#endif OptionItem( OptionItem::TYPE_PARAM, STR_OPT_SIMPLE_ITEMS, SETTINGS( detail.simple ), STR_OFF, 0, 1 ), -#if !defined(_OS_3DS) && !defined(_OS_GCW0) +#ifdef INV_QUALITY OptionItem( OptionItem::TYPE_PARAM, STR_OPT_RESOLUTION, SETTINGS( detail.scale ), STR_SCALE_100, 0, 3 ), -#endif -#if defined(_OS_WIN) || defined(_OS_LINUX) || defined(_OS_PSP) || defined(_OS_RPI) || defined(_OS_PSV) OptionItem( OptionItem::TYPE_PARAM, STR_OPT_DETAIL_VSYNC, SETTINGS( detail.vsync ), STR_OFF, 0, 1 ), #endif -#if !defined(_OS_PSP) && !defined(_OS_PSV) && !defined(_OS_3DS) && !defined(_OS_GCW0) +#ifdef INV_STEREO OptionItem( OptionItem::TYPE_PARAM, STR_OPT_DETAIL_STEREO, SETTINGS( detail.stereo ), STR_NO_STEREO, 0, #if defined(_OS_WIN) || defined(_OS_ANDROID) 4 /* with VR option */ @@ -164,28 +194,6 @@ static const OptionItem optSound[] = { #endif }; -#if defined(_OS_PSP) || defined(_OS_PSV) || defined(_OS_3DS) || defined(_OS_GCW0) || defined(_OS_CLOVER) || defined(_OS_PSC) || defined(_OS_XBOX) - #define INV_GAMEPAD_ONLY -#endif - -#if defined(_OS_PSP) || defined(_OS_PSV) || defined(_OS_3DS) || defined(_OS_GCW0) - #define INV_SINGLE_PLAYER -#endif - -#if defined(_OS_PSP) || defined(_OS_PSV) || defined(_OS_3DS) || defined(_OS_CLOVER) - #define INV_GAMEPAD_NO_TRIGGER -#endif - -#ifdef INV_SINGLE_PLAYER - #define INV_CTRL_START_OPTION 1 -#else - #define INV_CTRL_START_OPTION 2 -#endif - -#if defined(_OS_WIN) || defined(_OS_LINUX) || defined(_OS_RPI) || defined(_OS_GCW0) || defined(_OS_XBOX) - #define INV_VIBRATION -#endif - static const OptionItem optControls[] = { OptionItem( OptionItem::TYPE_TITLE, STR_SET_CONTROLS ), OptionItem( ), @@ -199,7 +207,7 @@ static const OptionItem optControls[] = { OptionItem( OptionItem::TYPE_PARAM, STR_OPT_CONTROLS_RETARGET , SETTINGS( controls[0].retarget ), STR_OFF, 0, 1 ), OptionItem( OptionItem::TYPE_PARAM, STR_OPT_CONTROLS_MULTIAIM , SETTINGS( controls[0].multiaim ), STR_OFF, 0, 1 ), #ifdef INV_GAMEPAD_ONLY - OptionItem( OptionItem::TYPE_PARAM, STR_EMPTY , SETTINGS( playerIndex ), STR_OPT_CONTROLS_GAMEPAD, 0, 0 ), + OptionItem( OptionItem::TYPE_PARAM, STR_EMPTY , SETTINGS( ctrlIndex ), STR_OPT_CONTROLS_KEYBOARD, 0, 0xFF ), #else OptionItem( OptionItem::TYPE_PARAM, STR_EMPTY , SETTINGS( ctrlIndex ), STR_OPT_CONTROLS_KEYBOARD, 0, 1 ), #endif @@ -499,14 +507,14 @@ struct Inventory { case cUp : nextSlot(slot, -1); break; case cDown : nextSlot(slot, +1); break; case cLeft : - if (opt->type == OptionItem::TYPE_PARAM && opt->checkValue(value - 1)) { + if (opt->type == OptionItem::TYPE_PARAM && (opt->maxValue != 0xFF) && opt->checkValue(value - 1)) { value--; timer = 0.2f; return opt; } break; case cRight : - if (opt->type == OptionItem::TYPE_PARAM && opt->checkValue(value + 1)) { + if (opt->type == OptionItem::TYPE_PARAM && (opt->maxValue != 0xFF) && opt->checkValue(value + 1)) { value++; timer = 0.2f; return opt; @@ -2090,7 +2098,7 @@ struct Inventory { const char *bSelect = STR[STR_KEY_FIRST + ikEnter]; const char *bBack = STR[STR_KEY_FIRST + Core::settings.controls[playerIndex].keys[cInventory].key]; - #if defined(_OS_SWITCH) || defined(_OS_3DS) || defined(_OS_GCW0) || defined(_OS_XBOX) + #if defined(_OS_SWITCH) || defined(_OS_3DS) || defined(_OS_GCW0) || defined(_OS_XBOX) || defined(_OS_XB1) bSelect = "A"; bBack = "B"; #endif diff --git a/src/level.h b/src/level.h index 64c5ba48..a7c02b4e 100644 --- a/src/level.h +++ b/src/level.h @@ -1808,7 +1808,7 @@ struct Level : IGame { } void renderSky() { - #ifndef _GAPI_GL + #if !defined(_GAPI_GL) && !defined(_GAPI_D3D11) return; #endif ASSERT(mesh->transparent == 0); @@ -1819,7 +1819,7 @@ struct Level : IGame { if (level.version & TR::VER_TR1) { if (Core::settings.detail.lighting < Core::Settings::HIGH || !Core::support.tex3D || !TR::getSkyParams(level.id, skyParams)) return; - type = Shader::SKY_CLOUDS_AZURE; + type = Shader::SKY_AZURE; } else { // TR2, TR3 if (level.extra.sky == -1) return; @@ -1857,7 +1857,7 @@ struct Level : IGame { time = (time - int(time)) * SKY_TIME_PERIOD; } - Core::active.shader->setParam(uParam, vec4(skyParams.wind * time, 1.0)); + Core::active.shader->setParam(uParam, vec4(skyParams.wind * time * 2.0f, 1.0)); Core::active.shader->setParam(uLightProj, *(mat4*)&skyParams); Core::active.shader->setParam(uPosScale, skyParams.cloudDownColor, 2); @@ -2608,7 +2608,18 @@ struct Level : IGame { Texture *screen = NULL; if (water) { screen = (waterCache && waterCache->visible) ? waterCache->getScreenTex() : NULL; - Core::setTarget(screen, NULL, RT_CLEAR_COLOR | RT_CLEAR_DEPTH | RT_STORE_COLOR | (screen ? RT_STORE_DEPTH : 0)); // render to screen texture (FUCK YOU iOS!) or back buffer + + int clearFlags = RT_STORE_COLOR; + + if (screen) { + clearFlags |= RT_CLEAR_COLOR | RT_CLEAR_DEPTH | RT_STORE_DEPTH; + } + + #ifndef EARLY_CLEAR + clearFlags |= RT_CLEAR_COLOR | RT_CLEAR_DEPTH; + #endif + + Core::setTarget(screen, NULL, clearFlags); // render to screen texture or back buffer Core::validateRenderState(); setupBinding(); } @@ -2649,7 +2660,7 @@ struct Level : IGame { Core::Pass pass = Core::pass; if (water && waterCache && waterCache->visible && screen) { - Core::setTarget(NULL, NULL, RT_STORE_COLOR); + Core::setTarget(NULL, NULL, RT_CLEAR_DEPTH | RT_STORE_COLOR); Core::validateRenderState(); waterCache->blitTexture(screen); } @@ -3201,6 +3212,13 @@ struct Level : IGame { #endif } } + + #ifdef EARLY_CLEAR + if (view == 0 && eye <= 0) { + Core::setTarget(NULL, NULL, RT_CLEAR_COLOR | RT_CLEAR_DEPTH | RT_STORE_COLOR | RT_STORE_DEPTH); + Core::validateRenderState(); + } + #endif } void renderEye(int eye, bool showUI, bool invBG) { diff --git a/src/libs/tinf/tinflate.c b/src/libs/tinf/tinflate.c index b2bec565..8de5f73c 100644 --- a/src/libs/tinf/tinflate.c +++ b/src/libs/tinf/tinflate.c @@ -303,7 +303,7 @@ static int tinf_inflate_block_data(TINF_DATA *d, TINF_TREE *lt, TINF_TREE *dt) /* check for end of block */ if (sym == 256) { - *d->destLen += d->dest - start; + *d->destLen += (unsigned int)(d->dest - start); return TINF_OK; } diff --git a/src/platform/xb1/Assets/LargeTile.scale-200.png b/src/platform/xb1/Assets/LargeTile.scale-200.png new file mode 100644 index 0000000000000000000000000000000000000000..6b8e2cb58d81da4ec9fffa88541443765dd3d7f8 GIT binary patch literal 11210 zcma)iWl$VW?=W&`aXlz{xVt;tA;pWk929qo75Q;E96g|g;uMDh=acH?xkRPb@BaZylE@YPhoZ&6UtT>rPR(O)S3>V%Xppi4(X zAMyfGQBl#+(E$Je4h{|;9v%S!0WmQ#85tQ62&AE*VPIfj0)bdqSlHOuI5|0acz6T_ z1;xa~WMpI%6cm(|mDSbNwY9bN^z@94jm^!?ZEbCxot-^BJ$-$BKYaKAgTdnB;t&W# zT3T9OUS45gVQFb;MMVV?iL9@$Z*6Vu?(XjE>-+WV*XZczyyC14T{z5C8vLUuitAjw>q?X%l~*JTa3p#PDO1L<5Ax@uK;othx6WpP#MX z=lRvN*kbQb^LjPpwQ_sket+96+-~ARfe-pawX=f0$1X-(XC0v1wX}a@R}nK$?*XD< zC8x3^s`2epT)8qrjkHcrWUv3xc$y!>@s4q0Q|8mI;>U6S-OGUc&RCP|NTJTt?X4M= zB_;W+ZoJlv3}$t|yT{4s{nIPLxIPq=tI&$DP%Blz^Cy|gM>(X3`9U3-R=`+M*z+AC zlqWVF)hqCR&s+ExJGsM#04&P!nZj21kcIxs#zS=qu7u?L-|iDRVu7~B*XC@JCU5<; z$lMt<6eAgF0>>=HSsWxi2%li<<6yjYAqqjUd=cF04_+b9-{d+Qo6onGK26_dm%a_g z?xBxM@6#*M&(_QCaY+gMU4L!H;zf!I3bUrrO1~lT4;qTP$QHCp4#bTZJQ#89>ix1k zC47xF)!3b9taK{MkC0W3-46|#I{W>ppv$(9pS_{ zfhZ=gw+_KO9T>4~+}3$QjWd~?+lW9Q*wXf9=rB9((^%Yy3^=x}3pucno%qj6`j272 zRgG?d4N>6ttZKRpCA{=SmlSYrtKE8K zc41U8aXZI9yl4(kG$B;dA+32i2z=K<1r8;z86KIpr<>oPRX;~~@W(!IT2H9CM$O6` z3drGqoAxmTMK?=P_}SvO?_7>&q>WCnk|4DlCwC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f{UI(kJM0B zzGNo%>B=k}!$p;su1o5@`DL7LQn`^u=@8Z)JMFQ=DD~iP%-v7RN#*Jr=sH)_|Ig>t Z2NZA_YlCIEF6@6~HHa4YyP`Gh{{YN1Hyr=~ literal 0 HcmV?d00001 diff --git a/src/platform/xb1/Assets/SmallTile.scale-200.png b/src/platform/xb1/Assets/SmallTile.scale-200.png new file mode 100644 index 0000000000000000000000000000000000000000..d5e72e284f9b058543bd0c82dc903b18a5dafa84 GIT binary patch literal 2296 zcmVD{FBzBnS+)5{DtUx&~iYQwg?76$uEECa6jXs)CDX zxJffJd%gG4Lt8jK<#7K~&Yu^SB$wVVYwy{!XU`P;=tn>L(T{%gqaUr22#~+TSOY)| zV9me75@W5Px|6#@A}G~cXAtb3hVexWx#Ad9u3yQ}K5vZ~NbPUs2qgG5VhGNYRIlnB z4`K47Dc#d4N#~rB^e?`tif&0+awB$89Cj_LVMo=2AtklbT6$GPg|I|g+I#&Ej#`QTVNr;Fj-c5abVu&&kfy_8RPmoT}|lwYYaoZ)2`HkW07 zNY7ZXt}oj;;hd^lfzxkFJ~(Gwfpc@aFD4h9)+%>yZ}uSh;Kbc=JU`ye38x*yQM$dH znlFn^aExtPVvrY(#&Hf{^TO$V#0ebP{5sRvmgU*Z#~cw6NdLV(%Ew|J=7<4c4R%I! zx}cfzG!Jt`u)9|TEUFWRC3BujIhbR_o;!}uOE9QkzcBL0y*@T22O5-a7^s}I4^Dg4 z<5~VVb_!d$&{Rfr%HU>Y@0?+Va{()PoP)>F`d0T}1?#D-+~(237v1;v*J^PBn^6T)}zoryN?y_t2a$C`qbk zq8tYmk?+_U+Uk@fJ>8gz3iNd`n_pAiInB$_4Fi)jWfvR95fu7#Z_z03DU+pqDnd5w z&0s-OK!cvi3OwFyvsZo=I6`qbJTe%|jVmxLAur7j-_HK8^=I@4=X8 z?3Jj%JILl}YJV85sXujC0K?C4?l)Nd%1;bYy=lNgP#jaaMxHkta>oeDgP9kOgO5WyrE8l%+j9u(Jh8G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lGx-&UsZ1V40rPoxE10j$qQh#Keg!+tqqjMW<|jN zBYy!MQPOFFu>-1DzE`cfxC(W)Lm>Fxr=~hao@akBElB$vfskB{JPHhm^xu}-C-AR` z13718a&#$bFYvMY-s6Z_J;4=4hPDwLPPS}kNToL9kSWfvh!PU?(Ex+HS^F)7KuwTo zBEDG3YC3LvKRaH3_4J=RM*_bLBpJ3H931Hs7Ub=+R3@)=m{DKt$3rtK1y$Ncp?sVc z)|T#5QsV{AR@~Tbs5^B`^*OnpddXLPtPQx;fgh>gTK#hMt-*UO=%p99j^fjyf_ACs zE(IN>rH-TQvz7KsOZ#D!|yh5%^VBs jIQhs{$;bHrUO6A7d6el@-N+|Vel};MZ-OY(MLzvMmY$n+ literal 0 HcmV?d00001 diff --git a/src/platform/xb1/Assets/Square150x150Logo.scale-200.png b/src/platform/xb1/Assets/Square150x150Logo.scale-200.png new file mode 100644 index 0000000000000000000000000000000000000000..78f8b2354c252e7b1929ca1d9353c4bc132adefd GIT binary patch literal 5198 zcmV-U6tU}xP)B8yg@XASERwEG#TBFflbX zH9R~#MMXtSOiWc(Rb5?OWMpJ&YHDw9Z*_HbeSLj_fq{mGhKGlTkB^U=o13PlrmwHB zwY9amxw*Z)y~D%9%F4>o(b3h_)!WFMn3?DF#R^Yiod z_4WAp`1$$y`}_O+{QUj>{r>*`|NsB4c8I0`025M4L_t(|0qnpr0RR910WkWP7Q(v) z00000000000628)-0f0YJru?9wG(MYt%AsbqADT?sB{3@lI*?i|GFM#Xl+L;#OG`B zyM+Jbh3`It0HJ4xQmlNpj60j?Sdkcr;TZHJEaFcl*+s#vPQ(=g*MRO3>NUDw;8}3x_hUT2$lvl;eS^a_Y*^@^WW^J89?1Oj*H|#psmE zT>@`9jFDqV_OTj9<1Wf+ZE9-P%6({gd}ZKHMxI_!W4R6;?ismTU=Jg%S-~S`g8H1s z-6DtR@h3Z($8xwZ#QPQ|RxvjiiHsj;e#@dB<)St+sF9aA?4>`x8GLf=9wl*BHHT_VmM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Z%o1s#}AV@eyAhrNXfp|JoUL&E9z*)ahHY>>F}P-~SjCQ^roU^2rh#JNL)^^l`^8 zj5IWOdgmQGn=qw#8I(;{{PX~9OMRY`qsHQw*{l zsDDFGl|BS^mSykrAM##R2SE`bv>eFgf<8ZmlP##$a8DtH2z90wp z&u@1pd%xV@w7;@P>!O@EERY63mbcdhpOxV%$02rA%geJy+Yx3U0=w{eB`7NthY3cJ zWv|=DXHd2^R5K2vnn?*{Jr_D6Mh?|i)H^<^nUo+AF@oZ68|BM-RpSsPsBjB;^h6bj z*lV$Rdk;&{OBQ=($kr=0{tv4INWIh+YY{+B0=2p;Z=*#fC5TH4ZGfYzb{w9mE2&)p zoAmkRc`2x99PVgYN?c=-KEIT&n*ymO+6<-SSq(913tcL-JJ+9tlS)(t-ex9|Xu^haqiDV8Iw`t@%NG89AgMN1r@D zS|il3HU#qHVC1Oy(eiBnM6Lv~e9w^FDx7^pvSMG9EIs_0WINop< zY`jpDoe6#zqIJDw2}T36)5&<%p!1T$NH933BUM#PP=d@DfX&;7S3lI{nwK1MC8x*d zt=s#TUPM@e;C9vlEN*P?9-KC>@1EWR8OLPOKJ8gw8CeF*zh{oHGW=kI8uP_MEUUG1(o6$$ym`<}taoGZ>RfR|6yubH)Z^(#P8v=7^5i z!e>n0H|Jc9`kvg`FR)f|{+^suRe-QLS#!)W#~gFa@xR9Z0WNi9tedv@9RL6T07*qo IM6N<$g3+iZ9{>OV literal 0 HcmV?d00001 diff --git a/src/platform/xb1/Assets/Square44x44Logo.altform-unplated_targetsize-48.png b/src/platform/xb1/Assets/Square44x44Logo.altform-unplated_targetsize-48.png new file mode 100644 index 0000000000000000000000000000000000000000..42fb2bdbac909e43fa7484cb12614fc21e31dbe6 GIT binary patch literal 706 zcmV;z0zLhSP)c~w|hT3K6LUX{VXU>Ypjj0U?+ElaN%mPA-s7z_pq z zwHJk(xq_t3IkjPT=Q(_tp`8BOB~Fd+uA4;pPRlb`0wj~C*g663!sHtZ677X%N$f|1fil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FT@D0=^V!uvH7)pxC)zL;Xn+D{+o-)7>kp^OdW@Nxk@Y!#+kS> zE$Pw)7h{4D}pQ+-?yCTGLJgg&f$4K~g^gJ<_^FDzQUKE3n2Hj=gX-*vxKTpw6y zxM=mSyby~sl3tb9VzOM=*22xTyk5kTclsts| zZ|)VHl2q5ox@Jn~avqqIvW~d&n)LB=G1n{xHn`v%KN^tS9brmkPO*_K070K~w#5{3 z1#QlQet2@4EkMw^?oL6PFrHg+)5xM6~-{#Fmr(cK7ruYvkx8?Z|VFn$Yv1luc z*ayyd*@!P#lG_g*{`K6J@~r|Bzj+pTCnb>ruIITJ5tF|n35ML{E)(bSt1rp%q9WPi zqTJIkYDzBhehofr9@w~IpBS`Vg2)zksJs&xY)kOSzyc|cVB&YX!12=+Wb^gy)wQLl zV@5?_b)GedpfO>f*X@UiV80>-@m$cSXQ8SPgDze0fph-Z>XQS@>)fxXDLUwrm^@_X*9GeA6N{xLqyJzGsMU zBCzKWvUE~vm3tlRQZXvi0xwoENQ^)X>guXHksk_5jvFq!9`ASbqE!gK6q~>HJ?@mY z_Fw6ol3&DbLAl*2@8E@%E*)Li;?6d+itHL_PbPP*#@5T2##OPAN_IpGENbcB zzdd7#Sc`*qYHsTGQe7JB002ovPDHLkV1jV20UrPW literal 0 HcmV?d00001 diff --git a/src/platform/xb1/Assets/Square44x44Logo.targetsize-48.png b/src/platform/xb1/Assets/Square44x44Logo.targetsize-48.png new file mode 100644 index 0000000000000000000000000000000000000000..42fb2bdbac909e43fa7484cb12614fc21e31dbe6 GIT binary patch literal 706 zcmV;z0zLhSP)c~w|hT3K6LUX{VXU>Ypjj0U?+ElaN%mPA-s7z_pq z zwHJk(xq_t3IkjPT=Q(_tp`8BOB~Fd+uA4;pPRlb`0wj~C*g663!sHtZ677X%N$f|1filVKA#RddFkcsJ z_NJ!_qMoIpe2_9ttH9nwH!z>$ceCJ@HQLzyVDkP=oi0&ASIcAYUwu!(>!B2nc`(pQ zae|)9Kq*zv*iZXAy=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mV?d00001 diff --git a/src/platform/xb1/Assets/Wide310x150Logo.scale-200.png b/src/platform/xb1/Assets/Wide310x150Logo.scale-200.png new file mode 100644 index 0000000000000000000000000000000000000000..12e41d09e6961eb138cb6c9419c416222133f547 GIT binary patch literal 5645 zcmV+o7V_zdP)0002DP)t-s00001 z0RaO80|W#F1_lNR2?+`c3JeSk4Gj$u5fKv;6BZU07Z(>B8yg@XASERwEG#TBFflbX zH9R~#MMXtSOiWc(Rb5?OWMpJ&YHDw9Z*_HbeSLj_fq{mGhKGlTkB^U=o13PlrmwHB zwY9amxw*Z)y~D%9%F4>o(b3h_)!WFMn3?DF#R^Yiod z_4WAp`1$$y`}_O+{QUj>{r>*`|NsB4c8I0`02L8QL_t(|0qn-H4FDhv1F)w3|7Roy zE`SBulM4U<000000000000000000000N@*$PQ3x?u48vna9J|5*t@%>#EvM6<7;z5 zG8!W=DjuuqS^lVv;7G_KE`Wuc|HX2ajU6_0sZ0h>hU$c4Pk&`@AQI^oJ{k{4h$bdq=(7v z(n)g7TkH<3KYWbvAU%citj$q~#J&3gE z;ea0ech32BxO35iL8L)vSCP1pPrgJr#~N+Y#DE2zn4UI1J|& z!554bo3!u1GjSW|=rh-xDmH0gm@{*`!GKAzNeja$7~I0S>h{;pW5p)*I-D_ao6I}x zzK}D;CM_Q51+m?uzobqXN!u#Q0zrbbKBV!U3rl2e zRcunPvr{G(Nt}$S^K8=c$QGGJ633I^A$kz`Zy(v1cr;;*U=XQ0H%Vui;KMD~1H~qF zI$SWZjPw3HUUn6mRI)`l%Op-`vFs~0sbUy7gJlxOC$WG?mClZtSSZEO3GdBNM|5E{ zG7DuMp791fR1h)D-xb?cTv~?;B8G=|#df1B2+|N6orRo7^ElEnT1yu1itUj@7)0LB zV2^Yb3XWIbcdB9&G4#IBS<0vDN2`iW#Lzv_Stj`V-i=FBk2WAjyh%GZ%AoJ$`X-#xc*V(=UFZvsy63)39+K47wMCp4EG!U_( z-)^RJ@e>R!L=4vjwPj8<*yNA)?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/platform/xb1/OpenLara.sln new file mode 100644 index 00000000..86965dcf --- /dev/null +++ b/src/platform/xb1/OpenLara.sln @@ -0,0 +1,51 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +VisualStudioVersion = 15.0.28307.1022 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "OpenLara", "OpenLara.vcxproj", "{0DF8D188-E91B-49C5-A2C5-75C430648B5E}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|ARM = Debug|ARM + Debug|ARM64 = Debug|ARM64 + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|ARM = Release|ARM + Release|ARM64 = Release|ARM64 + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {0DF8D188-E91B-49C5-A2C5-75C430648B5E}.Debug|ARM.ActiveCfg = Debug|ARM + {0DF8D188-E91B-49C5-A2C5-75C430648B5E}.Debug|ARM.Build.0 = Debug|ARM + {0DF8D188-E91B-49C5-A2C5-75C430648B5E}.Debug|ARM.Deploy.0 = Debug|ARM + {0DF8D188-E91B-49C5-A2C5-75C430648B5E}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {0DF8D188-E91B-49C5-A2C5-75C430648B5E}.Debug|ARM64.Build.0 = Debug|ARM64 + {0DF8D188-E91B-49C5-A2C5-75C430648B5E}.Debug|ARM64.Deploy.0 = Debug|ARM64 + {0DF8D188-E91B-49C5-A2C5-75C430648B5E}.Debug|x64.ActiveCfg = Debug|x64 + {0DF8D188-E91B-49C5-A2C5-75C430648B5E}.Debug|x64.Build.0 = Debug|x64 + {0DF8D188-E91B-49C5-A2C5-75C430648B5E}.Debug|x64.Deploy.0 = Debug|x64 + {0DF8D188-E91B-49C5-A2C5-75C430648B5E}.Debug|x86.ActiveCfg = Debug|Win32 + {0DF8D188-E91B-49C5-A2C5-75C430648B5E}.Debug|x86.Build.0 = Debug|Win32 + {0DF8D188-E91B-49C5-A2C5-75C430648B5E}.Debug|x86.Deploy.0 = Debug|Win32 + {0DF8D188-E91B-49C5-A2C5-75C430648B5E}.Release|ARM.ActiveCfg = Release|ARM + {0DF8D188-E91B-49C5-A2C5-75C430648B5E}.Release|ARM.Build.0 = Release|ARM + {0DF8D188-E91B-49C5-A2C5-75C430648B5E}.Release|ARM.Deploy.0 = Release|ARM + {0DF8D188-E91B-49C5-A2C5-75C430648B5E}.Release|ARM64.ActiveCfg = Release|ARM64 + {0DF8D188-E91B-49C5-A2C5-75C430648B5E}.Release|ARM64.Build.0 = Release|ARM64 + {0DF8D188-E91B-49C5-A2C5-75C430648B5E}.Release|ARM64.Deploy.0 = Release|ARM64 + {0DF8D188-E91B-49C5-A2C5-75C430648B5E}.Release|x64.ActiveCfg = Release|x64 + {0DF8D188-E91B-49C5-A2C5-75C430648B5E}.Release|x64.Build.0 = Release|x64 + {0DF8D188-E91B-49C5-A2C5-75C430648B5E}.Release|x64.Deploy.0 = Release|x64 + {0DF8D188-E91B-49C5-A2C5-75C430648B5E}.Release|x86.ActiveCfg = Release|Win32 + {0DF8D188-E91B-49C5-A2C5-75C430648B5E}.Release|x86.Build.0 = Release|Win32 + {0DF8D188-E91B-49C5-A2C5-75C430648B5E}.Release|x86.Deploy.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {037CFBE7-50F7-492C-B712-18C42FD39BE3} + EndGlobalSection +EndGlobal diff --git a/src/platform/xb1/OpenLara.vcxproj b/src/platform/xb1/OpenLara.vcxproj new file mode 100644 index 00000000..f12b042a --- /dev/null +++ b/src/platform/xb1/OpenLara.vcxproj @@ -0,0 +1,332 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + Debug + ARM + + + Release + ARM + + + Debug + ARM64 + + + Release + ARM64 + + + + {0df8d188-e91b-49c5-a2c5-75c430648b5e} + DirectXApp + OpenLara + en-US + 14.0 + true + Windows Store + 10.0.17763.0 + 10.0.16299.0 + 10.0 + + + + Application + true + v141 + + + Application + true + v141 + + + Application + true + v141 + true + + + Application + true + v141 + + + Application + false + true + v141 + true + + + Application + false + true + v141 + true + + + Application + false + true + v141 + true + + + Application + false + true + v141 + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OpenLara_TemporaryKey.pfx + False + False + Always + x64 + 0F7D3218F53B8902E26C7E787E16EB3520A9898C + 1 + OnApplicationRun + False + + + ..\..\libs\;..\..\;$(VC_IncludePath);$(WindowsSDK_IncludePath); + + + ..\..\libs\;..\..\;$(VC_IncludePath);$(WindowsSDK_IncludePath); + + + + d2d1.lib; d3d11.lib; dxgi.lib; windowscodecs.lib; dwrite.lib; %(AdditionalDependencies) + %(AdditionalLibraryDirectories); $(VCInstallDir)\lib\store\arm; $(VCInstallDir)\lib\arm + + + pch.h + $(IntDir)pch.pch + $(ProjectDir);$(IntermediateOutputPath);%(AdditionalIncludeDirectories) + /bigobj %(AdditionalOptions) + 4453;28204 + _DEBUG;%(PreprocessorDefinitions) + + + + + d2d1.lib; d3d11.lib; dxgi.lib; windowscodecs.lib; dwrite.lib; %(AdditionalDependencies) + %(AdditionalLibraryDirectories); $(VCInstallDir)\lib\store\arm; $(VCInstallDir)\lib\arm + + + pch.h + $(IntDir)pch.pch + $(ProjectDir);$(IntermediateOutputPath);%(AdditionalIncludeDirectories) + /bigobj %(AdditionalOptions) + 4453;28204 + NDEBUG;%(PreprocessorDefinitions) + + + + + d2d1.lib; d3d11.lib; dxgi.lib; windowscodecs.lib; dwrite.lib; %(AdditionalDependencies) + %(AdditionalLibraryDirectories); $(VCInstallDir)\lib\store\arm64; $(VCInstallDir)\lib\arm64 + + + pch.h + $(IntDir)pch.pch + $(ProjectDir);$(IntermediateOutputPath);%(AdditionalIncludeDirectories) + /bigobj %(AdditionalOptions) + 4453;28204 + _DEBUG;%(PreprocessorDefinitions) + + + + + d2d1.lib; d3d11.lib; dxgi.lib; windowscodecs.lib; dwrite.lib; %(AdditionalDependencies) + %(AdditionalLibraryDirectories); $(VCInstallDir)\lib\store\arm64; $(VCInstallDir)\lib\arm64 + + + pch.h + $(IntDir)pch.pch + $(ProjectDir);$(IntermediateOutputPath);%(AdditionalIncludeDirectories) + /bigobj %(AdditionalOptions) + 4453;28204 + NDEBUG;%(PreprocessorDefinitions) + + + + + d2d1.lib; d3d11.lib; dxgi.lib; windowscodecs.lib; dwrite.lib; %(AdditionalDependencies) + %(AdditionalLibraryDirectories); $(VCInstallDir)\lib\store; $(VCInstallDir)\lib + + + pch.h + $(IntDir)pch.pch + $(ProjectDir);$(IntermediateOutputPath);%(AdditionalIncludeDirectories) + /bigobj %(AdditionalOptions) + 4453;28204 + _DEBUG;%(PreprocessorDefinitions) + + + + + d2d1.lib; d3d11.lib; dxgi.lib; windowscodecs.lib; dwrite.lib; %(AdditionalDependencies) + %(AdditionalLibraryDirectories); $(VCInstallDir)\lib\store; $(VCInstallDir)\lib + + + pch.h + $(IntDir)pch.pch + $(ProjectDir);$(IntermediateOutputPath);%(AdditionalIncludeDirectories) + /bigobj %(AdditionalOptions) + 4453;28204 + NDEBUG;%(PreprocessorDefinitions) + + + + + d2d1.lib; d3d11.lib; dxgi.lib; windowscodecs.lib; dwrite.lib; %(AdditionalDependencies) + %(AdditionalLibraryDirectories); $(VCInstallDir)\lib\store\amd64; $(VCInstallDir)\lib\amd64 + + + pch.h + $(IntDir)pch.pch + $(ProjectDir);$(IntermediateOutputPath);%(AdditionalIncludeDirectories) + /bigobj %(AdditionalOptions) + 4453;28204 + _DEBUG;%(PreprocessorDefinitions) + + + + + vccorlib.lib; msvcrt.lib; d2d1.lib; d3d11.lib; dxgi.lib; windowscodecs.lib; dwrite.lib; %(AdditionalDependencies) + %(AdditionalLibraryDirectories); $(VCInstallDir)\lib\store\amd64; $(VCInstallDir)\lib\amd64 + vccorlib;msvcrt + + + $(ProjectDir);$(IntermediateOutputPath);%(AdditionalIncludeDirectories) + /bigobj %(AdditionalOptions) + 4453;28204 + __XB1__;__UWP__;NOMINMAX;_CRT_SECURE_NO_WARNINGS;NDEBUG;%(PreprocessorDefinitions) + NotUsing + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + false + + + false + + + + + + Designer + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/platform/xb1/OpenLara.vcxproj.filters b/src/platform/xb1/OpenLara.vcxproj.filters new file mode 100644 index 00000000..619c14bc --- /dev/null +++ b/src/platform/xb1/OpenLara.vcxproj.filters @@ -0,0 +1,103 @@ + + + + + db6ab835-f1cb-4efb-94eb-2bdfd0c3a3d2 + bmp;fbx;gif;jpg;jpeg;tga;tiff;tif;png + + + {ba6867bc-3dac-49f7-b628-c02d534f8825} + + + {d606bd3a-145c-432f-ae5a-66dcb178b466} + + + {d5e2e716-2bc5-43a1-bebc-4c5631d0b1bc} + + + + + + libs\tinf + + + libs\stb_vorbis + + + + + libs\tinf + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Assets + + + Assets + + + Assets + + + Assets + + + Assets + + + Assets + + + Assets + + + Assets + + + Assets + + + \ No newline at end of file diff --git a/src/platform/xb1/OpenLara.vcxproj.user b/src/platform/xb1/OpenLara.vcxproj.user new file mode 100644 index 00000000..85512529 --- /dev/null +++ b/src/platform/xb1/OpenLara.vcxproj.user @@ -0,0 +1,23 @@ + + + + UWPRemoteDebugger + 192.168.1.49 + + + AppHostLocalDebugger + 192.168.1.49 + + + UWPRemoteDebugger + 192.168.1.49 + + + True + False + x64 + False + 192.168.1.49 + True + + \ No newline at end of file diff --git a/src/platform/xb1/OpenLara_TemporaryKey.pfx b/src/platform/xb1/OpenLara_TemporaryKey.pfx new file mode 100644 index 0000000000000000000000000000000000000000..fc69764f43cbcc350600d74caed1b4780f7521c5 GIT binary patch literal 2512 zcmZWp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DxNmn{n;2$Do_=JI78}xcn!Cxpl7Hnq%yf0Y?Bs(Udiox{H*!c#rONOb!4)4b zIKjR4v^%_EXM_J4QVS`DWPvctae|lx!LX*bwyIGY{xuaEX0 + + CN=EAAE5CD2-DCE4-4EC0-B98D-40B753FDC939 + XProger + MSA + http://www.w3.org/2001/04/xmlenc#sha256 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 39822XProger.OpenLara + + OpenLara + + + + + \ No newline at end of file diff --git a/src/platform/xb1/Package.appxmanifest b/src/platform/xb1/Package.appxmanifest new file mode 100644 index 00000000..312c87c5 --- /dev/null +++ b/src/platform/xb1/Package.appxmanifest @@ -0,0 +1,33 @@ + + + + + + OpenLara + XProger + Assets\StoreLogo.png + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/platform/xb1/main.cpp b/src/platform/xb1/main.cpp new file mode 100644 index 00000000..1207fb1b --- /dev/null +++ b/src/platform/xb1/main.cpp @@ -0,0 +1,503 @@ +#include +#include +#include +#include + +#include "game.h" + +using namespace Concurrency; +using namespace Windows; +using namespace Windows::ApplicationModel::Activation; +using namespace Windows::UI::Core; +using namespace Windows::Foundation; +using namespace Windows::Graphics; +using namespace Windows::Gaming::Input; +using namespace Windows::Storage; +using namespace Windows::Globalization; +using namespace Windows::System::UserProfile; +using namespace Microsoft::WRL; + + +ID3D11Device *device; +ID3D11DeviceContext *deviceContext; +IDXGISwapChain1 *swapChain; + + +// multi-threading +void* osMutexInit() +{ + CRITICAL_SECTION *CS = new CRITICAL_SECTION(); + InitializeCriticalSection(CS); + return CS; +} + +void osMutexFree(void *obj) +{ + DeleteCriticalSection((CRITICAL_SECTION*)obj); + delete (CRITICAL_SECTION*)obj; +} + +void osMutexLock(void *obj) +{ + EnterCriticalSection((CRITICAL_SECTION*)obj); +} + +void osMutexUnlock(void *obj) +{ + LeaveCriticalSection((CRITICAL_SECTION*)obj); +} + + +// timing +LARGE_INTEGER timerFreq; +LARGE_INTEGER timerStart; + +int osGetTimeMS() +{ + LARGE_INTEGER time; + QueryPerformanceCounter(&time); + return int32((time.QuadPart - timerStart.QuadPart) * 1000L / timerFreq.QuadPart); +} + + +// input +struct JoyDevice { + Gamepad^ gamepad; + int time; + float vL, vR; + float oL, oR; +} joyDevice[INPUT_JOY_COUNT]; + +Core::Mutex joyLock; + +#define JOY_MIN_UPDATE_FX_TIME 50 +#define JOY_TRIGGER_THRESHOLD 0.1f + +void osJoyVibrate(int index, float L, float R) +{ + joyDevice[index].vL = L; + joyDevice[index].vR = R; +} + +float joyTrigger(double value) +{ + return clamp(((float)value - JOY_TRIGGER_THRESHOLD) / (1.0f - JOY_TRIGGER_THRESHOLD), 0.0f, 1.0f); +} + +void joyUpdate() +{ + OS_LOCK(joyLock); + + #define JOY_BUTTON(index, btn, mask) Input::setJoyDown(index, btn, (state.Buttons & mask) == mask); + + for (int i = 0; i < INPUT_JOY_COUNT; i++) + { + JoyDevice &joy = joyDevice[i]; + + if (!joy.gamepad) continue; + + GamepadReading& state = joy.gamepad->GetCurrentReading(); + + JOY_BUTTON(i, jkA, GamepadButtons::A); + JOY_BUTTON(i, jkB, GamepadButtons::B); + JOY_BUTTON(i, jkX, GamepadButtons::X); + JOY_BUTTON(i, jkY, GamepadButtons::Y); + JOY_BUTTON(i, jkLeft, GamepadButtons::DPadLeft); + JOY_BUTTON(i, jkRight, GamepadButtons::DPadRight); + JOY_BUTTON(i, jkUp, GamepadButtons::DPadUp); + JOY_BUTTON(i, jkDown, GamepadButtons::DPadDown); + JOY_BUTTON(i, jkSelect, GamepadButtons::View); + JOY_BUTTON(i, jkStart, GamepadButtons::Menu); + JOY_BUTTON(i, jkL, GamepadButtons::LeftThumbstick); + JOY_BUTTON(i, jkR, GamepadButtons::RightThumbstick); + JOY_BUTTON(i, jkLB, GamepadButtons::LeftShoulder); + JOY_BUTTON(i, jkRB, GamepadButtons::RightShoulder); + + Input::setJoyPos(i, jkL, vec2(float(state.LeftThumbstickX), -float(state.LeftThumbstickY))); + Input::setJoyPos(i, jkR, vec2(float(state.RightThumbstickX), -float(state.RightThumbstickY))); + Input::setJoyPos(i, jkLT, vec2(joyTrigger(state.LeftTrigger), 0.0f)); + Input::setJoyPos(i, jkRT, vec2(joyTrigger(state.RightTrigger), 0.0f)); + + if ((joy.vL != joy.oL || joy.vR != joy.oR) && osGetTimeMS() >= joy.time) { + GamepadVibration vibration; + vibration.LeftMotor = joy.vL; + vibration.RightMotor = joy.vR; + joy.gamepad->Vibration = vibration; + joy.oL = joy.vL; + joy.oR = joy.vR; + joy.time = osGetTimeMS() + JOY_MIN_UPDATE_FX_TIME; + } + } + + #undef JOY_BUTTON +} + +void joyAdd(Platform::Object^, Gamepad^ args) +{ + OS_LOCK(joyLock); + for (int i = 0; i < INPUT_JOY_COUNT; i++) + { + JoyDevice &joy = joyDevice[i]; + if (joy.gamepad) continue; + joy.gamepad = args; + return; + } +} + +void joyRemove(Platform::Object^, Gamepad^ args) +{ + OS_LOCK(joyLock); + for (int i = 0; i < INPUT_JOY_COUNT; i++) + { + JoyDevice &joy = joyDevice[i]; + if (!joy.gamepad) continue; + if (joy.gamepad == args) { + joy = {}; + return; + } + } +} + +void joyInit() +{ + Gamepad::GamepadAdded += ref new EventHandler(&joyAdd); + Gamepad::GamepadRemoved += ref new EventHandler(&joyRemove); +} + + +// sound +#define SND_SIZE 4704*sizeof(int16) +#define SND_MAX_BUFFERS 2 + +struct AudioContext : public IXAudio2VoiceCallback +{ + Microsoft::WRL::ComPtr pXAudio2; + HANDLE event; + + virtual void STDMETHODCALLTYPE OnVoiceProcessingPassStart(UINT32) override {} + virtual void STDMETHODCALLTYPE OnVoiceProcessingPassEnd() override {} + virtual void STDMETHODCALLTYPE OnStreamEnd() override {} + virtual void STDMETHODCALLTYPE OnLoopEnd(void*) override {} + virtual void STDMETHODCALLTYPE OnVoiceError(void*, HRESULT) override {} + virtual void STDMETHODCALLTYPE OnBufferStart(void*) override {} + + virtual void STDMETHODCALLTYPE OnBufferEnd(void* pBufferContext) + { + SetEvent(event); + } + + AudioContext() + { + event = CreateEventEx(NULL, NULL, 0, EVENT_ALL_ACCESS); + } + + virtual ~AudioContext() + { + CloseHandle(event); + } + + void start() + { + CreateThread(NULL, 0, fill, this, 0, NULL); + } + + void stop() { + SetEvent(event); + } + + void suspend() { + pXAudio2->StopEngine(); + } + + void resume() { + pXAudio2->StartEngine(); + } + + static DWORD WINAPI fill(LPVOID lpParam) + { + AudioContext* context = (AudioContext*)lpParam; + + IXAudio2MasteringVoice* masteringVoice; + IXAudio2SourceVoice* sourceVoice; + uint32 bufferIndex = 0; + + if (FAILED(XAudio2Create(context->pXAudio2.GetAddressOf(), 0))) { + return 0; + } + + if (FAILED(context->pXAudio2->CreateMasteringVoice(&masteringVoice))) { + return 0; + } + + uint8* data = new uint8[SND_SIZE * SND_MAX_BUFFERS]; + + WAVEFORMATEX waveFmt = { WAVE_FORMAT_PCM, 2, 44100, 44100 * 4, 4, 16, sizeof(waveFmt) }; + + if (FAILED(context->pXAudio2->CreateSourceVoice(&sourceVoice, &waveFmt, 0, XAUDIO2_DEFAULT_FREQ_RATIO, context))) { + return 0; + } + + if (FAILED(sourceVoice->Start(0))) { + return 0; + } + + while (!Core::isQuit) + { + XAUDIO2_VOICE_STATE state; + sourceVoice->GetState(&state, XAUDIO2_VOICE_NOSAMPLESPLAYED); + + if (state.BuffersQueued < SND_MAX_BUFFERS) { + XAUDIO2_BUFFER buffer = {}; + buffer.AudioBytes = SND_SIZE; + buffer.pAudioData = data + SND_SIZE * bufferIndex; + + Sound::fill((Sound::Frame*)buffer.pAudioData, buffer.AudioBytes / 4); + + bufferIndex = (bufferIndex + 1) % SND_MAX_BUFFERS; + + sourceVoice->SubmitSourceBuffer(&buffer); + } else { + WaitForSingleObject(context->event, INFINITE); + } + } + + delete[] data; + + return 0; + } +}; + + +struct RenderContext +{ + void init(CoreWindow^ window) + { + D3D_FEATURE_LEVEL featureLevels[] = { + D3D_FEATURE_LEVEL_10_0, + D3D_FEATURE_LEVEL_9_3, + D3D_FEATURE_LEVEL_9_2, + D3D_FEATURE_LEVEL_9_1 + }; + + HRESULT ret; + ret = D3D11CreateDevice(NULL, D3D_DRIVER_TYPE_HARDWARE, NULL, 0, featureLevels, ARRAYSIZE(featureLevels), D3D11_SDK_VERSION, &device, NULL, &deviceContext); + ASSERT(ret == S_OK); + + ComPtr dxgiDevice; + ComPtr(device).As(&dxgiDevice); + + ComPtr dxgiAdapter; + dxgiDevice->GetAdapter(&dxgiAdapter); + + ComPtr dxgiFactory; + dxgiAdapter->GetParent(IID_PPV_ARGS(&dxgiFactory)); + + DXGI_SWAP_CHAIN_DESC1 desc = {}; + desc.Width = Core::width; + desc.Height = Core::height; + desc.Format = DXGI_FORMAT_R8G8B8A8_UNORM; + desc.BufferCount = 2; + desc.BufferUsage = DXGI_USAGE_RENDER_TARGET_OUTPUT; + desc.SampleDesc.Count = 1; + desc.SampleDesc.Quality = 0; + desc.SwapEffect = DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL; + desc.Scaling = DXGI_SCALING_NONE; + desc.AlphaMode = DXGI_ALPHA_MODE_IGNORE; + + ret = dxgiFactory->CreateSwapChainForCoreWindow(device, reinterpret_cast(window), &desc, NULL, &swapChain); + ASSERT(ret == S_OK); + + dxgiDevice->SetMaximumFrameLatency(1); + } + + void present() + { + swapChain->Present(Core::settings.detail.vsync ? 1 : 0, 0); + } +}; + + +ref class View sealed : public ApplicationModel::Core::IFrameworkView +{ +private: + AudioContext audioContext; + RenderContext renderContext; + + bool m_windowVisible; + +public: + View() : m_windowVisible(true) {}; + + virtual void Initialize(ApplicationModel::Core::CoreApplicationView^ applicationView) + { + applicationView->Activated += ref new TypedEventHandler(this, &View::OnActivated); + ApplicationModel::Core::CoreApplication::Suspending += ref new EventHandler(this, &View::OnSuspending); + ApplicationModel::Core::CoreApplication::Resuming += ref new EventHandler(this, &View::OnResuming); + } + + virtual void SetWindow(CoreWindow^ window) + { + window->VisibilityChanged += ref new TypedEventHandler(this, &View::OnVisibilityChanged); + window->Closed += ref new TypedEventHandler(this, &View::OnWindowClosed); + SystemNavigationManager::GetForCurrentView()->BackRequested += ref new EventHandler(this, &View::OnBackRequested); + + Core::width = 1920; + Core::height = 1080; + + renderContext.init(window); + } + + int checkLanguage() + { + Platform::String^ language = GlobalizationPreferences::Languages->GetAt(0); + const wchar_t* id = language->Begin(); + + #define CHECK(str) (wcsstr(id, L##str"-") != 0) + + int str = STR_LANG_EN; + + if (CHECK("fr")) { + str = STR_LANG_FR; + } else if (CHECK("de")) { + str = STR_LANG_DE; + } else if (CHECK("es")) { + str = STR_LANG_ES; + } else if (CHECK("it")) { + str = STR_LANG_IT; + } else if (CHECK("pl")) { + str = STR_LANG_PL; + } else if (CHECK("pt")) { + str = STR_LANG_PT; + } else if (CHECK("ru") || CHECK("be") || CHECK("uk")) { + str = STR_LANG_RU; + } else if (CHECK("ja")) { + str = STR_LANG_JA; + } else if (CHECK("gr")) { + str = STR_LANG_GR; + } else if (CHECK("fi")) { + str = STR_LANG_FI; + } else if (CHECK("cs")) { + str = STR_LANG_CZ; + } else if (CHECK("zh")) { + str = STR_LANG_CN; + } + + return str - STR_LANG_EN; + } + + virtual void Load(Platform::String^ entryPoint) + { + // + } + + virtual void Run() + { + contentDir[0] = saveDir[0] = cacheDir[0] = 0; + + StorageFolder^ localFolder = ApplicationData::Current->LocalFolder; + wcstombs(contentDir, localFolder->Path->Data(), sizeof(contentDir)); + strcat(contentDir, "\\"); + strcpy(saveDir, contentDir); + strcpy(cacheDir, contentDir); + + Stream::addPack("content.zip"); + + GAPI::defRTV = NULL; + GAPI::defDSV = NULL; + + QueryPerformanceFrequency(&timerFreq); + QueryPerformanceCounter(&timerStart); + + Sound::channelsCount = 0; + + joyInit(); + audioContext.start(); + + Core::defLang = checkLanguage(); + + Game::init((const char*)NULL); + + while (!Core::isQuit) + { + if (m_windowVisible) + { + CoreWindow::GetForCurrentThread()->Dispatcher->ProcessEvents(CoreProcessEventsOption::ProcessAllIfPresent); + + joyUpdate(); + + if (Game::update()) { + Game::render(); + renderContext.present(); + } + } else { + CoreWindow::GetForCurrentThread()->Dispatcher->ProcessEvents(CoreProcessEventsOption::ProcessOneAndAllPending); + } + } + + audioContext.stop(); + Game::deinit(); + } + + virtual void Uninitialize() + { + // TODO save state? + } + +protected: + void OnActivated(ApplicationModel::Core::CoreApplicationView^ applicationView, ApplicationModel::Activation::IActivatedEventArgs^ args) + { + CoreWindow::GetForCurrentThread()->Activate(); + } + + void OnSuspending(Platform::Object^ sender, ApplicationModel::SuspendingEventArgs^ args) + { + audioContext.suspend(); + + ApplicationModel::SuspendingDeferral^ deferral = args->SuspendingOperation->GetDeferral(); + + create_task([this, deferral]() + { + // TODO save state? + deferral->Complete(); + }); + } + + void OnResuming(Platform::Object^ sender, Platform::Object^ args) + { + audioContext.resume(); + // TODO load state? + } + + void OnVisibilityChanged(CoreWindow^ sender, VisibilityChangedEventArgs^ args) + { + m_windowVisible = args->Visible; + } + + void OnWindowClosed(CoreWindow^ sender, CoreWindowEventArgs^ args) + { + ::Core::quit(); + } + + void OnBackRequested(Platform::Object^, BackRequestedEventArgs^ args) + { + args->Handled = true; + } +}; + + +ref class ViewSource sealed : ApplicationModel::Core::IFrameworkViewSource +{ +public: + virtual ApplicationModel::Core::IFrameworkView^ CreateView() + { + return ref new View(); + } +}; + + +[Platform::MTAThread] +int main(Platform::Array^) { + auto viewSource = ref new ViewSource(); + ApplicationModel::Core::CoreApplication::Run(viewSource); + return 0; +} \ No newline at end of file diff --git a/src/shader.h b/src/shader.h index 25306a6c..754e516f 100644 --- a/src/shader.h +++ b/src/shader.h @@ -10,7 +10,7 @@ struct Shader : GAPI::Shader { SPRITE = 0, FLASH, ROOM, ENTITY, MIRROR, FILTER_UPSCALE = 0, FILTER_DOWNSAMPLE, FILTER_DOWNSAMPLE_DEPTH, FILTER_GRAYSCALE, FILTER_BLUR, FILTER_ANAGLYPH, FILTER_EQUIRECTANGULAR, WATER_DROP = 0, WATER_SIMULATE, WATER_CAUSTICS, WATER_RAYS, WATER_MASK, WATER_COMPOSE, - SKY_TEXTURE = 0, SKY_CLOUDS, SKY_CLOUDS_AZURE, + SKY_TEXTURE = 0, SKY_CLOUDS, SKY_AZURE, MAX = 6 }; diff --git a/src/shaders/common.hlsl b/src/shaders/common.hlsl index c5ed1c7f..9c5edd91 100644 --- a/src/shaders/common.hlsl +++ b/src/shaders/common.hlsl @@ -62,8 +62,8 @@ struct VS_INPUT { #define SAMPLE_2D_LINEAR_WRAP(T,uv) T.Sample(smpLinearWrap, uv) #define SAMPLE_2D_CMP(T,uv) T.SampleCmp(smpCmp, uv.xy, uv.z) #define SAMPLE_2D_LOD0(T,uv) T.SampleLevel(smpLinear, uv, 0) - #define SAMPLE_3D(T,uv) T.Sample(smpLinear, uv) - #define SAMPLE_CUBE(T,uv) T.Sample(smpLinear, uv) + #define SAMPLE_3D(T,uv) T.SampleLevel(smpLinearWrap, uv, 0) + #define SAMPLE_CUBE(T,uv) T.Sample(smpLinear, uv) #else sampler2D sDiffuse : register(s0); sampler2D sNormal : register(s1); @@ -81,6 +81,8 @@ struct VS_INPUT { #define SAMPLE_2D_CMP(T,uv) ((tex2D(T, uv.xy) => uv.z) ? 1 : 0) #define SAMPLE_3D(T,uv) tex3D(T, uv) #define SAMPLE_CUBE(T,uv) texCUBE(T, uv) + + #define SV_POSITION POSITION #endif float4 uParam : register( c0 ); @@ -147,15 +149,16 @@ float calcCausticsV(float3 coord) { return 0.5 + abs(sin(dot(coord.xyz, 1.0 / 1024.0) + uParam.x)) * 0.75; } +#ifndef NORMAL_AS_3D float3 calcHeightMapNormal(float2 tcR, float2 tcB, float base) { float dx = SAMPLE_2D_LOD0(sNormal, tcR).x - base; float dz = SAMPLE_2D_LOD0(sNormal, tcB).x - base; return normalize( float3(dx, 64.0 / (1024.0 * 8.0), dz) ); } +#endif -half calcFresnel(half VoH, half f0) { - half f = (half)pow(1.0 - VoH, 5.0); - return f + f0 * (1.0h - f); +float calcFresnel(float NdotV, float f0) { + return f0 + (1.0 - f0) * pow(1.0 - NdotV, 5.0); } void applyFogUW(inout float3 color, float3 coord, float waterFogDist, float waterColorDist) { diff --git a/src/shaders/compile_d3d11.bat b/src/shaders/compile_d3d11.bat index 23828176..6e38efd6 100644 --- a/src/shaders/compile_d3d11.bat +++ b/src/shaders/compile_d3d11.bat @@ -25,6 +25,10 @@ call :compile filter _grayscale "/DGRAYSCALE" call :compile filter _blur "/DBLUR" call :compile filter _anaglyph "/DANAGLYPH" +call :compile sky +call :compile sky _clouds "/DSKY_CLOUDS" +call :compile sky _azure "/DSKY_AZURE" + call :compile gui diff --git a/src/shaders/sky.hlsl b/src/shaders/sky.hlsl new file mode 100644 index 00000000..2b051395 --- /dev/null +++ b/src/shaders/sky.hlsl @@ -0,0 +1,116 @@ +#define NORMAL_AS_3D + +#include "common.hlsl" + +struct VS_OUTPUT { + float4 pos : SV_POSITION; + half4 color : TEXCOORD0; + half2 texCoord : TEXCOORD1; + float3 coord : TEXCOORD2; +}; + +#ifdef VERTEX + VS_OUTPUT main(VS_INPUT In) { + VS_OUTPUT Out; + + Out.color = (half4)In.aColor; + Out.texCoord = (half2)In.aTexCoord.xy; + Out.coord = float3(In.aCoord.x, -In.aCoord.y, In.aCoord.z); + + Out.pos = mul(uViewProj, float4(In.aCoord.xyz * 5.0, 1.0)); + Out.pos.z = Out.pos.w; + + return Out; + } + +#else // PIXEL + + #ifdef SKY_AZURE + #define SKY_CLOUDS + #endif + + #ifdef SKY_CLOUDS + #define STEPS 8.0 + #define MIN_HEIGHT 2.0 + #define MAX_HEIGHT 4.0 + #define skyWind uParam.xyz + #define skyDown float3(uLightProj[0].x, uLightProj[1].x, uLightProj[2].x) + #define skyUp float3(uLightProj[0].y, uLightProj[1].y, uLightProj[2].y) + #define sunDir float3(uLightProj[0].z, uLightProj[1].z, uLightProj[2].z) + #define sunSize uLightProj[3].z + #define sunColor float3(uLightProj[0].w, uLightProj[1].w, uLightProj[2].w) + #define sunGlare uLightProj[3].w + #define cloudsDown uPosScale[0].xyz + #define cloudsUp uPosScale[1].xyz + + // based on https://www.shadertoy.com/view/XsVGz3 / https://www.shadertoy.com/view/XslGRr + float noise3D(float3 p) { + p = p * 0.15 + skyWind; + return SAMPLE_3D(sNormal, p).x; + } + + float density(float3 pos) { + float den = noise3D(pos) * 3.0 - 2.0 + (pos.y - MIN_HEIGHT); + float edge = 1.0 - smoothstep(MIN_HEIGHT, MAX_HEIGHT, pos.y); + den = clamp(den * edge * edge, 0.0, 1.0); + return den; + } + + float3 raymarching(float2 screenPos, float3 dir, float t0, float t1, float3 backCol) { + float dither = SAMPLE_2D_POINT_WRAP(sMask, screenPos * (1.0 / 8.0)).x; + + float3 step = dir * ((t1 - t0) / STEPS); + float3 pos = dir * t0 + step * dither; + float4 sum = 0.0; + + for (float i = 0.0; i < STEPS; i++) { + float den = density(pos); + + if (den > 0.01) { + float dif = max(0.0, den - density(pos + 0.3 * sunDir)) * 4.0; + + float4 col = float4(lerp(cloudsUp, cloudsDown, den), den); + float3 lin = sunColor * dif + 1.0; + + col.rgb *= lin; + + col.a *= 0.5; + col.rgb *= col.a; + sum = sum + col * (1.0 - sum.a); + } + + pos += step; + } + + sum = clamp(sum, 0.0, 1.0); + + float h = dir.y; + sum.rgb = lerp(sum.rgb, backCol, exp(-20.0 * h * h) ); + + return lerp(backCol, sum.xyz, sum.a); + } + #endif + + half4 main(VS_OUTPUT In) : COLOR0 { + float3 dir = normalize(In.coord); + + #ifdef SKY_AZURE + float3 col = lerp(skyDown, skyUp, dir.y); + #else + float3 col = SAMPLE_2D_LINEAR(sDiffuse, In.texCoord).xyz * In.color.xyz; + #endif + + #ifdef SKY_CLOUDS + float sun = clamp(sunSize + dot(sunDir, dir), 0.0, 1.0); + col += sunColor * pow(sun, sunGlare); + + float2 dist = float2(MIN_HEIGHT, MAX_HEIGHT) / dir.y; + + if (dist.x > 0.0) { + col = raymarching(In.pos.xy, dir, dist.x, dist.y, col); + } + #endif + + return half4(col, 1.0h); + } +#endif diff --git a/src/shaders/water_compose.hlsl b/src/shaders/water_compose.hlsl index fc588c47..5f3abe86 100644 --- a/src/shaders/water_compose.hlsl +++ b/src/shaders/water_compose.hlsl @@ -30,9 +30,9 @@ VS_OUTPUT main(VS_INPUT In) { Out.pos = mul(uViewProj, float4(coord, 1.0)); Out.hpos = Out.pos.xyw; Out.viewVec.xyz = uViewPos.xyz - coord; + Out.lightVec = uLightPos[0].xyz - coord; Out.viewVec.y = abs(Out.viewVec.y); Out.lightVec.y = abs(Out.lightVec.y); - Out.lightVec = uLightPos[0].xyz - coord; Out.viewVec.w = step(uPosScale[0].y, uViewPos.y); @@ -63,7 +63,7 @@ half4 main(VS_OUTPUT In) : COLOR0 { half3 refr = lerp(refrA.xyz, refrB.xyz, refrA.w); half3 refl = SAMPLE_2D_LINEAR(sReflect, float2(tc.x, tc.y) + dudv * uParam.w).xyz; - half fresnel = calcFresnel(max(0.0, dot(normal, viewVec)), 0.12); + half fresnel = calcFresnel(abs(dot(normal, viewVec)), 0.12); half mask = SAMPLE_2D_POINT(sMask, In.maskCoord).r; half4 color = half4(lerp(refr, refl, fresnel), mask); diff --git a/src/shaders/water_rays.hlsl b/src/shaders/water_rays.hlsl index da955817..ff776b59 100644 --- a/src/shaders/water_rays.hlsl +++ b/src/shaders/water_rays.hlsl @@ -33,9 +33,9 @@ float boxIntersect(float3 rayPos, float3 rayDir, float3 center, float3 hsize) { #ifdef _GAPI_GXM float4 main(VS_OUTPUT In) : COLOR0 { float2 pixelCoord = float2(__pixel_x(), __pixel_y()); -#else -float4 main(VS_OUTPUT In/*, float2 pixelCoord: VPOS*/) : COLOR0 { - float2 pixelCoord = 0.0; +#else defined(_GAPI_D3D11 +float4 main(VS_OUTPUT In) : COLOR0 { + float2 pixelCoord = In.pos.xy; #endif float3 viewVec = normalize(In.viewVec); diff --git a/src/sound.h b/src/sound.h index f8691c8d..29e9c7ed 100644 --- a/src/sound.h +++ b/src/sound.h @@ -8,7 +8,7 @@ #define DECODE_OGG -#if !defined(_OS_PSP) && !defined(_OS_WEB) && !defined(_OS_PSV) && !defined(_OS_3DS) && !defined(_OS_XBOX) +#if !defined(_OS_PSP) && !defined(_OS_WEB) && !defined(_OS_PSV) && !defined(_OS_3DS) && !defined(_OS_XBOX) && !defined(_OS_XB1) #define DECODE_MP3 #endif diff --git a/src/utils.h b/src/utils.h index 1a9e48e0..2ec58540 100644 --- a/src/utils.h +++ b/src/utils.h @@ -23,6 +23,20 @@ #define LOG printf #endif + #if defined(_OS_XBOX) || defined(_OS_XB1) + #define MAX_LOG_LENGTH 1024 + + #undef LOG + void LOG(const char *format, ...) { + char str[MAX_LOG_LENGTH]; + va_list arglist; + va_start(arglist, format); + _vsnprintf(str, MAX_LOG_LENGTH, format, arglist); + va_end(arglist); + OutputDebugStringA(str); + } + #endif + #else #define ASSERT(expr) @@ -50,20 +64,6 @@ #define LOG(...) __android_log_print(ANDROID_LOG_INFO,"OpenLara",__VA_ARGS__) #endif -#ifdef _OS_XBOX - #define MAX_LOG_LENGTH 1024 - - #undef LOG - void LOG(const char *format, ...) { - char str[MAX_LOG_LENGTH]; - va_list arglist; - va_start(arglist, format); - _vsnprintf(str, MAX_LOG_LENGTH, format, arglist); - va_end(arglist); - OutputDebugStringA(str); - } -#endif - #ifdef _OS_PSP extern "C" { @@ -1572,6 +1572,8 @@ char contentDir[255]; #define STREAM_BUFFER_SIZE (16 * 1024) +#define MAX_PACKS 32 + struct Stream { typedef void (Callback)(Stream *stream, void *userData); Callback *callback; @@ -1584,12 +1586,144 @@ struct Stream { char *buffer; int bufferIndex; + bool buffering; + uint32 baseOffset; + + struct Pack + { + Stream* stream; + uint8* table; + uint32 count; + + struct FileInfo + { + uint32 size; + uint32 offset; + }; + + bool findFile(const char* name, FileInfo &info) + { + if (!table || !name || !name[0]) { + return false; + } + + uint16 len = (uint16)strlen(name); + uint8* ptr = table; + + for (uint32 i = 0; i < count; i++) + { + uint32 magic; + memcpy(&magic, ptr, sizeof(magic)); + if (magic != 0x02014B50) { + ASSERT(false); + return false; + } + + uint16 nameLen, extraLen, infoLen; + memcpy(&nameLen, ptr + 28, sizeof(nameLen)); + memcpy(&extraLen, ptr + 30, sizeof(extraLen)); + + if ((nameLen == len) && (memcmp(ptr + 46, name, len) == 0)) + { + uint16 compression; + memcpy(&compression, ptr + 10, sizeof(compression)); + + if (compression != 0) + { + ASSERT(false); + return false; + } + + memcpy(&info.size, ptr + 24, sizeof(info.size)); + memcpy(&info.offset, ptr + 42, sizeof(info.offset)); + + stream->setPos(info.offset); + magic = stream->readLE32(); + + if (magic != 0x04034B50) { + ASSERT(false); + return false; + } + stream->seek(22); + nameLen = stream->readLE16(); + extraLen = stream->readLE16(); + + info.offset += 4 + 22 + 2 + 2 + nameLen + extraLen; + + return true; + } + + memcpy(&infoLen, ptr + 32, sizeof(infoLen)); + + ptr += 46 + nameLen + extraLen + infoLen; + } + + return false; + } + + Pack(const char *name) : stream(NULL), table(NULL), count(0) + { + stream = new Stream(name); + stream->buffering = false; + stream->setPos(stream->size - 22); + uint32 magic = stream->readLE32(); + + if (magic != 0x06054B50) + { + ASSERT(false); + return; + } + + stream->seek(6); + count = stream->readLE16(); + uint32 tableSize = stream->readLE32(); + uint32 tableOffset = stream->readLE32(); + + stream->setPos(tableOffset); + + table = new uint8[tableSize]; + stream->raw(table, tableSize); + } + + ~Pack() { + delete stream; + delete[] table; + } + }; + + static Pack* packs[MAX_PACKS]; + + static bool addPack(const char *name) + { + if (!existsContent(name)) { + return false; + } + + for (int i = 0; i < MAX_PACKS; i++) + { + if (!packs[i]) + { + packs[i] = new Pack(name); + return true; + } + } + return false; + } + + static void deinit() + { + for (int i = 0; i < MAX_PACKS; i++) + { + if (!packs[i]) break; + delete packs[i]; + } + } Stream(const char *name, const void *data, int size, Callback *callback = NULL, void *userData = NULL) : callback(callback), userData(userData), f(NULL), data((char*)data), name(NULL), size(size), pos(0), buffer(NULL) { this->name = String::copy(name); } - Stream(const char *name, Callback *callback = NULL, void *userData = NULL) : callback(callback), userData(userData), f(NULL), data(NULL), name(NULL), size(-1), pos(0), buffer(NULL) { + Stream(const char *name, Callback *callback = NULL, void *userData = NULL) : callback(callback), userData(userData), f(NULL), data(NULL), name(NULL), size(-1), pos(0), buffer(NULL), buffering(true), baseOffset(0) { if (!name && callback) { callback(NULL, userData); delete this; @@ -1600,10 +1734,45 @@ struct Stream { ASSERT(false); } + Stream::Pack::FileInfo info; + char path[256]; + + for (int i = 0; i < MAX_PACKS; i++) + { + if (!packs[i]) break; + + if (packs[i]->findFile(name, info)) + { + path[0] = 0; + if (contentDir[0] && (!cacheDir[0] || !strstr(name, cacheDir))) { + strcpy(path, contentDir); + } + strcat(path, packs[i]->stream->name); + fixBackslash(path); + + f = fopen(path, "rb"); + if (!f) { + LOG("error loading file from pack \"%s -> %s\"\n", packs[i]->stream->name, name); + ASSERT(false); + return; + } + baseOffset = info.offset; + fseek(f, info.offset, SEEK_SET); + size = info.size; + + fpos = 0; + bufferIndex = -1; + + this->name = String::copy(name); + if (callback) callback(this, userData); + return; + } + } + path[0] = 0; if (contentDir[0] && (!cacheDir[0] || !strstr(name, cacheDir))) { - strcat(path, contentDir); + strcpy(path, contentDir); } strcat(path, name); fixBackslash(path); @@ -1627,14 +1796,12 @@ struct Stream { fseek(f, 0, SEEK_END); size = (int32)ftell(f); fseek(f, 0, SEEK_SET); - fpos = 0; + fpos = 0; bufferIndex = -1; this->name = String::copy(name); - - if (callback) - callback(this, userData); + if (callback) callback(this, userData); } } @@ -1685,6 +1852,15 @@ struct Stream { } static bool existsContent(const char *name) { + for (uint32 i = 0; i < MAX_PACKS; i++) + { + if (!packs[i]) break; + + Pack::FileInfo info; + if (packs[i]->findFile(name, info)) + return true; + } + char fileName[1024]; strcpy(fileName, contentDir); strcat(fileName, name); @@ -1704,6 +1880,18 @@ struct Stream { if (!count) return; if (f) { + + if (!buffering) { + if (fpos != pos) { + fseek(f, baseOffset + pos, SEEK_SET); + fpos = pos; + } + fread(data, 1, count, f); + pos += count; + fpos += count; + return; + } + uint8 *ptr = (uint8*)data; while (count > 0) { @@ -1712,16 +1900,16 @@ struct Stream { if (bufferIndex != bIndex) { bufferIndex = bIndex; - size_t readed; + int readed; int part; if (fpos == pos) { part = min(count / STREAM_BUFFER_SIZE * STREAM_BUFFER_SIZE, size - fpos); if (part > STREAM_BUFFER_SIZE) { - readed = fread(ptr, 1, part, f); + readed = (int)fread(ptr, 1, part, f); #ifdef TEST_SLOW_FIO - LOG("%s read %d + %d\n", name, fpos, (int)readed); + LOG("%s read %d + %d\n", name, fpos, readed); Sleep(5); #endif @@ -1742,7 +1930,7 @@ struct Stream { if (fpos != bufferIndex * STREAM_BUFFER_SIZE) { fpos = bufferIndex * STREAM_BUFFER_SIZE; - fseek(f, fpos, SEEK_SET); + fseek(f, baseOffset + fpos, SEEK_SET); #ifdef TEST_SLOW_FIO LOG("%s seek %d\n", name, fpos); @@ -1755,7 +1943,7 @@ struct Stream { } part = min(STREAM_BUFFER_SIZE, size - fpos); - readed = fread(buffer, 1, part, f); + readed = (int)fread(buffer, 1, part, f); #ifdef TEST_SLOW_FIO LOG("%s read %d + %d\n", name, fpos, readed); @@ -1829,6 +2017,7 @@ struct Stream { } }; +Stream::Pack* Stream::packs[MAX_PACKS]; #ifdef OS_FILEIO_CACHE void osDataWrite(Stream *stream, const char *dir) { From af08ce9cdca1bd7c6a75900928384caa03a782ce Mon Sep 17 00:00:00 2001 From: Manuel Alfayate Corchete Date: Tue, 3 Nov 2020 16:50:38 +0100 Subject: [PATCH 003/190] SDL2 platform: Rewrite inputUpdate() so joystick/gamecontroller inputs are NOT processed as both joystick AND gamecontroller inputs, since that causes major input problems. (#276) --- src/platform/sdl2/main.cpp | 148 +++++++++++++++++++++++-------------- 1 file changed, 91 insertions(+), 57 deletions(-) diff --git a/src/platform/sdl2/main.cpp b/src/platform/sdl2/main.cpp index f99cbd96..2e34db30 100644 --- a/src/platform/sdl2/main.cpp +++ b/src/platform/sdl2/main.cpp @@ -346,31 +346,33 @@ void inputUpdate() { } } #endif - - break; - } - case SDL_KEYUP: { + break; + } + + case SDL_KEYUP: { int scancode = event.key.keysym.scancode; InputKey key = codeToInputKey(scancode); if (key != ikNone) { Input::setDown(key, 0); } break; - } - // Joystick reading using the modern GameController interface - case SDL_CONTROLLERBUTTONDOWN: { - joyIndex = joyGetIndex(event.cbutton.which); - JoyKey key = controllerCodeToJoyKey(event.cbutton.button); - Input::setJoyDown(joyIndex, key, 1); - break; - } - case SDL_CONTROLLERBUTTONUP: { - joyIndex = joyGetIndex(event.cbutton.which); - JoyKey key = controllerCodeToJoyKey(event.cbutton.button); - Input::setJoyDown(joyIndex, key, 0); - break; - } - case SDL_CONTROLLERAXISMOTION: { + } + + // Joystick reading using the modern SDL GameController interface + case SDL_CONTROLLERBUTTONDOWN: { + joyIndex = joyGetIndex(event.cbutton.which); + JoyKey key = controllerCodeToJoyKey(event.cbutton.button); + Input::setJoyDown(joyIndex, key, 1); + break; + } + case SDL_CONTROLLERBUTTONUP: { + joyIndex = joyGetIndex(event.cbutton.which); + JoyKey key = controllerCodeToJoyKey(event.cbutton.button); + Input::setJoyDown(joyIndex, key, 0); + break; + } + + case SDL_CONTROLLERAXISMOTION: { joyIndex = joyGetIndex(event.caxis.which); switch (event.caxis.axis) { case SDL_CONTROLLER_AXIS_LEFTX: joyL.x = joyAxisValue(event.caxis.value); break; @@ -381,49 +383,81 @@ void inputUpdate() { Input::setJoyPos(joyIndex, jkL, joyDir(joyL)); Input::setJoyPos(joyIndex, jkR, joyDir(joyR)); break; - } - // Joystick reading using the classic Joystick interface - case SDL_JOYBUTTONDOWN: { - joyIndex = joyGetIndex(event.jbutton.which); - JoyKey key = joyCodeToJoyKey(event.jbutton.button); - Input::setJoyDown(joyIndex, key, 1); - break; - } - case SDL_JOYBUTTONUP: { - joyIndex = joyGetIndex(event.jbutton.which); - JoyKey key = joyCodeToJoyKey(event.jbutton.button); - Input::setJoyDown(joyIndex, key, 0); - break; - } - case SDL_JOYAXISMOTION: { - joyIndex = joyGetIndex(event.jaxis.which); - switch (event.jaxis.axis) { - // In the classic joystick interface we know what axis changed by it's number, - // they have no names like on the fancy GameController interface. - case 0: joyL.x = joyAxisValue(event.jaxis.value); break; - case 1: joyL.y = joyAxisValue(event.jaxis.value); break; - case 2: joyR.x = joyAxisValue(event.jaxis.value); break; - case 3: joyR.y = joyAxisValue(event.jaxis.value); break; - } - Input::setJoyPos(joyIndex, jkL, joyDir(joyL)); - Input::setJoyPos(joyIndex, jkR, joyDir(joyR)); - break; - } - // Joystick connection or disconnection - case SDL_JOYDEVICEADDED : { + } + + // GameController connection or disconnection + case SDL_CONTROLLERDEVICEADDED: { // Upon connection, 'which' is the internal SDL2 joystick index, // but on disconnection, 'which' is the instanceID. // We store the joysticks in their corresponding position on the joysticks array, // IE: joystick with index 3 will be in sdl_joysticks[3]. - joyAdd(event.jdevice.which); - break; - } - case SDL_JOYDEVICEREMOVED : { - joyRemove(event.jdevice.which); + joyAdd(event.cdevice.which); break; - } - } - } + } + case SDL_CONTROLLERDEVICEREMOVED: { + joyRemove(event.cdevice.which); + break; + + // Joystick reading using the old SDL Joystick interface + case SDL_JOYBUTTONDOWN: + case SDL_JOYBUTTONUP: + case SDL_JOYAXISMOTION: + case SDL_JOYDEVICEADDED: + case SDL_JOYDEVICEREMOVED: + // Only handle the event if the joystick is incompatible with the SDL_GameController interface. + // (Otherwise it will interfere with the normal action of the SDL_GameController API, because + // the event is both a GameController event AND a Joystick event.) + if (SDL_IsGameController(joyIndex)) { + break; + } + + switch (event.type) { + case SDL_JOYBUTTONDOWN: { + joyIndex = joyGetIndex(event.jbutton.which); + JoyKey key = joyCodeToJoyKey(event.jbutton.button); + Input::setJoyDown(joyIndex, key, 1); + break; + } + case SDL_JOYBUTTONUP: { + joyIndex = joyGetIndex(event.jbutton.which); + JoyKey key = joyCodeToJoyKey(event.jbutton.button); + Input::setJoyDown(joyIndex, key, 0); + break; + } + case SDL_JOYAXISMOTION: { + joyIndex = joyGetIndex(event.jaxis.which); + switch (event.jaxis.axis) + { + // In the classic joystick interface we know what axis changed by it's number, + // they have no names like on the fancy GameController interface. + case 0: joyL.x = joyAxisValue(event.jaxis.value); break; + case 1: joyL.y = joyAxisValue(event.jaxis.value); break; + case 2: joyR.x = joyAxisValue(event.jaxis.value); break; + case 3: joyR.y = joyAxisValue(event.jaxis.value); break; + } + Input::setJoyPos(joyIndex, jkL, joyDir(joyL)); + Input::setJoyPos(joyIndex, jkR, joyDir(joyR)); + break; + } + + // Joystick connection or disconnection + case SDL_JOYDEVICEADDED: { + // Upon connection, 'which' is the internal SDL2 joystick index, + // but on disconnection, 'which' is the instanceID. + // We store the joysticks in their corresponding position on the joysticks array, + // IE: joystick with index 3 will be in sdl_joysticks[3]. + joyAdd(event.jdevice.which); + break; + } + case SDL_JOYDEVICEREMOVED: { + joyRemove(event.jdevice.which); + break; + } + break; + } + } + } + } } int main(int argc, char **argv) { From 9a80717f35694e6fd484246f19ce739157cc129d Mon Sep 17 00:00:00 2001 From: XProger Date: Thu, 5 Nov 2020 06:23:19 +0400 Subject: [PATCH 004/190] XBOX fix inventory background, add MSAA 4x, add title and save icons --- src/gapi/d3d8.h | 4 ++-- src/inventory.h | 18 +++++++++--------- src/level.h | 6 ++++++ src/platform/xbox/OpenLara.vcproj | 9 +++++++++ src/platform/xbox/main.cpp | 3 ++- src/platform/xbox/saveimage.xbx | Bin 0 -> 4096 bytes src/platform/xbox/titleimage.xbx | Bin 10240 -> 10240 bytes 7 files changed, 28 insertions(+), 12 deletions(-) create mode 100644 src/platform/xbox/saveimage.xbx diff --git a/src/gapi/d3d8.h b/src/gapi/d3d8.h index 7f99f91f..b76fc622 100644 --- a/src/gapi/d3d8.h +++ b/src/gapi/d3d8.h @@ -710,8 +710,8 @@ namespace GAPI { } void setVSync(bool enable) { - d3dpp.FullScreen_PresentationInterval = enable ? D3DPRESENT_INTERVAL_ONE : D3DPRESENT_INTERVAL_IMMEDIATE; - GAPI::resetDevice(); + // d3dpp.FullScreen_PresentationInterval = enable ? D3DPRESENT_INTERVAL_ONE : D3DPRESENT_INTERVAL_IMMEDIATE; + // GAPI::resetDevice(); } void waitVBlank() {} diff --git a/src/inventory.h b/src/inventory.h index c9a12f90..aa5043f8 100644 --- a/src/inventory.h +++ b/src/inventory.h @@ -1460,9 +1460,9 @@ struct Inventory { } void prepareBackground() { - #ifdef FFP - return; - #endif + #ifdef FFP + return; + #endif if (Core::settings.detail.stereo == Core::Settings::STEREO_VR) return; @@ -1471,9 +1471,9 @@ struct Inventory { return; #endif - #ifdef _OS_3DS - GAPI::rotate90 = false; - #endif + #ifdef _OS_3DS + GAPI::rotate90 = false; + #endif game->renderGame(false, true); @@ -1494,9 +1494,9 @@ struct Inventory { swap(background[view], background[2]); } - #ifdef _OS_3DS - GAPI::rotate90 = true; - #endif + #ifdef _OS_3DS + GAPI::rotate90 = true; + #endif Core::setDepthTest(true); } diff --git a/src/level.h b/src/level.h index a7c02b4e..e90d7b20 100644 --- a/src/level.h +++ b/src/level.h @@ -3213,6 +3213,12 @@ struct Level : IGame { } } + if (Core::defaultTarget) { + Core::viewportDef = short4(0, 0, Core::defaultTarget->origWidth, Core::defaultTarget->origHeight); + } else { + Core::viewportDef = short4(0, 0, Core::width, Core::height); + } + #ifdef EARLY_CLEAR if (view == 0 && eye <= 0) { Core::setTarget(NULL, NULL, RT_CLEAR_COLOR | RT_CLEAR_DEPTH | RT_STORE_COLOR | RT_STORE_DEPTH); diff --git a/src/platform/xbox/OpenLara.vcproj b/src/platform/xbox/OpenLara.vcproj index 1ab81fd9..b84f7953 100644 --- a/src/platform/xbox/OpenLara.vcproj +++ b/src/platform/xbox/OpenLara.vcproj @@ -59,6 +59,7 @@ TitleID="0x14021968" TitleName="OpenLara" TitleImage="titleimage.xbx" + SaveGameImage="saveimage.xbx" XBEVersion="4096"/> diff --git a/src/platform/xbox/main.cpp b/src/platform/xbox/main.cpp index 2a962415..02e42921 100644 --- a/src/platform/xbox/main.cpp +++ b/src/platform/xbox/main.cpp @@ -263,7 +263,8 @@ HRESULT ContextCreate() { d3dpp.EnableAutoDepthStencil = TRUE; d3dpp.AutoDepthStencilFormat = D3DFMT_D24S8; d3dpp.SwapEffect = D3DSWAPEFFECT_DISCARD; - d3dpp.FullScreen_PresentationInterval = D3DPRESENT_INTERVAL_ONE_OR_IMMEDIATE; + d3dpp.MultiSampleType = D3DMULTISAMPLE_4_SAMPLES_MULTISAMPLE_GAUSSIAN; + d3dpp.FullScreen_PresentationInterval = D3DPRESENT_INTERVAL_ONE; if (FAILED(D3D->CreateDevice(0, D3DDEVTYPE_HAL, NULL, D3DCREATE_HARDWARE_VERTEXPROCESSING, &d3dpp, &device))) return E_FAIL; diff --git a/src/platform/xbox/saveimage.xbx b/src/platform/xbox/saveimage.xbx new file mode 100644 index 0000000000000000000000000000000000000000..7e195e6f2917082e4339ca38ef6fbdc60cdea2dd GIT binary patch literal 4096 zcmeHKKWGzC82>KU$b~kLOXbd93mv2svIMMBII0u} z1(C+7?O@TZW4jr$b*rG31B(m{=PrXY2klck+@+yHZ?u3LN{iFu?x)GfK0-l42W=hv`XAr4dK`) z&fymEAsJf{zAWe^m3W$3;Jc3311Obr9kCm$nnt}K(mFw(8w77~E?u`?`&%6bOo^*A zj|%ZkaO)1|YTk3i0^x@eZ*CScio$&aosQ9t7YpU$iXBl78ou9QeA{-8JqJ^?jSx9-;l}-FUj-`!&gT(so4rCh3oHE2TlgYsZ>O!1P3YlkVNP zY;=M(%7<;$YYRP7%U1M|b#UtqpZlk_e#--=M}#`%3g996x=8lf}EouB8+ z06G=oYH#Q#zmM?g{0IEkZn5?i;Ozs#b1W;uYs1ruLOPMI&S4*i=Thy-sl_i4xwwj#7uR@%Y9p@gUgp#U*spx4(qca# tb4ljE6Bt+dK6YKpK5n0re$V-6wuD%t{9LBI@Og*9P_Vuh<@HbZ{{ashxTXLA literal 0 HcmV?d00001 diff --git a/src/platform/xbox/titleimage.xbx b/src/platform/xbox/titleimage.xbx index 8598f21d288db3a2d1f48ae17596db157bf3d6a7..9115b8d2edcd69f2d4b87964d08eb06936d916e5 100644 GIT binary patch literal 10240 zcmeHLPiP!f9DX}%aMpB7Ko)Z7VOCs74$6uwRLNoX;GqR!3Hx?8Ww&m{QdEL#!XAnQ zhbSJTUZmrpnBYYzY7~U@P-z$}RI$*DObZ@n3l$>%A%cfFRDFKmn@p>lZ2nl=CSm9D zcK+a-LEwEnm$F1+iwS<5PmL| zRO;lFLl8izkH-solnahtC3dz^UuOh-MMO&S0P+j@N84UM3p5U-vUtwSO0gOUj?% zc11Ji%0MYPp)sHo?}%BY-g*LKOCdjM^$PrOckA6=uvoV;taEAYa!cWt0LZ)_xhw=x z@6+cUHR}km6h1#xDtY3-vi_ej^rq&myxVvfzH}RRE@c4kQfLUrQi_Pg{y5INM?Uv~ z<|7E5pUF?rtTlx=c!@kzcRUa61+5qKzA-$IAnv&p;->yivsQu1L#ae!O}*>pAwFlE zI3D9dhAT&I9y;w%u%UzQzvn!#VUZ=-=UMMKi6@1mQ!oR{k%n*J;(O)NAHw^_Gum z-^=9+njd3r-xK3sOjVqQmJQOhWz@Uh@V@1?`{0p2|1pv;E#jpwC)r0mNh%Jj6SGbuHP>| zd~Y?*>D!U7t-J<(9O@6fCHHX~^(o|~?fPx26bJ( z@BRIK&Ke#RgLMjLoX4Cc@&Qp<%JN`a$@`^>=nP|NR zbY@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CuI!k7Nmq*!7666QzFy(9?_AsXLUC2|T8E5;m;D&PQ zhW~LPvrRd~ZAmA~{(C&iT5oFE|9#J8rt^j#Y Date: Thu, 5 Nov 2020 14:03:12 +0400 Subject: [PATCH 005/190] XBOX underwater vertex caustics, cubemaps, fix lighting intensity --- src/character.h | 4 +++ src/core.h | 5 +--- src/enemy.h | 4 ++- src/gapi/d3d8.h | 33 +++++++++------------ src/lara.h | 6 +++- src/level.h | 44 ++++++++++++++++++---------- src/objects.h | 4 ++- src/shaders/ambient_room.asm | 6 ++-- src/shaders/common.asm | 53 ++++++++++++++++++++++++++++++++-- src/shaders/compose_entity.asm | 19 +++++------- src/shaders/compose_flash.asm | 8 +++-- src/shaders/compose_mirror.asm | 39 +++++++++++++------------ src/shaders/compose_room.asm | 10 +++---- src/shaders/compose_sprite.asm | 18 ++++++------ 14 files changed, 157 insertions(+), 96 deletions(-) diff --git a/src/character.h b/src/character.h index 4e0ec19b..f3e954ff 100644 --- a/src/character.h +++ b/src/character.h @@ -308,6 +308,8 @@ struct Character : Controller { } void bakeEnvironment(Texture *&environment) { + Core::beginFrame(); + flags.invisible = true; if (!environment) { uint32 opt = OPT_CUBEMAP | OPT_TARGET; @@ -321,6 +323,8 @@ struct Character : Controller { environment->generateMipMap(); #endif flags.invisible = false; + + Core::endFrame(); } }; diff --git a/src/core.h b/src/core.h index adba0a4b..eb712d27 100644 --- a/src/core.h +++ b/src/core.h @@ -142,6 +142,7 @@ #define _GAPI_D3D8 1 #undef OS_PTHREAD_MT + #undef USE_CUBEMAP_MIPS #define NOMINMAX #include @@ -149,9 +150,6 @@ #elif _X360 #define _OS_X360 1 // TODO -#elif _XB1 - #define _OS_XB1 1 - #define _GAPI_D3D11 1 #endif #ifndef _OS_PSP @@ -553,7 +551,6 @@ struct MeshRange { E( sNormal ) \ E( sReflect ) \ E( sShadow ) \ - E( sEnvironment ) \ E( sMask ) #define SHADER_UNIFORMS(E) \ diff --git a/src/enemy.h b/src/enemy.h index edc9c022..8c61a044 100644 --- a/src/enemy.h +++ b/src/enemy.h @@ -3503,8 +3503,10 @@ struct Winston : Enemy { virtual void render(Frustum *frustum, MeshBuilder *mesh, Shader::Type type, bool caustics) { if (environment && (flags.unused & 4)) { game->setRoomParams(getRoomIndex(), Shader::MIRROR, 1.5f, 2.0f, 2.5f, 1.0f, false); - environment->bind(sEnvironment); + GAPI::Texture *dtex = Core::active.textures[sDiffuse]; + environment->bind(sDiffuse); Controller::render(frustum, mesh, type, caustics); + if (dtex) dtex->bind(sDiffuse); } else { Enemy::render(frustum, mesh, type, caustics); } diff --git a/src/gapi/d3d8.h b/src/gapi/d3d8.h index b76fc622..6295733e 100644 --- a/src/gapi/d3d8.h +++ b/src/gapi/d3d8.h @@ -53,6 +53,7 @@ namespace GAPI { int cullMode, blendMode; uint32 clearColor; + bool isFrontCW; LPDIRECT3DSURFACE8 defRT, defDS; @@ -222,7 +223,6 @@ namespace GAPI { void setConstant(UniformType uType, const float *value, int vectors) { const Binding &b = bindings[uType]; if (b.usage | USAGE_VS) device->SetVertexShaderConstant (b.reg, value, vectors); -// if (b.usage | USAGE_PS) device->SetPixelShaderConstant (b.reg, value, vectors); } void setParam(UniformType uType, const vec4 &value, int count = 1) { @@ -302,21 +302,6 @@ namespace GAPI { if (texCube) texCube->Release(); } - VOID XBUtil_SwizzleTexture2D( D3DLOCKED_RECT* pLock, const D3DSURFACE_DESC* pDesc ) - { - DWORD dwPixelSize = XGBytesPerPixelFromFormat( pDesc->Format ); - DWORD dwTextureSize = pDesc->Width * pDesc->Height * dwPixelSize; - - BYTE* pSrcBits = new BYTE[ dwTextureSize ]; - memcpy( pSrcBits, pLock->pBits, dwTextureSize ); - - XGSwizzleRect( pSrcBits, 0, NULL, pLock->pBits, - pDesc->Width, pDesc->Height, - NULL, dwPixelSize ); - - delete[] pSrcBits; - } - void updateLevel(int32 level, void *data) { int32 bpp; switch (fmt) { @@ -525,6 +510,7 @@ namespace GAPI { void init() { memset(rtCache, 0, sizeof(rtCache)); + isFrontCW = true; D3DADAPTER_IDENTIFIER8 adapterInfo; D3D->GetAdapterIdentifier(D3DADAPTER_DEFAULT, 0, &adapterInfo); @@ -555,11 +541,13 @@ namespace GAPI { defRT = defDS = NULL; - const float factors[] = { + const float factors[] = { + 1.0f, -19.555555555556f, 60.444444444444f, -56.888888888889f, // uCosCoeff + 0.5f, 0.5f/PI, 0.75f, 1.0f/1024.0f, // uAngles 0.0f, 0.5f, 1.0f, 2.0f, 0.6f, 0.9f, 0.9f, 32767.0f }; - device->SetVertexShaderConstant(94, factors, 2); + device->SetVertexShaderConstant(92, factors, 4); device->SetRenderState(D3DRS_FOGTABLEMODE, D3DFOG_EXP); } @@ -775,12 +763,17 @@ namespace GAPI { void setCullMode(int rsMask) { cullMode = rsMask; switch (rsMask) { - case RS_CULL_BACK : device->SetRenderState(D3DRS_CULLMODE, D3DCULL_CW); break; - case RS_CULL_FRONT : device->SetRenderState(D3DRS_CULLMODE, D3DCULL_CCW); break; + case RS_CULL_BACK : device->SetRenderState(D3DRS_CULLMODE, isFrontCW ? D3DCULL_CW : D3DCULL_CCW); break; + case RS_CULL_FRONT : device->SetRenderState(D3DRS_CULLMODE, isFrontCW ? D3DCULL_CCW : D3DCULL_CW); break; default : device->SetRenderState(D3DRS_CULLMODE, D3DCULL_NONE); } } + void setFrontFace(bool cw) { + isFrontCW = cw; + setCullMode(cullMode); + } + void setBlendMode(int rsMask) { blendMode = rsMask; switch (rsMask) { diff --git a/src/lara.h b/src/lara.h index d54f9a68..1c0859c8 100644 --- a/src/lara.h +++ b/src/lara.h @@ -3865,10 +3865,14 @@ struct Lara : Character { game->setRoomParams(getRoomIndex(), Shader::MIRROR, 0.3f, 0.3f, 0.3f, 1.0f, false); Core::updateLights(); */ - environment->bind(sEnvironment); + GAPI::Texture *dtex = Core::active.textures[sDiffuse]; + + environment->bind(sDiffuse); visibleMask ^= 0xFFFFFFFF; Controller::render(frustum, mesh, type, caustics); visibleMask ^= 0xFFFFFFFF; + + if (dtex) dtex->bind(sDiffuse); } } }; diff --git a/src/level.h b/src/level.h index e90d7b20..8db8b093 100644 --- a/src/level.h +++ b/src/level.h @@ -396,7 +396,7 @@ struct Level : IGame { Stream::cacheWrite("settings", (char*)&settings, sizeof(settings)); if (rebuildShaders) { - #if !defined(_GAPI_D3D9) && !defined(_GAPI_D3D11) && !defined(_GAPI_GXM) + #if !defined(_GAPI_D3D8) && !defined(_GAPI_D3D9) && !defined(_GAPI_D3D11) && !defined(_GAPI_GXM) delete shaderCache; shaderCache = new ShaderCache(); #endif @@ -595,11 +595,10 @@ struct Level : IGame { } virtual void setupBinding() { - atlasRooms->bind(sDiffuse); Core::whiteTex->bind(sNormal); Core::whiteTex->bind(sMask); Core::whiteTex->bind(sReflect); - Core::whiteCube->bind(sEnvironment); + atlasRooms->bind(sDiffuse); if (Core::pass != Core::passShadow) { Texture *shadowMap = shadow[player ? player->camera->cameraIndex : 0]; @@ -610,18 +609,18 @@ struct Level : IGame { } virtual void renderEnvironment(int roomIndex, const vec3 &pos, Texture **targets, int stride = 0, Core::Pass pass = Core::passAmbient) { - #ifdef FFP - return; - #endif + #ifdef FFP + return; + #endif - #ifdef _GAPI_SW - return; - #endif + #ifdef _GAPI_SW + return; + #endif - #ifdef _OS_3DS - return; // TODO render to cubemap face - GAPI::rotate90 = false; - #endif + #ifdef _OS_3DS + return; // TODO render to cubemap face + GAPI::rotate90 = false; + #endif PROFILE_MARKER("ENVIRONMENT"); setupBinding(); @@ -632,6 +631,10 @@ struct Level : IGame { int16 rIndex = roomIndex; level.getSector(rIndex, pos); // fix room index for overlapped blocks + #ifdef _GAPI_D3D8 + GAPI::setFrontFace(false); + #endif + // render level into cube faces or texture images for (int i = 0; i < 6; i++) { setupCubeCamera(pos, i); @@ -644,9 +647,13 @@ struct Level : IGame { renderView(rIndex, false, false); } - #ifdef _OS_3DS - GAPI::rotate90 = true; - #endif + #ifdef _GAPI_D3D8 + GAPI::setFrontFace(true); + #endif + + #ifdef _OS_3DS + GAPI::rotate90 = true; + #endif Core::pass = tmpPass; Core::eye = tmpEye; @@ -2687,6 +2694,11 @@ struct Level : IGame { Core::mViewInv = mat4(pos, pos + dir, up); Core::mView = Core::mViewInv.inverseOrtho(); Core::mProj = GAPI::perspective(90, 1.0f, 32.0f, 45.0f * 1024.0f, 0.0f); + + #ifdef _GAPI_D3D8 + Core::mProj.scale(vec3(1.0f, -1.0f, 1.0f)); + #endif + Core::mViewProj = Core::mProj * Core::mView; Core::viewPos = Core::mViewInv.offset().xyz(); diff --git a/src/objects.h b/src/objects.h index 1af31c6b..7e5dfc3c 100644 --- a/src/objects.h +++ b/src/objects.h @@ -896,8 +896,10 @@ struct Crystal : Controller { virtual void render(Frustum *frustum, MeshBuilder *mesh, Shader::Type type, bool caustics) { Core::setMaterial(0.5, 0.5, 3.0, 1.0f); - environment->bind(sEnvironment); + GAPI::Texture *dtex = Core::active.textures[sDiffuse]; + environment->bind(sDiffuse); Controller::render(frustum, mesh, type, caustics); + if (dtex) dtex->bind(sDiffuse); } }; diff --git a/src/shaders/ambient_room.asm b/src/shaders/ambient_room.asm index a3aef769..98eb8af0 100644 --- a/src/shaders/ambient_room.asm +++ b/src/shaders/ambient_room.asm @@ -54,13 +54,13 @@ mul light, light, att ; vColor = (aLight + light[1..3] * uLightColor[1..3]) * aColor * 2 - mov pos, aColor + mov att, aColor mov tmp, aLight mad tmp.xyz, light.y, c[uLightColor + 1], tmp mad tmp.xyz, light.z, c[uLightColor + 2], tmp mad tmp.xyz, light.w, c[uLightColor + 3], tmp - mul tmp, pos, tmp - applyUnderwater(tmp) + mul att, att, tmp + applyUnderwater(tmp, pos) add vColor, tmp, tmp ; vTecCoord = (aTexCoord.xyz, 1) diff --git a/src/shaders/common.asm b/src/shaders/common.asm index 3c2f30cc..00b25644 100644 --- a/src/shaders/common.asm +++ b/src/shaders/common.asm @@ -31,7 +31,8 @@ #define uLightPos 83 #define uLightColor 87 #define uRoomSize 91 -#define uPosScale 92 +#define uCosCoeff 92 +#define uAngles 93 #define ZERO c94.xxxx #define HALF c94.yyyy @@ -39,6 +40,8 @@ #define TWO c94.wwww #define UW_COLOR c95.xyz #define MAX_SHORT c95.wwww +#define WAVE_SIZE c[uAngles].wwww ; 1 / 1024 +#define WAVE_LUM c[uAngles].zzzz ; 0.75 #define tmp r8 @@ -48,6 +51,15 @@ mad tmp, src.z, c[matrix + 2], tmp \ mad dst, src.w, c[matrix + 3], tmp +#define mulQuat(dst, src, joint) \ + mul dst.xyz, c[uBasis + joint], src.zxyw \ + mad dst.xyz, src, c[uBasis + joint].zxyw, -dst \ + mad dst.xyz, src.yzxw, c[uBasis + joint].w, dst \ + mul tmp.xyz, c[uBasis + joint].zxyw, dst \ + mad dst.xyz, dst.yzxw, c[uBasis + joint].yzxw, -tmp \ + mad dst.xyz, dst, TWO, src \ + mov dst.w, ONE + #define mulQuatPos(dst, src, joint) \ mul dst.xyz, c[uBasis + joint], src.zxyw \ mad dst.xyz, src, c[uBasis + joint].zxyw, -dst \ @@ -58,6 +70,16 @@ add dst.xyz, c[uBasis + joint + 1], dst \ mov dst.w, c[uBasis + joint + 1].w +#define reflect(dst, a, b) \ + dp3 tmp.x, a, b \ + add tmp.x, tmp.x, tmp.x \ + mad dst, -tmp.xxxx, b, a + +#define normalize(v) \ + dp3 tmp.x, v, v \ + rsq tmp.x, tmp.x \ + mul v, v, tmp.xxxx + #define applyFog(dst, src) \ add tmp.xyz, c[uViewPos].xyz, -src.xyz \ mul tmp.xyz, tmp.xyz, c[uFogParams].www \ @@ -65,9 +87,34 @@ rsq tmp.x, tmp.x \ rcp dst.x, tmp.x +#define encodeColor(v) \ + mul vColor, v, HALF + +#define applyColor(dst, src) \ + mul dst, src, vColor \ + add dst, dst, dst \ + add dst, dst, dst + +#define cos(dst, ang) \ + mad dst.x, ang, c[uAngles].y, c[uAngles].x \ + expp dst.yw, dst.xxxx \ + add dst.x, dst.y, -c[uAngles].x \ + mul dst, dst.wwxx, dst.wxxx \ + mul dst.w, dst.w, dst.y \ + mul dst, dst, dst \ + dp4 dst.x, dst, c[uCosCoeff] + #ifdef UNDERWATER - #define applyUnderwater(dst) \ + #define applyUnderwater(dst, pos) \ + dp3 tmp.x, pos, WAVE_SIZE \ + add tmp.x, tmp.x, c[uParam].x \ + cos(tmp, tmp.x) \ + max tmp.x, tmp.x, -tmp.x \ + mul tmp.x, tmp.x, WAVE_LUM \ + add tmp.x, tmp.x, HALF \ + mul dst.xyz, dst.xyz, tmp.xxx \ mul dst.xyz, dst.xyz, UW_COLOR + #else - #define applyUnderwater(dst) + #define applyUnderwater(dst, pos) #endif diff --git a/src/shaders/compose_entity.asm b/src/shaders/compose_entity.asm index fc3bc22d..f9a98e9a 100644 --- a/src/shaders/compose_entity.asm +++ b/src/shaders/compose_entity.asm @@ -54,12 +54,7 @@ mul att, tmp, att ; normal = mulQuat(uBasis[joint], aNormal) - mul pos.xyz, c[uBasis + a0.x], aNormal.zxyw - mad pos.xyz, aNormal, c[uBasis + a0.x].zxyw, -pos - mad pos.xyz, aNormal.yzxw, c[uBasis + a0.x].w, pos - mul tmp.xyz, c[uBasis + a0.x].zxyw, pos - mad pos.xyz, pos.yzxw, c[uBasis + a0.x].yzxw, -tmp - mad normal, pos, TWO, aNormal + mulQuat(normal, aNormal, a0.x) ; light = max(0, dot(normal, lv[0..3])) dp3 light.x, lv0, normal @@ -72,22 +67,22 @@ mul light, light, att ; vColor = aColor * material.alpha * (material.ambient + light[0..3] * uLightColor[0..3]) * 2 - mov pos, aColor - mul pos, MAT_ALPHA, pos + mov att, aColor + mul att, MAT_ALPHA, att mov tmp.xyz, MAT_AMBIENT mov tmp.w, ONE mad tmp.xyz, light.x, c[uLightColor + 0], tmp mad tmp.xyz, light.y, c[uLightColor + 1], tmp mad tmp.xyz, light.z, c[uLightColor + 2], tmp mad tmp.xyz, light.w, c[uLightColor + 3], tmp - mul tmp, pos, tmp - applyUnderwater(tmp) - add vColor, tmp, tmp + mul att, att, tmp + applyUnderwater(att, pos) + encodeColor(att) ; vTecCoord = (aTexCoord.xyz, 1) mov vTexCoord, aTexCoord mov vTexCoord.w, ONE #else tex t0 - mul r0, t0, vColor + applyColor(r0, t0) #endif diff --git a/src/shaders/compose_flash.asm b/src/shaders/compose_flash.asm index d6e0ca21..b3181507 100644 --- a/src/shaders/compose_flash.asm +++ b/src/shaders/compose_flash.asm @@ -25,13 +25,15 @@ ; vColor = (material.diffuse * aColor.xyz * 2.0 + material.emissive, 1.0) mul tmp, MAT_DIFFUSE, aColor add tmp, tmp, tmp - add vColor, tmp, MAT_EMISSIVE - mov vColor.w, MAT_EMISSIVE + add tmp, tmp, MAT_EMISSIVE + mov tmp.w, MAT_EMISSIVE + mul tmp, tmp, HALF + encodeColor(tmp) ; vTecCoord = (aTexCoord.xyz, 1) mov vTexCoord, aTexCoord mov vTexCoord.w, ONE #else tex t0 - mul r0, t0, vColor + applyColor(r0, t0) #endif \ No newline at end of file diff --git a/src/shaders/compose_mirror.asm b/src/shaders/compose_mirror.asm index fdd44593..942a3294 100644 --- a/src/shaders/compose_mirror.asm +++ b/src/shaders/compose_mirror.asm @@ -2,14 +2,14 @@ #ifdef VERTEX ; variables - #define lv0 r0 - #define lv1 r1 - #define lv2 r2 - #define lv3 r3 - #define normal r4 - #define att r5 - #define light r6 - #define pos r7 + #define lv0 r0 + #define lv1 r1 + #define lv2 r2 + #define lv3 r3 + #define normal r4 + #define tmp2 r5 + #define viewVec r6 + #define pos r7 ; joint = int(aCoord.w) mov a0.x, aCoord.w @@ -23,18 +23,21 @@ ; vPosition = uViewProj * pos mulMat(vPosition, pos, uViewProj) -; vColor = uMaterial - mov vColor, ONE ; TODO +; viewVec = normalize(pos - uViewPos) + sub viewVec, pos, c[uViewPos] + normalize(viewVec) ; normal = mulQuat(uBasis, aNormal) - mov normal, aNormal - mul pos.xyz, c[uBasis + 0 + a0.x], normal.zxyw - mad pos.xyz, normal, c[uBasis + 0 + a0.x].zxyw, -pos - mad pos.xyz, normal.yzxw, c[uBasis + 0 + a0.x].w, pos - mul tmp.xyz, c[uBasis + 0 + a0.x].zxyw, pos - mad pos.xyz, pos.yzxw, c[uBasis + 0 + a0.x].yzxw, -tmp - mad vTexCoord, pos, TWO, normal + mulQuat(normal, aNormal, a0.x) + +; vTexCoord = reflect(viewVec, normal) + reflect(vTexCoord, viewVec, normal) + +; vColor = uMaterial + mov tmp, c[uMaterial] + mul tmp, tmp, HALF + encodeColor(tmp) #else tex t0 - mul r0, t0, vColor + applyColor(r0, t0) #endif \ No newline at end of file diff --git a/src/shaders/compose_room.asm b/src/shaders/compose_room.asm index a3aef769..557f4897 100644 --- a/src/shaders/compose_room.asm +++ b/src/shaders/compose_room.asm @@ -54,19 +54,19 @@ mul light, light, att ; vColor = (aLight + light[1..3] * uLightColor[1..3]) * aColor * 2 - mov pos, aColor + mov att, aColor mov tmp, aLight mad tmp.xyz, light.y, c[uLightColor + 1], tmp mad tmp.xyz, light.z, c[uLightColor + 2], tmp mad tmp.xyz, light.w, c[uLightColor + 3], tmp - mul tmp, pos, tmp - applyUnderwater(tmp) - add vColor, tmp, tmp + mul att, att, tmp + applyUnderwater(att, pos) + encodeColor(att) ; vTecCoord = (aTexCoord.xyz, 1) mov vTexCoord, aTexCoord mov vTexCoord.w, ONE #else tex t0 - mul r0, t0, vColor + applyColor(r0, t0) #endif \ No newline at end of file diff --git a/src/shaders/compose_sprite.asm b/src/shaders/compose_sprite.asm index 7e3c8efb..8d7e789e 100644 --- a/src/shaders/compose_sprite.asm +++ b/src/shaders/compose_sprite.asm @@ -76,19 +76,19 @@ mul light, light, att ; vColor = vec4(aLight.rgb * aLight.a, aLight.a) * 2 - mov tmp, aLight - mad tmp.xyz, light.x, c[uLightColor + 0], tmp - mad tmp.xyz, light.y, c[uLightColor + 1], tmp - mad tmp.xyz, light.z, c[uLightColor + 2], tmp - mad tmp.xyz, light.w, c[uLightColor + 3], tmp - mul tmp.xyz, tmp, tmp.w - applyUnderwater(tmp) - add vColor, tmp, tmp + mov att, aLight + mad att.xyz, light.x, c[uLightColor + 0], att + mad att.xyz, light.y, c[uLightColor + 1], att + mad att.xyz, light.z, c[uLightColor + 2], att + mad att.xyz, light.w, c[uLightColor + 3], att + mul att.xyz, att, att.w + applyUnderwater(att, pos) + encodeColor(att) ; vTecCoord = (aTexCoord.xyz, 1) mov vTexCoord, aTexCoord mov vTexCoord.w, ONE #else tex t0 - mul r0, t0, vColor + applyColor(r0, t0) #endif \ No newline at end of file From 1f6c3a771ec811be9363d887ec643dddba9b7696 Mon Sep 17 00:00:00 2001 From: Timur Gagiev Date: Fri, 6 Nov 2020 05:06:31 +0300 Subject: [PATCH 006/190] remove sEnvironment sampler from shaders --- src/shaders/common.hlsl | 41 ++++++++++++++++++++++----------- src/shaders/compose.glsl | 8 +++---- src/shaders/compose_mirror.hlsl | 3 ++- src/shaders/filter.glsl | 4 ++-- src/shaders/sky.hlsl | 2 +- src/shaders/water_rays.hlsl | 8 +++---- 6 files changed, 40 insertions(+), 26 deletions(-) diff --git a/src/shaders/common.hlsl b/src/shaders/common.hlsl index 9c5edd91..5e3db855 100644 --- a/src/shaders/common.hlsl +++ b/src/shaders/common.hlsl @@ -44,16 +44,21 @@ struct VS_INPUT { SamplerState smpLinearWrap : register(s4); SamplerComparisonState smpCmp : register(s5); - Texture2D sDiffuse : register(t0); -#ifdef NORMAL_AS_3D - Texture3D sNormal : register(t1); -#else - Texture2D sNormal : register(t1); -#endif + #ifdef DIFFUSE_AS_CUBE + TextureCube sDiffuse : register(t0); + #else + Texture2D sDiffuse : register(t0); + #endif + + #ifdef NORMAL_AS_3D + Texture3D sNormal : register(t1); + #else + Texture2D sNormal : register(t1); + #endif + Texture2D sReflect : register(t2); Texture2D sShadow : register(t3); - TextureCube sEnvironment : register(t4); - Texture2D sMask : register(t5); + Texture2D sMask : register(t4); #define SAMPLE_2D(T,uv) T.Sample(smpDefault, uv) #define SAMPLE_2D_POINT(T,uv) T.Sample(smpPoint, uv) @@ -64,14 +69,20 @@ struct VS_INPUT { #define SAMPLE_2D_LOD0(T,uv) T.SampleLevel(smpLinear, uv, 0) #define SAMPLE_3D(T,uv) T.SampleLevel(smpLinearWrap, uv, 0) #define SAMPLE_CUBE(T,uv) T.Sample(smpLinear, uv) + + #define POSITION SV_POSITION #else - sampler2D sDiffuse : register(s0); + #ifdef DIFFUSE_AS_CUBE + samplerCUBE sDiffuse : register(s0); + #else + sampler2D sDiffuse : register(s0); + #endif + sampler2D sNormal : register(s1); sampler2D sReflect : register(s2); sampler2D sShadow : register(s3); - samplerCUBE sEnvironment : register(s4); - sampler2D sMask : register(s5); - + sampler2D sMask : register(s4); + #define SAMPLE_2D(T,uv) tex2D(T, uv) #define SAMPLE_2D_POINT(T,uv) tex2D(T, uv) #define SAMPLE_2D_POINT_WRAP(T,uv) tex2D(T, uv) @@ -81,8 +92,10 @@ struct VS_INPUT { #define SAMPLE_2D_CMP(T,uv) ((tex2D(T, uv.xy) => uv.z) ? 1 : 0) #define SAMPLE_3D(T,uv) tex3D(T, uv) #define SAMPLE_CUBE(T,uv) texCUBE(T, uv) - - #define SV_POSITION POSITION + + #ifdef PIXEL + #define POSITION VPOS + #endif #endif float4 uParam : register( c0 ); diff --git a/src/shaders/compose.glsl b/src/shaders/compose.glsl index 51232502..16264ff2 100644 --- a/src/shaders/compose.glsl +++ b/src/shaders/compose.glsl @@ -247,10 +247,10 @@ varying vec4 vTexCoord; // xy - atlas coords, zw - trapezoidal correction #else - uniform sampler2D sDiffuse; - #ifdef TYPE_MIRROR - uniform samplerCube sEnvironment; + uniform samplerCube sDiffuse; + #else + uniform sampler2D sDiffuse; #endif float unpack(vec4 value) { @@ -356,7 +356,7 @@ varying vec4 vTexCoord; // xy - atlas coords, zw - trapezoidal correction vec4 color; #ifdef TYPE_MIRROR vec3 rv = reflect(-normalize(vViewVec.xyz), normalize(vNormal.xyz)); - color = textureCube(sEnvironment, normalize(rv)); + color = textureCube(sDiffuse, normalize(rv)); #else #ifndef TYPE_SPRITE #ifdef OPT_TRAPEZOID diff --git a/src/shaders/compose_mirror.hlsl b/src/shaders/compose_mirror.hlsl index 2a84b12d..df1a4877 100644 --- a/src/shaders/compose_mirror.hlsl +++ b/src/shaders/compose_mirror.hlsl @@ -1,3 +1,4 @@ +#define DIFFUSE_AS_CUBE #include "common.hlsl" struct VS_OUTPUT { @@ -31,7 +32,7 @@ VS_OUTPUT main(VS_INPUT In) { float4 main(VS_OUTPUT In) : COLOR0 { float3 rv = reflect(-In.viewVec.xyz, In.normal.xyz); - float4 color = SAMPLE_CUBE(sEnvironment, normalize(rv)); + float4 color = SAMPLE_CUBE(sDiffuse, normalize(rv)); color *= uMaterial; color.xyz = saturate(color.xyz); diff --git a/src/shaders/filter.glsl b/src/shaders/filter.glsl index 925e45b3..b8f8bd23 100644 --- a/src/shaders/filter.glsl +++ b/src/shaders/filter.glsl @@ -71,14 +71,14 @@ uniform mat4 uViewProj; #endif #ifdef FILTER_EQUIRECTANGULAR - uniform samplerCube sEnvironment; + uniform samplerCube sDiffuse; #define PI 3.14159265358979323846 vec4 equirectangular() { vec2 a = (vTexCoord - 0.5) * vec2(PI * 2.0, PI); vec3 v = vec3(sin(a.x) * cos(a.y), -sin(a.y), cos(a.x) * cos(a.y)); - return textureCube(sEnvironment, normalize(v)); + return textureCube(sDiffuse, normalize(v)); } #endif diff --git a/src/shaders/sky.hlsl b/src/shaders/sky.hlsl index 2b051395..801ecec1 100644 --- a/src/shaders/sky.hlsl +++ b/src/shaders/sky.hlsl @@ -3,7 +3,7 @@ #include "common.hlsl" struct VS_OUTPUT { - float4 pos : SV_POSITION; + float4 pos : POSITION; half4 color : TEXCOORD0; half2 texCoord : TEXCOORD1; float3 coord : TEXCOORD2; diff --git a/src/shaders/water_rays.hlsl b/src/shaders/water_rays.hlsl index ff776b59..3020c1b2 100644 --- a/src/shaders/water_rays.hlsl +++ b/src/shaders/water_rays.hlsl @@ -29,13 +29,13 @@ float boxIntersect(float3 rayPos, float3 rayDir, float3 center, float3 hsize) { float3 m = min(bMin, bMax); return max(0.0, max(m.x, max(m.y, m.z))); } - -#ifdef _GAPI_GXM + +#if defined(_GAPI_GXM) float4 main(VS_OUTPUT In) : COLOR0 { float2 pixelCoord = float2(__pixel_x(), __pixel_y()); -#else defined(_GAPI_D3D11 +#else float4 main(VS_OUTPUT In) : COLOR0 { - float2 pixelCoord = In.pos.xy; + float2 pixelCoord = In.pos.xy; #endif float3 viewVec = normalize(In.viewVec); From 0cd27e7d5addbf97781e141875eb8d738ce6fb35 Mon Sep 17 00:00:00 2001 From: XProger Date: Fri, 6 Nov 2020 12:41:34 +0400 Subject: [PATCH 007/190] XBOX fix 1080i video mode support fix #277 --- src/platform/xbox/main.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/platform/xbox/main.cpp b/src/platform/xbox/main.cpp index 02e42921..2fcf1397 100644 --- a/src/platform/xbox/main.cpp +++ b/src/platform/xbox/main.cpp @@ -263,9 +263,16 @@ HRESULT ContextCreate() { d3dpp.EnableAutoDepthStencil = TRUE; d3dpp.AutoDepthStencilFormat = D3DFMT_D24S8; d3dpp.SwapEffect = D3DSWAPEFFECT_DISCARD; - d3dpp.MultiSampleType = D3DMULTISAMPLE_4_SAMPLES_MULTISAMPLE_GAUSSIAN; d3dpp.FullScreen_PresentationInterval = D3DPRESENT_INTERVAL_ONE; + if (d3dpp.BackBufferHeight == 480) { + d3dpp.MultiSampleType = D3DMULTISAMPLE_4_SAMPLES_MULTISAMPLE_GAUSSIAN; + } else if (d3dpp.BackBufferHeight == 720) { + d3dpp.MultiSampleType = D3DMULTISAMPLE_2_SAMPLES_MULTISAMPLE_QUINCUNX; + } else if (d3dpp.BackBufferHeight == 1080) { + d3dpp.MultiSampleType = D3DMULTISAMPLE_NONE; + } + if (FAILED(D3D->CreateDevice(0, D3DDEVTYPE_HAL, NULL, D3DCREATE_HARDWARE_VERTEXPROCESSING, &d3dpp, &device))) return E_FAIL; From 8a5cc60873715be6db2e2449304d018bf7c90194 Mon Sep 17 00:00:00 2001 From: Timur Gagiev Date: Sat, 7 Nov 2020 05:47:48 +0300 Subject: [PATCH 008/190] 3DS fix build --- src/gapi/c3d.h | 13 ++----------- src/platform/3ds/compose_entity.v.pica | 2 +- src/platform/3ds/compose_room.v.pica | 2 +- src/platform/3ds/compose_sprite.v.pica | 2 +- src/platform/3ds/deploy.bat | 2 +- src/platform/3ds/filter_upscale.v.pica | 2 +- src/platform/3ds/gui.v.pica | 2 +- 7 files changed, 8 insertions(+), 17 deletions(-) diff --git a/src/gapi/c3d.h b/src/gapi/c3d.h index 809ec1bd..96b99e93 100644 --- a/src/gapi/c3d.h +++ b/src/gapi/c3d.h @@ -184,13 +184,8 @@ namespace GAPI { C3D_TexEnv *e = env; - GPU_TEVSRC texSrc = GPU_TEXTURE1; - if (src == compose_mirror) { - texSrc = GPU_TEXTURE0; - } - { // texture * vertex color - C3D_TexEnvSrc(e, C3D_Both, texSrc, GPU_PRIMARY_COLOR, GPU_PRIMARY_COLOR); + C3D_TexEnvSrc(e, C3D_Both, GPU_TEXTURE0, GPU_PRIMARY_COLOR, GPU_PRIMARY_COLOR); C3D_TexEnvFunc(e, C3D_Both, GPU_MODULATE); if (pass == Core::passCompose) { C3D_TexEnvScale(e, C3D_RGB, GPU_TEVSCALE_2); @@ -557,11 +552,7 @@ namespace GAPI { void bind(int sampler) { if (opt & OPT_PROXY) return; - if (sampler == sEnvironment) { - sampler = 0; // PICA200 can fetch cubemap only from tex unit 0 - } else if (sampler == sDiffuse) { - sampler = 1; - } else { + if (sampler > 3) { return; } diff --git a/src/platform/3ds/compose_entity.v.pica b/src/platform/3ds/compose_entity.v.pica index 5fd51bfb..6809033b 100644 --- a/src/platform/3ds/compose_entity.v.pica +++ b/src/platform/3ds/compose_entity.v.pica @@ -41,7 +41,7 @@ ; out .out vPosition position -.out vTexCoord texcoord1 +.out vTexCoord texcoord0 .out vColor color .proc main diff --git a/src/platform/3ds/compose_room.v.pica b/src/platform/3ds/compose_room.v.pica index 65b2c8b3..e2704816 100644 --- a/src/platform/3ds/compose_room.v.pica +++ b/src/platform/3ds/compose_room.v.pica @@ -36,7 +36,7 @@ ; out .out vPosition position -.out vTexCoord texcoord1 +.out vTexCoord texcoord0 .out vColor color .proc main diff --git a/src/platform/3ds/compose_sprite.v.pica b/src/platform/3ds/compose_sprite.v.pica index a7962d20..7e803e60 100644 --- a/src/platform/3ds/compose_sprite.v.pica +++ b/src/platform/3ds/compose_sprite.v.pica @@ -43,7 +43,7 @@ ; out .out vPosition position -.out vTexCoord texcoord1 +.out vTexCoord texcoord0 .out vColor color .proc main diff --git a/src/platform/3ds/deploy.bat b/src/platform/3ds/deploy.bat index a64a83ee..38c128a5 100644 --- a/src/platform/3ds/deploy.bat +++ b/src/platform/3ds/deploy.bat @@ -1 +1 @@ -C:\devkitPro\tools\bin\3dslink.exe OpenLara.3dsx -a 192.168.1.68 \ No newline at end of file +C:\devkitPro\tools\bin\3dslink.exe OpenLara.3dsx -a 192.168.1.63 \ No newline at end of file diff --git a/src/platform/3ds/filter_upscale.v.pica b/src/platform/3ds/filter_upscale.v.pica index 5a09ad39..d4b72307 100644 --- a/src/platform/3ds/filter_upscale.v.pica +++ b/src/platform/3ds/filter_upscale.v.pica @@ -11,7 +11,7 @@ ; out .out vPosition position -.out vTexCoord texcoord1 +.out vTexCoord texcoord0 .out vColor color .proc main diff --git a/src/platform/3ds/gui.v.pica b/src/platform/3ds/gui.v.pica index 4656a473..08c1471c 100644 --- a/src/platform/3ds/gui.v.pica +++ b/src/platform/3ds/gui.v.pica @@ -12,7 +12,7 @@ ; out .out vPosition position -.out vTexCoord texcoord1 +.out vTexCoord texcoord0 .out vColor color .proc main From f2622864e8a24b31df2a59935b6c9eb18cc00eed Mon Sep 17 00:00:00 2001 From: Timur Gagiev Date: Sat, 7 Nov 2020 06:05:38 +0300 Subject: [PATCH 009/190] 3DS move pica files to shaders directory --- src/platform/3ds/Makefile | 2 +- src/{platform/3ds => shaders/pica}/compose_entity.v.pica | 0 src/{platform/3ds => shaders/pica}/compose_flash.v.pica | 0 src/{platform/3ds => shaders/pica}/compose_mirror.v.pica | 0 src/{platform/3ds => shaders/pica}/compose_room.v.pica | 0 src/{platform/3ds => shaders/pica}/compose_sprite.v.pica | 0 src/{platform/3ds => shaders/pica}/dummy.v.pica | 0 src/{platform/3ds => shaders/pica}/filter_upscale.v.pica | 0 src/{platform/3ds => shaders/pica}/gui.v.pica | 0 src/{platform/3ds => shaders/pica}/shadow_entity.v.pica | 0 10 files changed, 1 insertion(+), 1 deletion(-) rename src/{platform/3ds => shaders/pica}/compose_entity.v.pica (100%) rename src/{platform/3ds => shaders/pica}/compose_flash.v.pica (100%) rename src/{platform/3ds => shaders/pica}/compose_mirror.v.pica (100%) rename src/{platform/3ds => shaders/pica}/compose_room.v.pica (100%) rename src/{platform/3ds => shaders/pica}/compose_sprite.v.pica (100%) rename src/{platform/3ds => shaders/pica}/dummy.v.pica (100%) rename src/{platform/3ds => shaders/pica}/filter_upscale.v.pica (100%) rename src/{platform/3ds => shaders/pica}/gui.v.pica (100%) rename src/{platform/3ds => shaders/pica}/shadow_entity.v.pica (100%) diff --git a/src/platform/3ds/Makefile b/src/platform/3ds/Makefile index 33fa3352..7eb7a4a3 100644 --- a/src/platform/3ds/Makefile +++ b/src/platform/3ds/Makefile @@ -33,7 +33,7 @@ include $(DEVKITARM)/3ds_rules #--------------------------------------------------------------------------------- TARGET := OpenLara BUILD := build -SOURCES := . ../../libs/stb_vorbis ../../libs/tinf +SOURCES := . ../../libs/stb_vorbis ../../libs/tinf ../../shaders/pica DATA := data INCLUDES := ../.. GRAPHICS := gfx diff --git a/src/platform/3ds/compose_entity.v.pica b/src/shaders/pica/compose_entity.v.pica similarity index 100% rename from src/platform/3ds/compose_entity.v.pica rename to src/shaders/pica/compose_entity.v.pica diff --git a/src/platform/3ds/compose_flash.v.pica b/src/shaders/pica/compose_flash.v.pica similarity index 100% rename from src/platform/3ds/compose_flash.v.pica rename to src/shaders/pica/compose_flash.v.pica diff --git a/src/platform/3ds/compose_mirror.v.pica b/src/shaders/pica/compose_mirror.v.pica similarity index 100% rename from src/platform/3ds/compose_mirror.v.pica rename to src/shaders/pica/compose_mirror.v.pica diff --git a/src/platform/3ds/compose_room.v.pica b/src/shaders/pica/compose_room.v.pica similarity index 100% rename from src/platform/3ds/compose_room.v.pica rename to src/shaders/pica/compose_room.v.pica diff --git a/src/platform/3ds/compose_sprite.v.pica b/src/shaders/pica/compose_sprite.v.pica similarity index 100% rename from src/platform/3ds/compose_sprite.v.pica rename to src/shaders/pica/compose_sprite.v.pica diff --git a/src/platform/3ds/dummy.v.pica b/src/shaders/pica/dummy.v.pica similarity index 100% rename from src/platform/3ds/dummy.v.pica rename to src/shaders/pica/dummy.v.pica diff --git a/src/platform/3ds/filter_upscale.v.pica b/src/shaders/pica/filter_upscale.v.pica similarity index 100% rename from src/platform/3ds/filter_upscale.v.pica rename to src/shaders/pica/filter_upscale.v.pica diff --git a/src/platform/3ds/gui.v.pica b/src/shaders/pica/gui.v.pica similarity index 100% rename from src/platform/3ds/gui.v.pica rename to src/shaders/pica/gui.v.pica diff --git a/src/platform/3ds/shadow_entity.v.pica b/src/shaders/pica/shadow_entity.v.pica similarity index 100% rename from src/platform/3ds/shadow_entity.v.pica rename to src/shaders/pica/shadow_entity.v.pica From fa2f98747b05a10eb216bca67db415a77028767e Mon Sep 17 00:00:00 2001 From: Timur Gagiev Date: Tue, 10 Nov 2020 09:37:31 +0300 Subject: [PATCH 010/190] 3DS fix file access latency, add cubemap reflections, add fog, add underwater vertex caustics --- src/core.h | 2 +- src/gapi/c3d.h | 138 ++++++--- src/level.h | 28 +- src/objects.h | 30 +- src/platform/3ds/Makefile | 2 +- src/platform/3ds/main.cpp | 2 + src/shaders/pica/ambient_room.v.pica | 68 +++++ src/shaders/pica/ambient_sprite.v.pica | 78 ++++++ src/shaders/pica/compose_entity.v.pica | 7 +- src/shaders/pica/compose_entity_u.v.pica | 190 +++++++++++++ src/shaders/pica/compose_flash.v.pica | 14 +- src/shaders/pica/compose_mirror.v.pica | 44 ++- src/shaders/pica/compose_room.v.pica | 7 +- src/shaders/pica/compose_room_u.v.pica | 169 +++++++++++ src/shaders/pica/compose_sprite.v.pica | 6 +- src/shaders/pica/compose_sprite_u.v.pica | 184 ++++++++++++ src/shaders/pica/dummy.v.pica | 8 +- src/utils.h | 339 +++++++++++++++-------- 18 files changed, 1116 insertions(+), 200 deletions(-) create mode 100644 src/shaders/pica/ambient_room.v.pica create mode 100644 src/shaders/pica/ambient_sprite.v.pica create mode 100644 src/shaders/pica/compose_entity_u.v.pica create mode 100644 src/shaders/pica/compose_room_u.v.pica create mode 100644 src/shaders/pica/compose_sprite_u.v.pica diff --git a/src/core.h b/src/core.h index eb712d27..f10a930b 100644 --- a/src/core.h +++ b/src/core.h @@ -1221,7 +1221,7 @@ namespace Core { } void setFog(const vec4 ¶ms) { - #ifdef _XBOX + #if defined(_GAPI_D3D8) || defined(_GAPI_C3D) GAPI::setFog(params); #else ASSERT(Core::active.shader); diff --git a/src/gapi/c3d.h b/src/gapi/c3d.h index 96b99e93..cec0d8a6 100644 --- a/src/gapi/c3d.h +++ b/src/gapi/c3d.h @@ -84,6 +84,11 @@ namespace GAPI { #include "compose_room_shbin.h" #include "compose_entity_shbin.h" #include "compose_mirror_shbin.h" + #include "compose_sprite_u_shbin.h" + #include "compose_room_u_shbin.h" + #include "compose_entity_u_shbin.h" + #include "ambient_sprite_shbin.h" + #include "ambient_room_shbin.h" #include "shadow_entity_shbin.h" #include "filter_upscale_shbin.h" #include "gui_shbin.h" @@ -91,15 +96,20 @@ namespace GAPI { } #define SHADERS_LIST(E) \ - E( compose_sprite ) \ - E( compose_flash ) \ - E( compose_room ) \ - E( compose_entity ) \ - E( compose_mirror ) \ - E( shadow_entity ) \ - E( filter_upscale ) \ - E( gui ) \ - E( dummy ) + E( compose_sprite ) \ + E( compose_flash ) \ + E( compose_room ) \ + E( compose_entity ) \ + E( compose_mirror ) \ + E( compose_sprite_u ) \ + E( compose_room_u ) \ + E( compose_entity_u ) \ + E( ambient_sprite ) \ + E( ambient_room ) \ + E( shadow_entity ) \ + E( filter_upscale ) \ + E( gui ) \ + E( dummy ) #define SHADER_DECL(v) DVLB_s* v; #define SHADER_INIT(v) v = DVLB_ParseFile((u32*)v##_shbin, v##_shbin_size); @@ -124,6 +134,14 @@ namespace GAPI { SHADERS_LIST(SHADER_DECL); + struct FogLUT { + vec4 params; + uint32 color; + C3D_FogLut table; + } fogLUT[3]; + + vec4 fogParams; + struct Shader { shaderProgram_s program; C3D_TexEnv env[4]; @@ -141,14 +159,46 @@ namespace GAPI { DVLB_s* src = NULL; + bool underwater = false; + bool grayscale = false; + + for (int i = 0; i < defCount; i++) { + if (def[i] == SD_UNDERWATER) { + underwater = true; + } + if (def[i] == SD_FILTER_GRAYSCALE) { + grayscale = true; + } + } + switch (pass) { case Core::passCompose : + if (underwater) { + switch (type) { + case 0 : src = compose_sprite_u; break; + case 1 : src = compose_flash; break; + case 2 : src = compose_room_u; break; + case 3 : src = compose_entity_u; break; + case 4 : src = compose_mirror; break; + default : src = dummy; + } + } else { + switch (type) { + case 0 : src = compose_sprite; break; + case 1 : src = compose_flash; break; + case 2 : src = compose_room; break; + case 3 : src = compose_entity; break; + case 4 : src = compose_mirror; break; + default : src = dummy; + } + } + break; + case Core::passAmbient : switch (type) { - case 0 : src = compose_sprite; break; - case 1 : src = compose_flash; break; - case 2 : src = compose_room; break; - case 3 : src = compose_entity; break; - case 4 : src = compose_mirror; break; + case 0 : src = ambient_sprite; break; + case 1 : src = ambient_room; break; + case 2 : src = ambient_room; break; + default : src = dummy; } break; case Core::passShadow : src = shadow_entity; break; @@ -159,18 +209,6 @@ namespace GAPI { shaderProgramSetVsh(&program, &src->DVLE[0]); - bool underwater = false; - bool grayscale = false; - - for (int i = 0; i < defCount; i++) { - if (def[i] == SD_UNDERWATER) { - underwater = true; - } - if (def[i] == SD_FILTER_GRAYSCALE) { - grayscale = true; - } - } - for (int ut = 0; ut < uMAX; ut++) { uID[ut] = shaderInstanceGetUniformLocation(program.vertexShader, UniformName[ut]); } @@ -187,13 +225,13 @@ namespace GAPI { { // texture * vertex color C3D_TexEnvSrc(e, C3D_Both, GPU_TEXTURE0, GPU_PRIMARY_COLOR, GPU_PRIMARY_COLOR); C3D_TexEnvFunc(e, C3D_Both, GPU_MODULATE); - if (pass == Core::passCompose) { - C3D_TexEnvScale(e, C3D_RGB, GPU_TEVSCALE_2); + if (pass == Core::passCompose || pass == Core::passAmbient) { + C3D_TexEnvScale(e, C3D_Both, GPU_TEVSCALE_4); } e++; } - if (underwater) { // multiply by underwater color + if (pass == Core::passAmbient && underwater) { // multiply by underwater color only for ambient pass C3D_TexEnvSrc(e, C3D_Both, GPU_PREVIOUS, GPU_CONSTANT, GPU_PRIMARY_COLOR); C3D_TexEnvFunc(e, C3D_Both, GPU_MODULATE); C3D_TexEnvColor(e, 0xFFE5E599); @@ -743,7 +781,7 @@ namespace GAPI { LOG("create RT for face:%d %dx%d\n", face, texture->width, texture->height); C3D_FrameBuf &fb = texture->target[face].frameBuf; - fb.colorBuf = (texture->opt & OPT_CUBEMAP) ? texture->texCube.data[face] : texture->tex.data; + fb.colorBuf = (texture->opt & OPT_CUBEMAP) ? texture->tex.cube->data[face] : texture->tex.data; fb.depthBuf = getDepthBuffer(texture->width, texture->height, group, depthFmt); fb.colorFmt = GPU_COLORBUF(formats[texture->fmt].format); fb.depthFmt = depthFmt; @@ -760,6 +798,10 @@ namespace GAPI { void init() { memset(depthBuffers, 0, sizeof(depthBuffers)); + for (int i = 0; i < COUNT(fogLUT); i++) { + fogLUT[i].params = vec4(-2.0f); // initialize with some unique value + } + gfxInitDefault(); vramFree(vramAlloc(0)); // vramInit() @@ -860,6 +902,7 @@ namespace GAPI { } void resetState() { + fogParams = vec4(-1.0f); C3D_SetAttrInfo(&vertexAttribs); } @@ -966,6 +1009,39 @@ namespace GAPI { } } + void setFog(const vec4 ¶ms) { + if (fogParams == params) return; + + fogParams = params; + + int32 index; + + if (fogLUT[0].params == params) { + index = 0; + } else if (fogLUT[1].params == params) { + index = 1; + } else if (fogLUT[2].params == params) { + index = 2; + } else { + index = 2; + fogLUT[0] = fogLUT[1]; + fogLUT[1] = fogLUT[2]; + + // for some reason GPU_NO_FOG breaks depth, blend or texEnv states in some cases, so we use low density fog table (0.0f) as NO_FOG + FogLut_Exp(&fogLUT[index].table, params.w, 1.0f, 32.0f, 45.0f * 1024.0f); + fogLUT[index].params = params; + fogLUT[index].color = 0xFF000000 + | (uint32(clamp(params.x * 255.0f, 0.0f, 255.0f)) << 0) + | (uint32(clamp(params.y * 255.0f, 0.0f, 255.0f)) << 8) + | (uint32(clamp(params.z * 255.0f, 0.0f, 255.0f)) << 16); + } + + + C3D_FogGasMode(GPU_FOG, GPU_PLAIN_DENSITY, false); + C3D_FogColor(fogLUT[index].color); + C3D_FogLutBind(&fogLUT[index].table); + } + void clear(bool color, bool depth) { uint32 mask = 0; if (color) mask |= C3D_CLEAR_COLOR; @@ -973,7 +1049,7 @@ namespace GAPI { if (!mask) return; C3D_FrameSplit(0); - C3D_RenderTargetClear(curTarget, C3D_ClearBits(mask), clearColor, 0); + C3D_FrameBufClear(&curTarget->frameBuf, C3D_ClearBits(mask), clearColor, 0); } void setClearColor(const vec4 &color) { diff --git a/src/level.h b/src/level.h index 8db8b093..ac29740e 100644 --- a/src/level.h +++ b/src/level.h @@ -617,11 +617,14 @@ struct Level : IGame { return; #endif - #ifdef _OS_3DS - return; // TODO render to cubemap face + #ifdef _GAPI_C3D GAPI::rotate90 = false; #endif + #ifdef _GAPI_D3D8 + GAPI::setFrontFace(false); + #endif + PROFILE_MARKER("ENVIRONMENT"); setupBinding(); float tmpEye = Core::eye; @@ -631,10 +634,6 @@ struct Level : IGame { int16 rIndex = roomIndex; level.getSector(rIndex, pos); // fix room index for overlapped blocks - #ifdef _GAPI_D3D8 - GAPI::setFrontFace(false); - #endif - // render level into cube faces or texture images for (int i = 0; i < 6; i++) { setupCubeCamera(pos, i); @@ -651,7 +650,7 @@ struct Level : IGame { GAPI::setFrontFace(true); #endif - #ifdef _OS_3DS + #ifdef _GAPI_C3D GAPI::rotate90 = true; #endif @@ -1801,12 +1800,18 @@ struct Level : IGame { TR::Entity &e = level.entities[i]; if (e.type == TR::Entity::CRYSTAL) { Crystal *c = (Crystal*)e.controller; - renderEnvironment(c->getRoomIndex(), c->pos - vec3(0, 512, 0), &c->environment); - #ifdef USE_CUBEMAP_MIPS - c->environment->generateMipMap(); - #endif + if (c->environment) { // already initialized and baked + continue; + } + c->bake(); + + #ifdef _GAPI_C3D + // C3D has a limit of GX commands for buffers clearing (GX_MemoryFill), so we limit render to one cubemap per frame + return; + #endif } } + needRedrawReflections = false; } void setMainLight(Controller *controller) { @@ -3178,7 +3183,6 @@ struct Level : IGame { if (needRedrawReflections) { initReflections(); - needRedrawReflections = false; } if (ambientCache) { diff --git a/src/objects.h b/src/objects.h index 7e5dfc3c..1c862875 100644 --- a/src/objects.h +++ b/src/objects.h @@ -865,12 +865,7 @@ struct Drawbridge : Controller { struct Crystal : Controller { Texture *environment; - Crystal(IGame *game, int entity) : Controller(game, entity) { - uint32 opt = OPT_CUBEMAP | OPT_TARGET; - #ifdef USE_CUBEMAP_MIPS - opt |= OPT_MIPMAPS; - #endif - environment = new Texture(CRYSTAL_CUBEMAP_SIZE, CRYSTAL_CUBEMAP_SIZE, 1, FMT_RGB16, opt); + Crystal(IGame *game, int entity) : Controller(game, entity), environment(NULL) { activate(); } @@ -895,12 +890,31 @@ struct Crystal : Controller { } virtual void render(Frustum *frustum, MeshBuilder *mesh, Shader::Type type, bool caustics) { - Core::setMaterial(0.5, 0.5, 3.0, 1.0f); + Core::setMaterial(0.5, 0.5, 3.0, 0.0f); // 0.0f - use vertex normal as texcoord GAPI::Texture *dtex = Core::active.textures[sDiffuse]; - environment->bind(sDiffuse); + if (environment) { + environment->bind(sDiffuse); + } else { + Core::whiteCube->bind(sDiffuse); + } Controller::render(frustum, mesh, type, caustics); if (dtex) dtex->bind(sDiffuse); } + + void bake() { + ASSERT(!environment); + + uint32 opt = OPT_CUBEMAP | OPT_TARGET; + #ifdef USE_CUBEMAP_MIPS + opt |= OPT_MIPMAPS; + #endif + + environment = new Texture(CRYSTAL_CUBEMAP_SIZE, CRYSTAL_CUBEMAP_SIZE, 1, FMT_RGB16, opt); + game->renderEnvironment(getRoomIndex(), pos - vec3(0, 512, 0), &environment); + if (opt & OPT_MIPMAPS) { + environment->generateMipMap(); + } + } }; diff --git a/src/platform/3ds/Makefile b/src/platform/3ds/Makefile index 7eb7a4a3..efec6dc8 100644 --- a/src/platform/3ds/Makefile +++ b/src/platform/3ds/Makefile @@ -48,7 +48,7 @@ APP_DESCRIPTION := Classic Tomb Raider open-source engine #--------------------------------------------------------------------------------- ARCH := -march=armv6k -mtune=mpcore -mfloat-abi=hard -mtp=soft -CFLAGS := $(ARCH) -g0 -w -Ofast -ffast-math -mword-relocations -fomit-frame-pointer -ffunction-sections +CFLAGS := $(ARCH) -g0 -w -O3 -mword-relocations -fomit-frame-pointer -ffunction-sections CFLAGS += $(INCLUDE) -DARM11 -D_3DS CXXFLAGS := $(CFLAGS) -fno-rtti -fno-exceptions -std=gnu++11 diff --git a/src/platform/3ds/main.cpp b/src/platform/3ds/main.cpp index 8ac8b51c..72af6243 100644 --- a/src/platform/3ds/main.cpp +++ b/src/platform/3ds/main.cpp @@ -193,6 +193,8 @@ int main() { return 0; } + Stream::init(); + sndInit(); inputInit(); diff --git a/src/shaders/pica/ambient_room.v.pica b/src/shaders/pica/ambient_room.v.pica new file mode 100644 index 00000000..ed53a728 --- /dev/null +++ b/src/shaders/pica/ambient_room.v.pica @@ -0,0 +1,68 @@ +; constants +.constf const0(0.0, 0.5, 1.0, 2.0) +.constf const1(0.00392156886, 3.05185094e-005, 0.00001, 0.00787401574) + +.alias ZERO const0.x +.alias HALF const0.y +.alias ONE const0.z +.alias TWO const0.w +.alias INV_BYTE const1.x +.alias INV_SHORT const1.y +.alias EPS const1.z +.alias INV_127 const1.w + +; uniforms +.fvec uViewProj[4] +.fvec uBasis[2] +.fvec uLightPos[4] +.fvec uLightColor[4] + +; in +.alias aCoord v0 +.alias aNormal v1 +.alias aTexCoord v2 +.alias aColor v3 +.alias aLight v4 + +; variables +.alias lv1 r1 +.alias lv2 r2 +.alias lv3 r3 +.alias normal r4 +.alias att r5 +.alias light r6 +.alias pos r7 +.alias tmp r8 + +; out +.out vPosition position +.out vTexCoord texcoord0 +.out vColor color + +.proc main +; pos = mulQuatPos(uBasis, aCoord) + mul pos.xyz, uBasis[0], aCoord.zxyw + mad pos.xyz, aCoord, uBasis[0].zxyw, -pos + mad pos.xyz, aCoord.yzxw, uBasis[0].w, pos + mul tmp.xyz, uBasis[0].zxyw, pos + mad pos.xyz, pos.yzxw, uBasis[0].yzxw, -tmp + mad pos.xyz, pos, TWO, aCoord + add pos.xyz, uBasis[1], pos + mov pos.w, ONE + +; vPosition = uViewProj * pos + mul tmp, uViewProj[0], pos.x + mad tmp, pos.y, uViewProj[1], tmp + mad tmp, pos.z, uViewProj[2], tmp + mad vPosition, pos.w, uViewProj[3], tmp + +; vColor = aColor/255 * aLight/255 + mul tmp, INV_BYTE, aColor + mul att, INV_BYTE, aLight + mul vColor, tmp, att + +; vTecCoord = aTexCoord/32767 + mul vTexCoord, INV_SHORT, aTexCoord + + end +.end diff --git a/src/shaders/pica/ambient_sprite.v.pica b/src/shaders/pica/ambient_sprite.v.pica new file mode 100644 index 00000000..6340cb61 --- /dev/null +++ b/src/shaders/pica/ambient_sprite.v.pica @@ -0,0 +1,78 @@ +; constants +.constf const0(0.0, 0.5, 1.0, 2.0) +.constf const1(0.00392156886, 3.05185094e-005, 0.00001, 0.00787401574) + +.alias ZERO const0.x +.alias HALF const0.y +.alias ONE const0.z +.alias TWO const0.w +.alias INV_BYTE const1.x +.alias INV_SHORT const1.y +.alias EPS const1.z +.alias INV_127 const1.w + +; uniforms +.fvec uViewPos +.fvec uViewProj[4] +.fvec uBasis[2] +.fvec uLightPos[4] +.fvec uLightColor[4] +.fvec uMaterial +.alias MAT_AMBIENT uMaterial.y +.alias MAT_ALPHA uMaterial.w + +; in +.alias aCoord v0 +.alias aNormal v1 +.alias aTexCoord v2 +.alias aColor v3 +.alias aLight v4 + +; variables +.alias lv0 r0 +.alias lv1 r1 +.alias lv2 r2 +.alias lv3 r3 +.alias normal r4 +.alias att r5 +.alias light r6 +.alias pos r7 +.alias tmp r8 +.alias size r4 +.alias vv r6 + +; out +.out vPosition position +.out vTexCoord texcoord0 +.out vColor color + +.proc main +; pos = aCoord + mulQuatPos(uBasis, aTexCoord.zw) + mov pos.z, ZERO + mov pos.xy, aTexCoord.zw + mul size.xyz, uBasis[0], pos.zxy + mad size.xyz, pos.xyz, uBasis[0].zxy, -size + mad size.xyz, pos.yzx, uBasis[0].w, size + mul tmp.xyz, uBasis[0].zxy, size.xyz + mad size.xyz, size.yzx, uBasis[0].yzx, -tmp + mad pos.xyz, size, TWO, pos + add size.xyz, uBasis[1], aCoord + add pos.xyz, pos, size + mov pos.w, ONE + +; vPosition = uViewProj * pos + mul tmp, uViewProj[0], pos.x + mad tmp, pos.y, uViewProj[1], tmp + mad tmp, pos.z, uViewProj[2], tmp + mad vPosition, pos.w, uViewProj[3], tmp + +; vColor = premultAlpha(aLight / 255) + mul tmp, INV_BYTE, aLight + mul tmp.xyz, tmp, tmp.w + mov vColor, tmp + +; vTecCoord = aTexCoord/32767 + mul vTexCoord, INV_SHORT, aTexCoord + + end +.end diff --git a/src/shaders/pica/compose_entity.v.pica b/src/shaders/pica/compose_entity.v.pica index 6809033b..40e5aa35 100644 --- a/src/shaders/pica/compose_entity.v.pica +++ b/src/shaders/pica/compose_entity.v.pica @@ -13,8 +13,8 @@ ; uniforms .fvec uViewProj[4] -.fvec uLightPos[4]; -.fvec uLightColor[4]; +.fvec uLightPos[4] +.fvec uLightColor[4] .fvec uMaterial .fvec uBasis[32*2] @@ -120,7 +120,8 @@ mad tmp.xyz, light.y, uLightColor[1], tmp mad tmp.xyz, light.z, uLightColor[2], tmp mad tmp.xyz, light.w, uLightColor[3], tmp - mul vColor, pos, tmp + mul tmp, pos, tmp + mul vColor, HALF, tmp ; vTecCoord = aTexCoord/32767 mul vTexCoord, INV_SHORT, aTexCoord diff --git a/src/shaders/pica/compose_entity_u.v.pica b/src/shaders/pica/compose_entity_u.v.pica new file mode 100644 index 00000000..33b22e40 --- /dev/null +++ b/src/shaders/pica/compose_entity_u.v.pica @@ -0,0 +1,190 @@ +; constants +.constf const0(0.0, 0.5, 1.0, 2.0) +.constf const1(0.00392156886, 3.05185094e-005, 0.00001, 0.00787401574) + +.alias ZERO const0.x +.alias HALF const0.y +.alias ONE const0.z +.alias TWO const0.w +.alias INV_BYTE const1.x +.alias INV_SHORT const1.y +.alias EPS const1.z +.alias INV_127 const1.w + +; uniforms +.fvec uViewProj[4] +.fvec uLightPos[4] +.fvec uLightColor[4] +.fvec uMaterial +.fvec uBasis[32*2] + +.alias MAT_AMBIENT uMaterial.y +.alias MAT_ALPHA uMaterial.w + +; in +.alias aCoord v0 +.alias aNormal v1 +.alias aTexCoord v2 +.alias aColor v3 +.alias aLight v4 + +; variables +.alias lv0 r0 +.alias lv1 r1 +.alias lv2 r2 +.alias lv3 r3 +.alias normal r4 +.alias att r5 +.alias light r6 +.alias pos r7 +.alias tmp r8 +.alias diffuse r5 + +; out +.out vPosition position +.out vTexCoord texcoord0 +.out vColor color + + +; underwater block -------------------------------------------------- +.constf const2(6.28318530718, 0.15915494309, 0.63661977236, 0.0) +.constf const3(1.0, 3.0, 0.0009765625, 0.75) +.constf const4(0.6, 0.9, 0.9, 1.0) + +.alias TWO_PI const2.x +.alias INV_TWO_PI const2.y +.alias INV_HALF_PI const2.z +.alias ONE_THREE const3.xy +.alias WAVE_SIZE const3.z +.alias WAVE_LUM const3.w +.alias UW_COLOR const4 + +.fvec uParam +.alias TIME uParam.x + +; tmp.x = abs(tmp.x) +.proc abs + max tmp.x, tmp.x, -tmp.x +.end + +; tmp.x = mod(tmp.x, TWO_PI) +.proc mod2pi + mul tmp.y, INV_TWO_PI, tmp.x + flr tmp.y, tmp.y + mul tmp.y, TWO_PI, tmp.y + add tmp.x, tmp.x, -tmp.y +.end + +; tmp.x = sin(tmp.x) +.proc sin + mul tmp.x, INV_HALF_PI, tmp.x + add tmp.xy, -ONE_THREE, tmp.xx + mad tmp.xy, tmp.xy, -tmp.xy, ONE_THREE.xx + max tmp.xy, ZERO, tmp.xy + add tmp.x, tmp.x, tmp.y +.end + +.proc applyUnderwater + ; k = dot(pos, 1/1024) + time + dp3 tmp.x, WAVE_SIZE, pos + add tmp.x, TIME, tmp.x + + call mod2pi + call sin + call abs + + mul tmp.x, WAVE_LUM, tmp.x + add tmp.x, HALF, tmp.x + mul tmp.xyz, UW_COLOR, tmp.xxx + mul diffuse.xyz, diffuse.xyz, tmp.xyz + mul vColor, HALF, diffuse +.end +; ------------------------------------------------------------------- + + +.proc main +; joint = int(aCoord.w) + mova a0.x, aCoord.w + +; pos = mulQuatPos(uBasis[joint], aCoord) + mul pos.xyz, uBasis[a0.x], aCoord.zxyw + mad pos.xyz, aCoord, uBasis[a0.x].zxyw, -pos + mad pos.xyz, aCoord.yzxw, uBasis[a0.x].w, pos + mul tmp.xyz, uBasis[a0.x].zxyw, pos + mad pos.xyz, pos.yzxw, uBasis[a0.x].yzxw, -tmp + mad pos.xyz, pos, TWO, aCoord + add pos.xyz, uBasis[a0.x + 1], pos + mov pos.w, uBasis[a0.x + 1].w + +; vPosition = uViewProj * pos + mul tmp, uViewProj[0], pos.x + mad tmp, pos.y, uViewProj[1], tmp + mad tmp, pos.z, uViewProj[2], tmp + mad vPosition, pos.w, uViewProj[3], tmp + +; lighting + ; lv[0..3] = (uLightPos[0..3].xyz - pos) * uLightColor[0..3].w; + add lv0.xyz, uLightPos[0], -pos + add lv1.xyz, uLightPos[1], -pos + add lv2.xyz, uLightPos[2], -pos + add lv3.xyz, uLightPos[3], -pos + mul lv0.xyz, uLightColor[0].w, lv0 + mul lv1.xyz, uLightColor[1].w, lv1 + mul lv2.xyz, uLightColor[2].w, lv2 + mul lv3.xyz, uLightColor[3].w, lv3 + + ; att[0..3] = dot(lv[0..3], lv[0..3]) + dp3 att.x, lv0, lv0 + dp3 att.y, lv1, lv1 + dp3 att.z, lv2, lv2 + dp3 att.w, lv3, lv3 + + ; att = max(0, 1 - att) / sqrt(att) + rsq tmp.x, att.x + rsq tmp.y, att.y + rsq tmp.z, att.z + rsq tmp.w, att.w + + add att, ONE, -att + max att, ZERO, att + mul att, tmp, att + + ; normal = mulQuat(uBasis[joint], aNormal/127 - 1) + mul normal.xyz, INV_127, aNormal + add normal.xyz, -ONE, normal + mul pos.xyz, uBasis[a0.x], normal.zxyw + mad pos.xyz, normal, uBasis[a0.x].zxyw, -pos + mad pos.xyz, normal.yzxw, uBasis[a0.x].w, pos + mul tmp.xyz, uBasis[a0.x].zxyw, pos + mad pos.xyz, pos.yzxw, uBasis[a0.x].yzxw, -tmp + mad normal.xyz, pos, TWO, normal + + ; light = max(0, dot(normal, lv[0..3])) + dp3 light.x, lv0, normal + dp3 light.y, lv1, normal + dp3 light.z, lv2, normal + dp3 light.w, lv3, normal + + ; light = max(0, light) * att + max light, ZERO, light + mul light, light, att + +; vColor = aColor/255 * material.alpha * (material.ambient + light[0..3] * uLightColor[0..3]) + mul diffuse, INV_BYTE, aColor + mul diffuse, MAT_ALPHA, diffuse + mov tmp.xyz, MAT_AMBIENT + mov tmp.w, ONE + mad tmp.xyz, light.x, uLightColor[0], tmp + mad tmp.xyz, light.y, uLightColor[1], tmp + mad tmp.xyz, light.z, uLightColor[2], tmp + mad tmp.xyz, light.w, uLightColor[3], tmp + mul diffuse, diffuse, tmp + +; vColor = applyUnderwater(diffuse, pos) + call applyUnderwater + +; vTecCoord = aTexCoord/32767 + mul vTexCoord, INV_SHORT, aTexCoord + + end +.end diff --git a/src/shaders/pica/compose_flash.v.pica b/src/shaders/pica/compose_flash.v.pica index fce085ff..b5ef7888 100644 --- a/src/shaders/pica/compose_flash.v.pica +++ b/src/shaders/pica/compose_flash.v.pica @@ -1,6 +1,6 @@ ; constants .constf const0(0.0, 0.5, 1.0, 2.0) -.constf const1(0.00392156886, 3.05185094e-005, 0.00001, 0.1) +.constf const1(0.00392156886, 3.05185094e-005, 0.00001, 0.25) .alias ZERO const0.x .alias HALF const0.y .alias ONE const0.z @@ -8,6 +8,7 @@ .alias INV_BYTE const1.x .alias INV_SHORT const1.y .alias EPS const1.z +.alias QUART const1.w ; uniforms .fvec uViewProj[4] @@ -36,7 +37,7 @@ ; out .out vPosition position -.out vTexCoord texcoord1 +.out vTexCoord texcoord0 .out vColor color .proc main @@ -58,10 +59,11 @@ ; vColor = aColor/255 * material.diffuse + material.emissive * 0.5 mul tmp, INV_BYTE, aColor - mul tmp.xyz, MAT_DIFFUSE, tmp - mov pos.xyz, MAT_EMISSIVE - mad tmp.xyz, pos, HALF, tmp - mov vColor, tmp + mul tmp, MAT_DIFFUSE, tmp + add tmp, tmp, tmp + add tmp, MAT_EMISSIVE, tmp + mov tmp.w, MAT_EMISSIVE + mul vColor, QUART, tmp ; vTecCoord = aTexCoord/32767 mul vTexCoord, INV_SHORT, aTexCoord diff --git a/src/shaders/pica/compose_mirror.v.pica b/src/shaders/pica/compose_mirror.v.pica index 20ee4762..a9e9dc04 100644 --- a/src/shaders/pica/compose_mirror.v.pica +++ b/src/shaders/pica/compose_mirror.v.pica @@ -1,6 +1,6 @@ ; constants .constf const0(0.0, 0.5, 1.0, 2.0) -.constf const1(0.00392156886, 3.05185094e-005, 0.00001, 0.00787401574) +.constf const1(0.00392156886, 3.05185094e-005, 0.25, 0.00787401574) .alias ZERO const0.x .alias HALF const0.y @@ -8,13 +8,14 @@ .alias TWO const0.w .alias INV_BYTE const1.x .alias INV_SHORT const1.y -.alias EPS const1.z +.alias QUART const1.z .alias INV_127 const1.w ; uniforms .fvec uViewProj[4] .fvec uBasis[32*2] .fvec uMaterial +.fvec uViewPos ; in .alias aCoord v0 @@ -29,8 +30,8 @@ .alias lv2 r2 .alias lv3 r3 .alias normal r4 -.alias att r5 -.alias light r6 +.alias refl r5 +.alias view r6 .alias pos r7 .alias tmp r8 @@ -61,18 +62,35 @@ mad tmp, pos.z, uViewProj[2], tmp mad vPosition, pos.w, uViewProj[3], tmp -; vColor = uMaterial - mov vColor.xyzw, ONE +; view = normalize(uViewPos - pos) + add view, uViewPos, pos + dp3 tmp.x, view, view + rsq tmp.x, tmp.x + mul view, view, tmp.xxxx -; normal = mulQuat(uBasis, aNormal/127 - 1) +; normal = mulQuat(uBasis[joint], aNormal/127 - 1) mul normal, INV_127, aNormal add normal, -ONE, normal - mul pos.xyz, uBasis[0], normal.zxyw - mad pos.xyz, normal, uBasis[0].zxyw, -pos - mad pos.xyz, normal.yzxw, uBasis[0].w, pos - mul tmp.xyz, uBasis[0].zxyw, pos - mad pos.xyz, pos.yzxw, uBasis[0].yzxw, -tmp - mad vTexCoord, pos, TWO, normal + mul pos.xyz, uBasis[a0.x], normal.zxyw + mad pos.xyz, normal, uBasis[a0.x].zxyw, -pos + mad pos.xyz, normal.yzxw, uBasis[a0.x].w, pos + mul tmp.xyz, uBasis[a0.x].zxyw, pos + mad pos.xyz, pos.yzxw, uBasis[a0.x].yzxw, -tmp + mad normal, pos, TWO, normal +; refl = reflect(-view, normal) + dp3 tmp.x, -view, normal + add tmp.x, tmp.x, tmp.x + mad refl, -tmp.xxxx, normal, -view + +; vTexCoord = lerp(normal, refl, uMaterial.w) + add tmp, -normal, refl + mad vTexCoord, tmp, uMaterial.wwww, normal + +; vColor = uMaterial + mov tmp.xyz, uMaterial + mov tmp.w, ONE + mul vColor, QUART, tmp + end .end diff --git a/src/shaders/pica/compose_room.v.pica b/src/shaders/pica/compose_room.v.pica index e2704816..25f4547c 100644 --- a/src/shaders/pica/compose_room.v.pica +++ b/src/shaders/pica/compose_room.v.pica @@ -14,8 +14,8 @@ ; uniforms .fvec uViewProj[4] .fvec uBasis[2] -.fvec uLightPos[4]; -.fvec uLightColor[4]; +.fvec uLightPos[4] +.fvec uLightColor[4] ; in .alias aCoord v0 @@ -100,7 +100,8 @@ mad tmp.xyz, light.y, uLightColor[1], tmp mad tmp.xyz, light.z, uLightColor[2], tmp mad tmp.xyz, light.w, uLightColor[3], tmp - mul vColor, pos, tmp + mul tmp, pos, tmp + mul vColor, HALF, tmp ; vTecCoord = aTexCoord/32767 mul vTexCoord, INV_SHORT, aTexCoord diff --git a/src/shaders/pica/compose_room_u.v.pica b/src/shaders/pica/compose_room_u.v.pica new file mode 100644 index 00000000..467789d5 --- /dev/null +++ b/src/shaders/pica/compose_room_u.v.pica @@ -0,0 +1,169 @@ +; constants +.constf const0(0.0, 0.5, 1.0, 2.0) +.constf const1(0.00392156886, 3.05185094e-005, 0.0009765625, 0.00787401574) + +.alias ZERO const0.x +.alias HALF const0.y +.alias ONE const0.z +.alias TWO const0.w +.alias INV_BYTE const1.x +.alias INV_SHORT const1.y +.alias INV_127 const1.w + +; uniforms +.fvec uViewProj[4] +.fvec uBasis[2] +.fvec uLightPos[4] +.fvec uLightColor[4] + +; in +.alias aCoord v0 +.alias aNormal v1 +.alias aTexCoord v2 +.alias aColor v3 +.alias aLight v4 + +; variables +.alias lv1 r1 +.alias lv2 r2 +.alias lv3 r3 +.alias normal r4 +.alias att r5 +.alias light r6 +.alias pos r7 +.alias tmp r8 +.alias diffuse r5 + +; out +.out vPosition position +.out vTexCoord texcoord0 +.out vColor color + + +; underwater block -------------------------------------------------- +.constf const2(6.28318530718, 0.15915494309, 0.63661977236, 0.0) +.constf const3(1.0, 3.0, 0.0009765625, 0.75) +.constf const4(0.6, 0.9, 0.9, 1.0) + +.alias TWO_PI const2.x +.alias INV_TWO_PI const2.y +.alias INV_HALF_PI const2.z +.alias ONE_THREE const3.xy +.alias WAVE_SIZE const3.z +.alias WAVE_LUM const3.w +.alias UW_COLOR const4 + +.fvec uParam +.alias TIME uParam.x + +; tmp.x = abs(tmp.x) +.proc abs + max tmp.x, tmp.x, -tmp.x +.end + +; tmp.x = mod(tmp.x, TWO_PI) +.proc mod2pi + mul tmp.y, INV_TWO_PI, tmp.x + flr tmp.y, tmp.y + mul tmp.y, TWO_PI, tmp.y + add tmp.x, tmp.x, -tmp.y +.end + +; tmp.x = sin(tmp.x) +.proc sin + mul tmp.x, INV_HALF_PI, tmp.x + add tmp.xy, -ONE_THREE, tmp.xx + mad tmp.xy, tmp.xy, -tmp.xy, ONE_THREE.xx + max tmp.xy, ZERO, tmp.xy + add tmp.x, tmp.x, tmp.y +.end + +.proc applyUnderwater + ; k = dot(pos, 1/1024) + time + dp3 tmp.x, WAVE_SIZE, pos + add tmp.x, TIME, tmp.x + + call mod2pi + call sin + call abs + + mul tmp.x, WAVE_LUM, tmp.x + add tmp.x, HALF, tmp.x + mul tmp.xyz, UW_COLOR, tmp.xxx + mul diffuse.xyz, diffuse.xyz, tmp.xyz + mul vColor, HALF, diffuse +.end +; ------------------------------------------------------------------- + + +.proc main +; pos = mulQuatPos(uBasis, aCoord) + mul pos.xyz, uBasis[0], aCoord.zxyw + mad pos.xyz, aCoord, uBasis[0].zxyw, -pos + mad pos.xyz, aCoord.yzxw, uBasis[0].w, pos + mul tmp.xyz, uBasis[0].zxyw, pos + mad pos.xyz, pos.yzxw, uBasis[0].yzxw, -tmp + mad pos.xyz, pos, TWO, aCoord + add pos.xyz, uBasis[1], pos + mov pos.w, ONE + +; vPosition = uViewProj * pos + mul tmp, uViewProj[0], pos.x + mad tmp, pos.y, uViewProj[1], tmp + mad tmp, pos.z, uViewProj[2], tmp + mad vPosition, pos.w, uViewProj[3], tmp + +; lighting + ; lv[1..3] = (uLightPos[1..3].xyz - pos) * uLightColor[1..3].w; + add lv1.xyz, uLightPos[1], -pos + add lv2.xyz, uLightPos[2], -pos + add lv3.xyz, uLightPos[3], -pos + mul lv1.xyz, uLightColor[1].w, lv1 + mul lv2.xyz, uLightColor[2].w, lv2 + mul lv3.xyz, uLightColor[3].w, lv3 + + ; att[1..3] = dot(lv[1..3], lv[1..3]) + mov att.x, ONE + dp3 att.y, lv1, lv1 + dp3 att.z, lv2, lv2 + dp3 att.w, lv3, lv3 + + ; att = max(0, 1 - att) / sqrt(att) + rsq tmp.y, att.y + rsq tmp.z, att.z + rsq tmp.w, att.w + + add att, ONE, -att + max att, ZERO, att + mul att, tmp, att + + ; normal = aNormal/127 - 1 + mul normal.xyz, INV_127, aNormal + add normal.xyz, -ONE, normal + + ; light = max(0, dot(normal, lv[1..3])) + mov light.x, ZERO + dp3 light.y, lv1, normal + dp3 light.z, lv2, normal + dp3 light.w, lv3, normal + + ; light = max(0, light) * att + max light, ZERO, light + mul light, light, att + +; color = (aLight/255 + light[1..3] * uLightColor[1..3]) * aColor/255 + mul tmp, INV_BYTE, aLight + mad tmp.xyz, light.y, uLightColor[1], tmp + mad tmp.xyz, light.z, uLightColor[2], tmp + mad tmp.xyz, light.w, uLightColor[3], tmp + mul diffuse, INV_BYTE, aColor + mul diffuse, diffuse, tmp + +; vColor = applyUnderwater(diffuse, pos) + call applyUnderwater + +; vTecCoord = aTexCoord/32767 + mul vTexCoord, INV_SHORT, aTexCoord + + end +.end diff --git a/src/shaders/pica/compose_sprite.v.pica b/src/shaders/pica/compose_sprite.v.pica index 7e803e60..1d46fb32 100644 --- a/src/shaders/pica/compose_sprite.v.pica +++ b/src/shaders/pica/compose_sprite.v.pica @@ -15,8 +15,8 @@ .fvec uViewPos .fvec uViewProj[4] .fvec uBasis[2] -.fvec uLightPos[4]; -.fvec uLightColor[4]; +.fvec uLightPos[4] +.fvec uLightColor[4] .fvec uMaterial .alias MAT_AMBIENT uMaterial.y .alias MAT_ALPHA uMaterial.w @@ -115,7 +115,7 @@ mad tmp.xyz, light.z, uLightColor[2], tmp mad tmp.xyz, light.w, uLightColor[3], tmp mul tmp.xyz, tmp, tmp.w - mov vColor, tmp + mul vColor, HALF, tmp ; vTecCoord = aTexCoord/32767 mul vTexCoord, INV_SHORT, aTexCoord diff --git a/src/shaders/pica/compose_sprite_u.v.pica b/src/shaders/pica/compose_sprite_u.v.pica new file mode 100644 index 00000000..13d1d88b --- /dev/null +++ b/src/shaders/pica/compose_sprite_u.v.pica @@ -0,0 +1,184 @@ +; constants +.constf const0(0.0, 0.5, 1.0, 2.0) +.constf const1(0.00392156886, 3.05185094e-005, 0.00001, 0.00787401574) + +.alias ZERO const0.x +.alias HALF const0.y +.alias ONE const0.z +.alias TWO const0.w +.alias INV_BYTE const1.x +.alias INV_SHORT const1.y +.alias EPS const1.z +.alias INV_127 const1.w + +; uniforms +.fvec uViewPos +.fvec uViewProj[4] +.fvec uBasis[2] +.fvec uLightPos[4] +.fvec uLightColor[4] +.fvec uMaterial +.alias MAT_AMBIENT uMaterial.y +.alias MAT_ALPHA uMaterial.w + +; in +.alias aCoord v0 +.alias aNormal v1 +.alias aTexCoord v2 +.alias aColor v3 +.alias aLight v4 + +; variables +.alias lv0 r0 +.alias lv1 r1 +.alias lv2 r2 +.alias lv3 r3 +.alias normal r4 +.alias att r5 +.alias light r6 +.alias pos r7 +.alias tmp r8 +.alias size r4 +.alias vv r6 +.alias diffuse r5 + +; out +.out vPosition position +.out vTexCoord texcoord0 +.out vColor color + + +; underwater block -------------------------------------------------- +.constf const2(6.28318530718, 0.15915494309, 0.63661977236, 0.0) +.constf const3(1.0, 3.0, 0.0009765625, 0.75) +.constf const4(0.6, 0.9, 0.9, 1.0) + +.alias TWO_PI const2.x +.alias INV_TWO_PI const2.y +.alias INV_HALF_PI const2.z +.alias ONE_THREE const3.xy +.alias WAVE_SIZE const3.z +.alias WAVE_LUM const3.w +.alias UW_COLOR const4 + +.fvec uParam +.alias TIME uParam.x + +; tmp.x = abs(tmp.x) +.proc abs + max tmp.x, tmp.x, -tmp.x +.end + +; tmp.x = mod(tmp.x, TWO_PI) +.proc mod2pi + mul tmp.y, INV_TWO_PI, tmp.x + flr tmp.y, tmp.y + mul tmp.y, TWO_PI, tmp.y + add tmp.x, tmp.x, -tmp.y +.end + +; tmp.x = sin(tmp.x) +.proc sin + mul tmp.x, INV_HALF_PI, tmp.x + add tmp.xy, -ONE_THREE, tmp.xx + mad tmp.xy, tmp.xy, -tmp.xy, ONE_THREE.xx + max tmp.xy, ZERO, tmp.xy + add tmp.x, tmp.x, tmp.y +.end + +.proc applyUnderwater + ; k = dot(pos, 1/1024) + time + dp3 tmp.x, WAVE_SIZE, pos + add tmp.x, TIME, tmp.x + + call mod2pi + call sin + call abs + + mul tmp.x, WAVE_LUM, tmp.x + add tmp.x, HALF, tmp.x + mul tmp.xyz, UW_COLOR, tmp.xxx + mul diffuse.xyz, diffuse.xyz, tmp.xyz + mul vColor, HALF, diffuse +.end +; ------------------------------------------------------------------- + + +.proc main +; pos = aCoord + mulQuatPos(uBasis, aTexCoord.zw) + mov pos.z, ZERO + mov pos.xy, aTexCoord.zw + mul size.xyz, uBasis[0], pos.zxy + mad size.xyz, pos.xyz, uBasis[0].zxy, -size + mad size.xyz, pos.yzx, uBasis[0].w, size + mul tmp.xyz, uBasis[0].zxy, size.xyz + mad size.xyz, size.yzx, uBasis[0].yzx, -tmp + mad pos.xyz, size, TWO, pos + add size.xyz, uBasis[1], aCoord + add pos.xyz, pos, size + mov pos.w, ONE + +; vPosition = uViewProj * pos + mul tmp, uViewProj[0], pos.x + mad tmp, pos.y, uViewProj[1], tmp + mad tmp, pos.z, uViewProj[2], tmp + mad vPosition, pos.w, uViewProj[3], tmp + +; lighting + ; lv[1..3] = (uLightPos[1..3].xyz - pos) * uLightColor[1..3].w; + add lv1.xyz, uLightPos[1], -pos + add lv2.xyz, uLightPos[2], -pos + add lv3.xyz, uLightPos[3], -pos + mul lv1.xyz, uLightColor[1].w, lv1 + mul lv2.xyz, uLightColor[2].w, lv2 + mul lv3.xyz, uLightColor[3].w, lv3 + + ; att[1..3] = dot(lv[1..3], lv[1..3]) + mov att.x, ONE + dp3 att.y, lv1, lv1 + dp3 att.z, lv2, lv2 + dp3 att.w, lv3, lv3 + + ; att = max(0, 1 - att) / sqrt(att) + rsq tmp.y, att.y + rsq tmp.z, att.z + rsq tmp.w, att.w + + add att, ONE, -att + max att, ZERO, att + mul att, tmp, att + + ; viewVec = uViewPos - pos + add vv.xyz, uViewPos, -pos + + ; normal = normalize(viewVec) + dp3 tmp.x, vv, vv + rsq tmp.x, tmp.x + mul normal, vv, tmp.x + + ; light = max(0, dot(normal, lv[1..3])) + mov light.x, MAT_AMBIENT + dp3 light.y, lv1, normal + dp3 light.z, lv2, normal + dp3 light.w, lv3, normal + + ; light = max(0, light) * att + max light, ZERO, light + mul light, light, att + +; vColor = vec4(aLight.rgb * aLight.a, aLight.a) + mul diffuse, INV_BYTE, aLight + mad diffuse.xyz, light.x, uLightColor[0], diffuse + mad diffuse.xyz, light.y, uLightColor[1], diffuse + mad diffuse.xyz, light.z, uLightColor[2], diffuse + mad diffuse.xyz, light.w, uLightColor[3], diffuse + mul diffuse.xyz, diffuse, diffuse.w + +; vColor = applyUnderwater(diffuse, pos) + call applyUnderwater + +; vTecCoord = aTexCoord/32767 + mul vTexCoord, INV_SHORT, aTexCoord + + end +.end diff --git a/src/shaders/pica/dummy.v.pica b/src/shaders/pica/dummy.v.pica index 6a14c979..7e2f80be 100644 --- a/src/shaders/pica/dummy.v.pica +++ b/src/shaders/pica/dummy.v.pica @@ -1,5 +1,5 @@ ; constants -.constf const0(0.0, 0.0, 0.0, 0.0) +.constf const0(0.0, 0.0, 0.0, 1.0) ; out .out vPosition position @@ -7,8 +7,8 @@ .out vColor color .proc main - mov vPosition, const0.xxxx - mov vTexCoord, const0.xxxx - mov vColor, const0.xxxx + mov vPosition, const0 + mov vTexCoord, const0 + mov vColor, const0 end .end diff --git a/src/utils.h b/src/utils.h index 2ec58540..bff2d025 100644 --- a/src/utils.h +++ b/src/utils.h @@ -1551,9 +1551,101 @@ namespace String { strcpy(res, str); return res; } + + int32 length(uint16 *str) { + if (!str || !str[0]) return 0; + int32 len = 0; + while (*str++) { + len++; + } + return len; + } } +template +struct Array { + int capacity; + int length; + T *items; + + Array(int capacity = 32) : capacity(capacity), length(0), items(NULL) {} + + ~Array() { + clear(); + } + + void reserve(int capacity) { + this->capacity = capacity; + if (items) + items = (T*)realloc(items, capacity * sizeof(T)); + else + items = (T*)malloc(capacity * sizeof(T)); + } + + int push(const T &item) { + if (!items) + items = (T*)malloc(capacity * sizeof(T)); + + if (length == capacity) + reserve(capacity + capacity / 2); + + items[length] = item; + return length++; + } + + int pop() { + ASSERT(length > 0); + return --length; + } + + void removeFast(int index) { + (*this)[index] = (*this)[length - 1]; + length--; + } + + void remove(int index) { + length--; + ASSERT(length >= 0); + for (int i = index; i < length; i++) + items[i] = items[i + 1]; + } + + void resize(int length) { + if (capacity < length) + reserve(length); + this->length = length; + } + + void reset() { + length = 0; + } + + void clear() { + reset(); + free(items); + items = NULL; + } + + int find(const T &item) { + for (int i = 0; i < length; i++) { + if (items[i] == item) + return i; + } + return -1; + } + + void sort() { + ::sort(items, length); + } + + T& operator[] (int index) { + ASSERT(index >= 0 && index < length); + return items[index]; + }; +}; + + struct Stream; extern void osCacheWrite (Stream *stream); @@ -1693,6 +1785,8 @@ struct Stream { static Pack* packs[MAX_PACKS]; + static Array fileList; + static bool addPack(const char *name) { if (!existsContent(name)) { @@ -1710,6 +1804,10 @@ struct Stream { return false; } + static void init() { + readFileList(); + } + static void deinit() { for (int i = 0; i < MAX_PACKS; i++) @@ -1717,8 +1815,58 @@ struct Stream { if (!packs[i]) break; delete packs[i]; } + + for (int i = 0; i < fileList.length; i++) { + delete[] fileList[i]; + } + fileList.clear(); } +private: +#ifdef _OS_3DS + static void streamThread(void *arg) { + Stream* stream = (Stream*)arg; + stream->openFile(); + } +#endif + + void openFile() { + char path[255]; + + path[0] = 0; + if (contentDir[0] && (!cacheDir[0] || !strstr(name, cacheDir))) { + strcpy(path, contentDir); + } + strcat(path, name); + fixBackslash(path); + + f = fopen(path, "rb"); + + if (!f) { + #ifdef _OS_WEB + osDownload(this); + #else + LOG("error loading file \"%s\"\n", name); + if (callback) { + callback(NULL, userData); + delete this; + } else { + ASSERT(false); + } + #endif + } else { + fseek(f, 0, SEEK_END); + size = (int32)ftell(f); + fseek(f, 0, SEEK_SET); + + fpos = 0; + bufferIndex = -1; + + if (callback) callback(this, userData); + } + } +public: + Stream(const char *name, const void *data, int size, Callback *callback = NULL, void *userData = NULL) : callback(callback), userData(userData), f(NULL), data((char*)data), name(NULL), size(size), pos(0), buffer(NULL) { this->name = String::copy(name); } @@ -1770,39 +1918,18 @@ struct Stream { } } - path[0] = 0; - if (contentDir[0] && (!cacheDir[0] || !strstr(name, cacheDir))) { - strcpy(path, contentDir); - } - strcat(path, name); - fixBackslash(path); - - f = fopen(path, "rb"); - - if (!f) { - #ifdef _OS_WEB - this->name = String::copy(name); - osDownload(this); - #else - LOG("error loading file \"%s\"\n", name); - if (callback) { - callback(NULL, userData); - delete this; - } else { - ASSERT(false); - } - #endif - } else { - fseek(f, 0, SEEK_END); - size = (int32)ftell(f); - fseek(f, 0, SEEK_SET); + this->name = String::copy(name); - fpos = 0; - bufferIndex = -1; + #ifdef _OS_3DS /* TODO + if (callback) { + s32 priority = 0; + svcGetThreadPriority(&priority, CUR_THREAD_HANDLE); + threadCreate(streamThread, this, 64 * 1024, priority - 1, -2, false); + return; + }*/ + #endif - this->name = String::copy(name); - if (callback) callback(this, userData); - } + openFile(); } ~Stream() { @@ -1811,6 +1938,62 @@ struct Stream { if (f) fclose(f); } +#ifdef _OS_3DS + static void readDirectory(const FS_Archive &archive, const char* path) { + char buf[255]; + strcpy(buf, contentDir + 5); // 5 to skip "sdmc:" + strcat(buf, path); + + FS_Path fsPath = fsMakePath(FS_PathType::PATH_ASCII, buf); + + Handle dir; + if (FSUSER_OpenDirectory(&dir, archive, fsPath) != 0) { + return; + } + + int32 pathLen = strlen(path); + strcpy(buf, path); + + while (1) { + FS_DirectoryEntry entry; + + u32 entriesRead = 0; + FSDIR_Read(dir, &entriesRead, 1, &entry); + + if (entriesRead == 0) { + break; + } + + int32 len = utf16_to_utf8((uint8*)buf + pathLen, entry.name, String::length(entry.name)); + buf[pathLen + len] = 0; + + if (entry.attributes & FS_ATTRIBUTE_DIRECTORY) { + strcat(buf, "/"); + readDirectory(archive, buf); + } else { + fileList.push(String::copy(buf)); + } + } + + FSDIR_Close(dir); + } + + static void readFileList() { + FS_Archive sdmc; + FS_Path fsRoot = fsMakePath(FS_PathType::PATH_ASCII, ""); + + if (FSUSER_OpenArchive(&sdmc, FS_ArchiveID::ARCHIVE_SDMC, fsRoot) != 0) { + return; + } + + readDirectory(sdmc, ""); + + FSUSER_CloseArchive(sdmc); + } +#else + static void readFileList() {}; +#endif + static void cacheRead(const char *name, Callback *callback = NULL, void *userData = NULL) { Stream *stream = new Stream(name, NULL, 0, callback, userData); #ifdef _OS_ANDROID // use saveDir for settings on android devices @@ -1861,6 +2044,15 @@ struct Stream { return true; } + if (fileList.length) { + for (int i = 0; i < fileList.length; i++) { + if (strcmp(fileList[i], name) == 0) { + return true; + } + } + return false; + } + char fileName[1024]; strcpy(fileName, contentDir); strcat(fileName, name); @@ -2018,6 +2210,7 @@ struct Stream { }; Stream::Pack* Stream::packs[MAX_PACKS]; +Array Stream::fileList; #ifdef OS_FILEIO_CACHE void osDataWrite(Stream *stream, const char *dir) { @@ -2287,88 +2480,4 @@ struct FixedStr { typedef FixedStr<16> str16; - -template -struct Array { - int capacity; - int length; - T *items; - - Array(int capacity = 32) : capacity(capacity), length(0), items(NULL) {} - - ~Array() { - clear(); - } - - void reserve(int capacity) { - this->capacity = capacity; - if (items) - items = (T*)realloc(items, capacity * sizeof(T)); - else - items = (T*)malloc(capacity * sizeof(T)); - } - - int push(const T &item) { - if (!items) - items = (T*)malloc(capacity * sizeof(T)); - - if (length == capacity) - reserve(capacity + capacity / 2); - - items[length] = item; - return length++; - } - - int pop() { - ASSERT(length > 0); - return --length; - } - - void removeFast(int index) { - (*this)[index] = (*this)[length - 1]; - length--; - } - - void remove(int index) { - length--; - ASSERT(length >= 0); - for (int i = index; i < length; i++) - items[i] = items[i + 1]; - } - - void resize(int length) { - if (capacity < length) - reserve(length); - this->length = length; - } - - void reset() { - length = 0; - } - - void clear() { - reset(); - free(items); - items = NULL; - } - - int find(const T &item) { - for (int i = 0; i < length; i++) { - if (items[i] == item) - return i; - } - return -1; - } - - void sort() { - ::sort(items, length); - } - - T& operator[] (int index) { - ASSERT(index >= 0 && index < length); - return items[index]; - }; -}; - - #endif From 8292ae6a42811da529b373357e41021313df2531 Mon Sep 17 00:00:00 2001 From: Timur Gagiev Date: Sun, 15 Nov 2020 14:59:54 +0300 Subject: [PATCH 011/190] fix Sega Saturn format support for 3DS and XBOX --- src/format.h | 168 ++++++++++++++++++++++++++++++++----------------- src/gapi/c3d.h | 6 +- src/level.h | 2 +- src/texture.h | 2 +- 4 files changed, 115 insertions(+), 63 deletions(-) diff --git a/src/format.h b/src/format.h index 0ac234a4..7a1448d9 100644 --- a/src/format.h +++ b/src/format.h @@ -3909,8 +3909,62 @@ namespace TR { #define CHUNK(str) ((uint64)((const char*)(str))[0] | ((uint64)((const char*)(str))[1] << 8) | ((uint64)((const char*)(str))[2] << 16) | ((uint64)((const char*)(str))[3] << 24) | \ ((uint64)((const char*)(str))[4] << 32) | ((uint64)((const char*)(str))[5] << 40) | ((uint64)((const char*)(str))[6] << 48) | ((uint64)((const char*)(str))[7] << 56)) + #define SAT_ROOMFILE 0x454C49464D4F4F52ULL /* CHUNK("ROOMFILE") */ + #define SAT_ROOMTINF 0x464E49544D4F4F52ULL /* CHUNK("ROOMTINF") */ + #define SAT_ROOMTQTR 0x525451544D4F4F52ULL /* CHUNK("ROOMTQTR") */ + #define SAT_ROOMTSUB 0x425553544D4F4F52ULL /* CHUNK("ROOMTSUB") */ + #define SAT_ROOMTPAL 0x4C4150544D4F4F52ULL /* CHUNK("ROOMTPAL") */ + #define SAT_ROOMSPAL 0x4C4150534D4F4F52ULL /* CHUNK("ROOMSPAL") */ + #define SAT_ROOMDATA 0x415441444D4F4F52ULL /* CHUNK("ROOMDATA") */ + #define SAT_ROOMNUMB 0x424D554E4D4F4F52ULL /* CHUNK("ROOMNUMB") */ + #define SAT_MESHPOS_ 0x20534F504853454DULL /* CHUNK("MESHPOS ") */ + #define SAT_MESHSIZE 0x455A49534853454DULL /* CHUNK("MESHSIZE") */ + #define SAT_DOORDATA 0x41544144524F4F44ULL /* CHUNK("DOORDATA") */ + #define SAT_FLOORDAT 0x544144524F4F4C46ULL /* CHUNK("FLOORDAT") */ + #define SAT_FLOORSIZ 0x5A4953524F4F4C46ULL /* CHUNK("FLOORSIZ") */ + #define SAT_FLORDATA 0x41544144524F4C46ULL /* CHUNK("FLORDATA") */ + #define SAT_LIGHTAMB 0x424D41544847494CULL /* CHUNK("LIGHTAMB") */ + #define SAT_RM_FLIP_ 0x2050494C465F4D52ULL /* CHUNK("RM_FLIP ") */ + #define SAT_RM_FLAGS 0x5347414C465F4D52ULL /* CHUNK("RM_FLAGS") */ + #define SAT_LIGHTSIZ 0x5A4953544847494CULL /* CHUNK("LIGHTSIZ") */ + #define SAT_CAMERAS_ 0x20534152454D4143ULL /* CHUNK("CAMERAS ") */ + #define SAT_SOUNDFX_ 0x205846444E554F53ULL /* CHUNK("SOUNDFX ") */ + #define SAT_BOXES___ 0x2020205345584F42ULL /* CHUNK("BOXES ") */ + #define SAT_OVERLAPS 0x5350414C5245564FULL /* CHUNK("OVERLAPS") */ + #define SAT_GND_ZONE 0x454E4F5A5F444E47ULL /* CHUNK("GND_ZONE") */ + #define SAT_GND_ZON2 0x324E4F5A5F444E47ULL /* CHUNK("GND_ZON2") */ + #define SAT_FLY_ZONE 0x454E4F5A5F594C46ULL /* CHUNK("FLY_ZONE") */ + #define SAT_ARANGES_ 0x205345474E415241ULL /* CHUNK("ARANGES ") */ + #define SAT_ITEMDATA 0x415441444D455449ULL /* CHUNK("ITEMDATA") */ + #define SAT_ROOMEND_ 0x20444E454D4F4F52ULL /* CHUNK("ROOMEND ") */ + #define SAD_OBJFILE_ 0x20454C49464A424FULL /* CHUNK("OBJFILE ") */ + #define SAD_ANIMS___ 0x202020534D494E41ULL /* CHUNK("ANIMS ") */ + #define SAD_CHANGES_ 0x205345474E414843ULL /* CHUNK("CHANGES ") */ + #define SAD_RANGES_z 0x00205345474E4152ULL /* CHUNK("RANGES \0") */ + #define SAD_COMMANDS 0x53444E414D4D4F43ULL /* CHUNK("COMMANDS") */ + #define SAD_ANIBONES 0x53454E4F42494E41ULL /* CHUNK("ANIBONES") */ + #define SAD_ANIMOBJ_ 0x204A424F4D494E41ULL /* CHUNK("ANIMOBJ ") */ + #define SAD_STATOBJ_ 0x204A424F54415453ULL /* CHUNK("STATOBJ ") */ + #define SAD_FRAMES__ 0x202053454D415246ULL /* CHUNK("FRAMES ") */ + #define SAD_MESHPTRS 0x535254504853454DULL /* CHUNK("MESHPTRS") */ + #define SAD_MESHDATA 0x415441444853454DULL /* CHUNK("MESHDATA") */ + #define SAD_OTEXTINF 0x464E49545845544FULL /* CHUNK("OTEXTINF") */ + #define SAD_OTEXTDAT 0x544144545845544FULL /* CHUNK("OTEXTDAT") */ + #define SAD_ITEXTINF 0x464E495458455449ULL /* CHUNK("ITEXTINF") */ + #define SAD_ITEXTDAT 0x5441445458455449ULL /* CHUNK("ITEXTDAT") */ + #define SAD_OBJEND__ 0x2020444E454A424FULL /* CHUNK("OBJEND ") */ + #define SPR_SPRFILE_ 0x20454C4946525053ULL /* CHUNK("SPRFILE ") */ + #define SPR_SPRITINF 0x464E495449525053ULL /* CHUNK("SPRITINF") */ + #define SPR_SPRITDAT 0x5441445449525053ULL /* CHUNK("SPRITDAT") */ + #define SPR_OBJECTS_ 0x20535443454A424FULL /* CHUNK("OBJECTS ") */ + #define SPR_SPRITEND 0x444E455449525053ULL /* CHUNK("SPRITEND") */ + #define SND_SAMPLUT_ 0x2054554C504D4153ULL /* CHUNK("SAMPLUT ") */ + #define SND_SAMPINFS 0x53464E49504D4153ULL /* CHUNK("SAMPINFS") */ + #define SND_SAMPLE__ 0x2020454C504D4153ULL /* CHUNK("SAMPLE ") */ + #define SND_ENDFILEz 0x00454C4946444E45ULL /* CHUNK("ENDFILE\0") */ + void readSAT(Stream &stream) { - #if !defined(_OS_PSP) && !defined(_OS_3DS) && !defined(_OS_XBOX) + #if !defined(_OS_PSP) Room *room = NULL; while (stream.pos < stream.size) { @@ -3926,18 +3980,18 @@ namespace TR { switch (chunkType) { // SAT - case CHUNK("ROOMFILE") : + case SAT_ROOMFILE : ASSERTV(stream.readBE32() == 0x00000000); ASSERTV(stream.readBE32() == 0x00000020); break; - case CHUNK("ROOMTINF") : + case SAT_ROOMTINF : ASSERTV(stream.readBE32() == 0x00000010); roomTexturesCount = stream.readBE32(); roomTextures = roomTexturesCount ? new TextureInfo[roomTexturesCount] : NULL; for (int i = 0; i < roomTexturesCount; i++) readObjectTex(stream, roomTextures[i], TEX_TYPE_ROOM); break; - case CHUNK("ROOMTQTR") : { + case SAT_ROOMTQTR : { ASSERTV(stream.readBE32() == 0x00000001); roomTexturesDataSize = stream.readBE32(); roomTexturesData = roomTexturesDataSize ? new uint8[roomTexturesDataSize] : NULL; @@ -3948,7 +4002,7 @@ namespace TR { */ break; } - case CHUNK("ROOMTSUB") : + case SAT_ROOMTSUB : ASSERTV(stream.readBE32() == 0x00000001); /* roomTexturesDataSize = stream.readBE32(); @@ -3961,34 +4015,34 @@ namespace TR { stream.raw(tsub, sizeof(uint8) * tsubCount); break; - case CHUNK("ROOMTPAL") : { + case SAT_ROOMTPAL : { ASSERTV(stream.readBE32() == 0x00000003); stream.seek(stream.readBE32() * 3); break; } - case CHUNK("ROOMSPAL") : { + case SAT_ROOMSPAL : { ASSERTV(stream.readLE32() == 0x02000000); stream.seek(stream.readBE32() * 2); break; } - case CHUNK("ROOMDATA") : + case SAT_ROOMDATA : ASSERTV(stream.readBE32() == 0x00000044); roomsCount = stream.readBE32(); rooms = new Room[roomsCount]; memset(rooms, 0, sizeof(Room) * roomsCount); break; - case CHUNK("ROOMNUMB") : + case SAT_ROOMNUMB : ASSERTV(stream.readBE32() == 0x00000000); room = &rooms[stream.readBE32()]; break; - case CHUNK("MESHPOS ") : + case SAT_MESHPOS_ : ASSERT(room); room->info.x = stream.readBE32(); room->info.z = stream.readBE32(); room->info.yBottom = stream.readBE32(); room->info.yTop = stream.readBE32(); break; - case CHUNK("MESHSIZE") : { + case SAT_MESHSIZE : { ASSERT(room); uint32 flag = stream.readBE32(); if (flag == 0x00000014) { @@ -4109,7 +4163,7 @@ namespace TR { data.fCount = fIndex; break; } - case CHUNK("DOORDATA") : { + case SAT_DOORDATA : { int32 roomIndex = stream.readBE32(); ASSERT(roomIndex < roomsCount); Room *room = &rooms[roomIndex]; @@ -4132,12 +4186,12 @@ namespace TR { } break; } - case CHUNK("FLOORDAT") : + case SAT_FLOORDAT : ASSERT(room); room->zSectors = stream.readBE32(); room->xSectors = stream.readBE32(); break; - case CHUNK("FLOORSIZ") : { + case SAT_FLOORSIZ : { ASSERTV(stream.readBE32() == 0x00000008); ASSERT(room && room->sectors == NULL); @@ -4158,7 +4212,7 @@ namespace TR { } break; } - case CHUNK("FLORDATA") : + case SAT_FLORDATA : ASSERTV(stream.readBE32() == 0x00000002); ASSERT(floors == NULL); floorsCount = stream.readBE32(); @@ -4166,25 +4220,25 @@ namespace TR { for (int i = 0; i < floorsCount; i++) floors[i].value = stream.readBE16(); break; - case CHUNK("LIGHTAMB") : + case SAT_LIGHTAMB : ASSERT(room); room->ambient = stream.readBE32(); room->ambient2 = stream.readBE32(); break; - case CHUNK("RM_FLIP ") : { + case SAT_RM_FLIP_ : { ASSERTV(stream.readBE32() == 0x00000002); uint32 value = stream.readBE32(); room->alternateRoom = value == 0xFFFFFFFF ? -1 : value; break; } - case CHUNK("RM_FLAGS") : { + case SAT_RM_FLAGS : { ASSERT(room); ASSERTV(stream.readBE32() == 0x00000002); uint32 value = stream.readBE32(); room->flags.water = (value & 0x01) != 0; break; } - case CHUNK("LIGHTSIZ") : { + case SAT_LIGHTSIZ : { ASSERTV(stream.readBE32() == 0x00000014); ASSERT(room && room->lights == NULL); room->lightsCount = stream.readBE32(); @@ -4206,7 +4260,7 @@ namespace TR { } break; } - case CHUNK("CAMERAS ") : + case SAT_CAMERAS_ : ASSERTV(stream.readBE32() == 0x00000010); ASSERT(cameras == NULL); camerasCount = stream.readBE32(); @@ -4220,7 +4274,7 @@ namespace TR { cam.flags.boxIndex = stream.readBE16(); } break; - case CHUNK("SOUNDFX ") : { + case SAT_SOUNDFX_ : { uint32 flag = stream.readBE32(); if (flag == 0x00000000) { // SND ASSERTV(stream.readBE32() == 0x00000000); @@ -4254,7 +4308,7 @@ namespace TR { } break; } - case CHUNK("BOXES ") : + case SAT_BOXES___ : ASSERTV(stream.readBE32() == 0x00000014); ASSERT(boxes == NULL); boxesCount = stream.readBE32(); @@ -4269,7 +4323,7 @@ namespace TR { b.overlap.value = stream.readBE16(); } break; - case CHUNK("OVERLAPS") : + case SAT_OVERLAPS : ASSERTV(stream.readBE32() == 0x00000002); ASSERT(overlaps == NULL); overlapsCount = stream.readBE32(); @@ -4277,16 +4331,16 @@ namespace TR { for (int i = 0; i < overlapsCount; i++) overlaps[i].value = stream.readBE16(); break; - case CHUNK("GND_ZONE") : - case CHUNK("GND_ZON2") : - case CHUNK("FLY_ZONE") : { + case SAT_GND_ZONE : + case SAT_GND_ZON2 : + case SAT_FLY_ZONE : { ASSERTV(stream.readBE32() == 0x00000002); uint16 **ptr; switch (chunkType) { - case CHUNK("GND_ZONE") : ptr = zones[0].ground1 ? &zones[1].ground1 : &zones[0].ground1; break; - case CHUNK("GND_ZON2") : ptr = zones[0].ground2 ? &zones[1].ground2 : &zones[0].ground2; break; - case CHUNK("FLY_ZONE") : ptr = zones[0].fly ? &zones[1].fly : &zones[0].fly; break; + case SAT_GND_ZONE : ptr = zones[0].ground1 ? &zones[1].ground1 : &zones[0].ground1; break; + case SAT_GND_ZON2 : ptr = zones[0].ground2 ? &zones[1].ground2 : &zones[0].ground2; break; + case SAT_FLY_ZONE : ptr = zones[0].fly ? &zones[1].fly : &zones[0].fly; break; default : ptr = NULL; } @@ -4299,7 +4353,7 @@ namespace TR { (*ptr)[i] = stream.readBE16(); break; } - case CHUNK("ARANGES ") : { + case SAT_ARANGES_ : { ASSERTV(stream.readBE32() == 0x00000008); animTexturesCount = stream.readBE32(); animTextures = new AnimTexture[animTexturesCount]; @@ -4314,7 +4368,7 @@ namespace TR { } break; } - case CHUNK("ITEMDATA") : { + case SAT_ITEMDATA : { ASSERTV(stream.readBE32() == 0x00000014); entitiesBaseCount = stream.readBE32(); entitiesCount = entitiesBaseCount + MAX_RESERVED_ENTITIES; @@ -4333,16 +4387,16 @@ namespace TR { } break; } - case CHUNK("ROOMEND ") : + case SAT_ROOMEND_ : ASSERTV(stream.readBE32() == 0x00000000); ASSERTV(stream.readBE32() == 0x00000000); break; // SAD - case CHUNK("OBJFILE ") : + case SAD_OBJFILE_ : ASSERTV(stream.readBE32() == 0x00000000); ASSERTV(stream.readBE32() == 0x00000020); break; - case CHUNK("ANIMS ") : + case SAD_ANIMS___ : ASSERTV(stream.readBE32() == 0x00000022); ASSERT(anims == NULL); animsCount = stream.readBE32(); @@ -4367,7 +4421,7 @@ namespace TR { anim.animCommand = stream.readBE16(); } break; - case CHUNK("CHANGES ") : + case SAD_CHANGES_ : ASSERTV(stream.readBE32() == 0x00000008); ASSERT(states == NULL); statesCount = stream.readBE32(); @@ -4380,7 +4434,7 @@ namespace TR { ASSERTV(stream.readBE16() == state.rangesOffset); // dummy } break; - case CHUNK("RANGES \0") : + case SAD_RANGES_z : ASSERTV(stream.readBE32() == 0x00000008); ASSERT(ranges == NULL); rangesCount = stream.readBE32(); @@ -4393,7 +4447,7 @@ namespace TR { range.nextFrame = stream.readBE16(); } break; - case CHUNK("COMMANDS") : + case SAD_COMMANDS : ASSERTV(stream.readBE32() == 0x00000002); ASSERT(commands == NULL); commandsCount = stream.readBE32(); @@ -4401,7 +4455,7 @@ namespace TR { for (int i = 0; i < commandsCount; i++) commands[i] = stream.readBE16(); break; - case CHUNK("ANIBONES") : + case SAD_ANIBONES : ASSERTV(stream.readBE32() == 0x00000004); ASSERT(nodesData == NULL); nodesDataSize = stream.readBE32(); @@ -4409,7 +4463,7 @@ namespace TR { for (int i = 0; i < nodesDataSize; i++) nodesData[i] = stream.readBE32(); break; - case CHUNK("ANIMOBJ ") : + case SAD_ANIMOBJ_ : ASSERTV(stream.readBE32() == 0x00000038); ASSERT(models == NULL); modelsCount = stream.readBE32(); @@ -4427,7 +4481,7 @@ namespace TR { ASSERTV(stream.readBE16() == model.animation); } break; - case CHUNK("STATOBJ ") : + case SAD_STATOBJ_ : ASSERTV(stream.readBE32() == 0x00000020); ASSERT(staticMeshes == NULL); staticMeshesCount = stream.readBE32(); @@ -4451,7 +4505,7 @@ namespace TR { mesh.flags = stream.readBE16(); } break; - case CHUNK("FRAMES ") : + case SAD_FRAMES__ : ASSERTV(stream.readBE32() == 0x00000002); ASSERT(frameData == NULL); frameDataSize = stream.readBE32(); @@ -4459,7 +4513,7 @@ namespace TR { for (int i = 0; i < frameDataSize; i++) frameData[i] = stream.readBE16(); break; - case CHUNK("MESHPTRS") : + case SAD_MESHPTRS : ASSERTV(stream.readBE32() == 0x00000004); ASSERT(meshOffsets == NULL); meshOffsetsCount = stream.readBE32(); @@ -4467,14 +4521,14 @@ namespace TR { for (int i = 0; i < meshOffsetsCount; i++) meshOffsets[i] = stream.readBE32(); break; - case CHUNK("MESHDATA") : + case SAD_MESHDATA : ASSERTV(stream.readBE32() == 0x00000002); ASSERT(meshData == NULL); meshDataSize = stream.readBE32(); meshData = meshDataSize ? new uint16[meshDataSize] : NULL; stream.raw(meshData, sizeof(uint16) * meshDataSize); break; - case CHUNK("OTEXTINF") : + case SAD_OTEXTINF : ASSERTV(stream.readBE32() == 0x00000010); ASSERT(objectTextures == NULL); objectTexturesCount = stream.readBE32(); @@ -4484,14 +4538,14 @@ namespace TR { objectTexturesBaseCount = objectTexturesCount; expandObjectTex(objectTextures, objectTexturesCount); break; - case CHUNK("OTEXTDAT") : { + case SAD_OTEXTDAT : { ASSERTV(stream.readBE32() == 0x00000001); objectTexturesDataSize = stream.readBE32(); objectTexturesData = objectTexturesDataSize ? new uint8[objectTexturesDataSize] : NULL; stream.raw(objectTexturesData, objectTexturesDataSize); break; } - case CHUNK("ITEXTINF") : { + case SAD_ITEXTINF : { ASSERTV(stream.readBE32() == 0x00000014); itemTexturesCount = stream.readBE32(); itemTextures = itemTexturesCount ? new TextureInfo[itemTexturesCount * 5] : NULL; @@ -4501,23 +4555,23 @@ namespace TR { expandObjectTex(itemTextures, itemTexturesCount); break; } - case CHUNK("ITEXTDAT") : { + case SAD_ITEXTDAT : { ASSERTV(stream.readBE32() == 0x00000001); itemTexturesDataSize = stream.readBE32(); itemTexturesData = itemTexturesDataSize ? new uint8[itemTexturesDataSize] : NULL; stream.raw(itemTexturesData, itemTexturesDataSize); break; } - case CHUNK("OBJEND ") : + case SAD_OBJEND__ : ASSERTV(stream.readBE32() == 0x00000000); ASSERTV(stream.readBE32() == 0x00000000); break; // SPR - case CHUNK("SPRFILE ") : + case SPR_SPRFILE_ : ASSERTV(stream.readBE32() == 0x00000000); ASSERTV(stream.readBE32() == 0x00000020); break; - case CHUNK("SPRITINF") : { + case SPR_SPRITINF : { ASSERTV(stream.readBE32() == 0x00000010); spriteTexturesCount = stream.readBE32(); spriteTextures = spriteTexturesCount ? new TextureInfo[spriteTexturesCount] : NULL; @@ -4525,14 +4579,14 @@ namespace TR { readSpriteTex(stream, spriteTextures[i]); break; } - case CHUNK("SPRITDAT") : { + case SPR_SPRITDAT : { ASSERTV(stream.readBE32() == 0x00000001); spriteTexturesDataSize = stream.readBE32(); spriteTexturesData = spriteTexturesDataSize ? new uint8[spriteTexturesDataSize] : NULL; stream.raw(spriteTexturesData, spriteTexturesDataSize); break; } - case CHUNK("OBJECTS ") : { + case SPR_OBJECTS_ : { ASSERTV(stream.readBE32() == 0x00000000); spriteSequencesCount = stream.readBE32(); spriteSequences = spriteSequencesCount ? new SpriteSequence[spriteSequencesCount] : NULL; @@ -4546,12 +4600,12 @@ namespace TR { } break; } - case CHUNK("SPRITEND") : + case SPR_SPRITEND : ASSERTV(stream.readBE32() == 0x00000000); ASSERTV(stream.readBE32() == 0x00000000); break; // SND - case CHUNK("SAMPLUT ") : { + case SND_SAMPLUT_ : { ASSERTV(stream.readBE32() == 0x00000002); int count = stream.readBE32(); soundsMap = new int16[count]; @@ -4559,7 +4613,7 @@ namespace TR { soundsMap[i] = stream.readBE16(); break; } - case CHUNK("SAMPINFS") : { + case SND_SAMPINFS : { ASSERTV(stream.readBE32() == 0x00000008); soundsInfoCount = stream.readBE32(); soundsInfo = soundsInfoCount ? new SoundInfo[soundsInfoCount] : NULL; @@ -4574,7 +4628,7 @@ namespace TR { } break; } - case CHUNK("SAMPLE ") : { + case SND_SAMPLE__ : { int32 index = stream.readBE32(); int32 size = stream.readBE32(); ASSERT(index < soundOffsetsCount); @@ -4584,7 +4638,7 @@ namespace TR { stream.seek(size); break; } - case CHUNK("ENDFILE\0") : + case SND_ENDFILEz : ASSERTV(stream.readBE32() == 0x00000000); ASSERTV(stream.readBE32() == 0x00000000); break; diff --git a/src/gapi/c3d.h b/src/gapi/c3d.h index cec0d8a6..5f2c7362 100644 --- a/src/gapi/c3d.h +++ b/src/gapi/c3d.h @@ -27,7 +27,7 @@ namespace GAPI { struct Vertex { short4 coord; ubyte4 normal; - short4 texCoord; + short2 texCoord; ubyte4 color; ubyte4 light; }; @@ -778,8 +778,6 @@ namespace GAPI { C3D_RenderTarget* checkRenderTarget(Texture *texture, int face, int group, GPU_DEPTHBUF depthFmt) { if (!texture->target[face].frameBuf.colorBuf) { - LOG("create RT for face:%d %dx%d\n", face, texture->width, texture->height); - C3D_FrameBuf &fb = texture->target[face].frameBuf; fb.colorBuf = (texture->opt & OPT_CUBEMAP) ? texture->tex.cube->data[face] : texture->tex.data; fb.depthBuf = getDepthBuffer(texture->width, texture->height, group, depthFmt); @@ -826,7 +824,7 @@ namespace GAPI { AttrInfo_Init(&vertexAttribs); AttrInfo_AddLoader(&vertexAttribs, aCoord , GPU_SHORT , 4); AttrInfo_AddLoader(&vertexAttribs, aNormal , GPU_UNSIGNED_BYTE , 4); - AttrInfo_AddLoader(&vertexAttribs, aTexCoord , GPU_SHORT , 4); + AttrInfo_AddLoader(&vertexAttribs, aTexCoord , GPU_SHORT , 2); AttrInfo_AddLoader(&vertexAttribs, aColor , GPU_UNSIGNED_BYTE , 4); AttrInfo_AddLoader(&vertexAttribs, aLight , GPU_UNSIGNED_BYTE , 4); diff --git a/src/level.h b/src/level.h index ac29740e..7333e8f0 100644 --- a/src/level.h +++ b/src/level.h @@ -1655,7 +1655,7 @@ struct Level : IGame { tileData = new AtlasTile(); atlasRooms = rAtlas->pack(OPT_MIPMAPS | OPT_VRAM_3DS); - atlasObjects = oAtlas->pack(OPT_MIPMAPS | OPT_VRAM_3DS); + atlasObjects = oAtlas->pack(OPT_MIPMAPS); atlasSprites = sAtlas->pack(OPT_MIPMAPS); atlasGlyphs = gAtlas->pack(0); diff --git a/src/texture.h b/src/texture.h index c3686fd4..a9c8d3a4 100644 --- a/src/texture.h +++ b/src/texture.h @@ -647,7 +647,7 @@ struct Texture : GAPI::Texture { } static uint8* LoadBIN(Stream &stream, uint32 &width, uint32 &height) { - if (strstr(stream.name, "224.")) { + if (strstr(stream.name, "224.") || stream.size == 157696) { height = 224; } else { height = 256; From a94937ae40135b3058b731d3fba9becdffd0dae8 Mon Sep 17 00:00:00 2001 From: XProger Date: Sun, 15 Nov 2020 16:12:00 +0400 Subject: [PATCH 012/190] XBOX turn off MSAA for 720p for stable 60 fps --- src/platform/xbox/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/platform/xbox/main.cpp b/src/platform/xbox/main.cpp index 2fcf1397..c5a92695 100644 --- a/src/platform/xbox/main.cpp +++ b/src/platform/xbox/main.cpp @@ -268,7 +268,7 @@ HRESULT ContextCreate() { if (d3dpp.BackBufferHeight == 480) { d3dpp.MultiSampleType = D3DMULTISAMPLE_4_SAMPLES_MULTISAMPLE_GAUSSIAN; } else if (d3dpp.BackBufferHeight == 720) { - d3dpp.MultiSampleType = D3DMULTISAMPLE_2_SAMPLES_MULTISAMPLE_QUINCUNX; + d3dpp.MultiSampleType = D3DMULTISAMPLE_NONE; //D3DMULTISAMPLE_2_SAMPLES_MULTISAMPLE_QUINCUNX; // unstable 60 fps } else if (d3dpp.BackBufferHeight == 1080) { d3dpp.MultiSampleType = D3DMULTISAMPLE_NONE; } From 23cf124c2bd8f2daa8cfebcfa0042412c385ca7a Mon Sep 17 00:00:00 2001 From: Timur Gagiev Date: Wed, 25 Nov 2020 02:06:40 +0300 Subject: [PATCH 013/190] 3DS turn off bottom screen by default, downscale atlas to 1024x1024 if it's necessary (SAT version only), fix sprites rendering, add notification if no content data is available, fix floating point precision bugs --- src/core.h | 4 ++-- src/gapi/c3d.h | 29 ++++++++++++++++++------ src/gapi/gl.h | 4 ++++ src/gapi/sw.h | 16 ++++++++------ src/lara.h | 9 ++++++++ src/platform/3ds/Makefile | 2 +- src/platform/3ds/main.cpp | 46 ++++++++++++++++++++++++--------------- 7 files changed, 76 insertions(+), 34 deletions(-) diff --git a/src/core.h b/src/core.h index f10a930b..f0d52fa7 100644 --- a/src/core.h +++ b/src/core.h @@ -706,7 +706,7 @@ namespace Core { void stop() { if (fpsTime < Core::getTime()) { - LOG("FPS: %d DIP: %d TRI: %d RT: %d CB: %d\n", fps, dips, tris, rt, cb); + LOG("FPS: %d DIP: %d TRI: %d RT: %d\n", fps, dips, tris, rt); #ifdef PROFILE LOG("frame time: %d mcs\n", tFrame / 1000); LOG("sound: mix %d rev %d ren %d/%d ogg %d\n", Sound::stats.mixer, Sound::stats.reverb, Sound::stats.render[0], Sound::stats.render[1], Sound::stats.ogg); @@ -1221,7 +1221,7 @@ namespace Core { } void setFog(const vec4 ¶ms) { - #if defined(_GAPI_D3D8) || defined(_GAPI_C3D) + #if defined(_GAPI_D3D8) || defined(_GAPI_C3D) || defined(_GAPI_SW) || defined(FFP) GAPI::setFog(params); #else ASSERT(Core::active.shader); diff --git a/src/gapi/c3d.h b/src/gapi/c3d.h index 5f2c7362..8f1be38a 100644 --- a/src/gapi/c3d.h +++ b/src/gapi/c3d.h @@ -27,7 +27,7 @@ namespace GAPI { struct Vertex { short4 coord; ubyte4 normal; - short2 texCoord; + short4 texCoord; ubyte4 color; ubyte4 light; }; @@ -461,17 +461,28 @@ namespace GAPI { FormatDesc desc = formats[fmt]; if (width < 8 || height < 8) { - LOG("texture too small %dx%d [%d %d]!\n", width, height, fmt, opt); + LOG("\ntexture too small %dx%d [%d %d]!\n\n", width, height, fmt, opt); width = 8; height = 8; data = NULL; } + void* tmpData = NULL; + if (width > 1024 || height > 1024) { - LOG("texture too large %dx%d [%d %d]!\n", width, height, fmt, opt); - width = 8; - height = 8; - data = NULL; + LOG("\ntexture too large %dx%d [%d %d]!\n", width, height, fmt, opt); + + origWidth >>= 1; + origHeight >>= 1; + width >>= 1; + height >>= 1; + + LOG("downsample to %dx%d\n\n", width, height); + + tmpData = linearAlloc(width * height * desc.bpp / 8); + downsampleImage(tmpData, data, width << 1, height << 1); + + data = tmpData; } bool isCube = (opt & OPT_CUBEMAP) != 0; @@ -508,6 +519,10 @@ namespace GAPI { update(data); } + if (tmpData) { + linearFree(tmpData); + } + GPU_TEXTURE_FILTER_PARAM filter = (opt & OPT_NEAREST) ? GPU_NEAREST : GPU_LINEAR; C3D_TexSetFilter(&tex, filter, filter); C3D_TexSetFilterMipmap(&tex, filter); @@ -824,7 +839,7 @@ namespace GAPI { AttrInfo_Init(&vertexAttribs); AttrInfo_AddLoader(&vertexAttribs, aCoord , GPU_SHORT , 4); AttrInfo_AddLoader(&vertexAttribs, aNormal , GPU_UNSIGNED_BYTE , 4); - AttrInfo_AddLoader(&vertexAttribs, aTexCoord , GPU_SHORT , 2); + AttrInfo_AddLoader(&vertexAttribs, aTexCoord , GPU_SHORT , 4); AttrInfo_AddLoader(&vertexAttribs, aColor , GPU_UNSIGNED_BYTE , 4); AttrInfo_AddLoader(&vertexAttribs, aLight , GPU_UNSIGNED_BYTE , 4); diff --git a/src/gapi/gl.h b/src/gapi/gl.h index 360d3163..f1afed32 100644 --- a/src/gapi/gl.h +++ b/src/gapi/gl.h @@ -1697,6 +1697,10 @@ namespace GAPI { #endif } + void setFog(const vec4 ¶ms) { + // FFP TODO + } + void DIP(Mesh *mesh, const MeshRange &range) { #ifdef FFP mat4 m = mView * mModel; diff --git a/src/gapi/sw.h b/src/gapi/sw.h index 4800313d..b15c6818 100644 --- a/src/gapi/sw.h +++ b/src/gapi/sw.h @@ -335,6 +335,8 @@ namespace GAPI { } } + void setFog(const vec4 ¶ms) {} + bool checkBackface(const VertexSW *a, const VertexSW *b, const VertexSW *c) { return ((b->x - a->x) >> 16) * (c->y - a->y) - ((c->x - a->x) >> 16) * (b->y - a->y) <= 0; @@ -474,9 +476,9 @@ namespace GAPI { b */ VertexSW _n; - VertexSW *t = swVertices + indices[0]; - VertexSW *m = swVertices + indices[1]; - VertexSW *b = swVertices + indices[2]; + VertexSW *t = swVertices.items + indices[0]; + VertexSW *m = swVertices.items + indices[1]; + VertexSW *b = swVertices.items + indices[2]; VertexSW *n = &_n; if (checkBackface(t, m, b)) @@ -521,10 +523,10 @@ namespace GAPI { */ VertexSW _n; VertexSW _p; - VertexSW *t = swVertices + indices[0]; - VertexSW *m = swVertices + indices[1]; - VertexSW *b = swVertices + indices[2]; - VertexSW *o = swVertices + indices[3]; + VertexSW *t = swVertices.items + indices[0]; + VertexSW *m = swVertices.items + indices[1]; + VertexSW *b = swVertices.items + indices[2]; + VertexSW *o = swVertices.items + indices[3]; VertexSW *n = &_n; VertexSW *p = &_p; diff --git a/src/lara.h b/src/lara.h index 1c0859c8..34e3a126 100644 --- a/src/lara.h +++ b/src/lara.h @@ -3625,6 +3625,11 @@ struct Lara : Character { return false; } + #ifdef _OS_3DS // for some reason move() math works incorrect on 3DS + #pragma GCC push_options + #pragma GCC optimize ("O0") + #endif + void move() { vec3 vel = (velocity + flowVelocity) * Core::deltaTime * 30.0f + collisionOffset; vec3 opos(pos), offset(0.0f); @@ -3775,6 +3780,10 @@ struct Lara : Character { if (dozy) stand = STAND_UNDERWATER; } + #ifdef _OS_3DS + #pragma GCC pop_options + #endif + virtual void applyFlow(TR::Camera &sink) { if (stand != STAND_UNDERWATER && stand != STAND_ONWATER) return; diff --git a/src/platform/3ds/Makefile b/src/platform/3ds/Makefile index efec6dc8..7eb7a4a3 100644 --- a/src/platform/3ds/Makefile +++ b/src/platform/3ds/Makefile @@ -48,7 +48,7 @@ APP_DESCRIPTION := Classic Tomb Raider open-source engine #--------------------------------------------------------------------------------- ARCH := -march=armv6k -mtune=mpcore -mfloat-abi=hard -mtp=soft -CFLAGS := $(ARCH) -g0 -w -O3 -mword-relocations -fomit-frame-pointer -ffunction-sections +CFLAGS := $(ARCH) -g0 -w -Ofast -ffast-math -mword-relocations -fomit-frame-pointer -ffunction-sections CFLAGS += $(INCLUDE) -DARM11 -D_3DS CXXFLAGS := $(CFLAGS) -fno-rtti -fno-exceptions -std=gnu++11 diff --git a/src/platform/3ds/main.cpp b/src/platform/3ds/main.cpp index 72af6243..131c8985 100644 --- a/src/platform/3ds/main.cpp +++ b/src/platform/3ds/main.cpp @@ -33,7 +33,7 @@ int osGetTimeMS() { } // backlight -bool bottomScreenOn = true; +bool bottomScreenOn = false; void setBottomScreen(bool enable) { gspLcdInit(); @@ -46,10 +46,10 @@ aptHookCookie(cookie); void checkAptHook(APT_HookType hook, void *param) { if (!bottomScreenOn) { switch(hook) { - case APTHOOK_ONSUSPEND : setBottomScreen(1); + case APTHOOK_ONSUSPEND : setBottomScreen(true); break; case APTHOOK_ONRESTORE : - case APTHOOK_ONWAKEUP : setBottomScreen(0); + case APTHOOK_ONWAKEUP : setBottomScreen(false); break; default: break; @@ -97,13 +97,13 @@ void inputUpdate() { if (down & KEY_TOUCH) { bottomScreenOn = !bottomScreenOn; - bottomScreenOn ? setBottomScreen(1) : setBottomScreen(0); + bottomScreenOn ? setBottomScreen(true) : setBottomScreen(false); } } void inputFree() { if (!bottomScreenOn) - setBottomScreen(1); + setBottomScreen(true); hidExit(); } @@ -117,7 +117,6 @@ int sndBufIndex; bool sndReady; void sndFill(void *arg) { - LOG("thread start\n"); memset(sndWaveBuf, 0, sizeof(sndWaveBuf)); sndWaveBuf[0].data_vaddr = sndBuffer + 0; sndWaveBuf[0].nsamples = SND_FRAMES; @@ -177,6 +176,8 @@ void sndFree() { } int main() { + setBottomScreen(false); + { bool isNew3DS; APT_CheckNew3DS(&isNew3DS); @@ -189,10 +190,6 @@ int main() { strcpy(saveDir, "sdmc:/3ds/OpenLara/"); strcpy(contentDir, "sdmc:/3ds/OpenLara/"); - if(chdir(contentDir) != 0) { - return 0; - } - Stream::init(); sndInit(); @@ -202,16 +199,31 @@ int main() { Game::init(); - while (aptMainLoop() && !Core::isQuit) { - inputUpdate(); + if (Core::isQuit) { + bottomScreenOn = true; + setBottomScreen(true); + consoleClear(); + LOG("\n\nCopy the original game content to:\n\n %s\n\nPress A to exit", contentDir); + while (aptMainLoop()) { + hidScanInput(); + u64 mask = hidKeysDown() | hidKeysHeld(); + if (mask & KEY_A) { + break; + } - if (Input::joy[0].down[jkStart]) - Core::quit(); + gfxFlushBuffers(); + gfxSwapBuffers(); + gspWaitForVBlank(); + } + } else { + while (aptMainLoop() && !Core::isQuit) { + inputUpdate(); - Game::update(); - Game::render(); + Game::update(); + Game::render(); - GAPI::present(); + GAPI::present(); + } } inputFree(); From 1d07147e725df2abb7c241d2ef00657bf357380d Mon Sep 17 00:00:00 2001 From: Timur Gagiev Date: Wed, 25 Nov 2020 02:08:40 +0300 Subject: [PATCH 014/190] use Windows 10 SDK by default --- src/platform/win/OpenLara.sln | 10 ++-- src/platform/win/OpenLara.vcxproj | 65 ++++------------------- src/platform/win/OpenLara.vcxproj.filters | 3 ++ src/shaders/compose.glsl | 4 +- 4 files changed, 21 insertions(+), 61 deletions(-) diff --git a/src/platform/win/OpenLara.sln b/src/platform/win/OpenLara.sln index c49f4440..2079fe9a 100644 --- a/src/platform/win/OpenLara.sln +++ b/src/platform/win/OpenLara.sln @@ -1,25 +1,25 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Express 2013 for Windows Desktop -VisualStudioVersion = 12.0.31101.0 +# Visual Studio 15 +VisualStudioVersion = 15.0.28307.1022 MinimumVisualStudioVersion = 10.0.40219.1 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "OpenLara", "OpenLara.vcxproj", "{6935E070-59B8-418A-9241-70BACB4217B5}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 - Profile|Win32 = Profile|Win32 Release|Win32 = Release|Win32 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {6935E070-59B8-418A-9241-70BACB4217B5}.Debug|Win32.ActiveCfg = Debug|Win32 {6935E070-59B8-418A-9241-70BACB4217B5}.Debug|Win32.Build.0 = Debug|Win32 - {6935E070-59B8-418A-9241-70BACB4217B5}.Profile|Win32.ActiveCfg = Profile|Win32 - {6935E070-59B8-418A-9241-70BACB4217B5}.Profile|Win32.Build.0 = Profile|Win32 {6935E070-59B8-418A-9241-70BACB4217B5}.Release|Win32.ActiveCfg = Release|Win32 {6935E070-59B8-418A-9241-70BACB4217B5}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {969CCE82-3511-4643-9273-4B4554C4E782} + EndGlobalSection EndGlobal diff --git a/src/platform/win/OpenLara.vcxproj b/src/platform/win/OpenLara.vcxproj index 2c9aeb92..b4c093c0 100644 --- a/src/platform/win/OpenLara.vcxproj +++ b/src/platform/win/OpenLara.vcxproj @@ -5,10 +5,6 @@ Debug Win32 - - Profile - Win32 - Release Win32 @@ -30,14 +26,7 @@ Application false - v141_xp - true - NotSet - - - Application - false - v141_xp + v141 true NotSet @@ -50,29 +39,23 @@ - - - true ..\..\..\bin\ - ..\..\libs\;..\..\;$(VC_IncludePath);$(WindowsSdk_71A_IncludePath); - ..\..\libs\openvr\;$(VC_LibraryPath_x86);$(WindowsSdk_71A_LibraryPath_x86); + ..\..\libs\;..\..\;$(VC_IncludePath);$(WindowsSDK_IncludePath); + ..\..\libs\openvr\;$(VC_LibraryPath_x86);$(WindowsSDK_LibraryPath_x86); + $(VC_IncludePath);$(WindowsSDK_IncludePath);$(VC_ExecutablePath_x86);$(WindowsSDK_ExecutablePath);$(VS_ExecutablePath);$(FxCopDir);$(MSBuild_ExecutablePath);$(VC_LibraryPath_x86);$(SystemRoot) + $(VC_ExecutablePath_x86);$(WindowsSDK_ExecutablePath);$(VS_ExecutablePath);$(MSBuild_ExecutablePath);$(SystemRoot)\SysWow64;$(FxCopDir);$(PATH); false ..\..\..\bin\ false - ..\..\libs\;..\..\;$(VC_IncludePath);$(WindowsSdk_71A_IncludePath); - ..\..\libs\openvr\;$(VC_LibraryPath_x86);$(WindowsSdk_71A_LibraryPath_x86); - - - false - ..\..\..\bin\ - false - ..\..\;$(VC_IncludePath);$(WindowsSdk_71A_IncludePath); - ..\..\libs\openvr\;$(VC_LibraryPath_x86);$(WindowsSdk_71A_LibraryPath_x86); + ..\..\libs\openvr\;$(VC_LibraryPath_x86);$(WindowsSDK_LibraryPath_x86); + ..\..\libs\;..\..\;$(VC_IncludePath);$(WindowsSDK_IncludePath); + $(VC_IncludePath);$(WindowsSDK_IncludePath);$(VC_ExecutablePath_x86);$(WindowsSDK_ExecutablePath);$(VS_ExecutablePath);$(FxCopDir);$(MSBuild_ExecutablePath);$(VC_LibraryPath_x86);$(SystemRoot) + $(VC_ExecutablePath_x86);$(WindowsSDK_ExecutablePath);$(VS_ExecutablePath);$(MSBuild_ExecutablePath);$(SystemRoot)\SysWow64;$(FxCopDir);$(PATH); @@ -121,35 +104,6 @@ true - - - Level3 - - - Full - true - true - PROFILE;MINIMAL;NOMINMAX;_CRT_SECURE_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) - false - false - MultiThreaded - Strict - false - Speed - /d2noftol3 %(AdditionalOptions) - true - - - Console - true - true - true - wcrt.lib;wsock32.lib;opengl32.lib;d3d11.lib;winmm.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) - true - false - false - - @@ -173,6 +127,7 @@ + diff --git a/src/platform/win/OpenLara.vcxproj.filters b/src/platform/win/OpenLara.vcxproj.filters index d20ce2be..52a1913f 100644 --- a/src/platform/win/OpenLara.vcxproj.filters +++ b/src/platform/win/OpenLara.vcxproj.filters @@ -128,6 +128,9 @@ lang + + gapi + diff --git a/src/shaders/compose.glsl b/src/shaders/compose.glsl index 16264ff2..4a47b765 100644 --- a/src/shaders/compose.glsl +++ b/src/shaders/compose.glsl @@ -148,7 +148,9 @@ varying vec4 vTexCoord; // xy - atlas coords, zw - trapezoidal correction #ifdef TYPE_FLASH vDiffuse.xyz += uMaterial.w; - #else + #endif + + #ifdef TYPE_ENTITY vDiffuse *= uMaterial.w; #endif From 960f2ad6e9090e2b073f13f5f3636f7a22b39878 Mon Sep 17 00:00:00 2001 From: Timur Gagiev Date: Wed, 25 Nov 2020 04:25:17 +0300 Subject: [PATCH 015/190] fix windows project settings --- src/platform/win/OpenLara.vcxproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/platform/win/OpenLara.vcxproj b/src/platform/win/OpenLara.vcxproj index b4c093c0..bd624ddd 100644 --- a/src/platform/win/OpenLara.vcxproj +++ b/src/platform/win/OpenLara.vcxproj @@ -14,13 +14,13 @@ {6935E070-59B8-418A-9241-70BACB4217B5} Win32Proj OpenLara - 8.1 + 10.0.10240.0 Application true - v141_xp + v141 NotSet From e8b55939aa4262f0f22e8669a792c164dcbcdead Mon Sep 17 00:00:00 2001 From: Timur Gagiev Date: Wed, 25 Nov 2020 05:32:02 +0300 Subject: [PATCH 016/190] merge OGL 3.2 support from Vulkan branch --- src/gapi/gl.h | 104 ++--- src/libs/gl/wglext.h | 840 ++++++++++++++++++++++++++++++++++++++ src/platform/win/main.cpp | 65 ++- 3 files changed, 954 insertions(+), 55 deletions(-) create mode 100644 src/libs/gl/wglext.h diff --git a/src/gapi/gl.h b/src/gapi/gl.h index f1afed32..4b79342f 100644 --- a/src/gapi/gl.h +++ b/src/gapi/gl.h @@ -10,6 +10,7 @@ #ifdef _OS_WIN #include #include + #include #elif _OS_ANDROID #include @@ -343,6 +344,7 @@ #ifdef _OS_WIN PFNGLTEXIMAGE3DPROC glTexImage3D; #endif + PFNGLGETSTRINGIPROC glGetStringi; // Profiling #ifdef PROFILE PFNGLOBJECTLABELPROC glObjectLabel; @@ -379,16 +381,17 @@ PFNGLVERTEXATTRIBPOINTERPROC glVertexAttribPointer; PFNGLGETPROGRAMIVPROC glGetProgramiv; // Render to texture - PFNGLGENFRAMEBUFFERSPROC glGenFramebuffers; - PFNGLBINDFRAMEBUFFERPROC glBindFramebuffer; - PFNGLGENRENDERBUFFERSPROC glGenRenderbuffers; - PFNGLBINDRENDERBUFFERPROC glBindRenderbuffer; - PFNGLFRAMEBUFFERTEXTURE2DPROC glFramebufferTexture2D; - PFNGLFRAMEBUFFERRENDERBUFFERPROC glFramebufferRenderbuffer; - PFNGLRENDERBUFFERSTORAGEPROC glRenderbufferStorage; - PFNGLCHECKFRAMEBUFFERSTATUSPROC glCheckFramebufferStatus; - PFNGLDELETEFRAMEBUFFERSPROC glDeleteFramebuffers; - PFNGLDELETERENDERBUFFERSPROC glDeleteRenderbuffers; + PFNGLGENFRAMEBUFFERSPROC glGenFramebuffers; + PFNGLBINDFRAMEBUFFERPROC glBindFramebuffer; + PFNGLGENRENDERBUFFERSPROC glGenRenderbuffers; + PFNGLBINDRENDERBUFFERPROC glBindRenderbuffer; + PFNGLFRAMEBUFFERTEXTURE2DPROC glFramebufferTexture2D; + PFNGLFRAMEBUFFERRENDERBUFFERPROC glFramebufferRenderbuffer; + PFNGLRENDERBUFFERSTORAGEPROC glRenderbufferStorage; + PFNGLCHECKFRAMEBUFFERSTATUSPROC glCheckFramebufferStatus; + PFNGLDELETEFRAMEBUFFERSPROC glDeleteFramebuffers; + PFNGLDELETERENDERBUFFERSPROC glDeleteRenderbuffers; + PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC glGetFramebufferAttachmentParameteriv; // Mesh PFNGLGENBUFFERSARBPROC glGenBuffers; PFNGLDELETEBUFFERSARBPROC glDeleteBuffers; @@ -1139,9 +1142,26 @@ namespace GAPI { }; Array rtCache[2]; - bool extSupport(const char *str, const char *ext) { - if (!str) return false; - return strstr(str, ext) != NULL; + + bool extSupport(const char *str) { + if (glGetStringi != NULL) { + GLint count = 0; + glGetIntegerv(GL_NUM_EXTENSIONS, &count); + for (int i = 0; i < count; i++) { + const char *ext = (const char*)glGetStringi(GL_EXTENSIONS, i); + if (strstr(ext, str) != NULL) { + return true; + } + } + } else { + const char *ext = (const char*)glGetString(GL_EXTENSIONS); + if (!ext) { + return false; + } + return strstr(ext, str) != NULL; + } + + return false; } void init() { @@ -1170,6 +1190,8 @@ namespace GAPI { GetProcOGL(glTexImage3D); #endif + GetProcOGL(glGetStringi); + #ifdef PROFILE GetProcOGL(glObjectLabel); GetProcOGL(glPushDebugGroup); @@ -1215,6 +1237,7 @@ namespace GAPI { GetProcOGL(glCheckFramebufferStatus); GetProcOGL(glDeleteFramebuffers); GetProcOGL(glDeleteRenderbuffers); + GetProcOGL(glGetFramebufferAttachmentParameteriv); GetProcOGL(glGenBuffers); GetProcOGL(glDeleteBuffers); @@ -1239,21 +1262,6 @@ namespace GAPI { LOG("Renderer : %s\n", (char*)glGetString(GL_RENDERER)); LOG("Version : %s\n", (char*)glGetString(GL_VERSION)); - char *ext = (char*)glGetString(GL_EXTENSIONS); -/* - if (ext != NULL) { - char buf[255]; - int len = strlen(ext); - int start = 0; - for (int i = 0; i < len; i++) - if (ext[i] == ' ' || (i == len - 1)) { - memcpy(buf, &ext[start], i - start); - buf[i - start] = 0; - LOG("%s\n", buf); - start = i + 1; - } - } -*/ #ifndef FFP bool GLES3 = false; #ifdef _OS_WEB @@ -1274,19 +1282,19 @@ namespace GAPI { #endif #endif - bool _GL_EXT_shadow_samplers = extSupport(ext, "GL_EXT_shadow_samplers"); - bool _GL_ARB_shadow = extSupport(ext, "GL_ARB_shadow"); - bool _GL_OES_standard_derivatives = extSupport(ext, "GL_OES_standard_derivatives"); + bool _GL_EXT_shadow_samplers = extSupport("GL_EXT_shadow_samplers"); + bool _GL_ARB_shadow = extSupport("GL_ARB_shadow"); + bool _GL_OES_standard_derivatives = extSupport("GL_OES_standard_derivatives"); - support.shaderBinary = extSupport(ext, "_program_binary"); - support.VAO = GLES3 || extSupport(ext, "_vertex_array_object"); + support.shaderBinary = extSupport("_program_binary"); + support.VAO = GLES3 || extSupport("_vertex_array_object"); support.VBO = glGenBuffers != NULL; - support.depthTexture = GLES3 || extSupport(ext, "_depth_texture"); + support.depthTexture = GLES3 || extSupport("_depth_texture"); support.shadowSampler = _GL_EXT_shadow_samplers || _GL_ARB_shadow; - support.discardFrame = extSupport(ext, "_discard_framebuffer"); - support.texNPOT = GLES3 || extSupport(ext, "_texture_npot") || extSupport(ext, "_texture_non_power_of_two"); - support.texRG = GLES3 || extSupport(ext, "_texture_rg "); // hope that isn't last extension in string ;) - support.texMaxLevel = GLES3 || extSupport(ext, "_texture_max_level"); + support.discardFrame = extSupport("_discard_framebuffer"); + support.texNPOT = GLES3 || extSupport("_texture_npot") || extSupport("_texture_non_power_of_two"); + support.texRG = GLES3 || extSupport("_texture_rg "); // hope that isn't last extension in string ;) + support.texMaxLevel = GLES3 || extSupport("_texture_max_level"); #ifdef _GAPI_GLES2 // TODO support.shaderBinary = false; @@ -1301,15 +1309,15 @@ namespace GAPI { support.derivatives = true; support.tex3D = glTexImage3D != NULL; #endif - support.texBorder = extSupport(ext, "_texture_border_clamp"); - support.maxAniso = extSupport(ext, "_texture_filter_anisotropic"); - support.colorFloat = extSupport(ext, "_color_buffer_float"); - support.colorHalf = extSupport(ext, "_color_buffer_half_float") || extSupport(ext, "GL_ARB_half_float_pixel"); - support.texFloatLinear = support.colorFloat || extSupport(ext, "GL_ARB_texture_float") || extSupport(ext, "_texture_float_linear"); - support.texFloat = support.texFloatLinear || extSupport(ext, "_texture_float"); - support.texHalfLinear = support.colorHalf || extSupport(ext, "GL_ARB_texture_float") || extSupport(ext, "_texture_half_float_linear") || extSupport(ext, "_color_buffer_half_float"); + support.texBorder = extSupport("_texture_border_clamp"); + support.maxAniso = extSupport("_texture_filter_anisotropic"); + support.colorFloat = extSupport("_color_buffer_float"); + support.colorHalf = extSupport("_color_buffer_half_float") || extSupport("GL_ARB_half_float_pixel"); + support.texFloatLinear = support.colorFloat || extSupport("GL_ARB_texture_float") || extSupport("_texture_float_linear"); + support.texFloat = support.texFloatLinear || extSupport("_texture_float"); + support.texHalfLinear = support.colorHalf || extSupport("GL_ARB_texture_float") || extSupport("_texture_half_float_linear") || extSupport("_color_buffer_half_float"); - support.texHalf = support.texHalfLinear || extSupport(ext, "_texture_half_float"); + support.texHalf = support.texHalfLinear || extSupport("_texture_half_float"); #ifdef SDL2_GLES support.shaderBinary = false; // TODO @@ -1318,8 +1326,8 @@ namespace GAPI { #endif #ifdef PROFILE - support.profMarker = extSupport(ext, "_KHR_debug"); - support.profTiming = extSupport(ext, "_timer_query"); + support.profMarker = extSupport("_KHR_debug"); + support.profTiming = extSupport("_timer_query"); #endif if (support.maxAniso) diff --git a/src/libs/gl/wglext.h b/src/libs/gl/wglext.h new file mode 100644 index 00000000..1f447dcb --- /dev/null +++ b/src/libs/gl/wglext.h @@ -0,0 +1,840 @@ +#ifndef __wglext_h_ +#define __wglext_h_ 1 + +#ifdef __cplusplus +extern "C" { +#endif + +/* +** Copyright (c) 2013-2015 The Khronos Group Inc. +** +** Permission is hereby granted, free of charge, to any person obtaining a +** copy of this software and/or associated documentation files (the +** "Materials"), to deal in the Materials without restriction, including +** without limitation the rights to use, copy, modify, merge, publish, +** distribute, sublicense, and/or sell copies of the Materials, and to +** permit persons to whom the Materials are furnished to do so, subject to +** the following conditions: +** +** The above copyright notice and this permission notice shall be included +** in all copies or substantial portions of the Materials. +** +** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. +*/ +/* +** This header is generated from the Khronos OpenGL / OpenGL ES XML +** API Registry. The current version of the Registry, generator scripts +** used to make the header, and the header can be found at +** http://www.opengl.org/registry/ +** +** Khronos $Revision: 31597 $ on $Date: 2015-06-25 16:32:35 -0400 (Thu, 25 Jun 2015) $ +*/ + +#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__) +#define WIN32_LEAN_AND_MEAN 1 +#include +#endif + +#define WGL_WGLEXT_VERSION 20150623 + +/* Generated C header for: + * API: wgl + * Versions considered: .* + * Versions emitted: _nomatch_^ + * Default extensions included: wgl + * Additional extensions included: _nomatch_^ + * Extensions removed: _nomatch_^ + */ + +#ifndef WGL_ARB_buffer_region +#define WGL_ARB_buffer_region 1 +#define WGL_FRONT_COLOR_BUFFER_BIT_ARB 0x00000001 +#define WGL_BACK_COLOR_BUFFER_BIT_ARB 0x00000002 +#define WGL_DEPTH_BUFFER_BIT_ARB 0x00000004 +#define WGL_STENCIL_BUFFER_BIT_ARB 0x00000008 +typedef HANDLE (WINAPI * PFNWGLCREATEBUFFERREGIONARBPROC) (HDC hDC, int iLayerPlane, UINT uType); +typedef VOID (WINAPI * PFNWGLDELETEBUFFERREGIONARBPROC) (HANDLE hRegion); +typedef BOOL (WINAPI * PFNWGLSAVEBUFFERREGIONARBPROC) (HANDLE hRegion, int x, int y, int width, int height); +typedef BOOL (WINAPI * PFNWGLRESTOREBUFFERREGIONARBPROC) (HANDLE hRegion, int x, int y, int width, int height, int xSrc, int ySrc); +#ifdef WGL_WGLEXT_PROTOTYPES +HANDLE WINAPI wglCreateBufferRegionARB (HDC hDC, int iLayerPlane, UINT uType); +VOID WINAPI wglDeleteBufferRegionARB (HANDLE hRegion); +BOOL WINAPI wglSaveBufferRegionARB (HANDLE hRegion, int x, int y, int width, int height); +BOOL WINAPI wglRestoreBufferRegionARB (HANDLE hRegion, int x, int y, int width, int height, int xSrc, int ySrc); +#endif +#endif /* WGL_ARB_buffer_region */ + +#ifndef WGL_ARB_context_flush_control +#define WGL_ARB_context_flush_control 1 +#define WGL_CONTEXT_RELEASE_BEHAVIOR_ARB 0x2097 +#define WGL_CONTEXT_RELEASE_BEHAVIOR_NONE_ARB 0 +#define WGL_CONTEXT_RELEASE_BEHAVIOR_FLUSH_ARB 0x2098 +#endif /* WGL_ARB_context_flush_control */ + +#ifndef WGL_ARB_create_context +#define WGL_ARB_create_context 1 +#define WGL_CONTEXT_DEBUG_BIT_ARB 0x00000001 +#define WGL_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB 0x00000002 +#define WGL_CONTEXT_MAJOR_VERSION_ARB 0x2091 +#define WGL_CONTEXT_MINOR_VERSION_ARB 0x2092 +#define WGL_CONTEXT_LAYER_PLANE_ARB 0x2093 +#define WGL_CONTEXT_FLAGS_ARB 0x2094 +#define ERROR_INVALID_VERSION_ARB 0x2095 +typedef HGLRC (WINAPI * PFNWGLCREATECONTEXTATTRIBSARBPROC) (HDC hDC, HGLRC hShareContext, const int *attribList); +#ifdef WGL_WGLEXT_PROTOTYPES +HGLRC WINAPI wglCreateContextAttribsARB (HDC hDC, HGLRC hShareContext, const int *attribList); +#endif +#endif /* WGL_ARB_create_context */ + +#ifndef WGL_ARB_create_context_profile +#define WGL_ARB_create_context_profile 1 +#define WGL_CONTEXT_PROFILE_MASK_ARB 0x9126 +#define WGL_CONTEXT_CORE_PROFILE_BIT_ARB 0x00000001 +#define WGL_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB 0x00000002 +#define ERROR_INVALID_PROFILE_ARB 0x2096 +#endif /* WGL_ARB_create_context_profile */ + +#ifndef WGL_ARB_create_context_robustness +#define WGL_ARB_create_context_robustness 1 +#define WGL_CONTEXT_ROBUST_ACCESS_BIT_ARB 0x00000004 +#define WGL_LOSE_CONTEXT_ON_RESET_ARB 0x8252 +#define WGL_CONTEXT_RESET_NOTIFICATION_STRATEGY_ARB 0x8256 +#define WGL_NO_RESET_NOTIFICATION_ARB 0x8261 +#endif /* WGL_ARB_create_context_robustness */ + +#ifndef WGL_ARB_extensions_string +#define WGL_ARB_extensions_string 1 +typedef const char *(WINAPI * PFNWGLGETEXTENSIONSSTRINGARBPROC) (HDC hdc); +#ifdef WGL_WGLEXT_PROTOTYPES +const char *WINAPI wglGetExtensionsStringARB (HDC hdc); +#endif +#endif /* WGL_ARB_extensions_string */ + +#ifndef WGL_ARB_framebuffer_sRGB +#define WGL_ARB_framebuffer_sRGB 1 +#define WGL_FRAMEBUFFER_SRGB_CAPABLE_ARB 0x20A9 +#endif /* WGL_ARB_framebuffer_sRGB */ + +#ifndef WGL_ARB_make_current_read +#define WGL_ARB_make_current_read 1 +#define ERROR_INVALID_PIXEL_TYPE_ARB 0x2043 +#define ERROR_INCOMPATIBLE_DEVICE_CONTEXTS_ARB 0x2054 +typedef BOOL (WINAPI * PFNWGLMAKECONTEXTCURRENTARBPROC) (HDC hDrawDC, HDC hReadDC, HGLRC hglrc); +typedef HDC (WINAPI * PFNWGLGETCURRENTREADDCARBPROC) (void); +#ifdef WGL_WGLEXT_PROTOTYPES +BOOL WINAPI wglMakeContextCurrentARB (HDC hDrawDC, HDC hReadDC, HGLRC hglrc); +HDC WINAPI wglGetCurrentReadDCARB (void); +#endif +#endif /* WGL_ARB_make_current_read */ + +#ifndef WGL_ARB_multisample +#define WGL_ARB_multisample 1 +#define WGL_SAMPLE_BUFFERS_ARB 0x2041 +#define WGL_SAMPLES_ARB 0x2042 +#endif /* WGL_ARB_multisample */ + +#ifndef WGL_ARB_pbuffer +#define WGL_ARB_pbuffer 1 +DECLARE_HANDLE(HPBUFFERARB); +#define WGL_DRAW_TO_PBUFFER_ARB 0x202D +#define WGL_MAX_PBUFFER_PIXELS_ARB 0x202E +#define WGL_MAX_PBUFFER_WIDTH_ARB 0x202F +#define WGL_MAX_PBUFFER_HEIGHT_ARB 0x2030 +#define WGL_PBUFFER_LARGEST_ARB 0x2033 +#define WGL_PBUFFER_WIDTH_ARB 0x2034 +#define WGL_PBUFFER_HEIGHT_ARB 0x2035 +#define WGL_PBUFFER_LOST_ARB 0x2036 +typedef HPBUFFERARB (WINAPI * PFNWGLCREATEPBUFFERARBPROC) (HDC hDC, int iPixelFormat, int iWidth, int iHeight, const int *piAttribList); +typedef HDC (WINAPI * PFNWGLGETPBUFFERDCARBPROC) (HPBUFFERARB hPbuffer); +typedef int (WINAPI * PFNWGLRELEASEPBUFFERDCARBPROC) (HPBUFFERARB hPbuffer, HDC hDC); +typedef BOOL (WINAPI * PFNWGLDESTROYPBUFFERARBPROC) (HPBUFFERARB hPbuffer); +typedef BOOL (WINAPI * PFNWGLQUERYPBUFFERARBPROC) (HPBUFFERARB hPbuffer, int iAttribute, int *piValue); +#ifdef WGL_WGLEXT_PROTOTYPES +HPBUFFERARB WINAPI wglCreatePbufferARB (HDC hDC, int iPixelFormat, int iWidth, int iHeight, const int *piAttribList); +HDC WINAPI wglGetPbufferDCARB (HPBUFFERARB hPbuffer); +int WINAPI wglReleasePbufferDCARB (HPBUFFERARB hPbuffer, HDC hDC); +BOOL WINAPI wglDestroyPbufferARB (HPBUFFERARB hPbuffer); +BOOL WINAPI wglQueryPbufferARB (HPBUFFERARB hPbuffer, int iAttribute, int *piValue); +#endif +#endif /* WGL_ARB_pbuffer */ + +#ifndef WGL_ARB_pixel_format +#define WGL_ARB_pixel_format 1 +#define WGL_NUMBER_PIXEL_FORMATS_ARB 0x2000 +#define WGL_DRAW_TO_WINDOW_ARB 0x2001 +#define WGL_DRAW_TO_BITMAP_ARB 0x2002 +#define WGL_ACCELERATION_ARB 0x2003 +#define WGL_NEED_PALETTE_ARB 0x2004 +#define WGL_NEED_SYSTEM_PALETTE_ARB 0x2005 +#define WGL_SWAP_LAYER_BUFFERS_ARB 0x2006 +#define WGL_SWAP_METHOD_ARB 0x2007 +#define WGL_NUMBER_OVERLAYS_ARB 0x2008 +#define WGL_NUMBER_UNDERLAYS_ARB 0x2009 +#define WGL_TRANSPARENT_ARB 0x200A +#define WGL_TRANSPARENT_RED_VALUE_ARB 0x2037 +#define WGL_TRANSPARENT_GREEN_VALUE_ARB 0x2038 +#define WGL_TRANSPARENT_BLUE_VALUE_ARB 0x2039 +#define WGL_TRANSPARENT_ALPHA_VALUE_ARB 0x203A +#define WGL_TRANSPARENT_INDEX_VALUE_ARB 0x203B +#define WGL_SHARE_DEPTH_ARB 0x200C +#define WGL_SHARE_STENCIL_ARB 0x200D +#define WGL_SHARE_ACCUM_ARB 0x200E +#define WGL_SUPPORT_GDI_ARB 0x200F +#define WGL_SUPPORT_OPENGL_ARB 0x2010 +#define WGL_DOUBLE_BUFFER_ARB 0x2011 +#define WGL_STEREO_ARB 0x2012 +#define WGL_PIXEL_TYPE_ARB 0x2013 +#define WGL_COLOR_BITS_ARB 0x2014 +#define WGL_RED_BITS_ARB 0x2015 +#define WGL_RED_SHIFT_ARB 0x2016 +#define WGL_GREEN_BITS_ARB 0x2017 +#define WGL_GREEN_SHIFT_ARB 0x2018 +#define WGL_BLUE_BITS_ARB 0x2019 +#define WGL_BLUE_SHIFT_ARB 0x201A +#define WGL_ALPHA_BITS_ARB 0x201B +#define WGL_ALPHA_SHIFT_ARB 0x201C +#define WGL_ACCUM_BITS_ARB 0x201D +#define WGL_ACCUM_RED_BITS_ARB 0x201E +#define WGL_ACCUM_GREEN_BITS_ARB 0x201F +#define WGL_ACCUM_BLUE_BITS_ARB 0x2020 +#define WGL_ACCUM_ALPHA_BITS_ARB 0x2021 +#define WGL_DEPTH_BITS_ARB 0x2022 +#define WGL_STENCIL_BITS_ARB 0x2023 +#define WGL_AUX_BUFFERS_ARB 0x2024 +#define WGL_NO_ACCELERATION_ARB 0x2025 +#define WGL_GENERIC_ACCELERATION_ARB 0x2026 +#define WGL_FULL_ACCELERATION_ARB 0x2027 +#define WGL_SWAP_EXCHANGE_ARB 0x2028 +#define WGL_SWAP_COPY_ARB 0x2029 +#define WGL_SWAP_UNDEFINED_ARB 0x202A +#define WGL_TYPE_RGBA_ARB 0x202B +#define WGL_TYPE_COLORINDEX_ARB 0x202C +typedef BOOL (WINAPI * PFNWGLGETPIXELFORMATATTRIBIVARBPROC) (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, const int *piAttributes, int *piValues); +typedef BOOL (WINAPI * PFNWGLGETPIXELFORMATATTRIBFVARBPROC) (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, const int *piAttributes, FLOAT *pfValues); +typedef BOOL (WINAPI * PFNWGLCHOOSEPIXELFORMATARBPROC) (HDC hdc, const int *piAttribIList, const FLOAT *pfAttribFList, UINT nMaxFormats, int *piFormats, UINT *nNumFormats); +#ifdef WGL_WGLEXT_PROTOTYPES +BOOL WINAPI wglGetPixelFormatAttribivARB (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, const int *piAttributes, int *piValues); +BOOL WINAPI wglGetPixelFormatAttribfvARB (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, const int *piAttributes, FLOAT *pfValues); +BOOL WINAPI wglChoosePixelFormatARB (HDC hdc, const int *piAttribIList, const FLOAT *pfAttribFList, UINT nMaxFormats, int *piFormats, UINT *nNumFormats); +#endif +#endif /* WGL_ARB_pixel_format */ + +#ifndef WGL_ARB_pixel_format_float +#define WGL_ARB_pixel_format_float 1 +#define WGL_TYPE_RGBA_FLOAT_ARB 0x21A0 +#endif /* WGL_ARB_pixel_format_float */ + +#ifndef WGL_ARB_render_texture +#define WGL_ARB_render_texture 1 +#define WGL_BIND_TO_TEXTURE_RGB_ARB 0x2070 +#define WGL_BIND_TO_TEXTURE_RGBA_ARB 0x2071 +#define WGL_TEXTURE_FORMAT_ARB 0x2072 +#define WGL_TEXTURE_TARGET_ARB 0x2073 +#define WGL_MIPMAP_TEXTURE_ARB 0x2074 +#define WGL_TEXTURE_RGB_ARB 0x2075 +#define WGL_TEXTURE_RGBA_ARB 0x2076 +#define WGL_NO_TEXTURE_ARB 0x2077 +#define WGL_TEXTURE_CUBE_MAP_ARB 0x2078 +#define WGL_TEXTURE_1D_ARB 0x2079 +#define WGL_TEXTURE_2D_ARB 0x207A +#define WGL_MIPMAP_LEVEL_ARB 0x207B +#define WGL_CUBE_MAP_FACE_ARB 0x207C +#define WGL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB 0x207D +#define WGL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB 0x207E +#define WGL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB 0x207F +#define WGL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB 0x2080 +#define WGL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB 0x2081 +#define WGL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB 0x2082 +#define WGL_FRONT_LEFT_ARB 0x2083 +#define WGL_FRONT_RIGHT_ARB 0x2084 +#define WGL_BACK_LEFT_ARB 0x2085 +#define WGL_BACK_RIGHT_ARB 0x2086 +#define WGL_AUX0_ARB 0x2087 +#define WGL_AUX1_ARB 0x2088 +#define WGL_AUX2_ARB 0x2089 +#define WGL_AUX3_ARB 0x208A +#define WGL_AUX4_ARB 0x208B +#define WGL_AUX5_ARB 0x208C +#define WGL_AUX6_ARB 0x208D +#define WGL_AUX7_ARB 0x208E +#define WGL_AUX8_ARB 0x208F +#define WGL_AUX9_ARB 0x2090 +typedef BOOL (WINAPI * PFNWGLBINDTEXIMAGEARBPROC) (HPBUFFERARB hPbuffer, int iBuffer); +typedef BOOL (WINAPI * PFNWGLRELEASETEXIMAGEARBPROC) (HPBUFFERARB hPbuffer, int iBuffer); +typedef BOOL (WINAPI * PFNWGLSETPBUFFERATTRIBARBPROC) (HPBUFFERARB hPbuffer, const int *piAttribList); +#ifdef WGL_WGLEXT_PROTOTYPES +BOOL WINAPI wglBindTexImageARB (HPBUFFERARB hPbuffer, int iBuffer); +BOOL WINAPI wglReleaseTexImageARB (HPBUFFERARB hPbuffer, int iBuffer); +BOOL WINAPI wglSetPbufferAttribARB (HPBUFFERARB hPbuffer, const int *piAttribList); +#endif +#endif /* WGL_ARB_render_texture */ + +#ifndef WGL_ARB_robustness_application_isolation +#define WGL_ARB_robustness_application_isolation 1 +#define WGL_CONTEXT_RESET_ISOLATION_BIT_ARB 0x00000008 +#endif /* WGL_ARB_robustness_application_isolation */ + +#ifndef WGL_ARB_robustness_share_group_isolation +#define WGL_ARB_robustness_share_group_isolation 1 +#endif /* WGL_ARB_robustness_share_group_isolation */ + +#ifndef WGL_3DFX_multisample +#define WGL_3DFX_multisample 1 +#define WGL_SAMPLE_BUFFERS_3DFX 0x2060 +#define WGL_SAMPLES_3DFX 0x2061 +#endif /* WGL_3DFX_multisample */ + +#ifndef WGL_3DL_stereo_control +#define WGL_3DL_stereo_control 1 +#define WGL_STEREO_EMITTER_ENABLE_3DL 0x2055 +#define WGL_STEREO_EMITTER_DISABLE_3DL 0x2056 +#define WGL_STEREO_POLARITY_NORMAL_3DL 0x2057 +#define WGL_STEREO_POLARITY_INVERT_3DL 0x2058 +typedef BOOL (WINAPI * PFNWGLSETSTEREOEMITTERSTATE3DLPROC) (HDC hDC, UINT uState); +#ifdef WGL_WGLEXT_PROTOTYPES +BOOL WINAPI wglSetStereoEmitterState3DL (HDC hDC, UINT uState); +#endif +#endif /* WGL_3DL_stereo_control */ + +#ifndef WGL_AMD_gpu_association +#define WGL_AMD_gpu_association 1 +#define WGL_GPU_VENDOR_AMD 0x1F00 +#define WGL_GPU_RENDERER_STRING_AMD 0x1F01 +#define WGL_GPU_OPENGL_VERSION_STRING_AMD 0x1F02 +#define WGL_GPU_FASTEST_TARGET_GPUS_AMD 0x21A2 +#define WGL_GPU_RAM_AMD 0x21A3 +#define WGL_GPU_CLOCK_AMD 0x21A4 +#define WGL_GPU_NUM_PIPES_AMD 0x21A5 +#define WGL_GPU_NUM_SIMD_AMD 0x21A6 +#define WGL_GPU_NUM_RB_AMD 0x21A7 +#define WGL_GPU_NUM_SPI_AMD 0x21A8 +typedef UINT (WINAPI * PFNWGLGETGPUIDSAMDPROC) (UINT maxCount, UINT *ids); +typedef INT (WINAPI * PFNWGLGETGPUINFOAMDPROC) (UINT id, int property, GLenum dataType, UINT size, void *data); +typedef UINT (WINAPI * PFNWGLGETCONTEXTGPUIDAMDPROC) (HGLRC hglrc); +typedef HGLRC (WINAPI * PFNWGLCREATEASSOCIATEDCONTEXTAMDPROC) (UINT id); +typedef HGLRC (WINAPI * PFNWGLCREATEASSOCIATEDCONTEXTATTRIBSAMDPROC) (UINT id, HGLRC hShareContext, const int *attribList); +typedef BOOL (WINAPI * PFNWGLDELETEASSOCIATEDCONTEXTAMDPROC) (HGLRC hglrc); +typedef BOOL (WINAPI * PFNWGLMAKEASSOCIATEDCONTEXTCURRENTAMDPROC) (HGLRC hglrc); +typedef HGLRC (WINAPI * PFNWGLGETCURRENTASSOCIATEDCONTEXTAMDPROC) (void); +typedef VOID (WINAPI * PFNWGLBLITCONTEXTFRAMEBUFFERAMDPROC) (HGLRC dstCtx, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); +#ifdef WGL_WGLEXT_PROTOTYPES +UINT WINAPI wglGetGPUIDsAMD (UINT maxCount, UINT *ids); +INT WINAPI wglGetGPUInfoAMD (UINT id, int property, GLenum dataType, UINT size, void *data); +UINT WINAPI wglGetContextGPUIDAMD (HGLRC hglrc); +HGLRC WINAPI wglCreateAssociatedContextAMD (UINT id); +HGLRC WINAPI wglCreateAssociatedContextAttribsAMD (UINT id, HGLRC hShareContext, const int *attribList); +BOOL WINAPI wglDeleteAssociatedContextAMD (HGLRC hglrc); +BOOL WINAPI wglMakeAssociatedContextCurrentAMD (HGLRC hglrc); +HGLRC WINAPI wglGetCurrentAssociatedContextAMD (void); +VOID WINAPI wglBlitContextFramebufferAMD (HGLRC dstCtx, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); +#endif +#endif /* WGL_AMD_gpu_association */ + +#ifndef WGL_ATI_pixel_format_float +#define WGL_ATI_pixel_format_float 1 +#define WGL_TYPE_RGBA_FLOAT_ATI 0x21A0 +#endif /* WGL_ATI_pixel_format_float */ + +#ifndef WGL_EXT_create_context_es2_profile +#define WGL_EXT_create_context_es2_profile 1 +#define WGL_CONTEXT_ES2_PROFILE_BIT_EXT 0x00000004 +#endif /* WGL_EXT_create_context_es2_profile */ + +#ifndef WGL_EXT_create_context_es_profile +#define WGL_EXT_create_context_es_profile 1 +#define WGL_CONTEXT_ES_PROFILE_BIT_EXT 0x00000004 +#endif /* WGL_EXT_create_context_es_profile */ + +#ifndef WGL_EXT_depth_float +#define WGL_EXT_depth_float 1 +#define WGL_DEPTH_FLOAT_EXT 0x2040 +#endif /* WGL_EXT_depth_float */ + +#ifndef WGL_EXT_display_color_table +#define WGL_EXT_display_color_table 1 +typedef GLboolean (WINAPI * PFNWGLCREATEDISPLAYCOLORTABLEEXTPROC) (GLushort id); +typedef GLboolean (WINAPI * PFNWGLLOADDISPLAYCOLORTABLEEXTPROC) (const GLushort *table, GLuint length); +typedef GLboolean (WINAPI * PFNWGLBINDDISPLAYCOLORTABLEEXTPROC) (GLushort id); +typedef VOID (WINAPI * PFNWGLDESTROYDISPLAYCOLORTABLEEXTPROC) (GLushort id); +#ifdef WGL_WGLEXT_PROTOTYPES +GLboolean WINAPI wglCreateDisplayColorTableEXT (GLushort id); +GLboolean WINAPI wglLoadDisplayColorTableEXT (const GLushort *table, GLuint length); +GLboolean WINAPI wglBindDisplayColorTableEXT (GLushort id); +VOID WINAPI wglDestroyDisplayColorTableEXT (GLushort id); +#endif +#endif /* WGL_EXT_display_color_table */ + +#ifndef WGL_EXT_extensions_string +#define WGL_EXT_extensions_string 1 +typedef const char *(WINAPI * PFNWGLGETEXTENSIONSSTRINGEXTPROC) (void); +#ifdef WGL_WGLEXT_PROTOTYPES +const char *WINAPI wglGetExtensionsStringEXT (void); +#endif +#endif /* WGL_EXT_extensions_string */ + +#ifndef WGL_EXT_framebuffer_sRGB +#define WGL_EXT_framebuffer_sRGB 1 +#define WGL_FRAMEBUFFER_SRGB_CAPABLE_EXT 0x20A9 +#endif /* WGL_EXT_framebuffer_sRGB */ + +#ifndef WGL_EXT_make_current_read +#define WGL_EXT_make_current_read 1 +#define ERROR_INVALID_PIXEL_TYPE_EXT 0x2043 +typedef BOOL (WINAPI * PFNWGLMAKECONTEXTCURRENTEXTPROC) (HDC hDrawDC, HDC hReadDC, HGLRC hglrc); +typedef HDC (WINAPI * PFNWGLGETCURRENTREADDCEXTPROC) (void); +#ifdef WGL_WGLEXT_PROTOTYPES +BOOL WINAPI wglMakeContextCurrentEXT (HDC hDrawDC, HDC hReadDC, HGLRC hglrc); +HDC WINAPI wglGetCurrentReadDCEXT (void); +#endif +#endif /* WGL_EXT_make_current_read */ + +#ifndef WGL_EXT_multisample +#define WGL_EXT_multisample 1 +#define WGL_SAMPLE_BUFFERS_EXT 0x2041 +#define WGL_SAMPLES_EXT 0x2042 +#endif /* WGL_EXT_multisample */ + +#ifndef WGL_EXT_pbuffer +#define WGL_EXT_pbuffer 1 +DECLARE_HANDLE(HPBUFFEREXT); +#define WGL_DRAW_TO_PBUFFER_EXT 0x202D +#define WGL_MAX_PBUFFER_PIXELS_EXT 0x202E +#define WGL_MAX_PBUFFER_WIDTH_EXT 0x202F +#define WGL_MAX_PBUFFER_HEIGHT_EXT 0x2030 +#define WGL_OPTIMAL_PBUFFER_WIDTH_EXT 0x2031 +#define WGL_OPTIMAL_PBUFFER_HEIGHT_EXT 0x2032 +#define WGL_PBUFFER_LARGEST_EXT 0x2033 +#define WGL_PBUFFER_WIDTH_EXT 0x2034 +#define WGL_PBUFFER_HEIGHT_EXT 0x2035 +typedef HPBUFFEREXT (WINAPI * PFNWGLCREATEPBUFFEREXTPROC) (HDC hDC, int iPixelFormat, int iWidth, int iHeight, const int *piAttribList); +typedef HDC (WINAPI * PFNWGLGETPBUFFERDCEXTPROC) (HPBUFFEREXT hPbuffer); +typedef int (WINAPI * PFNWGLRELEASEPBUFFERDCEXTPROC) (HPBUFFEREXT hPbuffer, HDC hDC); +typedef BOOL (WINAPI * PFNWGLDESTROYPBUFFEREXTPROC) (HPBUFFEREXT hPbuffer); +typedef BOOL (WINAPI * PFNWGLQUERYPBUFFEREXTPROC) (HPBUFFEREXT hPbuffer, int iAttribute, int *piValue); +#ifdef WGL_WGLEXT_PROTOTYPES +HPBUFFEREXT WINAPI wglCreatePbufferEXT (HDC hDC, int iPixelFormat, int iWidth, int iHeight, const int *piAttribList); +HDC WINAPI wglGetPbufferDCEXT (HPBUFFEREXT hPbuffer); +int WINAPI wglReleasePbufferDCEXT (HPBUFFEREXT hPbuffer, HDC hDC); +BOOL WINAPI wglDestroyPbufferEXT (HPBUFFEREXT hPbuffer); +BOOL WINAPI wglQueryPbufferEXT (HPBUFFEREXT hPbuffer, int iAttribute, int *piValue); +#endif +#endif /* WGL_EXT_pbuffer */ + +#ifndef WGL_EXT_pixel_format +#define WGL_EXT_pixel_format 1 +#define WGL_NUMBER_PIXEL_FORMATS_EXT 0x2000 +#define WGL_DRAW_TO_WINDOW_EXT 0x2001 +#define WGL_DRAW_TO_BITMAP_EXT 0x2002 +#define WGL_ACCELERATION_EXT 0x2003 +#define WGL_NEED_PALETTE_EXT 0x2004 +#define WGL_NEED_SYSTEM_PALETTE_EXT 0x2005 +#define WGL_SWAP_LAYER_BUFFERS_EXT 0x2006 +#define WGL_SWAP_METHOD_EXT 0x2007 +#define WGL_NUMBER_OVERLAYS_EXT 0x2008 +#define WGL_NUMBER_UNDERLAYS_EXT 0x2009 +#define WGL_TRANSPARENT_EXT 0x200A +#define WGL_TRANSPARENT_VALUE_EXT 0x200B +#define WGL_SHARE_DEPTH_EXT 0x200C +#define WGL_SHARE_STENCIL_EXT 0x200D +#define WGL_SHARE_ACCUM_EXT 0x200E +#define WGL_SUPPORT_GDI_EXT 0x200F +#define WGL_SUPPORT_OPENGL_EXT 0x2010 +#define WGL_DOUBLE_BUFFER_EXT 0x2011 +#define WGL_STEREO_EXT 0x2012 +#define WGL_PIXEL_TYPE_EXT 0x2013 +#define WGL_COLOR_BITS_EXT 0x2014 +#define WGL_RED_BITS_EXT 0x2015 +#define WGL_RED_SHIFT_EXT 0x2016 +#define WGL_GREEN_BITS_EXT 0x2017 +#define WGL_GREEN_SHIFT_EXT 0x2018 +#define WGL_BLUE_BITS_EXT 0x2019 +#define WGL_BLUE_SHIFT_EXT 0x201A +#define WGL_ALPHA_BITS_EXT 0x201B +#define WGL_ALPHA_SHIFT_EXT 0x201C +#define WGL_ACCUM_BITS_EXT 0x201D +#define WGL_ACCUM_RED_BITS_EXT 0x201E +#define WGL_ACCUM_GREEN_BITS_EXT 0x201F +#define WGL_ACCUM_BLUE_BITS_EXT 0x2020 +#define WGL_ACCUM_ALPHA_BITS_EXT 0x2021 +#define WGL_DEPTH_BITS_EXT 0x2022 +#define WGL_STENCIL_BITS_EXT 0x2023 +#define WGL_AUX_BUFFERS_EXT 0x2024 +#define WGL_NO_ACCELERATION_EXT 0x2025 +#define WGL_GENERIC_ACCELERATION_EXT 0x2026 +#define WGL_FULL_ACCELERATION_EXT 0x2027 +#define WGL_SWAP_EXCHANGE_EXT 0x2028 +#define WGL_SWAP_COPY_EXT 0x2029 +#define WGL_SWAP_UNDEFINED_EXT 0x202A +#define WGL_TYPE_RGBA_EXT 0x202B +#define WGL_TYPE_COLORINDEX_EXT 0x202C +typedef BOOL (WINAPI * PFNWGLGETPIXELFORMATATTRIBIVEXTPROC) (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, int *piAttributes, int *piValues); +typedef BOOL (WINAPI * PFNWGLGETPIXELFORMATATTRIBFVEXTPROC) (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, int *piAttributes, FLOAT *pfValues); +typedef BOOL (WINAPI * PFNWGLCHOOSEPIXELFORMATEXTPROC) (HDC hdc, const int *piAttribIList, const FLOAT *pfAttribFList, UINT nMaxFormats, int *piFormats, UINT *nNumFormats); +#ifdef WGL_WGLEXT_PROTOTYPES +BOOL WINAPI wglGetPixelFormatAttribivEXT (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, int *piAttributes, int *piValues); +BOOL WINAPI wglGetPixelFormatAttribfvEXT (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, int *piAttributes, FLOAT *pfValues); +BOOL WINAPI wglChoosePixelFormatEXT (HDC hdc, const int *piAttribIList, const FLOAT *pfAttribFList, UINT nMaxFormats, int *piFormats, UINT *nNumFormats); +#endif +#endif /* WGL_EXT_pixel_format */ + +#ifndef WGL_EXT_pixel_format_packed_float +#define WGL_EXT_pixel_format_packed_float 1 +#define WGL_TYPE_RGBA_UNSIGNED_FLOAT_EXT 0x20A8 +#endif /* WGL_EXT_pixel_format_packed_float */ + +#ifndef WGL_EXT_swap_control +#define WGL_EXT_swap_control 1 +typedef BOOL (WINAPI * PFNWGLSWAPINTERVALEXTPROC) (int interval); +typedef int (WINAPI * PFNWGLGETSWAPINTERVALEXTPROC) (void); +#ifdef WGL_WGLEXT_PROTOTYPES +BOOL WINAPI wglSwapIntervalEXT (int interval); +int WINAPI wglGetSwapIntervalEXT (void); +#endif +#endif /* WGL_EXT_swap_control */ + +#ifndef WGL_EXT_swap_control_tear +#define WGL_EXT_swap_control_tear 1 +#endif /* WGL_EXT_swap_control_tear */ + +#ifndef WGL_I3D_digital_video_control +#define WGL_I3D_digital_video_control 1 +#define WGL_DIGITAL_VIDEO_CURSOR_ALPHA_FRAMEBUFFER_I3D 0x2050 +#define WGL_DIGITAL_VIDEO_CURSOR_ALPHA_VALUE_I3D 0x2051 +#define WGL_DIGITAL_VIDEO_CURSOR_INCLUDED_I3D 0x2052 +#define WGL_DIGITAL_VIDEO_GAMMA_CORRECTED_I3D 0x2053 +typedef BOOL (WINAPI * PFNWGLGETDIGITALVIDEOPARAMETERSI3DPROC) (HDC hDC, int iAttribute, int *piValue); +typedef BOOL (WINAPI * PFNWGLSETDIGITALVIDEOPARAMETERSI3DPROC) (HDC hDC, int iAttribute, const int *piValue); +#ifdef WGL_WGLEXT_PROTOTYPES +BOOL WINAPI wglGetDigitalVideoParametersI3D (HDC hDC, int iAttribute, int *piValue); +BOOL WINAPI wglSetDigitalVideoParametersI3D (HDC hDC, int iAttribute, const int *piValue); +#endif +#endif /* WGL_I3D_digital_video_control */ + +#ifndef WGL_I3D_gamma +#define WGL_I3D_gamma 1 +#define WGL_GAMMA_TABLE_SIZE_I3D 0x204E +#define WGL_GAMMA_EXCLUDE_DESKTOP_I3D 0x204F +typedef BOOL (WINAPI * PFNWGLGETGAMMATABLEPARAMETERSI3DPROC) (HDC hDC, int iAttribute, int *piValue); +typedef BOOL (WINAPI * PFNWGLSETGAMMATABLEPARAMETERSI3DPROC) (HDC hDC, int iAttribute, const int *piValue); +typedef BOOL (WINAPI * PFNWGLGETGAMMATABLEI3DPROC) (HDC hDC, int iEntries, USHORT *puRed, USHORT *puGreen, USHORT *puBlue); +typedef BOOL (WINAPI * PFNWGLSETGAMMATABLEI3DPROC) (HDC hDC, int iEntries, const USHORT *puRed, const USHORT *puGreen, const USHORT *puBlue); +#ifdef WGL_WGLEXT_PROTOTYPES +BOOL WINAPI wglGetGammaTableParametersI3D (HDC hDC, int iAttribute, int *piValue); +BOOL WINAPI wglSetGammaTableParametersI3D (HDC hDC, int iAttribute, const int *piValue); +BOOL WINAPI wglGetGammaTableI3D (HDC hDC, int iEntries, USHORT *puRed, USHORT *puGreen, USHORT *puBlue); +BOOL WINAPI wglSetGammaTableI3D (HDC hDC, int iEntries, const USHORT *puRed, const USHORT *puGreen, const USHORT *puBlue); +#endif +#endif /* WGL_I3D_gamma */ + +#ifndef WGL_I3D_genlock +#define WGL_I3D_genlock 1 +#define WGL_GENLOCK_SOURCE_MULTIVIEW_I3D 0x2044 +#define WGL_GENLOCK_SOURCE_EXTERNAL_SYNC_I3D 0x2045 +#define WGL_GENLOCK_SOURCE_EXTERNAL_FIELD_I3D 0x2046 +#define WGL_GENLOCK_SOURCE_EXTERNAL_TTL_I3D 0x2047 +#define WGL_GENLOCK_SOURCE_DIGITAL_SYNC_I3D 0x2048 +#define WGL_GENLOCK_SOURCE_DIGITAL_FIELD_I3D 0x2049 +#define WGL_GENLOCK_SOURCE_EDGE_FALLING_I3D 0x204A +#define WGL_GENLOCK_SOURCE_EDGE_RISING_I3D 0x204B +#define WGL_GENLOCK_SOURCE_EDGE_BOTH_I3D 0x204C +typedef BOOL (WINAPI * PFNWGLENABLEGENLOCKI3DPROC) (HDC hDC); +typedef BOOL (WINAPI * PFNWGLDISABLEGENLOCKI3DPROC) (HDC hDC); +typedef BOOL (WINAPI * PFNWGLISENABLEDGENLOCKI3DPROC) (HDC hDC, BOOL *pFlag); +typedef BOOL (WINAPI * PFNWGLGENLOCKSOURCEI3DPROC) (HDC hDC, UINT uSource); +typedef BOOL (WINAPI * PFNWGLGETGENLOCKSOURCEI3DPROC) (HDC hDC, UINT *uSource); +typedef BOOL (WINAPI * PFNWGLGENLOCKSOURCEEDGEI3DPROC) (HDC hDC, UINT uEdge); +typedef BOOL (WINAPI * PFNWGLGETGENLOCKSOURCEEDGEI3DPROC) (HDC hDC, UINT *uEdge); +typedef BOOL (WINAPI * PFNWGLGENLOCKSAMPLERATEI3DPROC) (HDC hDC, UINT uRate); +typedef BOOL (WINAPI * PFNWGLGETGENLOCKSAMPLERATEI3DPROC) (HDC hDC, UINT *uRate); +typedef BOOL (WINAPI * PFNWGLGENLOCKSOURCEDELAYI3DPROC) (HDC hDC, UINT uDelay); +typedef BOOL (WINAPI * PFNWGLGETGENLOCKSOURCEDELAYI3DPROC) (HDC hDC, UINT *uDelay); +typedef BOOL (WINAPI * PFNWGLQUERYGENLOCKMAXSOURCEDELAYI3DPROC) (HDC hDC, UINT *uMaxLineDelay, UINT *uMaxPixelDelay); +#ifdef WGL_WGLEXT_PROTOTYPES +BOOL WINAPI wglEnableGenlockI3D (HDC hDC); +BOOL WINAPI wglDisableGenlockI3D (HDC hDC); +BOOL WINAPI wglIsEnabledGenlockI3D (HDC hDC, BOOL *pFlag); +BOOL WINAPI wglGenlockSourceI3D (HDC hDC, UINT uSource); +BOOL WINAPI wglGetGenlockSourceI3D (HDC hDC, UINT *uSource); +BOOL WINAPI wglGenlockSourceEdgeI3D (HDC hDC, UINT uEdge); +BOOL WINAPI wglGetGenlockSourceEdgeI3D (HDC hDC, UINT *uEdge); +BOOL WINAPI wglGenlockSampleRateI3D (HDC hDC, UINT uRate); +BOOL WINAPI wglGetGenlockSampleRateI3D (HDC hDC, UINT *uRate); +BOOL WINAPI wglGenlockSourceDelayI3D (HDC hDC, UINT uDelay); +BOOL WINAPI wglGetGenlockSourceDelayI3D (HDC hDC, UINT *uDelay); +BOOL WINAPI wglQueryGenlockMaxSourceDelayI3D (HDC hDC, UINT *uMaxLineDelay, UINT *uMaxPixelDelay); +#endif +#endif /* WGL_I3D_genlock */ + +#ifndef WGL_I3D_image_buffer +#define WGL_I3D_image_buffer 1 +#define WGL_IMAGE_BUFFER_MIN_ACCESS_I3D 0x00000001 +#define WGL_IMAGE_BUFFER_LOCK_I3D 0x00000002 +typedef LPVOID (WINAPI * PFNWGLCREATEIMAGEBUFFERI3DPROC) (HDC hDC, DWORD dwSize, UINT uFlags); +typedef BOOL (WINAPI * PFNWGLDESTROYIMAGEBUFFERI3DPROC) (HDC hDC, LPVOID pAddress); +typedef BOOL (WINAPI * PFNWGLASSOCIATEIMAGEBUFFEREVENTSI3DPROC) (HDC hDC, const HANDLE *pEvent, const LPVOID *pAddress, const DWORD *pSize, UINT count); +typedef BOOL (WINAPI * PFNWGLRELEASEIMAGEBUFFEREVENTSI3DPROC) (HDC hDC, const LPVOID *pAddress, UINT count); +#ifdef WGL_WGLEXT_PROTOTYPES +LPVOID WINAPI wglCreateImageBufferI3D (HDC hDC, DWORD dwSize, UINT uFlags); +BOOL WINAPI wglDestroyImageBufferI3D (HDC hDC, LPVOID pAddress); +BOOL WINAPI wglAssociateImageBufferEventsI3D (HDC hDC, const HANDLE *pEvent, const LPVOID *pAddress, const DWORD *pSize, UINT count); +BOOL WINAPI wglReleaseImageBufferEventsI3D (HDC hDC, const LPVOID *pAddress, UINT count); +#endif +#endif /* WGL_I3D_image_buffer */ + +#ifndef WGL_I3D_swap_frame_lock +#define WGL_I3D_swap_frame_lock 1 +typedef BOOL (WINAPI * PFNWGLENABLEFRAMELOCKI3DPROC) (void); +typedef BOOL (WINAPI * PFNWGLDISABLEFRAMELOCKI3DPROC) (void); +typedef BOOL (WINAPI * PFNWGLISENABLEDFRAMELOCKI3DPROC) (BOOL *pFlag); +typedef BOOL (WINAPI * PFNWGLQUERYFRAMELOCKMASTERI3DPROC) (BOOL *pFlag); +#ifdef WGL_WGLEXT_PROTOTYPES +BOOL WINAPI wglEnableFrameLockI3D (void); +BOOL WINAPI wglDisableFrameLockI3D (void); +BOOL WINAPI wglIsEnabledFrameLockI3D (BOOL *pFlag); +BOOL WINAPI wglQueryFrameLockMasterI3D (BOOL *pFlag); +#endif +#endif /* WGL_I3D_swap_frame_lock */ + +#ifndef WGL_I3D_swap_frame_usage +#define WGL_I3D_swap_frame_usage 1 +typedef BOOL (WINAPI * PFNWGLGETFRAMEUSAGEI3DPROC) (float *pUsage); +typedef BOOL (WINAPI * PFNWGLBEGINFRAMETRACKINGI3DPROC) (void); +typedef BOOL (WINAPI * PFNWGLENDFRAMETRACKINGI3DPROC) (void); +typedef BOOL (WINAPI * PFNWGLQUERYFRAMETRACKINGI3DPROC) (DWORD *pFrameCount, DWORD *pMissedFrames, float *pLastMissedUsage); +#ifdef WGL_WGLEXT_PROTOTYPES +BOOL WINAPI wglGetFrameUsageI3D (float *pUsage); +BOOL WINAPI wglBeginFrameTrackingI3D (void); +BOOL WINAPI wglEndFrameTrackingI3D (void); +BOOL WINAPI wglQueryFrameTrackingI3D (DWORD *pFrameCount, DWORD *pMissedFrames, float *pLastMissedUsage); +#endif +#endif /* WGL_I3D_swap_frame_usage */ + +#ifndef WGL_NV_DX_interop +#define WGL_NV_DX_interop 1 +#define WGL_ACCESS_READ_ONLY_NV 0x00000000 +#define WGL_ACCESS_READ_WRITE_NV 0x00000001 +#define WGL_ACCESS_WRITE_DISCARD_NV 0x00000002 +typedef BOOL (WINAPI * PFNWGLDXSETRESOURCESHAREHANDLENVPROC) (void *dxObject, HANDLE shareHandle); +typedef HANDLE (WINAPI * PFNWGLDXOPENDEVICENVPROC) (void *dxDevice); +typedef BOOL (WINAPI * PFNWGLDXCLOSEDEVICENVPROC) (HANDLE hDevice); +typedef HANDLE (WINAPI * PFNWGLDXREGISTEROBJECTNVPROC) (HANDLE hDevice, void *dxObject, GLuint name, GLenum type, GLenum access); +typedef BOOL (WINAPI * PFNWGLDXUNREGISTEROBJECTNVPROC) (HANDLE hDevice, HANDLE hObject); +typedef BOOL (WINAPI * PFNWGLDXOBJECTACCESSNVPROC) (HANDLE hObject, GLenum access); +typedef BOOL (WINAPI * PFNWGLDXLOCKOBJECTSNVPROC) (HANDLE hDevice, GLint count, HANDLE *hObjects); +typedef BOOL (WINAPI * PFNWGLDXUNLOCKOBJECTSNVPROC) (HANDLE hDevice, GLint count, HANDLE *hObjects); +#ifdef WGL_WGLEXT_PROTOTYPES +BOOL WINAPI wglDXSetResourceShareHandleNV (void *dxObject, HANDLE shareHandle); +HANDLE WINAPI wglDXOpenDeviceNV (void *dxDevice); +BOOL WINAPI wglDXCloseDeviceNV (HANDLE hDevice); +HANDLE WINAPI wglDXRegisterObjectNV (HANDLE hDevice, void *dxObject, GLuint name, GLenum type, GLenum access); +BOOL WINAPI wglDXUnregisterObjectNV (HANDLE hDevice, HANDLE hObject); +BOOL WINAPI wglDXObjectAccessNV (HANDLE hObject, GLenum access); +BOOL WINAPI wglDXLockObjectsNV (HANDLE hDevice, GLint count, HANDLE *hObjects); +BOOL WINAPI wglDXUnlockObjectsNV (HANDLE hDevice, GLint count, HANDLE *hObjects); +#endif +#endif /* WGL_NV_DX_interop */ + +#ifndef WGL_NV_DX_interop2 +#define WGL_NV_DX_interop2 1 +#endif /* WGL_NV_DX_interop2 */ + +#ifndef WGL_NV_copy_image +#define WGL_NV_copy_image 1 +typedef BOOL (WINAPI * PFNWGLCOPYIMAGESUBDATANVPROC) (HGLRC hSrcRC, GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, HGLRC hDstRC, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei width, GLsizei height, GLsizei depth); +#ifdef WGL_WGLEXT_PROTOTYPES +BOOL WINAPI wglCopyImageSubDataNV (HGLRC hSrcRC, GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, HGLRC hDstRC, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei width, GLsizei height, GLsizei depth); +#endif +#endif /* WGL_NV_copy_image */ + +#ifndef WGL_NV_delay_before_swap +#define WGL_NV_delay_before_swap 1 +typedef BOOL (WINAPI * PFNWGLDELAYBEFORESWAPNVPROC) (HDC hDC, GLfloat seconds); +#ifdef WGL_WGLEXT_PROTOTYPES +BOOL WINAPI wglDelayBeforeSwapNV (HDC hDC, GLfloat seconds); +#endif +#endif /* WGL_NV_delay_before_swap */ + +#ifndef WGL_NV_float_buffer +#define WGL_NV_float_buffer 1 +#define WGL_FLOAT_COMPONENTS_NV 0x20B0 +#define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_R_NV 0x20B1 +#define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RG_NV 0x20B2 +#define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RGB_NV 0x20B3 +#define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RGBA_NV 0x20B4 +#define WGL_TEXTURE_FLOAT_R_NV 0x20B5 +#define WGL_TEXTURE_FLOAT_RG_NV 0x20B6 +#define WGL_TEXTURE_FLOAT_RGB_NV 0x20B7 +#define WGL_TEXTURE_FLOAT_RGBA_NV 0x20B8 +#endif /* WGL_NV_float_buffer */ + +#ifndef WGL_NV_gpu_affinity +#define WGL_NV_gpu_affinity 1 +DECLARE_HANDLE(HGPUNV); +struct _GPU_DEVICE { + DWORD cb; + CHAR DeviceName[32]; + CHAR DeviceString[128]; + DWORD Flags; + RECT rcVirtualScreen; +}; +typedef struct _GPU_DEVICE *PGPU_DEVICE; +#define ERROR_INCOMPATIBLE_AFFINITY_MASKS_NV 0x20D0 +#define ERROR_MISSING_AFFINITY_MASK_NV 0x20D1 +typedef BOOL (WINAPI * PFNWGLENUMGPUSNVPROC) (UINT iGpuIndex, HGPUNV *phGpu); +typedef BOOL (WINAPI * PFNWGLENUMGPUDEVICESNVPROC) (HGPUNV hGpu, UINT iDeviceIndex, PGPU_DEVICE lpGpuDevice); +typedef HDC (WINAPI * PFNWGLCREATEAFFINITYDCNVPROC) (const HGPUNV *phGpuList); +typedef BOOL (WINAPI * PFNWGLENUMGPUSFROMAFFINITYDCNVPROC) (HDC hAffinityDC, UINT iGpuIndex, HGPUNV *hGpu); +typedef BOOL (WINAPI * PFNWGLDELETEDCNVPROC) (HDC hdc); +#ifdef WGL_WGLEXT_PROTOTYPES +BOOL WINAPI wglEnumGpusNV (UINT iGpuIndex, HGPUNV *phGpu); +BOOL WINAPI wglEnumGpuDevicesNV (HGPUNV hGpu, UINT iDeviceIndex, PGPU_DEVICE lpGpuDevice); +HDC WINAPI wglCreateAffinityDCNV (const HGPUNV *phGpuList); +BOOL WINAPI wglEnumGpusFromAffinityDCNV (HDC hAffinityDC, UINT iGpuIndex, HGPUNV *hGpu); +BOOL WINAPI wglDeleteDCNV (HDC hdc); +#endif +#endif /* WGL_NV_gpu_affinity */ + +#ifndef WGL_NV_multisample_coverage +#define WGL_NV_multisample_coverage 1 +#define WGL_COVERAGE_SAMPLES_NV 0x2042 +#define WGL_COLOR_SAMPLES_NV 0x20B9 +#endif /* WGL_NV_multisample_coverage */ + +#ifndef WGL_NV_present_video +#define WGL_NV_present_video 1 +DECLARE_HANDLE(HVIDEOOUTPUTDEVICENV); +#define WGL_NUM_VIDEO_SLOTS_NV 0x20F0 +typedef int (WINAPI * PFNWGLENUMERATEVIDEODEVICESNVPROC) (HDC hDC, HVIDEOOUTPUTDEVICENV *phDeviceList); +typedef BOOL (WINAPI * PFNWGLBINDVIDEODEVICENVPROC) (HDC hDC, unsigned int uVideoSlot, HVIDEOOUTPUTDEVICENV hVideoDevice, const int *piAttribList); +typedef BOOL (WINAPI * PFNWGLQUERYCURRENTCONTEXTNVPROC) (int iAttribute, int *piValue); +#ifdef WGL_WGLEXT_PROTOTYPES +int WINAPI wglEnumerateVideoDevicesNV (HDC hDC, HVIDEOOUTPUTDEVICENV *phDeviceList); +BOOL WINAPI wglBindVideoDeviceNV (HDC hDC, unsigned int uVideoSlot, HVIDEOOUTPUTDEVICENV hVideoDevice, const int *piAttribList); +BOOL WINAPI wglQueryCurrentContextNV (int iAttribute, int *piValue); +#endif +#endif /* WGL_NV_present_video */ + +#ifndef WGL_NV_render_depth_texture +#define WGL_NV_render_depth_texture 1 +#define WGL_BIND_TO_TEXTURE_DEPTH_NV 0x20A3 +#define WGL_BIND_TO_TEXTURE_RECTANGLE_DEPTH_NV 0x20A4 +#define WGL_DEPTH_TEXTURE_FORMAT_NV 0x20A5 +#define WGL_TEXTURE_DEPTH_COMPONENT_NV 0x20A6 +#define WGL_DEPTH_COMPONENT_NV 0x20A7 +#endif /* WGL_NV_render_depth_texture */ + +#ifndef WGL_NV_render_texture_rectangle +#define WGL_NV_render_texture_rectangle 1 +#define WGL_BIND_TO_TEXTURE_RECTANGLE_RGB_NV 0x20A0 +#define WGL_BIND_TO_TEXTURE_RECTANGLE_RGBA_NV 0x20A1 +#define WGL_TEXTURE_RECTANGLE_NV 0x20A2 +#endif /* WGL_NV_render_texture_rectangle */ + +#ifndef WGL_NV_swap_group +#define WGL_NV_swap_group 1 +typedef BOOL (WINAPI * PFNWGLJOINSWAPGROUPNVPROC) (HDC hDC, GLuint group); +typedef BOOL (WINAPI * PFNWGLBINDSWAPBARRIERNVPROC) (GLuint group, GLuint barrier); +typedef BOOL (WINAPI * PFNWGLQUERYSWAPGROUPNVPROC) (HDC hDC, GLuint *group, GLuint *barrier); +typedef BOOL (WINAPI * PFNWGLQUERYMAXSWAPGROUPSNVPROC) (HDC hDC, GLuint *maxGroups, GLuint *maxBarriers); +typedef BOOL (WINAPI * PFNWGLQUERYFRAMECOUNTNVPROC) (HDC hDC, GLuint *count); +typedef BOOL (WINAPI * PFNWGLRESETFRAMECOUNTNVPROC) (HDC hDC); +#ifdef WGL_WGLEXT_PROTOTYPES +BOOL WINAPI wglJoinSwapGroupNV (HDC hDC, GLuint group); +BOOL WINAPI wglBindSwapBarrierNV (GLuint group, GLuint barrier); +BOOL WINAPI wglQuerySwapGroupNV (HDC hDC, GLuint *group, GLuint *barrier); +BOOL WINAPI wglQueryMaxSwapGroupsNV (HDC hDC, GLuint *maxGroups, GLuint *maxBarriers); +BOOL WINAPI wglQueryFrameCountNV (HDC hDC, GLuint *count); +BOOL WINAPI wglResetFrameCountNV (HDC hDC); +#endif +#endif /* WGL_NV_swap_group */ + +#ifndef WGL_NV_vertex_array_range +#define WGL_NV_vertex_array_range 1 +typedef void *(WINAPI * PFNWGLALLOCATEMEMORYNVPROC) (GLsizei size, GLfloat readfreq, GLfloat writefreq, GLfloat priority); +typedef void (WINAPI * PFNWGLFREEMEMORYNVPROC) (void *pointer); +#ifdef WGL_WGLEXT_PROTOTYPES +void *WINAPI wglAllocateMemoryNV (GLsizei size, GLfloat readfreq, GLfloat writefreq, GLfloat priority); +void WINAPI wglFreeMemoryNV (void *pointer); +#endif +#endif /* WGL_NV_vertex_array_range */ + +#ifndef WGL_NV_video_capture +#define WGL_NV_video_capture 1 +DECLARE_HANDLE(HVIDEOINPUTDEVICENV); +#define WGL_UNIQUE_ID_NV 0x20CE +#define WGL_NUM_VIDEO_CAPTURE_SLOTS_NV 0x20CF +typedef BOOL (WINAPI * PFNWGLBINDVIDEOCAPTUREDEVICENVPROC) (UINT uVideoSlot, HVIDEOINPUTDEVICENV hDevice); +typedef UINT (WINAPI * PFNWGLENUMERATEVIDEOCAPTUREDEVICESNVPROC) (HDC hDc, HVIDEOINPUTDEVICENV *phDeviceList); +typedef BOOL (WINAPI * PFNWGLLOCKVIDEOCAPTUREDEVICENVPROC) (HDC hDc, HVIDEOINPUTDEVICENV hDevice); +typedef BOOL (WINAPI * PFNWGLQUERYVIDEOCAPTUREDEVICENVPROC) (HDC hDc, HVIDEOINPUTDEVICENV hDevice, int iAttribute, int *piValue); +typedef BOOL (WINAPI * PFNWGLRELEASEVIDEOCAPTUREDEVICENVPROC) (HDC hDc, HVIDEOINPUTDEVICENV hDevice); +#ifdef WGL_WGLEXT_PROTOTYPES +BOOL WINAPI wglBindVideoCaptureDeviceNV (UINT uVideoSlot, HVIDEOINPUTDEVICENV hDevice); +UINT WINAPI wglEnumerateVideoCaptureDevicesNV (HDC hDc, HVIDEOINPUTDEVICENV *phDeviceList); +BOOL WINAPI wglLockVideoCaptureDeviceNV (HDC hDc, HVIDEOINPUTDEVICENV hDevice); +BOOL WINAPI wglQueryVideoCaptureDeviceNV (HDC hDc, HVIDEOINPUTDEVICENV hDevice, int iAttribute, int *piValue); +BOOL WINAPI wglReleaseVideoCaptureDeviceNV (HDC hDc, HVIDEOINPUTDEVICENV hDevice); +#endif +#endif /* WGL_NV_video_capture */ + +#ifndef WGL_NV_video_output +#define WGL_NV_video_output 1 +DECLARE_HANDLE(HPVIDEODEV); +#define WGL_BIND_TO_VIDEO_RGB_NV 0x20C0 +#define WGL_BIND_TO_VIDEO_RGBA_NV 0x20C1 +#define WGL_BIND_TO_VIDEO_RGB_AND_DEPTH_NV 0x20C2 +#define WGL_VIDEO_OUT_COLOR_NV 0x20C3 +#define WGL_VIDEO_OUT_ALPHA_NV 0x20C4 +#define WGL_VIDEO_OUT_DEPTH_NV 0x20C5 +#define WGL_VIDEO_OUT_COLOR_AND_ALPHA_NV 0x20C6 +#define WGL_VIDEO_OUT_COLOR_AND_DEPTH_NV 0x20C7 +#define WGL_VIDEO_OUT_FRAME 0x20C8 +#define WGL_VIDEO_OUT_FIELD_1 0x20C9 +#define WGL_VIDEO_OUT_FIELD_2 0x20CA +#define WGL_VIDEO_OUT_STACKED_FIELDS_1_2 0x20CB +#define WGL_VIDEO_OUT_STACKED_FIELDS_2_1 0x20CC +typedef BOOL (WINAPI * PFNWGLGETVIDEODEVICENVPROC) (HDC hDC, int numDevices, HPVIDEODEV *hVideoDevice); +typedef BOOL (WINAPI * PFNWGLRELEASEVIDEODEVICENVPROC) (HPVIDEODEV hVideoDevice); +typedef BOOL (WINAPI * PFNWGLBINDVIDEOIMAGENVPROC) (HPVIDEODEV hVideoDevice, HPBUFFERARB hPbuffer, int iVideoBuffer); +typedef BOOL (WINAPI * PFNWGLRELEASEVIDEOIMAGENVPROC) (HPBUFFERARB hPbuffer, int iVideoBuffer); +typedef BOOL (WINAPI * PFNWGLSENDPBUFFERTOVIDEONVPROC) (HPBUFFERARB hPbuffer, int iBufferType, unsigned long *pulCounterPbuffer, BOOL bBlock); +typedef BOOL (WINAPI * PFNWGLGETVIDEOINFONVPROC) (HPVIDEODEV hpVideoDevice, unsigned long *pulCounterOutputPbuffer, unsigned long *pulCounterOutputVideo); +#ifdef WGL_WGLEXT_PROTOTYPES +BOOL WINAPI wglGetVideoDeviceNV (HDC hDC, int numDevices, HPVIDEODEV *hVideoDevice); +BOOL WINAPI wglReleaseVideoDeviceNV (HPVIDEODEV hVideoDevice); +BOOL WINAPI wglBindVideoImageNV (HPVIDEODEV hVideoDevice, HPBUFFERARB hPbuffer, int iVideoBuffer); +BOOL WINAPI wglReleaseVideoImageNV (HPBUFFERARB hPbuffer, int iVideoBuffer); +BOOL WINAPI wglSendPbufferToVideoNV (HPBUFFERARB hPbuffer, int iBufferType, unsigned long *pulCounterPbuffer, BOOL bBlock); +BOOL WINAPI wglGetVideoInfoNV (HPVIDEODEV hpVideoDevice, unsigned long *pulCounterOutputPbuffer, unsigned long *pulCounterOutputVideo); +#endif +#endif /* WGL_NV_video_output */ + +#ifndef WGL_OML_sync_control +#define WGL_OML_sync_control 1 +typedef BOOL (WINAPI * PFNWGLGETSYNCVALUESOMLPROC) (HDC hdc, INT64 *ust, INT64 *msc, INT64 *sbc); +typedef BOOL (WINAPI * PFNWGLGETMSCRATEOMLPROC) (HDC hdc, INT32 *numerator, INT32 *denominator); +typedef INT64 (WINAPI * PFNWGLSWAPBUFFERSMSCOMLPROC) (HDC hdc, INT64 target_msc, INT64 divisor, INT64 remainder); +typedef INT64 (WINAPI * PFNWGLSWAPLAYERBUFFERSMSCOMLPROC) (HDC hdc, int fuPlanes, INT64 target_msc, INT64 divisor, INT64 remainder); +typedef BOOL (WINAPI * PFNWGLWAITFORMSCOMLPROC) (HDC hdc, INT64 target_msc, INT64 divisor, INT64 remainder, INT64 *ust, INT64 *msc, INT64 *sbc); +typedef BOOL (WINAPI * PFNWGLWAITFORSBCOMLPROC) (HDC hdc, INT64 target_sbc, INT64 *ust, INT64 *msc, INT64 *sbc); +#ifdef WGL_WGLEXT_PROTOTYPES +BOOL WINAPI wglGetSyncValuesOML (HDC hdc, INT64 *ust, INT64 *msc, INT64 *sbc); +BOOL WINAPI wglGetMscRateOML (HDC hdc, INT32 *numerator, INT32 *denominator); +INT64 WINAPI wglSwapBuffersMscOML (HDC hdc, INT64 target_msc, INT64 divisor, INT64 remainder); +INT64 WINAPI wglSwapLayerBuffersMscOML (HDC hdc, int fuPlanes, INT64 target_msc, INT64 divisor, INT64 remainder); +BOOL WINAPI wglWaitForMscOML (HDC hdc, INT64 target_msc, INT64 divisor, INT64 remainder, INT64 *ust, INT64 *msc, INT64 *sbc); +BOOL WINAPI wglWaitForSbcOML (HDC hdc, INT64 target_sbc, INT64 *ust, INT64 *msc, INT64 *sbc); +#endif +#endif /* WGL_OML_sync_control */ + +#ifdef __cplusplus +} +#endif + +#endif \ No newline at end of file diff --git a/src/platform/win/main.cpp b/src/platform/win/main.cpp index dc1cf6e8..daf66a30 100644 --- a/src/platform/win/main.cpp +++ b/src/platform/win/main.cpp @@ -404,15 +404,13 @@ HWND hWnd; void ContextSwap() { const BITMAPINFO bmi = { sizeof(BITMAPINFOHEADER), Core::width, -Core::height, 1, sizeof(GAPI::ColorSW) * 8, BI_RGB, 0, 0, 0, 0, 0 }; - SetDIBitsToDevice(hDC, 0, 0, Core::width, Core::height, 0, 0, 0, Core::height, GAPI::swColor, &bmi, 0); + SetDIBitsToDevice(hDC, 0, 0, Core::width, Core::height, 0, 0, 0, Core::height, GAPI::swColor, &bmi, DIB_RGB_COLORS); } #elif _GAPI_GL HDC hDC; HGLRC hRC; void ContextCreate() { - hDC = GetDC(hWnd); - PIXELFORMATDESCRIPTOR pfd; memset(&pfd, 0, sizeof(pfd)); pfd.nSize = sizeof(pfd); @@ -424,11 +422,64 @@ HWND hWnd; pfd.cBlueBits = 8; pfd.cAlphaBits = 8; pfd.cDepthBits = 24; - pfd.cStencilBits = 8; - int format = ChoosePixelFormat(hDC, &pfd); - SetPixelFormat(hDC, format, &pfd); - hRC = wglCreateContext(hDC); + PFNWGLCHOOSEPIXELFORMATARBPROC wglChoosePixelFormatARB = NULL; + PFNWGLCREATECONTEXTATTRIBSARBPROC wglCreateContextAttribsARB = NULL; + + { + HWND fWnd = CreateWindow("static", NULL, WS_POPUP, 0, 0, 0, 0, 0, 0, 0, 0); + HDC fDC = GetDC(fWnd); + + int format = ChoosePixelFormat(fDC, &pfd); + SetPixelFormat(fDC, format, &pfd); + HGLRC fRC = wglCreateContext(fDC); + wglMakeCurrent(fDC, fRC); + + wglChoosePixelFormatARB = GetProcOGL(wglChoosePixelFormatARB); + wglCreateContextAttribsARB = GetProcOGL(wglCreateContextAttribsARB); + + wglMakeCurrent(0, 0); + ReleaseDC(fWnd, fDC); + wglDeleteContext(fRC); + DestroyWindow(fWnd); + } + + hDC = GetDC(hWnd); + + if (wglChoosePixelFormatARB && wglCreateContextAttribsARB) { + const int pixelAttribs[] = { + WGL_DRAW_TO_WINDOW_ARB, GL_TRUE, + WGL_SUPPORT_OPENGL_ARB, GL_TRUE, + WGL_DOUBLE_BUFFER_ARB, GL_TRUE, + WGL_PIXEL_TYPE_ARB, WGL_TYPE_RGBA_ARB, + WGL_ACCELERATION_ARB, WGL_FULL_ACCELERATION_ARB, + WGL_COLOR_BITS_ARB, 32, + WGL_ALPHA_BITS_ARB, 8, + 0 + }; + + int format; + UINT numFormats; + bool status = wglChoosePixelFormatARB(hDC, pixelAttribs, NULL, 1, &format, &numFormats); + ASSERT(status && numFormats > 0); + + DescribePixelFormat(hDC, format, sizeof(pfd), &pfd); + SetPixelFormat(hDC, format, &pfd); + + int contextAttribs[] = { + WGL_CONTEXT_MAJOR_VERSION_ARB, 3, + WGL_CONTEXT_MINOR_VERSION_ARB, 2, + WGL_CONTEXT_PROFILE_MASK_ARB, WGL_CONTEXT_CORE_PROFILE_BIT_ARB, + 0 + }; + + hRC = wglCreateContextAttribsARB(hDC, 0, contextAttribs); + } else { + int format = ChoosePixelFormat(hDC, &pfd); + SetPixelFormat(hDC, format, &pfd); + hRC = wglCreateContext(hDC); + } + wglMakeCurrent(hDC, hRC); } From cee187309322fa3a5a9b450d0dfd91e6d736d045 Mon Sep 17 00:00:00 2001 From: Timur Gagiev Date: Wed, 25 Nov 2020 06:28:11 +0300 Subject: [PATCH 017/190] fix luminance format for textures --- src/gapi/gl.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/gapi/gl.h b/src/gapi/gl.h index 4b79342f..8baf60f0 100644 --- a/src/gapi/gl.h +++ b/src/gapi/gl.h @@ -890,6 +890,11 @@ namespace GAPI { desc.fmt = GL_RGBA; } + if (fmt == FMT_LUMINANCE && Core::support.texRG) { + desc.ifmt = GL_R8; + desc.fmt = GL_RED; + } + #ifdef _OS_WEB // fucking firefox! if (WEBGL_VERSION == 1) { if (fmt == FMT_RG_FLOAT) { @@ -1293,7 +1298,7 @@ namespace GAPI { support.shadowSampler = _GL_EXT_shadow_samplers || _GL_ARB_shadow; support.discardFrame = extSupport("_discard_framebuffer"); support.texNPOT = GLES3 || extSupport("_texture_npot") || extSupport("_texture_non_power_of_two"); - support.texRG = GLES3 || extSupport("_texture_rg "); // hope that isn't last extension in string ;) + support.texRG = GLES3 || extSupport("_texture_rg"); support.texMaxLevel = GLES3 || extSupport("_texture_max_level"); #ifdef _GAPI_GLES2 // TODO From 8a3126a7c36ff31b76881cfced858d12f9e0a77b Mon Sep 17 00:00:00 2001 From: Sergey Ukolov Date: Wed, 16 Dec 2020 18:00:52 +0300 Subject: [PATCH 018/190] Adjusted sound buffer size for nix platform (#286) Fixes possible audio stutters https://github.com/XProger/OpenLara/issues/285 --- src/platform/nix/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/platform/nix/main.cpp b/src/platform/nix/main.cpp index 7592edf0..46e17491 100644 --- a/src/platform/nix/main.cpp +++ b/src/platform/nix/main.cpp @@ -27,7 +27,7 @@ int osGetTimeMS() { // sound #define SND_FRAME_SIZE 4 -#define SND_DATA_SIZE (1024 * SND_FRAME_SIZE) +#define SND_DATA_SIZE (2352 * SND_FRAME_SIZE) pa_simple *sndOut; pthread_t sndThread; From 6d9304d96a77dd2beb9dfa14203e37b71d5df319 Mon Sep 17 00:00:00 2001 From: XProger Date: Sun, 27 Dec 2020 18:00:36 +0300 Subject: [PATCH 019/190] TI-Nspire port --- src/core.h | 8 ++- src/format.h | 9 ++- src/gameflow.h | 4 +- src/gapi/sw.h | 23 ++++-- src/objects.h | 14 ++-- src/platform/tns/Makefile | 49 +++++++++++++ src/platform/tns/main.cpp | 145 ++++++++++++++++++++++++++++++++++++++ src/sound.h | 25 ++++--- src/ui.h | 2 +- src/utils.h | 12 ++-- src/video.h | 20 ++++++ 11 files changed, 278 insertions(+), 33 deletions(-) create mode 100644 src/platform/tns/Makefile create mode 100644 src/platform/tns/main.cpp diff --git a/src/core.h b/src/core.h index f0d52fa7..603f8c19 100644 --- a/src/core.h +++ b/src/core.h @@ -150,9 +150,15 @@ #elif _X360 #define _OS_X360 1 // TODO +#elif __NDLESS__ + #define _OS_TNS 1 + #define _GAPI_SW 1 + #include + + #undef OS_PTHREAD_MT #endif -#ifndef _OS_PSP +#if !defined(_OS_PSP) && !defined(_OS_TNS) #define USE_INFLATE #endif diff --git a/src/format.h b/src/format.h index 7a1448d9..e1160d56 100644 --- a/src/format.h +++ b/src/format.h @@ -3233,7 +3233,9 @@ namespace TR { case VER_TR2_PSX : loadTR2_PSX (stream); break; case VER_TR3_PC : loadTR3_PC (stream); break; case VER_TR3_PSX : loadTR3_PSX (stream); break; + #ifdef USE_INFLATE case VER_TR4_PC : loadTR4_PC (stream); break; + #endif case VER_TR4_PSX : loadTR4_PSX (stream); break; case VER_TR4_SDC : loadTR4_SDC (stream); break; case VER_TR5_PC : loadTR5_PC (stream); break; @@ -3609,6 +3611,7 @@ namespace TR { readCameraFrames(stream); } + #ifdef USE_INFLATE void loadTR4_PC (Stream &stream) { uint16 roomTilesCount, objTilesCount, bumpTilesCount; uint32 sizeD, sizeC, sizeR; @@ -3686,6 +3689,7 @@ namespace TR { soundDataSize += sizeC; } } + #endif void loadTR4_PSX (Stream &stream) { @@ -5895,10 +5899,13 @@ namespace TR { break; } case VER_TR3_PSX : { + mesh.tCount = 0; + mesh.rCount = 0; + mesh.fCount = 0; + if (!mesh.vCount) { mesh.vertices = NULL; mesh.faces = NULL; - mesh.tCount = mesh.rCount = mesh.fCount = 0; break; } diff --git a/src/gameflow.h b/src/gameflow.h index 4b639187..b6314693 100644 --- a/src/gameflow.h +++ b/src/gameflow.h @@ -1087,7 +1087,7 @@ namespace TR { id == LVL_TR2_CUT_4 || id == LVL_TR2_XIAN || id == LVL_TR2_HOUSE) { char buf[64]; strcpy(buf, LEVEL_INFO[id].name); - String::toLower(buf); + StrUtils::toLower(buf); sprintf(dst, "DATA/%s.TR2", buf); } else if (id == LVL_TR2_TITLE) { sprintf(dst, "DATA/%s.tr2", LEVEL_INFO[id].name); @@ -1098,7 +1098,7 @@ namespace TR { } if (Stream::existsContent(dst)) break; strcpy(dst, LEVEL_INFO[id].name); - String::toLower(dst); + StrUtils::toLower(dst); strcat(dst, ".TR2"); break; } diff --git a/src/gapi/sw.h b/src/gapi/sw.h index b15c6818..89573734 100644 --- a/src/gapi/sw.h +++ b/src/gapi/sw.h @@ -7,12 +7,14 @@ #define PROFILE_LABEL(id, name, label) #define PROFILE_TIMING(time) -#ifdef _OS_LINUX +//#define DITHER_FILTER + +#if defined(_OS_LINUX) || defined(_OS_TNS) #define COLOR_16 #endif #ifdef COLOR_16 - #ifdef _OS_LINUX + #if defined(_OS_LINUX) || defined(_OS_TNS) #define COLOR_FMT_565 #define CONV_COLOR(r,g,b) (((r >> 3) << 11) | ((g >> 2) << 5) | (b >> 3)) #else @@ -290,7 +292,7 @@ namespace GAPI { } if (depth) { - memset(swDepth, 0xFF, Core::width * Core::height * sizeof(DepthSW)); + //memset(swDepth, 0xFF, Core::width * Core::height * sizeof(DepthSW)); } } @@ -396,18 +398,25 @@ namespace GAPI { int32 i = y * Core::width; + #ifdef DITHER_FILTER const int *dithY = uvDither + ((y & 1) * 4); + #endif for (int x = i + x1; x < i + x2; x++) { S.z += dS.z; DepthSW z = DepthSW(uint32(S.z) >> 16); - if (swDepth[x] >= z) { + {//if (swDepth[x] >= z) { + #ifdef DITHER_FILTER const int *dithX = dithY + (x & 1); uint32 u = uint32(S.u + dithX[0]) >> 16; uint32 v = uint32(S.v + dithX[2]) >> 16; + #else + uint32 u = uint32(S.u) >> 16; + uint32 v = uint32(S.v) >> 16; + #endif uint8 index = curTile->index[(v << 8) + u]; @@ -415,7 +424,7 @@ namespace GAPI { index = swLightmap[((S.l >> (16 + 3)) << 8) + index]; swColor[x] = swPalette[index]; - swDepth[x] = z; + //swDepth[x] = z; } } @@ -580,8 +589,8 @@ namespace GAPI { } void applyLighting(VertexSW &result, const Vertex &vertex, float depth) { - vec3 coord = vec3(vertex.coord); - vec3 normal = vec3(vertex.normal).normal(); + vec3 coord = vec3(float(vertex.coord.x), float(vertex.coord.y), float(vertex.coord.z)); + vec3 normal = vec3(float(vertex.normal.x), float(vertex.normal.y), float(vertex.normal.z)).normal(); float lighting = 0.0f; for (int i = 0; i < lightsCount; i++) { LightSW &light = lightsRel[i]; diff --git a/src/objects.h b/src/objects.h index 1c862875..ce631f1c 100644 --- a/src/objects.h +++ b/src/objects.h @@ -153,9 +153,9 @@ struct Flame : Sprite { Controller *owner; int32 jointIndex; - float sleep; + float sleepTime; - Flame(IGame *game, int entity) : Sprite(game, entity, false, Sprite::FRAME_ANIMATED), owner(NULL), jointIndex(0), sleep(0.0f) { + Flame(IGame *game, int entity) : Sprite(game, entity, false, Sprite::FRAME_ANIMATED), owner(NULL), jointIndex(0), sleepTime(0.0f) { time = randf() * 3.0f; activate(); } @@ -186,15 +186,15 @@ struct Flame : Sprite { lara->hit(FLAME_BURN_DAMAGE * Core::deltaTime, this); } else if (lara->health > 0.0f) { - if (sleep > 0.0f) - sleep = max(0.0f, sleep - Core::deltaTime); + if (sleepTime > 0.0f) + sleepTime = max(0.0f, sleepTime - Core::deltaTime); - if (sleep == 0.0f && !lara->burn && lara->collide(Sphere(pos, 600.0f))) { + if (sleepTime == 0.0f && !lara->burn && lara->collide(Sphere(pos, 600.0f))) { lara->hit(FLAME_HEAT_DAMAGE * Core::deltaTime, this); if (lara->collide(Sphere(pos, 300.0f))) { Flame::add(game, lara, 0); - sleep = 3.0f; // stay inactive for 3 seconds + sleepTime = 3.0f; // stay inactive for 3 seconds } } } @@ -1838,4 +1838,4 @@ struct Bullet : Controller { } }; -#endif \ No newline at end of file +#endif diff --git a/src/platform/tns/Makefile b/src/platform/tns/Makefile new file mode 100644 index 00000000..b4b9d14e --- /dev/null +++ b/src/platform/tns/Makefile @@ -0,0 +1,49 @@ +DEBUG = FALSE + +GCC = nspire-gcc +AS = nspire-as +GXX = nspire-g++ +LD = nspire-ld +GENZEHN = genzehn + +GCCFLAGS = -marm -march=armv5te -mtune=arm926ej-s -std=c++11 -flto -fomit-frame-pointer -fno-exceptions -fno-rtti -ffunction-sections -fdata-sections -D__NDLESS__ -I../../ +LDFLAGS = -Wl,--gc-sections -Wl,--as-needed -flto -Wno-alloc-size-larger-than +ZEHNFLAGS = --name "OpenLara" + +ifeq ($(DEBUG),FALSE) + GCCFLAGS += -Ofast +else + GCCFLAGS += -O0 -g +endif + +OBJS = $(patsubst %.c, %.o, $(shell find . -name \*.c)) +OBJS += $(patsubst %.cpp, %.o, $(shell find . -name \*.cpp)) +OBJS += $(patsubst %.S, %.o, $(shell find . -name \*.S)) +EXE = OpenLara +DISTDIR = . +vpath %.tns $(DISTDIR) +vpath %.elf $(DISTDIR) + +all: $(EXE).prg.tns + +%.o: %.c + $(GCC) $(GCCFLAGS) -c $< + +%.o: %.cpp + $(GXX) $(GCCFLAGS) -c $< + +%.o: %.S + $(AS) -c $< + +$(EXE).elf: $(OBJS) + mkdir -p $(DISTDIR) + $(LD) $^ -o $(DISTDIR)/$@ $(LDFLAGS) + +$(EXE).tns: $(EXE).elf + $(GENZEHN) --input $(DISTDIR)/$^ --output $(DISTDIR)/$@ $(ZEHNFLAGS) + +$(EXE).prg.tns: $(EXE).tns + make-prg $(DISTDIR)/$^ $(DISTDIR)/$@ + +clean: + rm -f *.o $(DISTDIR)/$(EXE).tns $(DISTDIR)/$(EXE).elf $(DISTDIR)/$(EXE).prg.tns diff --git a/src/platform/tns/main.cpp b/src/platform/tns/main.cpp new file mode 100644 index 00000000..04c0e2fb --- /dev/null +++ b/src/platform/tns/main.cpp @@ -0,0 +1,145 @@ +#include + +#include + +// multi-threading (no sound - no problem) +void* osMutexInit() { return NULL; } +void osMutexFree(void *obj) {} +void osMutexLock(void *obj) {} +void osMutexUnlock(void *obj) {} + + +// timing +unsigned int osTime; +volatile unsigned int *timerBUS; +volatile unsigned int *timerCLK; +volatile unsigned int *timerCTR; +volatile unsigned int *timerDIV; + +void timerInit() +{ + timerBUS = (unsigned int*)0x900B0018; + timerCLK = (unsigned int*)0x900C0004; + timerCTR = (unsigned int*)0x900C0008; + timerDIV = (unsigned int*)0x900C0080; + + *timerBUS &= ~(1 << 11); + *timerDIV = 0x0A; + *timerCTR = 0x82; + + osTime = *timerCLK; +} + +int osGetTimeMS() +{ + return (osTime - *timerCLK) / 33; +} + + +// input +touchpad_info_t* touchInfo; +touchpad_report_t touchReport; + +void touchInit() +{ + touchInfo = is_touchpad ? touchpad_getinfo() : NULL; +} + +bool osJoyReady(int index) +{ + return (index == 0); +} + +void osJoyVibrate(int index, float L, float R) {} + +void joyUpdate() +{ + Input::setJoyPos(0, jkL, vec2(0.0f, 0.0f)); + Input::setJoyPos(0, jkR, vec2(0.0f, 0.0f)); + Input::setJoyPos(0, jkLT, vec2(0.0f, 0.0f)); + Input::setJoyPos(0, jkRT, vec2(0.0f, 0.0f)); + + if (touchInfo) + { + touchpad_scan(&touchReport); + if (touchReport.contact) + { + float tx = float(touchReport.x) / float(touchInfo->width) * 2.0f - 1.0f; + float ty = float(touchReport.y) / float(touchInfo->height) * 2.0f - 1.0f; + Input::setJoyPos(0, jkL, vec2(tx, -ty)); + } + } + + Input::setJoyDown(0, jkA, isKeyPressed(KEY_NSPIRE_2)); + Input::setJoyDown(0, jkB, isKeyPressed(KEY_NSPIRE_3)); + Input::setJoyDown(0, jkX, isKeyPressed(KEY_NSPIRE_5)); + Input::setJoyDown(0, jkY, isKeyPressed(KEY_NSPIRE_6)); + Input::setJoyDown(0, jkLB, isKeyPressed(KEY_NSPIRE_7)); + Input::setJoyDown(0, jkRB, isKeyPressed(KEY_NSPIRE_9)); + Input::setJoyDown(0, jkL, false); + Input::setJoyDown(0, jkR, false); + Input::setJoyDown(0, jkStart, isKeyPressed(KEY_NSPIRE_ENTER)); + Input::setJoyDown(0, jkSelect, isKeyPressed(KEY_NSPIRE_MENU)); + + Input::setJoyDown(0, jkUp, isKeyPressed(KEY_NSPIRE_UP) || isKeyPressed(KEY_NSPIRE_LEFTUP) || isKeyPressed(KEY_NSPIRE_UPRIGHT)); + Input::setJoyDown(0, jkDown, isKeyPressed(KEY_NSPIRE_DOWN) || isKeyPressed(KEY_NSPIRE_RIGHTDOWN) || isKeyPressed(KEY_NSPIRE_DOWNLEFT)); + Input::setJoyDown(0, jkLeft, isKeyPressed(KEY_NSPIRE_LEFT) || isKeyPressed(KEY_NSPIRE_LEFTUP) || isKeyPressed(KEY_NSPIRE_DOWNLEFT)); + Input::setJoyDown(0, jkRight, isKeyPressed(KEY_NSPIRE_RIGHT) || isKeyPressed(KEY_NSPIRE_RIGHTDOWN) || isKeyPressed(KEY_NSPIRE_UPRIGHT)); +} + +unsigned short* osPalette() +{ + return (unsigned short*)0xC0000200; +} + +int main(void) +{ + if (!has_colors) + return 0; + + lcd_init(SCR_320x240_565); + + timerInit(); + touchInit(); + + contentDir[0] = saveDir[0] = cacheDir[0] = 0; + + strcpy(contentDir, "/documents/Games/OpenLara/"); + strcpy(saveDir, contentDir); + strcpy(cacheDir, contentDir); + + Stream::addPack("content.tns"); + + Core::width = SCREEN_WIDTH; + Core::height = SCREEN_HEIGHT; + + GAPI::swColor = new GAPI::ColorSW[SCREEN_WIDTH * SCREEN_HEIGHT]; + GAPI::resize(); + + Sound::channelsCount = 0; + + Game::init("DATA/LEVEL1.PHD"); + + while (!Core::isQuit) + { + joyUpdate(); + + if (Game::update()) + { + Game::render(); + + lcd_blit(GAPI::swColor, SCR_320x240_565); + } + + if (isKeyPressed(KEY_NSPIRE_ESC)) + { + Core::quit(); + } + } + + delete[] GAPI::swColor; + + //Game::deinit(); + + return 0; +} diff --git a/src/sound.h b/src/sound.h index 29e9c7ed..558d8ae5 100644 --- a/src/sound.h +++ b/src/sound.h @@ -1,15 +1,20 @@ #ifndef H_SOUND #define H_SOUND -#define DECODE_ADPCM -#define DECODE_IMA -#define DECODE_VAG -#define DECODE_XA +#ifdef _OS_TNS + #define NO_SOUND +#endif -#define DECODE_OGG +#ifndef NO_SOUND + #define DECODE_ADPCM + #define DECODE_IMA + #define DECODE_VAG + #define DECODE_XA + #define DECODE_OGG -#if !defined(_OS_PSP) && !defined(_OS_WEB) && !defined(_OS_PSV) && !defined(_OS_3DS) && !defined(_OS_XBOX) && !defined(_OS_XB1) - #define DECODE_MP3 + #if !defined(_OS_PSP) && !defined(_OS_WEB) && !defined(_OS_PSV) && !defined(_OS_3DS) && !defined(_OS_XBOX) && !defined(_OS_XB1) + #define DECODE_MP3 + #endif #endif #include "utils.h" @@ -846,7 +851,8 @@ namespace Sound { Sample(Stream *stream, const vec3 *pos, float volume, float pitch, int flags, int id) : uniquePtr(pos), decoder(NULL), volume(volume), volumeTarget(volume), volumeDelta(0.0f), pitch(pitch), flags(flags), id(id) { this->pos = pos ? *pos : vec3(0.0f); - + + #ifndef NO_SOUND uint32 fourcc; stream->read(fourcc); if (fourcc == FOURCC("RIFF")) { // wav @@ -898,6 +904,7 @@ namespace Sound { decoder = new VAG(stream); #endif } + #endif if (!decoder) delete stream; @@ -1171,6 +1178,7 @@ namespace Sound { } Sample* play(Stream *stream, const vec3 *pos = NULL, float volume = 1.0f, float pitch = 0.0f, int flags = 0, int id = - 1) { + #ifndef NO_SOUND OS_LOCK(lock); ASSERT(pitch >= 0.0f); @@ -1207,6 +1215,7 @@ namespace Sound { LOG("! no free channels\n"); } + #endif delete stream; return NULL; } diff --git a/src/ui.h b/src/ui.h index 5d08e047..f521d78d 100644 --- a/src/ui.h +++ b/src/ui.h @@ -9,7 +9,7 @@ #define SUBTITLES_SPEED 0.1f #define TEXT_LINE_HEIGHT 18 -#ifdef _OS_PSV +#if defined(_OS_PSV) || defined(_OS_TNS) #define UI_SHOW_FPS #endif diff --git a/src/utils.h b/src/utils.h index bff2d025..df417442 100644 --- a/src/utils.h +++ b/src/utils.h @@ -1532,7 +1532,7 @@ struct CLUT { ColorCLUT color[16]; }; -namespace String { +namespace StrUtils { void toLower(char *str) { if (!str) return; @@ -1868,7 +1868,7 @@ struct Stream { public: Stream(const char *name, const void *data, int size, Callback *callback = NULL, void *userData = NULL) : callback(callback), userData(userData), f(NULL), data((char*)data), name(NULL), size(size), pos(0), buffer(NULL) { - this->name = String::copy(name); + this->name = StrUtils::copy(name); } Stream(const char *name, Callback *callback = NULL, void *userData = NULL) : callback(callback), userData(userData), f(NULL), data(NULL), name(NULL), size(-1), pos(0), buffer(NULL), buffering(true), baseOffset(0) { @@ -1912,13 +1912,13 @@ struct Stream { fpos = 0; bufferIndex = -1; - this->name = String::copy(name); + this->name = StrUtils::copy(name); if (callback) callback(this, userData); return; } } - this->name = String::copy(name); + this->name = StrUtils::copy(name); #ifdef _OS_3DS /* TODO if (callback) { @@ -1964,14 +1964,14 @@ struct Stream { break; } - int32 len = utf16_to_utf8((uint8*)buf + pathLen, entry.name, String::length(entry.name)); + int32 len = utf16_to_utf8((uint8*)buf + pathLen, entry.name, StrUtils::length(entry.name)); buf[pathLen + len] = 0; if (entry.attributes & FS_ATTRIBUTE_DIRECTORY) { strcat(buf, "/"); readDirectory(archive, buf); } else { - fileList.push(String::copy(buf)); + fileList.push(StrUtils::copy(buf)); } } diff --git a/src/video.h b/src/video.h index 2aa3b51d..552fcb74 100644 --- a/src/video.h +++ b/src/video.h @@ -5,6 +5,10 @@ #include "texture.h" #include "sound.h" +#ifdef _OS_TNS + #define NO_VIDEO +#endif + struct AC_ENTRY { uint8 code; uint8 skip; @@ -264,6 +268,9 @@ struct Video { nextChunk(0, 0); + #ifdef NO_SOUND + audioDecoder = NULL; + #else if (sfmt == 1) audioDecoder = new Sound::PCM(NULL, channels, rate, 0x7FFFFF, bps); // TR2 else if (sfmt == 101) { @@ -272,6 +279,7 @@ struct Video { else audioDecoder = new Sound::IMA(NULL, channels, rate); // TR3 } + #endif } virtual ~Escape() { @@ -678,6 +686,9 @@ struct Video { } virtual int decode(Sound::Frame *frames, int count) { + #ifdef NO_VIDEO + return 0; + #else if (!audioDecoder) return 0; if (bps != 4 && abs(curAudioChunk - curVideoChunk) > 1) { // sync with video chunk, doesn't work for IMA @@ -718,6 +729,7 @@ struct Video { } return count; + #endif } }; @@ -838,7 +850,11 @@ struct Video { channels = 2; freq = 37800; + #ifdef NO_SOUND + audioDecoder = NULL; + #else audioDecoder = new Sound::XA(NULL); + #endif } virtual ~STR() { @@ -1077,6 +1093,9 @@ struct Video { } virtual int decode(Sound::Frame *frames, int count) { + #ifdef NO_VIDEO + return 0; + #else if (!audioDecoder) return 0; Sound::XA *xa = (Sound::XA*)audioDecoder; @@ -1104,6 +1123,7 @@ struct Video { } return count; + #endif } }; From 0c0e2111b5afcdc85c1880b9d14140cd2f89fbc2 Mon Sep 17 00:00:00 2001 From: XProger Date: Tue, 29 Dec 2020 02:08:34 +0300 Subject: [PATCH 020/190] gba render on tns --- src/gapi/sw.h | 2 +- src/platform/gba/{Makefile => Makefile_gba} | 2 +- src/platform/gba/Makefile_tns | 49 ++++++ src/platform/gba/common.h | 91 +++++++---- src/platform/gba/level.h | 10 +- src/platform/gba/main.cpp | 166 +++++++++++++++++--- src/platform/gba/render.iwram.cpp | 143 ++++++++++++++--- src/platform/tns/main.cpp | 40 ++--- 8 files changed, 406 insertions(+), 97 deletions(-) rename src/platform/gba/{Makefile => Makefile_gba} (99%) create mode 100644 src/platform/gba/Makefile_tns diff --git a/src/gapi/sw.h b/src/gapi/sw.h index 89573734..7086699e 100644 --- a/src/gapi/sw.h +++ b/src/gapi/sw.h @@ -249,7 +249,7 @@ namespace GAPI { void resize() { delete[] swDepth; - swDepth = new DepthSW[Core::width * Core::height]; + //swDepth = new DepthSW[Core::width * Core::height]; } inline mat4::ProjRange getProjRange() { diff --git a/src/platform/gba/Makefile b/src/platform/gba/Makefile_gba similarity index 99% rename from src/platform/gba/Makefile rename to src/platform/gba/Makefile_gba index 2c9c2d01..0fdc1ec7 100644 --- a/src/platform/gba/Makefile +++ b/src/platform/gba/Makefile_gba @@ -32,7 +32,7 @@ MUSIC := #--------------------------------------------------------------------------------- ARCH := -mthumb -mthumb-interwork -CFLAGS := -g -Wall -O3\ +CFLAGS := -g -Wall -O3 -D__GBA__\ -mcpu=arm7tdmi -mtune=arm7tdmi\ -fomit-frame-pointer\ -ffast-math\ diff --git a/src/platform/gba/Makefile_tns b/src/platform/gba/Makefile_tns new file mode 100644 index 00000000..e60cf91b --- /dev/null +++ b/src/platform/gba/Makefile_tns @@ -0,0 +1,49 @@ +DEBUG = FALSE + +GCC = nspire-gcc +AS = nspire-as +GXX = nspire-g++ +LD = nspire-ld +GENZEHN = genzehn + +GCCFLAGS = -marm -march=armv5te -mtune=arm926ej-s -std=c++11 -flto -ffast-math -fomit-frame-pointer -fno-exceptions -fno-rtti -ffunction-sections -fdata-sections -D__TNS__ -I../../ +LDFLAGS = -Wl,--gc-sections -Wl,--as-needed -flto -Wno-alloc-size-larger-than +ZEHNFLAGS = --name "OpenLara" + +ifeq ($(DEBUG),FALSE) + GCCFLAGS += -Ofast +else + GCCFLAGS += -O0 -g +endif + +OBJS = $(patsubst %.c, %.o, $(shell find . -name \*.c)) +OBJS += $(patsubst %.cpp, %.o, $(shell find . -name \*.cpp)) +OBJS += $(patsubst %.s, %.o, $(shell find . -name \*.s)) +EXE = OpenLara +DISTDIR = . +vpath %.tns $(DISTDIR) +vpath %.elf $(DISTDIR) + +all: $(EXE).prg.tns + +%.o: %.c + $(GCC) $(GCCFLAGS) -c $< + +%.o: %.cpp + $(GXX) $(GCCFLAGS) -c $< + +%.o: %.s + $(AS) -c $< + +$(EXE).elf: $(OBJS) + mkdir -p $(DISTDIR) + $(LD) $^ -o $(DISTDIR)/$@ $(LDFLAGS) + +$(EXE).tns: $(EXE).elf + $(GENZEHN) --input $(DISTDIR)/$^ --output $(DISTDIR)/$@ $(ZEHNFLAGS) + +$(EXE).prg.tns: $(EXE).tns + make-prg $(DISTDIR)/$^ $(DISTDIR)/$@ + +clean: + rm -f *.o $(DISTDIR)/$(EXE).tns $(DISTDIR)/$(EXE).elf $(DISTDIR)/$(EXE).prg.tns diff --git a/src/platform/gba/common.h b/src/platform/gba/common.h index 1632596c..8c384db2 100644 --- a/src/platform/gba/common.h +++ b/src/platform/gba/common.h @@ -1,19 +1,21 @@ #ifndef H_COMMON #define H_COMMON -#ifdef _WIN32 -#define _CRT_SECURE_NO_WARNINGS -#include -#else -#include -#include -#include -#include -#include -#include -#include -#include -#include +#if defined(_WIN32) + #define _CRT_SECURE_NO_WARNINGS + #include +#elif defined(__GBA__) + #include + #include + #include + #include + #include + #include + #include + #include + #include +#elif defined(__TNS__) + #include #endif #include @@ -22,29 +24,47 @@ #include #include -#define USE_MODE_5 //#define DEBUG_OVERDRAW //#define DEBUG_FACES +//#define USE_MODE_5 +//#define USE_MODE_4 + #define SCALE 1 -#ifdef USE_MODE_5 - #define WIDTH 160 - #define HEIGHT 128 - #define FRAME_WIDTH 160 - #define FRAME_HEIGHT 128 - #define PIXEL_SIZE 1 -#else // MODE_4 - #define WIDTH 240 - #define HEIGHT 160 +#if defined(__TNS__) + #define WIDTH SCREEN_WIDTH + #define HEIGHT SCREEN_HEIGHT #define FRAME_WIDTH (WIDTH/SCALE) #define FRAME_HEIGHT (HEIGHT/SCALE) - #define PIXEL_SIZE 2 + #define FOV_SHIFT 8 +#else + #ifdef USE_MODE_5 + #define WIDTH 160 + #define HEIGHT 128 + #define FRAME_WIDTH 160 + #define FRAME_HEIGHT 128 + #define FOV_SHIFT 7 + #elif USE_MODE_4 + #define WIDTH 240 + #define HEIGHT 160 + #define FRAME_WIDTH (WIDTH/SCALE) + #define FRAME_HEIGHT (HEIGHT/SCALE) + #define FOV_SHIFT 7 + #else + #error + #endif #endif -#ifdef _WIN32 - #define INLINE inline +#ifdef USE_MODE_5 + #define PIXEL_SIZE 1 #else + #define PIXEL_SIZE 2 +#endif + +#if defined(_WIN32) + #define INLINE inline +#elif defined(__GBA__) || defined(__TNS__) #define INLINE __attribute__((always_inline)) inline #endif @@ -63,13 +83,13 @@ typedef int16 Index; #define DEG2RAD (PI / 180.0f) #define RAD2DEG (180.0f / PI) -#ifdef _WIN32 +#if defined(_WIN32) #define IWRAM_CODE #define EWRAM_DATA #define dmaCopy(src,dst,size) memcpy(dst,src,size) #define ALIGN4 -#else +#elif defined(__GBA__) #define ALIGN4 __attribute__ ((aligned (4))) // TODO profiling @@ -91,6 +111,18 @@ typedef int16 Index; REG_TM2CNT= 0; return (REG_TM3D<<16)|REG_TM2D; } +#elif defined(__TNS__) + #define IWRAM_CODE + #define EWRAM_DATA + + #define dmaCopy(src,dst,size) memcpy(dst,src,size) + + #define ALIGN4 __attribute__ ((aligned (4))) + + void SetPalette(unsigned short* palette); + + INLINE void profile_start() {} + INLINE uint32 profile_stop() { return 0; } #endif enum InputKey { @@ -289,7 +321,6 @@ struct Face { }; #define FIXED_SHIFT 14 -#define FOV_SHIFT (7 - (SCALE - 1)) #define MAX_MATRICES 8 #define MAX_MODELS 64 @@ -339,4 +370,4 @@ void readLevel(const uint8 *data); const Room::Sector* getSector(int32 roomIndex, int32 x, int32 z); int32 getRoomIndex(int32 roomIndex, const vec3i &pos); -#endif \ No newline at end of file +#endif diff --git a/src/platform/gba/level.h b/src/platform/gba/level.h index 433833f3..ba94611d 100644 --- a/src/platform/gba/level.h +++ b/src/platform/gba/level.h @@ -130,16 +130,22 @@ void readLevel(const uint8 *data) { // TODO non-hardcode level loader, added *_O const uint8* p = f_palette; - for (int i = 0; i < 256; i++) { + for (int i = 0; i < 256; i++) + { + #if defined(_WIN32) || defined(__GBA__) palette[i] = (p[0] >> 1) | ((p[1] >> 1) << 5) | ((p[2] >> 1) << 10); + #elif defined(__TNS__) + palette[i] = (p[2] >> 1) | ((p[1] >> 1) << 5) | ((p[0] >> 1) << 10); + #endif p += 3; } -#ifndef _WIN32 +#if defined(__GBA__) || defined(__TNS__) #ifndef USE_MODE_5 SetPalette(palette); #endif #endif + // prepare models for (uint32 i = 0; i < modelsCount; i++) { dmaCopy(modelsPtr, models + i, sizeof(Model)); // sizeof(Model) is faster than FILE_MODEL_SIZE diff --git a/src/platform/gba/main.cpp b/src/platform/gba/main.cpp index b379c728..9ddc25e4 100644 --- a/src/platform/gba/main.cpp +++ b/src/platform/gba/main.cpp @@ -1,24 +1,10 @@ -#ifndef _WIN32 -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "LEVEL1_PHD.h" -#endif - //#define PROFILE #include "common.h" #include "level.h" #include "camera.h" -#ifdef _WIN32 +#if defined(_WIN32) uint8* LEVEL1_PHD; uint32 SCREEN[WIDTH * HEIGHT]; @@ -26,8 +12,69 @@ extern uint8 fb[WIDTH * HEIGHT * 2]; #define WND_SCALE 4 -#else +#elif defined(__GBA__) + #include "LEVEL1_PHD.h" + extern uint32 fb; +#elif defined(__TNS__) + uint8* LEVEL1_PHD; + + extern uint8 fb[WIDTH * HEIGHT]; + + unsigned int osTime; + volatile unsigned int *timerBUS; + volatile unsigned int *timerCLK; + volatile unsigned int *timerCTR; + volatile unsigned int *timerDIV; + + void timerInit() + { + timerBUS = (unsigned int*)0x900B0018; + timerCLK = (unsigned int*)0x900C0004; + timerCTR = (unsigned int*)0x900C0008; + timerDIV = (unsigned int*)0x900C0080; + + *timerBUS &= ~(1 << 11); + *timerDIV = 0x0A; + *timerCTR = 0x82; + + osTime = *timerCLK; + } + + int GetTickCount() + { + return (osTime - *timerCLK) / 33; + } + + void SetPalette(unsigned short* palette) + { + unsigned short *palReg = (unsigned short*)0xC0000200; + memcpy(palReg, palette, 256 * 2); + } + + touchpad_info_t* touchInfo; + touchpad_report_t touchReport; + uint8 inputData[0x20]; + + void inputInit() + { + touchInfo = is_touchpad ? touchpad_getinfo() : NULL; + } + + void inputUpdate() + { + if (touchInfo) + { + touchpad_scan(&touchReport); + } + + memcpy(inputData, (void*)0x900E0000, 0x20); + } + + bool keyDown(const t_key &key) + { + return (*(short*)(inputData + key.tpad_row)) & key.tpad_col; + } #endif bool keys[IK_MAX] = {}; @@ -42,7 +89,7 @@ void update(int32 frames) { } } -#ifdef WIN32 +#if defined(_WIN32) extern Vertex gVertices[MAX_VERTICES]; INLINE int32 classify(const Vertex* v) { @@ -127,7 +174,7 @@ void render() { drawNumber(fps, FRAME_WIDTH, 16); } -#ifdef _WIN32 +#if defined(_WIN32) HDC hDC; void blit() { @@ -187,9 +234,20 @@ void vblank() { } int main(void) { -#ifdef _WIN32 +#if defined(_WIN32) || defined(__TNS__) { - FILE *f = fopen("data/LEVEL1.PHD", "rb"); + #if defined(_WIN32) + FILE *f = fopen("data/LEVEL1.PHD", "rb"); + #elif defined(__TNS__) + FILE *f = fopen("/documents/OpenLara/LEVEL1.PHD.tns", "rb"); + #else + #error + #endif + + if (!f) { + return 0; + } + fseek(f, 0, SEEK_END); int32 size = ftell(f); fseek(f, 0, SEEK_SET); @@ -197,7 +255,7 @@ int main(void) { fread(LEVEL1_PHD, 1, size, f); fclose(f); } -#else +#elif defined(__GBA__) // set low latency mode via WAITCNT register (thanks to GValiente) #define BIT_SET(y, flag) (y |= (flag)) #define REG_WAITCNT_NV *(u16*)(REG_BASE + 0x0204) @@ -209,7 +267,7 @@ int main(void) { readLevel(LEVEL1_PHD); -#ifdef _WIN32 +#if defined(_WIN32) RECT r = { 0, 0, 240 * WND_SCALE, 160 * WND_SCALE }; AdjustWindowRect(&r, WS_OVERLAPPEDWINDOW, false); @@ -243,7 +301,7 @@ int main(void) { } } while (msg.message != WM_QUIT); -#else +#elif defined(__GBA__) irqInit(); irqSet(IRQ_VBLANK, vblank); irqEnable(IRQ_VBLANK); @@ -306,5 +364,67 @@ int main(void) { } } +#elif defined(__TNS__) + if (!has_colors) + return 0; + + lcd_init(SCR_320x240_8); + + timerInit(); + inputInit(); + + int startTime = GetTickCount(); + int lastTime = -15; + int fpsTime = startTime; + + memset(keys, 0, sizeof(keys)); + + while (1) + { + inputUpdate(); + + if (keyDown(KEY_NSPIRE_ESC)) + { + break; + } + + if (touchInfo && touchReport.contact) + { + float tx = float(touchReport.x) / float(touchInfo->width) * 2.0f - 1.0f; + float ty = float(touchReport.y) / float(touchInfo->height) * 2.0f - 1.0f; + + keys[IK_LEFT] = tx < -0.5f; + keys[IK_RIGHT] = tx > 0.5f; + keys[IK_UP] = ty > 0.5f; + keys[IK_DOWN] = ty < -0.5f; + } else { + keys[IK_LEFT] = + keys[IK_RIGHT] = + keys[IK_UP] = + keys[IK_DOWN] = false; + } + + keys[IK_A] = keyDown(KEY_NSPIRE_2); + keys[IK_B] = keyDown(KEY_NSPIRE_3); + keys[IK_L] = keyDown(KEY_NSPIRE_7); + keys[IK_R] = keyDown(KEY_NSPIRE_9); + + int time = GetTickCount() - startTime; + update((time - lastTime) / 16); + lastTime = time; + + render(); + + lcd_blit(fb, SCR_320x240_8); + //msleep(16); + + fpsCounter++; + if (lastTime - fpsTime >= 1000) + { + fps = fpsCounter; + fpsCounter = 0; + fpsTime = lastTime - ((lastTime - fpsTime) - 1000); + } + } #endif } diff --git a/src/platform/gba/render.iwram.cpp b/src/platform/gba/render.iwram.cpp index 03152bad..7313e229 100644 --- a/src/platform/gba/render.iwram.cpp +++ b/src/platform/gba/render.iwram.cpp @@ -4,10 +4,12 @@ uint16 divTable[DIV_TABLE_SIZE]; -#ifdef _WIN32 +#if defined(_WIN32) uint8 fb[WIDTH * HEIGHT * 2]; -#else +#elif defined(__GBA__) uint32 fb = VRAM; +#elif defined(__TNS__) + uint8 fb[WIDTH * HEIGHT]; #endif #define FixedInvS(x) ((x < 0) ? -divTable[abs(x)] : divTable[x]) @@ -194,7 +196,7 @@ Matrix& matrixGet() { } void matrixPush() { -#ifdef _WIN32 +#if defined(_WIN32) if (matrixStackIndex >= MAX_MATRICES - 1) { DebugBreak(); return; @@ -206,7 +208,7 @@ void matrixPush() { } void matrixPop() { -#ifdef _WIN32 +#if defined(_WIN32) if (matrixStackIndex <= 0) { DebugBreak(); return; @@ -292,7 +294,7 @@ INLINE int32 classify(const Vertex* v) { } void transform(const vec3s &v, int32 vg) { -#ifdef _WIN32 +#if defined(_WIN32) if (gVerticesCount >= MAX_VERTICES) { DebugBreak(); return; @@ -326,12 +328,12 @@ void transform(const vec3s &v, int32 vg) { z >>= FOV_SHIFT; -#if 1 +#if 0 x >>= (10 + SCALE); y >>= (10 + SCALE); z >>= (10 + SCALE); - #ifdef WIN32 + #if defined(_WIN32) if (abs(z) >= DIV_TABLE_SIZE) { DebugBreak(); } @@ -593,7 +595,7 @@ struct Edge { }; INLINE void scanlineG(const uint8 *tile, uint16* buffer, int32 x1, int32 x2, uint8 palIndex, uint32 g, uint32 dgdx) { - #ifdef USE_MODE_5 + #if defined(USE_MODE_5) uint16* pixel = buffer + x1; if (x1 & 1) { @@ -621,7 +623,7 @@ INLINE void scanlineG(const uint8 *tile, uint16* buffer, int32 x1, int32 x2, uin if (x2 & 1) { *pixel++ = FETCH_G_PAL(palIndex); } - #else + #elif defined(USE_MODE_4) if (x1 & 1) { uint16 &p = *(uint16*)((uint8*)buffer + x1 - 1); @@ -671,11 +673,60 @@ INLINE void scanlineG(const uint8 *tile, uint16* buffer, int32 x1, int32 x2, uin { *pixel = (*pixel & 0xFF00) | FETCH_G(palIndex); } + #else + if (x1 & 1) + { + *((uint8*)buffer + x1) = FETCH_G(palIndex); + g += dgdx; + x1++; + } + + int32 width = (x2 - x1) >> 1; + uint16* pixel = (uint16*)((uint8*)buffer + x1); + + dgdx <<= 1; + + if (width && (x1 & 3)) + { + uint16 p = FETCH_G(palIndex); + *pixel++ = p | (FETCH_G(palIndex) << 8); + + g += dgdx; + + width--; + } + + while (width-- > 0) + { + uint32 p = FETCH_G(palIndex); + p |= (FETCH_G(palIndex) << 8); + + g += dgdx; + + if (width-- > 0) + { + p |= (FETCH_G(palIndex) << 16); + p |= (FETCH_G(palIndex) << 24); + + g += dgdx; + + *(uint32*)pixel = p; + pixel += 2; + } else { + *(uint16*)pixel = p; + pixel += 1; + } + } + + if (x2 & 1) + { + *((uint8*)pixel) = FETCH_G(palIndex); + } #endif } INLINE void scanlineGT(const uint8 *tile, uint16* buffer, int32 x1, int32 x2, uint32 g, uint32 t, uint32 dgdx, uint32 dtdx) { - #ifdef USE_MODE_5 + #if defined(USE_MODE_5) uint16* pixel = buffer + x1; if (x1 & 1) { @@ -708,7 +759,7 @@ INLINE void scanlineGT(const uint8 *tile, uint16* buffer, int32 x1, int32 x2, ui *pixel++ = FETCH_GT_PAL(); } - #else + #elif defined(USE_MODE_4) if (x1 & 1) { @@ -766,6 +817,62 @@ INLINE void scanlineGT(const uint8 *tile, uint16* buffer, int32 x1, int32 x2, ui { *pixel = (*pixel & 0xFF00) | FETCH_GT(); } + #else + if (x1 & 1) + { + *((uint8*)buffer + x1) = FETCH_GT(); + t += dtdx; + g += dgdx; + x1++; + } + + int32 width = (x2 - x1) >> 1; + uint16* pixel = (uint16*)((uint8*)buffer + x1); + + dgdx <<= 1; + + if (width && (x1 & 3)) + { + uint16 p = FETCH_GT(); + t += dtdx; + *pixel++ = p | (FETCH_GT() << 8); + t += dtdx; + + g += dgdx; + + width--; + } + + while (width-- > 0) + { + uint32 p = FETCH_GT(); + t += dtdx; + p |= (FETCH_GT() << 8); + t += dtdx; + + g += dgdx; + + if (width-- > 0) + { + p |= (FETCH_GT() << 16); + t += dtdx; + p |= (FETCH_GT() << 24); + t += dtdx; + + g += dgdx; + + *(uint32*)pixel = p; + pixel += 2; + } else { + *(uint16*)pixel = p; + pixel += 1; + } + } + + if (x2 & 1) + { + *((uint8*)pixel) = FETCH_GT(); + } #endif } @@ -1066,7 +1173,7 @@ void drawGlyph(const Sprite *sprite, int32 x, int32 y) { } void faceAddQuad(uint16 flags, const Index* indices, int32 startVertex) { -#ifdef _WIN32 +#if defined(_WIN32) if (gFacesCount >= MAX_FACES) { DebugBreak(); } @@ -1104,7 +1211,7 @@ void faceAddQuad(uint16 flags, const Index* indices, int32 startVertex) { } void faceAddTriangle(uint16 flags, const Index* indices, int32 startVertex) { -#ifdef _WIN32 +#if defined(_WIN32) if (gFacesCount >= MAX_FACES) { DebugBreak(); } @@ -1227,9 +1334,9 @@ void initRender() { } void dmaClear(uint32 *dst, uint32 count) { -#ifdef WIN32 +#if defined(_WIN32) || defined(__TNS__) memset(dst, 0, count * 4); -#else +#elif defined(__GBA__) vu32 value = 0; REG_DMA3SAD = (vu32)&value; REG_DMA3DAD = (vu32)dst; @@ -1238,9 +1345,5 @@ void dmaClear(uint32 *dst, uint32 count) { } void clear() { -#ifdef USE_MODE_5 dmaClear((uint32*)fb, (WIDTH * HEIGHT) >> PIXEL_SIZE); -#else - dmaClear((uint32*)fb, (WIDTH * HEIGHT) >> PIXEL_SIZE); -#endif -} \ No newline at end of file +} diff --git a/src/platform/tns/main.cpp b/src/platform/tns/main.cpp index 04c0e2fb..61fa7894 100644 --- a/src/platform/tns/main.cpp +++ b/src/platform/tns/main.cpp @@ -52,7 +52,7 @@ bool osJoyReady(int index) void osJoyVibrate(int index, float L, float R) {} -void joyUpdate() +bool inputUpdate() { Input::setJoyPos(0, jkL, vec2(0.0f, 0.0f)); Input::setJoyPos(0, jkR, vec2(0.0f, 0.0f)); @@ -70,21 +70,23 @@ void joyUpdate() } } - Input::setJoyDown(0, jkA, isKeyPressed(KEY_NSPIRE_2)); - Input::setJoyDown(0, jkB, isKeyPressed(KEY_NSPIRE_3)); - Input::setJoyDown(0, jkX, isKeyPressed(KEY_NSPIRE_5)); - Input::setJoyDown(0, jkY, isKeyPressed(KEY_NSPIRE_6)); - Input::setJoyDown(0, jkLB, isKeyPressed(KEY_NSPIRE_7)); - Input::setJoyDown(0, jkRB, isKeyPressed(KEY_NSPIRE_9)); + uint8 inputData[0x20]; + memcpy(inputData, (void*)0x900E0000, 0x20); + + #define IS_KEY_DOWN(key) ((*(short*)(inputData + key.tpad_row)) & key.tpad_col) + + Input::setJoyDown(0, jkA, IS_KEY_DOWN(KEY_NSPIRE_2)); + Input::setJoyDown(0, jkB, IS_KEY_DOWN(KEY_NSPIRE_3)); + Input::setJoyDown(0, jkX, IS_KEY_DOWN(KEY_NSPIRE_5)); + Input::setJoyDown(0, jkY, IS_KEY_DOWN(KEY_NSPIRE_6)); + Input::setJoyDown(0, jkLB, IS_KEY_DOWN(KEY_NSPIRE_7)); + Input::setJoyDown(0, jkRB, IS_KEY_DOWN(KEY_NSPIRE_9)); Input::setJoyDown(0, jkL, false); Input::setJoyDown(0, jkR, false); - Input::setJoyDown(0, jkStart, isKeyPressed(KEY_NSPIRE_ENTER)); - Input::setJoyDown(0, jkSelect, isKeyPressed(KEY_NSPIRE_MENU)); + Input::setJoyDown(0, jkStart, IS_KEY_DOWN(KEY_NSPIRE_ENTER)); + Input::setJoyDown(0, jkSelect, IS_KEY_DOWN(KEY_NSPIRE_MENU)); - Input::setJoyDown(0, jkUp, isKeyPressed(KEY_NSPIRE_UP) || isKeyPressed(KEY_NSPIRE_LEFTUP) || isKeyPressed(KEY_NSPIRE_UPRIGHT)); - Input::setJoyDown(0, jkDown, isKeyPressed(KEY_NSPIRE_DOWN) || isKeyPressed(KEY_NSPIRE_RIGHTDOWN) || isKeyPressed(KEY_NSPIRE_DOWNLEFT)); - Input::setJoyDown(0, jkLeft, isKeyPressed(KEY_NSPIRE_LEFT) || isKeyPressed(KEY_NSPIRE_LEFTUP) || isKeyPressed(KEY_NSPIRE_DOWNLEFT)); - Input::setJoyDown(0, jkRight, isKeyPressed(KEY_NSPIRE_RIGHT) || isKeyPressed(KEY_NSPIRE_RIGHTDOWN) || isKeyPressed(KEY_NSPIRE_UPRIGHT)); + return !IS_KEY_DOWN(KEY_NSPIRE_ESC); } unsigned short* osPalette() @@ -113,7 +115,7 @@ int main(void) Core::width = SCREEN_WIDTH; Core::height = SCREEN_HEIGHT; - GAPI::swColor = new GAPI::ColorSW[SCREEN_WIDTH * SCREEN_HEIGHT]; + GAPI::swColor = new GAPI::ColorSW[Core::width * Core::height]; GAPI::resize(); Sound::channelsCount = 0; @@ -122,7 +124,10 @@ int main(void) while (!Core::isQuit) { - joyUpdate(); + if (!inputUpdate()) + { + Core::quit(); + } if (Game::update()) { @@ -130,11 +135,6 @@ int main(void) lcd_blit(GAPI::swColor, SCR_320x240_565); } - - if (isKeyPressed(KEY_NSPIRE_ESC)) - { - Core::quit(); - } } delete[] GAPI::swColor; From d07808e93c0887c630e7ac0b621d592edfe20d2d Mon Sep 17 00:00:00 2001 From: Timur Gagiev Date: Tue, 29 Dec 2020 02:24:26 +0300 Subject: [PATCH 021/190] GBA fix build --- src/platform/gba/{Makefile_gba => Makefile} | 0 src/platform/gba/common.h | 8 ++++++-- 2 files changed, 6 insertions(+), 2 deletions(-) rename src/platform/gba/{Makefile_gba => Makefile} (100%) diff --git a/src/platform/gba/Makefile_gba b/src/platform/gba/Makefile similarity index 100% rename from src/platform/gba/Makefile_gba rename to src/platform/gba/Makefile diff --git a/src/platform/gba/common.h b/src/platform/gba/common.h index 8c384db2..43e2a846 100644 --- a/src/platform/gba/common.h +++ b/src/platform/gba/common.h @@ -27,8 +27,12 @@ //#define DEBUG_OVERDRAW //#define DEBUG_FACES -//#define USE_MODE_5 -//#define USE_MODE_4 +#if defined(_WIN32) + #define USE_MODE_5 1 +#elif defined(__GBA__) + #define USE_MODE_5 1 + //#define USE_MODE_4 1 +#endif #define SCALE 1 From 608f75e71d73197a1a74c5ea170c7f79e3686e26 Mon Sep 17 00:00:00 2001 From: Timur Gagiev Date: Wed, 30 Dec 2020 03:53:43 +0300 Subject: [PATCH 022/190] fixed #282 Switch fix input for new firmware version --- src/platform/nx/main.cpp | 55 +++++++++++++++++++--------------------- 1 file changed, 26 insertions(+), 29 deletions(-) diff --git a/src/platform/nx/main.cpp b/src/platform/nx/main.cpp index e70226d0..7070fd68 100644 --- a/src/platform/nx/main.cpp +++ b/src/platform/nx/main.cpp @@ -96,7 +96,7 @@ EGLContext context; NWindow *window; void configureResolution() { - if (appletGetOperationMode() == AppletOperationMode_Docked) { + if (appletGetOperationMode() == AppletOperationMode_Console) { Core::width = 1920; Core::height = 1080; } @@ -184,19 +184,19 @@ void osJoyVibrate(int index, float L, float R) { bool joyIsSplit; int joySplitTime; +PadState pads[2]; void joySplit(bool split) { joyIsSplit = split; joySplitTime = Core::getTime(); + if (split) { - hidSetNpadJoyHoldType(HidJoyHoldType_Horizontal); - hidSetNpadJoyAssignmentModeSingleByDefault(CONTROLLER_PLAYER_1); - hidSetNpadJoyAssignmentModeSingleByDefault(CONTROLLER_PLAYER_2); + hidSetNpadJoyAssignmentModeSingle(HidNpadIdType_No1, HidNpadJoyDeviceType_Left); + hidSetNpadJoyAssignmentModeSingle(HidNpadIdType_No2, HidNpadJoyDeviceType_Right); } else { - hidSetNpadJoyHoldType(HidJoyHoldType_Default); - hidSetNpadJoyAssignmentModeDual(CONTROLLER_PLAYER_1); - hidSetNpadJoyAssignmentModeDual(CONTROLLER_PLAYER_2); - hidMergeSingleJoyAsDualJoy(CONTROLLER_PLAYER_1, CONTROLLER_PLAYER_2); + hidSetNpadJoyAssignmentModeDual(HidNpadIdType_No1); + hidSetNpadJoyAssignmentModeDual(HidNpadIdType_No2); + hidMergeSingleJoyAsDualJoy(HidNpadIdType_No1, HidNpadIdType_No2); if (Game::level && Game::level->players[1]) { Game::level->addPlayer(1); // add existing player == remove player @@ -205,6 +205,12 @@ void joySplit(bool split) { } void joyInit() { + hidSetNpadJoyHoldType(HidNpadJoyHoldType_Horizontal); + + padConfigureInput(2, HidNpadStyleSet_NpadStandard); + padInitialize(&pads[0], HidNpadIdType_No1, HidNpadIdType_Handheld); + padInitialize(&pads[1], HidNpadIdType_No2, HidNpadIdType_Handheld); + joySplit(false); } @@ -215,18 +221,12 @@ void joyUpdate() { KEY_DLEFT, KEY_DRIGHT, KEY_DUP, KEY_DDOWN, }; - if (hidGetHandheldMode() && joyIsSplit) { - joySplit(false); - } - - hidScanInput(); - bool waitForSplit = false; for (int i = 0; i < (joyIsSplit ? 2 : 1); i++) { - HidControllerID ctrl = (i == 0 ? CONTROLLER_P1_AUTO : CONTROLLER_PLAYER_2); + padUpdate(&pads[i]); - u64 mask = hidKeysDown(ctrl) | hidKeysHeld(ctrl); + u64 mask = padGetButtonsDown(&pads[i]) | padGetButtons(&pads[i]); for (int j = 1; j < jkMAX; j++) { if (j != jkSelect && j != jkStart) { @@ -237,15 +237,14 @@ void joyUpdate() { Input::setJoyDown(i, jkSelect, (mask & (KEY_MINUS | KEY_PLUS)) != 0); Input::setJoyDown(i, jkStart, (mask & (KEY_LSTICK | KEY_RSTICK)) != 0); - JoystickPosition sL, sR; + HidAnalogStickState sL = padGetStickPos(&pads[i], 0); + HidAnalogStickState sR = padGetStickPos(&pads[i], 1); - hidJoystickRead(&sL, ctrl, JOYSTICK_LEFT); - hidJoystickRead(&sR, ctrl, JOYSTICK_RIGHT); - Input::setJoyPos(i, jkL, vec2(float(sL.dx), float(-sL.dy)) / 32767.0f); - Input::setJoyPos(i, jkR, vec2(float(sR.dx), float(-sR.dy)) / 32767.0f); + Input::setJoyPos(i, jkL, vec2(float(sL.x), float(-sL.y)) / 32767.0f); + Input::setJoyPos(i, jkR, vec2(float(sR.x), float(-sR.y)) / 32767.0f); if ((mask & (KEY_L | KEY_R)) == (KEY_L | KEY_R)) { // hold L and R to split/merge joy-con's - if (joySplitTime + 1000 < Core::getTime()) { // 1 sec timer + if (Core::getTime() - joySplitTime > 1000) { // 1 sec timer joySplit(!joyIsSplit); } waitForSplit = true; @@ -258,7 +257,8 @@ void joyUpdate() { } void touchUpdate() { - int touchesCount = hidTouchCount(); + HidTouchScreenState state; + hidGetTouchScreenStates(&state, 1); bool touchState[COUNT(Input::touch)]; @@ -266,14 +266,11 @@ void touchUpdate() { touchState[i] = Input::down[ikTouchA + i]; } - for (int i = 0; i < touchesCount; i++) { - touchPosition touch; - hidTouchRead(&touch, i); - - InputKey key = Input::getTouch(touch.id); + for (int i = 0; i < state.count; i++) { + InputKey key = Input::getTouch(state.touches[i].finger_id); if (key == ikNone) continue; - Input::setPos(key, vec2(float(touch.px), float(touch.py))); + Input::setPos(key, vec2(float(state.touches[i].x), float(state.touches[i].y))); Input::setDown(key, true); touchState[key - ikTouchA] = false; From 26d226a6df32985cf2abf0c6597a845b058e1aa3 Mon Sep 17 00:00:00 2001 From: Timur Gagiev Date: Wed, 30 Dec 2020 04:56:03 +0300 Subject: [PATCH 023/190] fix windows build --- src/json.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/json.h b/src/json.h index a433e3f2..e569cfcc 100644 --- a/src/json.h +++ b/src/json.h @@ -23,7 +23,7 @@ struct JSON { Type type; JSON(Type type, const char *name = NULL) : nodes(NULL), prev(NULL), next(NULL), type(type) { - this->name = String::copy(name); + this->name = StrUtils::copy(name); } ~JSON() { @@ -66,7 +66,7 @@ struct JSON { void add(const char *name, const char *value) { - add(STRING, name)->sValue = String::copy(value); + add(STRING, name)->sValue = StrUtils::copy(value); } void add(const char *name, int value) { From 87bb787032b2f278d9ff8c5f508b6fd40ff47571 Mon Sep 17 00:00:00 2001 From: XProger Date: Sun, 3 Jan 2021 16:39:21 +0300 Subject: [PATCH 024/190] Linux AZERTY keyboard layout support --- src/format.h | 2 +- src/platform/nix/main.cpp | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/format.h b/src/format.h index e1160d56..3ae93dee 100644 --- a/src/format.h +++ b/src/format.h @@ -6301,7 +6301,7 @@ namespace TR { for (int j = 0; j < animTex.count; j++) animTex.textures[j] = *(ptr++); } - delete animTexBlock; + delete[] animTexBlock; } if (version & (VER_TR4 | VER_TR5)) { diff --git a/src/platform/nix/main.cpp b/src/platform/nix/main.cpp index 46e17491..8696566f 100644 --- a/src/platform/nix/main.cpp +++ b/src/platform/nix/main.cpp @@ -78,7 +78,7 @@ void sndFree() { } // Input -InputKey keyToInputKey(XKeyEvent event) { +InputKey keyToInputKey(Display *dpy, XKeyEvent event) { KeySym code = XLookupKeysym(&event, 0); if (code == XK_Shift_R) code = XK_Shift_L; @@ -96,7 +96,7 @@ InputKey keyToInputKey(XKeyEvent event) { }; for (int i = 0; i < COUNT(codes); i++) { - if (codes[i] == code) { + if (XKeysymToKeycode(dpy, codes[i]) == event.keycode) { return (InputKey)(ikLeft + i); } } @@ -338,7 +338,7 @@ void toggle_fullscreen(Display* dpy, Window win) { XSendEvent(dpy, DefaultRootWindow(dpy), False, SubstructureNotifyMask, &xev); } -void WndProc(const XEvent &e,Display*dpy,Window wnd) { +void WndProc(const XEvent &e, Display* dpy, Window wnd) { switch (e.type) { case ConfigureNotify : Core::width = e.xconfigure.width; @@ -350,7 +350,7 @@ void WndProc(const XEvent &e,Display*dpy,Window wnd) { toggle_fullscreen(dpy,wnd); break; } - Input::setDown(keyToInputKey(e.xkey), e.type == KeyPress); + Input::setDown(keyToInputKey(dpy, e.xkey), e.type == KeyPress); break; case ButtonPress : case ButtonRelease : { @@ -455,7 +455,7 @@ int main(int argc, char **argv) { XNextEvent(dpy, &event); if (event.type == ClientMessage && *event.xclient.data.l == WM_DELETE_WINDOW) Core::quit(); - WndProc(event,dpy,wnd); + WndProc(event, dpy, wnd); } else { joyUpdate(); bool updated = Game::update(); From 75118aa874d0018145d5ab33a676b5e9a733a1ae Mon Sep 17 00:00:00 2001 From: Viktor Varga Date: Fri, 8 Jan 2021 02:35:13 +0100 Subject: [PATCH 025/190] Adding hungarian translation (#289) * Adding hungarian translation * mistake in hungarian corrected --- src/inventory.h | 2 +- src/lang.h | 11 +- src/lang/hu.h | 359 ++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 368 insertions(+), 4 deletions(-) create mode 100644 src/lang/hu.h diff --git a/src/inventory.h b/src/inventory.h index aa5043f8..4cb4f34a 100644 --- a/src/inventory.h +++ b/src/inventory.h @@ -190,7 +190,7 @@ static const OptionItem optSound[] = { OptionItem( OptionItem::TYPE_PARAM, STR_REVERBERATION, SETTINGS( audio.reverb ), STR_OFF, 0, 1 ), OptionItem( OptionItem::TYPE_PARAM, STR_OPT_SUBTITLES, SETTINGS( audio.subtitles ), STR_OFF, 0, 1 ), #ifndef FFP - OptionItem( OptionItem::TYPE_PARAM, STR_OPT_LANGUAGE, SETTINGS( audio.language ), STR_LANG_EN, 0, STR_LANG_CN - STR_LANG_EN ), + OptionItem( OptionItem::TYPE_PARAM, STR_OPT_LANGUAGE, SETTINGS( audio.language ), STR_LANG_EN, 0, STR_LANG_HU - STR_LANG_EN ), #endif }; diff --git a/src/lang.h b/src/lang.h index 96baba18..2c0738e1 100644 --- a/src/lang.h +++ b/src/lang.h @@ -38,6 +38,7 @@ enum StringID { , STR_LANG_FI , STR_LANG_CZ , STR_LANG_CN + , STR_LANG_HU , STR_APPLY , STR_GAMEPAD_1 , STR_GAMEPAD_2 @@ -271,9 +272,10 @@ enum StringID { , "\x11\x01\x22\x01\x0F\x01\x0F\x01\x0E\x01\x06\x01\x04\x01\x0C\x01\x0B\xFF\xFF" \ , "Suomi" \ , "{Cesky" \ - , "\x11\x02\x8A\x02\x6C\x01\x54\x03\x02\xFF\xFF" + , "\x11\x02\x8A\x02\x6C\x01\x54\x03\x02\xFF\xFF" \ + , "Magyar" -#define LANG_PREFIXES "_EN", "_FR", "_DE", "_ES", "_IT", "_PL", "_PT", "_RU", "_JA", "_GR", "_FI", "_CZ", "_CN" +#define LANG_PREFIXES "_EN", "_FR", "_DE", "_ES", "_IT", "_PL", "_PT", "_RU", "_JA", "_GR", "_FI", "_CZ", "_CN", "_HU" #define STR_KEYS \ "NONE", "LEFT", "RIGHT", "UP", "DOWN", "SPACE", "TAB", "ENTER", "ESCAPE", "SHIFT", "CTRL", "ALT" \ @@ -320,6 +322,7 @@ const char *helpText = #include "lang/fi.h" #include "lang/cz.h" #include "lang/cn.h" +#include "lang/hu.h" char **STR = NULL; @@ -337,7 +340,8 @@ void ensureLanguage(int lang) { ASSERT(COUNT(STR_FI) == STR_MAX); ASSERT(COUNT(STR_CZ) == STR_MAX); ASSERT(COUNT(STR_CN) == STR_MAX); - + ASSERT(COUNT(STR_HU) == STR_MAX); + lang += STR_LANG_EN; switch (lang) { @@ -353,6 +357,7 @@ void ensureLanguage(int lang) { case STR_LANG_FI : STR = (char**)STR_FI; break; case STR_LANG_CZ : STR = (char**)STR_CZ; break; case STR_LANG_CN : STR = (char**)STR_CN; break; + case STR_LANG_HU : STR = (char**)STR_HU; break; default : STR = (char**)STR_EN; break; } } diff --git a/src/lang/hu.h b/src/lang/hu.h new file mode 100644 index 00000000..d3fbc52c --- /dev/null +++ b/src/lang/hu.h @@ -0,0 +1,359 @@ +#ifndef H_LANG_HU +#define H_LANG_HU + +// Hungarian translation: Varga Viktor +// Comment: Only tilde was used for double for long ö and u +// Todo to correct this: +// 1. add the " accent glpyh to the end of Russian charset, +// 2. modify the ui.h + +const char *STR_HU[] = { "" +// help + , "Bet~olt)es..." + , "Nyomj H-t a S)ug)ohoz" + , helpText + , "%s@@@" + "~OL)ESEK %d@@" + "FELVETT %d@@" + "TITKOK %d/%d@@" + "SZ~UKS)EGES ID+O %s" + , "J)at)ek ment)ese..." + , "Ment)es k)esz!" + , "MENT)ESI HIBA!" + , "IGEN" + , "NEM" + , "Ki" + , "Be" + , "Ki" + , "Side-By-Side" + , "Anaglyph" + , "Osztott k)eperny+o" + , "VR" + , "Alacsony" + , "K~ozepes" + , "Magas" + , STR_LANGUAGES + , "Alkalmaz" + , "Gamepad 1" + , "Gamepad 2" + , "Gamepad 3" + , "Gamepad 4" + , "Nincs k)esz" + , "1. j)at)ekos" + , "2. j)at)ekos" + , "Nyomj meg egy gombot" + , "%s - Kiv)alaszt" + , "%s - Vissza" +// inventory pages + , "OPCI)OK" + , "T)ARGYLISTA" + , "T)ARGYAK" +// save game page + , "J)at)ek ment)ese?" + , "Aktu)alis poz)ici)o" +// inventory option + , "J)at)ek" + , "T)erk)ep" + , "Ir)anyt+u" + , "Statisztika" + , "Lara otthona" + , "R)eszletess)egi szintek" + , "Hang" + , "Ir)any)it)as" + , "Gamma" +// passport menu + , "J)at)ek bet~olt)ese" + , ")Uj j)at)ek" + , "Szint )ujraind)it)asa" + , "Kil)ep)es a kezd+ok)eperny+oh~oz" + , "Kil)ep)es a j)at)ekb)ol" + , "Szint kiv)alaszt)asa" +// detail options + , "R)eszletek kiv)alaszt)asa" + , "Sz+ur)es" + , "Vil)ag)it)as" + , ")Arny)ekok" + , "V)iz" + , "VSync" + , "Sztere)o" + , "Egyszer+u t)argyak" + , "Felbont)as" + , STR_SCALE +// sound options + , "Hanger+o be)all)it)asa" + , "Visszaver+od)es" + , "Feliratok" + , "Nyelv" +// controls options + , "Ir)any)it)as be)all)it)asa" + , "Billenty+uzet" + , "Gamepad" + , "Vibr)aci)o" + , ")Uj c)elpont" + , "Multi-c)elz)as" + // controls + , "Bal", "Jobb", "Fut)as", "Vissza", "Ugr)as", "S)eta", "Akci)o", "Fegyver el+ov)etel", "N)ez", "Gugol", "L~ok", "Gurul", "T)argylista", "Kezd)es" + , STR_KEYS +// inventory items + , "Ismeretlen" + , "Robban)oanyag" + , "Pisztolyok" + , "Shotgun" + , "Magnumok" + , "Uzik" + , "Pisztoly t~olt)enyek" + , "Shotgun t~olt)enyek" + , "Magnum t~olt)enyek" + , "Uzi t~olt)enyek" + , "Kis Medi pakk" + , "Nagy Medi pakk" + , ")Olomr)ud" + , "Scion" +// keys + , "Kulcs" + , "Ez~ust kulcs" + , "Rozsd)as kulcs" + , "Arany kulcs" + , "Zaf)ir kulcs" + , "Neptunusz kulcs" + , "Atlasz kulcs" + , "Damokl)esz kulcs" + , "Thor kulcs" + , "D)iszes kulcs" +// puzzles + , "Rejtv)eny" + , "Arany szobor" + , "Arany r)ud" + , "Fogasker)ek" + , "Biztos)it)ek" + , "Ankh" + , "H)orusz szeme" + , "Anubisz pecs)etje" + , "Szkarabeusz" + , "Piramis kulcs" +// TR1 subtitles + /* CAFE */ , + "[43500]Mit kell tennie az embernek, ahhoz,@hogy megkapja azt a bizonyos figyelmet?" + "[47500]Neh)ez pontosan megmondani,@de )ugy t+unik j)ol vagy." + "[50000]Nos, nagyszer+u. B)ar az az igazs)ag,@nem )en akarlak." + "[54500]Nem?" + "[55000]Nem. Miss Jacqueline Natla szeretne,@a Natla Technologies-t)ol." + "[59000]Tudod, minden f)enyes@)es sz)ep alkot)oja?" + "[64500]Z)arja le, Larson." + "[66000]H~olgyem." + "[68000]Ezt figyeld, Lara." + "[70500]Hogyan )erinti ez a p)enzt)arc)ad?" + "[73500]Bocs. )En csak a sport)ert j)atszom." + "[76000]Akkor tetszeni fog egy nagy park." + "[78000]Peru. Hatalmas hegyl)ancok, amit fel kell fedezni.@J)egfalak. )Eles szikl)ak. Vad szelek." + "[87500])Es itt van ez a kis csecsebecse:@+osi id+ok misztikus er+ovel rendelkez+o m+ut)argya" + "[92500]eltemetve Qualopec fel nem lelt s)irj)aban." + "[96000]Ez az ami )erdekel." + "[98000]Holnap elmehetsz.@Elfoglalt vagy holnap?" + /* LIFT */ , + "[49000])Athelyezve Szt. Ferenc kolostor)aba, )uj k)is)ert)esek k)inoznak engem." + "[53500]A testv)erek k~ozt az a h)ir j)arja, hogy a kolostor alatt@ker~ult s)irba Tihocan," + "[60000]egyike az elveszett kontinens, Atlantisz,@ legend)as uralkod)oinak," + "[64500])es vele egy~utt fekszik az +o darabja@az Atlantiszi Scion-nak." + "[68000]A med)alt felosztott)ak a h)arom uralkod)o k~oz~ott@" + "[72500]ami hatalmas er+oket f)ekez meg.@Er+ot, ami meghaladja az alkot)o erej)et is." + "[79000]Izzad a l)abam ezekt+ol a lehet+os)egekt+ol,@amik olyan k~ozel )allnak a haland)o )enemhez." + "[85500]Minden este t)ul teszem magam@ezeken a fant)azi)akon, de ez val)oj)aban egy teszt." + "[92000]" + "[93500]Pierre. Nee. Te szem)et." + /* CANYON */ , + "[13500])Epp most h)uztad a szerencsecsont nagyobb v)eg)et." + "[16500]Mizu." + "[17500]D)elut)an." + "[20000]Ott hagytuk Larson-t szelet aratni, mi?" + "[22500]Ha ez a kifejez)es." + "[24000]Nos, a kis nyaral)asi zavarg)asnak most m)ar v)ege." + "[27000]Itt az ideje visszaadni azt, amit ellopt)al t+olem." + "[30000]Pr)ob)aljuk meg az )eteldobozt." + "[32000]" + "[42500]Nos? ~Old meg!" + "[45000]H)e!" + "[48000]" + "[50500]Debilek!" + "[53000]" + "[62500]Gyer~unk." + "[65000]" + "[136000]Mi a fene volt ez?" + "[138000]Mi?" + "[138500]Egyszer+u." + "[140500]Val)osz)in+uleg csak egy hal." + "[142500]Ez egy hal, k~oly~ok." + "[145000]Ember, meg kell tanulnod laz)itani.@Visszamegyek. J~ossz?" + "[152000]" + "[158000])Alland)o..." + "[160000]Itt van." + "[161500]K)eszen )allsz m)ar?" + /* PRISON */ , + "[00001]Nem tehetik ezt!" + "[01500]El)it)elj~uk ~Ont, atlantiszi Natla a b+unei)ert." + "[06000]Hatalmaddal er+oteljesen vissza)el)esei miatt,@ )es mert kiraboltad a mi..." + "[11500]Nem tehetik! )En..." + "[12500]Megsz~untetve a beleegyez)es szabad k~otel)ek)et@amely alatt n)ep~unket ir)any)itj)ak," + "[18500])es megt)amadva Tihocan-t )es engem a sereg~unkkel." + "[23500]A harcosaink t)avoztak a piramisunkb)ol" + "[27000])igy fel tudod haszn)alni a piramist - annak erej)et@a teremt)esre - az esztelen rombol)asodhoz." + "[33500]Esztelen!? N)ezz magadra!" + "[35500]Egyik+ot~oknek sincs egy lelem)enyes@gondolat se a fej)eben." + "[40500]Pazarl)ok!" + "[41500]Csak csin)alj)atok." + "[44000]Tihocan!" + "[45000]Egy szent helyet haszn)alt)al@saj)at ~or~om~odre," + "[49500]mint valami korcs gy)arat." + "[51000]+Ok a t)ul)el+ok. Egy )uj gener)aci)o." + "[54000]Egy lem)esz)arolt halom most." + "[56000])Es te. A pokol torn)ac)ara z)arunk." + "[60000]Az ereid, a sz)ived, a l)abad," + "[64000])es a beteg agyad szil)ardd)a teszi majd a fagyott v)er." + "[70000]~Udv~oz~old az ~or~ok nyugtalans)agod, Natla." + "[73000]Te sem fogsz nyugodni, ak)ar az @)atkozott kontinensed Atlantisz!" + /* 22 */ , + "[04000])Ujra itt?" + "[05500])Es te - a nagy )ujra megnyit)ora, gondolom." + "[09500]Az evol)uci)o bajban van - a term)eszetes szelekci)o m)ara alig )erv)enyes~ul..." + "[13500]Az )uj h)us megjelen)ese fel fogja ism)et gerjeszteni a ter~uleti vit)akat" + "[17500] - meger+os)it )es el+oseg)it minket..." + "[20500]M)eg )uj fajokat is l)etre hozhat." + "[22500]Az evol)uci)o szteroidokon, akkor." + "[24500]Egy seggber)ug)as...@a nyomorult Qualopec-enk )es Tihocan-nak nem voltak ~otletei" + "[29500] - Atlantisz kataklizm)aja az )ert)ektelen gyeng)ek verseny)et s)ujtotta..." + "[33500]visszazuhan)asra k)enyszer)itve +oket )ujra a t)ul)el)es alapjaihoz..." + "[37000]Nem volna szabad )ugy t~ort)ennie." + "[39000]Vagy )igy." + "[40000]A kikel)es 15 m)asodperc m)ulva kezd+odik." + "[43000]Most m)ar k)es+o le)all)itani!" + "[45000]A m+uvelet sz)ive n)elk~ul nem!" + "[47000]Neee!" + "[50000]T)IZ" + "[54000]~OT..." + "[55500]4...3...2..." + "[60000]EGY..." + /* 23 */ , + "[00001]Nos, most m)ar a teljes figyelmem rajtad" + "[02500]- M)egsem vagyok biztos abban, hogy )en is megkaptam a tied." + "[05000]Hell)o?" + "[06000]Elkaplak )es lel+olek, mint egy kuty)at." + "[09000]Term)eszetesen." + "[10000]Te )es az az idi)ota Scion darabod." + "[13000]Annyira szeretn)ed megtartani, hogy kihaszn)alom ezt..." + "[17000]V)arjunk... itt most a m+ut)argyr)ol besz)el~unk?" + "[20000]Egyenesben vagyunk ... eg)eszen ..." + "[22000]Tarts ki - Sajn)alom" + "[24000]- ez csak egy r)esz, mondtad - hol van a t~obbi?" + "[26500]Ms. Natla Pierre Dupont-ot )all)itotta arra a nyomra." + "[29500])Es hol van az?" + "[30500]H)a)a)a. Nem vagy el)eg gyors, hogy utol)erd." + "[34000]Sz)oval azt gondolod, ez a besz)elget)es csak arra van, hogy feltartson?" + "[37000]Nem tudom, hogy a kis ny)ul-b)eka l)abai hov)a vezetik +ot." + "[42000]Meg kell k)erdezned Ms. Natla-t)ol." + "[46000]" + "[51000]K~osz~on~om. Megteszem." + /* 24 */ , "" + /* 25 */ , + "[03500]Itt nyugszik Tihocan" + "[05000]...Atlantisz k)et ur)anak egyike..." + "[10000]Ki a kontinens )atka ut)an is..." + "[13000]...megpr)ob)alt uralkodni ezeken a kop)ar m)as-f~oldeken..." + "[19000]Ki Gyermek n)elk~ul halt meg )es a tud)as)anak nem volt ~or~ok~ose..." + "[25500]Tekints r)ank j)oindulattal, Tihocan." + /* 26 */ , "K~osz~ontelek az otthonomban!@Vezetett t)ur)ara foglak vinni." + /* 27 */ , "Haszn)ald az ir)any gombokat, hogy a zeneszob)aba menj." + /* 28 */ , "OK. Ugr)aljunk egy kicsit.@Nyomd meg az ugr)as gombot." + /* 29 */ , "Most nyomd meg )ujra )es gyorsan nyomj hozz)a@egy ir)anyt )es abba az ir)anyba fogok ugrani." + /* 30 */ , ")A)a, a nagyterem.@Bocs a l)ad)ak)ert, de n)eh)any dolgot@rakt)arakba vitetek )es sz)all)it)ok m)eg nem j~ottek." + /* 31 */ , "Fuss oda egy l)ad)ahoz, )es am)ig nyomva tartod az el+ore gombot,@nyomj akci)o gombot )es )en felugrok r)a." + /* 32 */ , "Ez kor)abban b)alterem volt, de )atalak)itottam@ a saj)at torna termemnek.@Mi a v)elem)enyed?@Nos csin)aljunk n)eh)any gyakorlatot." + /* 33 */ , "Nem mindenhova rohanok.@Ha )ovatos akarok lenni, s)et)alok@Tartsd nyomva a s)eta gombot, )es s)et)alj a feh)er vonalhoz." + /* 34 */ , "A s)eta gomb nyomva tart)as)aval nem fogok leesni, m)eg akkor sem ha megpr)ob)alod.@Rajta, pr)ob)ald ki." + /* 35 */ , "Ha szeretn)el k~orbe n)ezni, tartsd nyomva a n)ez gombot.@Ut)ana nyomd le az ir)anyt amerre n)ezni szeretn)el." + /* 36 */ , "Ha egy ugr)as t)ul nagy nekem, el tudom kapni a peremet )es megmenteni magam@egy cs)unya zuhan)ast)ol. S)et)alj a sz)el)ehez a feh)er vonallal, addig, am)ig @m)ar nem megyek tov)abb. Ut)ana nyomj ugr)ast, ut)ana meg r~ogt~on@ el+ore gombot, )es am)ig a leveg+oben vagyok, nyomd le )es tartsd nyomva az akci)o gombot." + /* 37 */ , "Nyomj el+or)et, )es felm)aszom." + /* 38 */ , "Ha fut)o ugr)ast csin)alok, akkor tudok ekkor)at ugrani, nem probl)ema." + /* 39 */ , "S)et)alj a sz)el)ehez a feh)er vonallal, addig, am)ig m)ar nem megyek tov)abb.@Azt)an engedd el a s)et)at, nyomj h)atr)at, hogy neki tudjak futni.@Nyomj el+or)et, )es r~ogt~on nyomd le )es tartsd nyomva az ugr)as gombot.@Nem fogok elugrani az utols)o pillanatig." + /* 40 */ , "Helyes. Ez egy igaz)an nagy@ Csin)alj egy fut)o ugr)ast, mint kor)abban, de am)ig a leveg+oben@vagyok, nyomd le )es tarts nyomva az akci)o gombot, hogy elkapjam a peremet." + /* 41 */ , "Sz)ep." + /* 42 */ , "Pr)ob)alj meg felm)aszni itt.@Nyomj el+or)et, )es tartsd nyomva az akci)o gombot." + /* 43 */ , "Nem tudok felm)aszni, mert a r)es t)ul kicsi.@Nyomj jobbot, )es oldalra m)aszom,@am)ig el)eg hely lesz, akkor nyomj el+or)et." + /* 44 */ , "Remek!@Ha nagy a m)elys)eg, )es nem szeretn)ek@s)er~ulni a leugr)assal, le tudom magam ereszteni )ovatosan." + /* 45 */ , "Nyomj h)atr)at )es h)atrafel)e ugrok.@Azonnal nyomd meg )es tartsd nyomva az akci)o gombot,@)es elkapom a peremet )utban lefel)e." + /* 46 */ , "Akkor engedd el." + /* 47 */ , "Menj~unk )uszni egyet." + /* 48 */ , "Az ugr)as gomb )es az ir)anyok@navig)alnak engem a v)iz alatt." + /* 49 */ , ")O! Leveg+o!@Csak haszn)ald az el+or)et, balr)at, vagy jobbr)at@a felsz)in k~ozeli man+overez)eshez.@Nyomj ugr)ast egy )ujabb )usz)ashoz lemer~ul)eshez.@Vagy menj a sz)el)ehez, )es nyomj akci)o gombot a kim)asz)ashoz." + /* 50 */ , "Helyes. A legjobb lesz, ha leveszem ezeket a nedves ruh)akat." + /* 51 */ , "Mond: Cs)i)iz!" + /* 52 */ , "Semmi szem)elyes." + /* 53 */ , "M)eg mindig f)aj a fejem t+oled.@)Es m)ok)as ~otleteket ad nekem.@Hogy l+ojelek a pokolra, p)eld)aul!" + /* 54 */ , "Nem tudsz meg~olni engem vagy a fi)ok)aimat olyan k~onnyed)en, Lara." + /* 55 */ , "Egy kicsit elk)esett a d)ij)atad)as, non?@M)eg mindig a r)eszv)etel ami sz)am)it." + /* 56 */ , "R)am l+osz?@R)am l+osz, mi?@Nincs senki m)as itt, csak r)am l+ohetsz!" +// TR1 levels + , "Lara otthona" + , "Barlangok" + , "Vilcabamba v)arosa" + , "Elveszett v~olgy" + , "Qualopec s)irja" + , "Szt. Ferenc kolostor" + , "Colosseum" + , "Mid)asz palota" + , "A Ciszterna" + , "Tihocan s)irja" + , "Khamoon v)arosa" + , "Khamoon obeliszkje" + , "Scion szent)elye" + , "Natla b)any)ai" + , "Atlantisz" + , "A nagy piramis" + , "Visszat)er)es Egyiptomba" + , "Macska templom" + , "Atlantiszi t)amaszpont" + , "A kapt)ar" +// TR2 levels + , "Lara otthona" + , "A nagy fal" + , "Velence" + , "Bartoli rejtekhelye" + , "Operah)az" + , "Tengeri f)ur)otorony" + , "B)uv)arter~ulet" + , "40 ~ol" + , "A Maria Doria roncsa" + , "Lak)okabinok" + , "A fed)elzet" + , "Tibeti hegyl)abak" + , "Barkhang kolostor" + , "Talion katakomb)ai" + , "J)egpalota" + , "Xian temploma" + , ")Usz)o szigetek" + , "A S)ark)anyod)u" + , "Otthon )edes otthon" +// TR3 levels + , "Lara otthona" + , "Dzsungel" + , "Templom romok" + , "A Gangesz foly)o" + , "Kaliya barlangjai" + , "Tengerparti falu" + , "A baleset helysz)ine" + , "Madubu szurdok" + , "Puna temploma" + , "Temze rakpart" + , "Aldwych" + , "Lud kapuja" + , "V)aros" + , "Nevada sivatag" + , "Magas biztons)ag)u )ep~ulet" + , "51-es k~orzet" + , "Antarktisz" + , "RX-Tech b)any)ak" + , "Tinnos elveszett v)arosa" + , "Meteorit barlang" + , "Mindenszentek" +}; + +#endif From dc5ae76016c30b834da80590ab8918e9606d4fae Mon Sep 17 00:00:00 2001 From: Timur Gagiev Date: Fri, 8 Jan 2021 05:44:48 +0300 Subject: [PATCH 026/190] add special glyph for Hungarian translation, fix auto language detection for Hungarian on various platforms --- src/lang/glyph_ru.h | 323 +++++++++------------- src/lang/glyph_ru.png | Bin 3169 -> 2016 bytes src/lang/hu.h | 88 +++--- src/platform/nix/main.cpp | 1 + src/platform/rpi/main.cpp | 1 + src/platform/web/index.php | 2 + src/platform/win/OpenLara.vcxproj | 1 + src/platform/win/OpenLara.vcxproj.filters | 3 + src/platform/win/main.cpp | 1 + src/platform/xb1/main.cpp | 2 + src/ui.h | 15 +- 11 files changed, 186 insertions(+), 251 deletions(-) diff --git a/src/lang/glyph_ru.h b/src/lang/glyph_ru.h index 5b40c24e..68d36876 100644 --- a/src/lang/glyph_ru.h +++ b/src/lang/glyph_ru.h @@ -1,207 +1,134 @@ #ifndef __GLYPH_RU__ #define __GLYPH_RU__ -static unsigned int size_GLYPH_RU = 3169; +static unsigned int size_GLYPH_RU = 2016; static unsigned char GLYPH_RU[] = { 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x30, 0x08, 0x03, 0x00, 0x00, 0x00, 0xc9, 0xa1, 0x54, - 0x4d, 0x00, 0x00, 0x00, 0x19, 0x74, 0x45, 0x58, 0x74, 0x53, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, - 0x65, 0x00, 0x41, 0x64, 0x6f, 0x62, 0x65, 0x20, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x52, 0x65, 0x61, - 0x64, 0x79, 0x71, 0xc9, 0x65, 0x3c, 0x00, 0x00, 0x03, 0x66, 0x69, 0x54, 0x58, 0x74, 0x58, 0x4d, - 0x4c, 0x3a, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x64, 0x6f, 0x62, 0x65, 0x2e, 0x78, 0x6d, 0x70, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x3c, 0x3f, 0x78, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x20, 0x62, 0x65, - 0x67, 0x69, 0x6e, 0x3d, 0x22, 0xef, 0xbb, 0xbf, 0x22, 0x20, 0x69, 0x64, 0x3d, 0x22, 0x57, 0x35, - 0x4d, 0x30, 0x4d, 0x70, 0x43, 0x65, 0x68, 0x69, 0x48, 0x7a, 0x72, 0x65, 0x53, 0x7a, 0x4e, 0x54, - 0x63, 0x7a, 0x6b, 0x63, 0x39, 0x64, 0x22, 0x3f, 0x3e, 0x20, 0x3c, 0x78, 0x3a, 0x78, 0x6d, 0x70, - 0x6d, 0x65, 0x74, 0x61, 0x20, 0x78, 0x6d, 0x6c, 0x6e, 0x73, 0x3a, 0x78, 0x3d, 0x22, 0x61, 0x64, - 0x6f, 0x62, 0x65, 0x3a, 0x6e, 0x73, 0x3a, 0x6d, 0x65, 0x74, 0x61, 0x2f, 0x22, 0x20, 0x78, 0x3a, - 0x78, 0x6d, 0x70, 0x74, 0x6b, 0x3d, 0x22, 0x41, 0x64, 0x6f, 0x62, 0x65, 0x20, 0x58, 0x4d, 0x50, - 0x20, 0x43, 0x6f, 0x72, 0x65, 0x20, 0x35, 0x2e, 0x33, 0x2d, 0x63, 0x30, 0x31, 0x31, 0x20, 0x36, - 0x36, 0x2e, 0x31, 0x34, 0x35, 0x36, 0x36, 0x31, 0x2c, 0x20, 0x32, 0x30, 0x31, 0x32, 0x2f, 0x30, - 0x32, 0x2f, 0x30, 0x36, 0x2d, 0x31, 0x34, 0x3a, 0x35, 0x36, 0x3a, 0x32, 0x37, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x3e, 0x20, 0x3c, 0x72, 0x64, 0x66, 0x3a, 0x52, 0x44, 0x46, - 0x20, 0x78, 0x6d, 0x6c, 0x6e, 0x73, 0x3a, 0x72, 0x64, 0x66, 0x3d, 0x22, 0x68, 0x74, 0x74, 0x70, - 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x77, 0x33, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x31, 0x39, - 0x39, 0x39, 0x2f, 0x30, 0x32, 0x2f, 0x32, 0x32, 0x2d, 0x72, 0x64, 0x66, 0x2d, 0x73, 0x79, 0x6e, - 0x74, 0x61, 0x78, 0x2d, 0x6e, 0x73, 0x23, 0x22, 0x3e, 0x20, 0x3c, 0x72, 0x64, 0x66, 0x3a, 0x44, - 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x72, 0x64, 0x66, 0x3a, 0x61, - 0x62, 0x6f, 0x75, 0x74, 0x3d, 0x22, 0x22, 0x20, 0x78, 0x6d, 0x6c, 0x6e, 0x73, 0x3a, 0x78, 0x6d, - 0x70, 0x4d, 0x4d, 0x3d, 0x22, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x6e, 0x73, 0x2e, 0x61, - 0x64, 0x6f, 0x62, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x78, 0x61, 0x70, 0x2f, 0x31, 0x2e, 0x30, - 0x2f, 0x6d, 0x6d, 0x2f, 0x22, 0x20, 0x78, 0x6d, 0x6c, 0x6e, 0x73, 0x3a, 0x73, 0x74, 0x52, 0x65, - 0x66, 0x3d, 0x22, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x6e, 0x73, 0x2e, 0x61, 0x64, 0x6f, - 0x62, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x78, 0x61, 0x70, 0x2f, 0x31, 0x2e, 0x30, 0x2f, 0x73, - 0x54, 0x79, 0x70, 0x65, 0x2f, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x66, - 0x23, 0x22, 0x20, 0x78, 0x6d, 0x6c, 0x6e, 0x73, 0x3a, 0x78, 0x6d, 0x70, 0x3d, 0x22, 0x68, 0x74, - 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x6e, 0x73, 0x2e, 0x61, 0x64, 0x6f, 0x62, 0x65, 0x2e, 0x63, 0x6f, - 0x6d, 0x2f, 0x78, 0x61, 0x70, 0x2f, 0x31, 0x2e, 0x30, 0x2f, 0x22, 0x20, 0x78, 0x6d, 0x70, 0x4d, - 0x4d, 0x3a, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, - 0x6e, 0x74, 0x49, 0x44, 0x3d, 0x22, 0x78, 0x6d, 0x70, 0x2e, 0x64, 0x69, 0x64, 0x3a, 0x42, 0x42, - 0x34, 0x35, 0x44, 0x30, 0x32, 0x41, 0x33, 0x38, 0x33, 0x36, 0x45, 0x39, 0x31, 0x31, 0x41, 0x46, - 0x41, 0x46, 0x45, 0x31, 0x39, 0x34, 0x30, 0x32, 0x31, 0x32, 0x32, 0x37, 0x37, 0x46, 0x22, 0x20, - 0x78, 0x6d, 0x70, 0x4d, 0x4d, 0x3a, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x44, - 0x3d, 0x22, 0x78, 0x6d, 0x70, 0x2e, 0x64, 0x69, 0x64, 0x3a, 0x37, 0x35, 0x38, 0x44, 0x39, 0x41, - 0x36, 0x31, 0x34, 0x32, 0x45, 0x39, 0x31, 0x31, 0x45, 0x39, 0x41, 0x45, 0x35, 0x43, 0x46, 0x35, - 0x46, 0x42, 0x33, 0x44, 0x37, 0x46, 0x44, 0x41, 0x35, 0x41, 0x22, 0x20, 0x78, 0x6d, 0x70, 0x4d, - 0x4d, 0x3a, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x44, 0x3d, 0x22, 0x78, 0x6d, - 0x70, 0x2e, 0x69, 0x69, 0x64, 0x3a, 0x37, 0x35, 0x38, 0x44, 0x39, 0x41, 0x36, 0x30, 0x34, 0x32, - 0x45, 0x39, 0x31, 0x31, 0x45, 0x39, 0x41, 0x45, 0x35, 0x43, 0x46, 0x35, 0x46, 0x42, 0x33, 0x44, - 0x37, 0x46, 0x44, 0x41, 0x35, 0x41, 0x22, 0x20, 0x78, 0x6d, 0x70, 0x3a, 0x43, 0x72, 0x65, 0x61, - 0x74, 0x6f, 0x72, 0x54, 0x6f, 0x6f, 0x6c, 0x3d, 0x22, 0x41, 0x64, 0x6f, 0x62, 0x65, 0x20, 0x50, - 0x68, 0x6f, 0x74, 0x6f, 0x73, 0x68, 0x6f, 0x70, 0x20, 0x43, 0x53, 0x36, 0x20, 0x28, 0x57, 0x69, - 0x6e, 0x64, 0x6f, 0x77, 0x73, 0x29, 0x22, 0x3e, 0x20, 0x3c, 0x78, 0x6d, 0x70, 0x4d, 0x4d, 0x3a, - 0x44, 0x65, 0x72, 0x69, 0x76, 0x65, 0x64, 0x46, 0x72, 0x6f, 0x6d, 0x20, 0x73, 0x74, 0x52, 0x65, - 0x66, 0x3a, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x44, 0x3d, 0x22, 0x78, 0x6d, - 0x70, 0x2e, 0x69, 0x69, 0x64, 0x3a, 0x36, 0x45, 0x42, 0x33, 0x33, 0x37, 0x36, 0x37, 0x45, 0x39, - 0x34, 0x32, 0x45, 0x39, 0x31, 0x31, 0x42, 0x46, 0x32, 0x46, 0x41, 0x35, 0x36, 0x41, 0x42, 0x35, - 0x44, 0x38, 0x43, 0x34, 0x31, 0x38, 0x22, 0x20, 0x73, 0x74, 0x52, 0x65, 0x66, 0x3a, 0x64, 0x6f, - 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x44, 0x3d, 0x22, 0x78, 0x6d, 0x70, 0x2e, 0x64, 0x69, - 0x64, 0x3a, 0x42, 0x42, 0x34, 0x35, 0x44, 0x30, 0x32, 0x41, 0x33, 0x38, 0x33, 0x36, 0x45, 0x39, - 0x31, 0x31, 0x41, 0x46, 0x41, 0x46, 0x45, 0x31, 0x39, 0x34, 0x30, 0x32, 0x31, 0x32, 0x32, 0x37, - 0x37, 0x46, 0x22, 0x2f, 0x3e, 0x20, 0x3c, 0x2f, 0x72, 0x64, 0x66, 0x3a, 0x44, 0x65, 0x73, 0x63, - 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x3e, 0x20, 0x3c, 0x2f, 0x72, 0x64, 0x66, 0x3a, 0x52, - 0x44, 0x46, 0x3e, 0x20, 0x3c, 0x2f, 0x78, 0x3a, 0x78, 0x6d, 0x70, 0x6d, 0x65, 0x74, 0x61, 0x3e, - 0x20, 0x3c, 0x3f, 0x78, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x20, 0x65, 0x6e, 0x64, 0x3d, 0x22, - 0x72, 0x22, 0x3f, 0x3e, 0xb9, 0xc4, 0x8c, 0x25, 0x00, 0x00, 0x00, 0x3f, 0x50, 0x4c, 0x54, 0x45, - 0xce, 0x94, 0x5a, 0xff, 0xef, 0x8c, 0xa5, 0x6b, 0x39, 0xff, 0xff, 0x9c, 0xa5, 0x7b, 0x4a, 0xdc, - 0xa0, 0x64, 0x70, 0x5c, 0x2c, 0x30, 0x0c, 0x04, 0xe8, 0xc0, 0x70, 0xff, 0xd6, 0x7b, 0x58, 0x44, - 0x00, 0xc8, 0x90, 0x58, 0xb0, 0x80, 0x50, 0x73, 0x5a, 0x29, 0x8c, 0x5a, 0x29, 0xb5, 0x84, 0x52, - 0xef, 0xc6, 0x73, 0xde, 0xa5, 0x63, 0x31, 0x08, 0x00, 0x5a, 0x42, 0x00, 0xff, 0xff, 0xff, 0xed, - 0xab, 0xcf, 0x9c, 0x00, 0x00, 0x00, 0x15, 0x74, 0x52, 0x4e, 0x53, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, - 0x2b, 0xd9, 0x7d, 0xea, 0x00, 0x00, 0x08, 0x25, 0x49, 0x44, 0x41, 0x54, 0x78, 0xda, 0xec, 0x9a, - 0x89, 0x72, 0xdb, 0x38, 0x0c, 0x86, 0x29, 0xfa, 0x88, 0x93, 0x5d, 0x9e, 0xd0, 0xfb, 0x3f, 0xeb, - 0x02, 0x20, 0x09, 0x02, 0x94, 0xdd, 0xc6, 0x1d, 0xef, 0x4c, 0x32, 0x8d, 0x26, 0x76, 0x4b, 0xf1, - 0x02, 0x3e, 0x41, 0x14, 0x7f, 0x58, 0x6e, 0xff, 0xcb, 0x0f, 0xf7, 0x03, 0xe0, 0x8b, 0x1f, 0x91, - 0x0e, 0xe0, 0xaf, 0xcf, 0xb7, 0x1f, 0xc7, 0x67, 0x00, 0x04, 0x39, 0xda, 0x89, 0xb0, 0x9e, 0x90, - 0x53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, 0x6f, 0x4f, 0xed, 0xb0, 0x56, 0xe6, 0x5b, 0x1c, 0x96, - 0x72, 0xee, 0xe5, 0x20, 0xd7, 0xce, 0xd8, 0xe7, 0xbb, 0x05, 0x0d, 0x00, 0x07, 0xf2, 0x40, 0xd4, - 0xe7, 0x1a, 0x27, 0x00, 0x01, 0xec, 0x0a, 0x00, 0x20, 0x01, 0x74, 0x7e, 0x34, 0x8b, 0x85, 0x0c, - 0x57, 0x00, 0x5a, 0x05, 0xfa, 0xd3, 0x4d, 0xe6, 0x32, 0x88, 0x03, 0xc7, 0x32, 0x13, 0x88, 0xe8, - 0xf3, 0x2e, 0xe3, 0x65, 0xd7, 0x1c, 0x15, 0x83, 0x57, 0x00, 0xe5, 0x08, 0x20, 0x0b, 0x80, 0xd4, - 0xca, 0xbd, 0x07, 0xda, 0x6f, 0x00, 0xf4, 0xa1, 0xc6, 0x88, 0x0c, 0xc0, 0xac, 0x17, 0xca, 0x36, - 0x03, 0x60, 0xce, 0x98, 0x32, 0x02, 0xb8, 0x8c, 0xf1, 0x01, 0x76, 0x65, 0x5f, 0xef, 0x8f, 0xfe, - 0x0f, 0x00, 0xf0, 0x1b, 0x00, 0xe8, 0x21, 0x8f, 0xe0, 0xf7, 0xfb, 0x00, 0x5a, 0x04, 0x94, 0x09, - 0xc0, 0x11, 0x80, 0x62, 0xe6, 0x33, 0x0e, 0xdf, 0x01, 0xa0, 0x97, 0x81, 0x03, 0x00, 0xc8, 0xea, - 0x8e, 0xfc, 0x0c, 0x00, 0x22, 0x90, 0x2f, 0xba, 0x51, 0x54, 0x11, 0xc9, 0x4d, 0x29, 0x9e, 0x1f, - 0x01, 0x58, 0xcb, 0xe8, 0x1c, 0x99, 0xdb, 0x03, 0x80, 0x00, 0x44, 0x02, 0x10, 0x1f, 0x01, 0x70, - 0x04, 0xc0, 0x3d, 0x05, 0x80, 0x56, 0x1d, 0xdd, 0x9e, 0x57, 0x41, 0x05, 0x80, 0xef, 0x49, 0x59, - 0x03,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70, 0x66, - 0x8d, 0x8a, 0xcc, 0xf4, 0x08, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, - 0x82, + 0x4d, 0x00, 0x00, 0x00, 0x3f, 0x50, 0x4c, 0x54, 0x45, 0x00, 0x00, 0x00, 0x5a, 0x42, 0x00, 0xef, + 0xc6, 0x73, 0xde, 0xa5, 0x63, 0xa5, 0x6b, 0x39, 0xb5, 0x84, 0x52, 0xce, 0x94, 0x5a, 0x73, 0x5a, + 0x29, 0x31, 0x08, 0x00, 0x8c, 0x5a, 0x29, 0xff, 0xef, 0x8c, 0x70, 0x5c, 0x2c, 0xa5, 0x7b, 0x4a, + 0xdc, 0xa0, 0x64, 0xff, 0xff, 0x9c, 0xff, 0xd6, 0x7b, 0x30, 0x0c, 0x04, 0xe8, 0xc0, 0x70, 0x58, + 0x44, 0x00, 0xc8, 0x90, 0x58, 0xb0, 0x80, 0x50, 0xfb, 0xc4, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x01, + 0x74, 0x52, 0x4e, 0x53, 0x00, 0x40, 0xe6, 0xd8, 0x66, 0x00, 0x00, 0x07, 0x4f, 0x49, 0x44, 0x41, + 0x54, 0x78, 0x5e, 0xed, 0x9a, 0xdb, 0x72, 0x1b, 0x39, 0x0c, 0x44, 0xd5, 0x00, 0xaf, 0xa3, 0x8b, + 0xed, 0xec, 0xfe, 0xff, 0xb7, 0x2e, 0x41, 0x0d, 0xd8, 0xa4, 0x3c, 0xae, 0xd8, 0x55, 0x7a, 0x70, + 0x36, 0x46, 0x99, 0x52, 0x1a, 0x04, 0x48, 0xe2, 0x84, 0x51, 0x84, 0x49, 0x4e, 0xdf, 0xdb, 0x7e, + 0xec, 0xc7, 0xaa, 0x19, 0xfa, 0xcb, 0x67, 0xe3, 0x69, 0x9f, 0x49, 0xc8, 0xc3, 0xa8, 0xe9, 0x98, + 0x5d, 0x14, 0x27, 0x1b, 0xc3, 0x85, 0xe5, 0x70,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, 0x1b, 0x4e, + 0x0e, 0x6c, 0x4d, 0x4f, 0x00, 0x10, 0x05, 0x55, 0xaa, 0x87, 0x55, 0xb5, 0xda, 0x77, 0x00, 0xcc, + 0xaf, 0xa2, 0x11, 0xd4, 0xe8, 0xce, 0x63, 0xdd, 0x09, 0x54, 0x49, 0x38, 0x8d, 0xf5, 0x24, 0xf5, + 0x42, 0x09, 0xf4, 0x11, 0x80, 0xbe, 0x07, 0x20, 0x03, 0x40, 0xec, 0xda, 0x33, 0xb0, 0xf9, 0xd1, + 0xb9, 0xbf, 0xbf, 0x39, 0x80, 0xe5, 0xf3, 0x82, 0x67, 0x5b, 0x01, 0x10, 0x79, 0x94, 0x2a, 0xf5, + 0xea, 0xeb, 0x03, 0x03, 0x1a, 0xf3, 0xab, 0xa8, 0x03, 0xc0, 0x6f, 0x00, 0xb4, 0x0a, 0x3b, 0x80, + 0x60, 0x62, 0x05, 0xc0, 0xf8, 0xaa, 0x04, 0x90, 0x0c, 0x00, 0x81, 0xb3, 0xe0, 0x8f, 0x01, 0x34, + 0xfb, 0x18, 0x00, 0xc4, 0x2c, 0xd6, 0x4f, 0x00, 0x20, 0x01, 0xe9, 0xf5, 0x13, 0xaa, 0x60, 0x01, + 0x58, 0x45, 0x71, 0x08, 0x60, 0xd5, 0x5e, 0xb2, 0xc0, 0xca, 0x72, 0xa5, 0xd5, 0x00, 0xd4, 0x8f, + 0x00, 0x24, 0x03, 0x90, 0xbe, 0x04, 0xc0, 0x3e, 0x75, 0xe6, 0xf8, 0x5a, 0xab, 0x03, 0xf0, 0x04, + 0x88, 0x3a, 0x01, 0xe8, 0xc7, 0x00, 0x58, 0xf0, 0x95, 0xd2, 0x52, 0xd6, 0x1b, 0x60, 0xf5, 0x1f, + 0x00, 0xe0, 0xfa, 0xeb, 0x26, 0x41, 0x52, 0x92, 0x30, 0x70, 0xa8, 0x54, 0x49, 0x55, 0xf4, 0x43, + 0x00, 0x21, 0x84, 0xaf, 0x00, 0xd0, 0x5e, 0x9f, 0x70, 0x7f, 0x55, 0xd1, 0xe8, 0x00, 0xbc, 0xe0, + 0xa6, 0xf3, 0xef, 0x01, 0xb0, 0xfe, 0xeb, 0xb5, 0x3e, 0x12, 0x20, 0x00, 0x51, 0x96, 0xb8, 0x16, + 0xbc, 0x6a, 0x5e, 0x01, 0x49, 0xa0, 0x52, 0x95, 0xa4, 0x8a, 0xdd, 0x43, 0x00, 0x4e, 0xa0, 0xdb, + 0x97, 0x00, 0xb4, 0xa4, 0x09, 0x40, 0xac, 0x55, 0x35, 0xea, 0x57, 0x00, 0x60, 0xb9, 0xb2, 0x71, + 0xab, 0xd7, 0x7a, 0x8d, 0xf3, 0xdf, 0xe3, 0x98, 0x01, 0x58, 0xfd, 0x9f, 0x02, 0x40, 0xa2, 0x29, + 0x4c, 0xaa, 0x36, 0x0d, 0xc0, 0xa5, 0x12, 0x40, 0x37, 0x00, 0x48, 0x17, 0x4a, 0x8d, 0xc0, 0x74, + 0xe3, 0xea, 0x83, 0x86, 0x26, 0x18, 0xb5, 0x65, 0x7f, 0xa3, 0x4c, 0x00, 0xc1, 0x01, 0x50, 0xd3, + 0x20, 0xbb, 0x79, 0x7c, 0x8d, 0x52, 0x1b, 0x00, 0x27, 0x00, 0x55, 0x10, 0x80, 0x3b, 0x16, 0x00, + 0x01, 0x5c, 0xf4, 0x00, 0x08, 0x0c, 0xc0, 0xc2, 0xdc, 0xb5, 0x03, 0xa8, 0xb5, 0x57, 0xc5, 0x00, + 0x07, 0x70, 0x54, 0x70, 0xd0, 0x18, 0x63, 0x1b, 0x9e, 0x01, 0x95, 0x07, 0x00, 0xe1, 0x1d, 0x80, + 0xc6, 0xbc, 0xc5, 0x97, 0x0f, 0x00, 0x68, 0x31, 0x1b, 0xf1, 0x71, 0xff, 0x0e, 0x50, 0xb7, 0x68, + 0xb2, 0x44, 0x31, 0xe2, 0xd2, 0xd2, 0x99, 0x0f, 0x02, 0x80, 0xfc, 0x06, 0x40, 0x49, 0x60, 0xbd, +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 0xfd, 0x14, 0x41, 0x24, 0xcc, 0x00, 0xd2, 0x03, 0x00, 0x44, 0x89, + 0x78, 0xd1, 0xec, 0x37, 0x52, 0x6e, 0xb7, 0x19, 0x40, 0x7a, 0x07, 0xe0, 0x24, 0x38, 0xcd, 0x09, + 0x2b, 0x00, 0xd5, 0xda, 0xbd, 0x44, 0x58, 0x9b, 0x6f, 0x71, 0x58, 0xbe, 0x44, 0x8c, 0x79, 0xe7, + 0xec, 0xe4, 0xca, 0x74, 0xa3, 0x72, 0x3a, 0x02, 0x50, 0x15, 0xac, 0xff, 0x9f, 0xf6, 0x47, 0xa0, + 0x11, 0xe0, 0x87, 0x54, 0x29, 0x24, 0x00, 0x4d, 0x80, 0xea, 0x20, 0x90, 0xd1, 0x01, 0xa4, 0x0b, + 0x01, 0x14, 0x44, 0x14, 0xbf, 0xb1, 0xb8, 0xa4, 0x52, 0x9c, 0x0f, 0x6f, 0xe8, 0x12, 0x6f, 0x00, + 0x98, 0x10, 0x13, 0x80, 0xc4, 0x76, 0x3d, 0x8a, 0x02, 0xba, 0x3e, 0xc3, 0x8b, 0xe2, 0x0e, 0xaf, + 0x9f, 0x00, 0x0a, 0xb4, 0x9a, 0xcf, 0x01, 0x70, 0xbd, 0x63, 0x00, 0x46, 0xa0, 0x2a, 0x8a, 0xd7, + 0xbf, 0xfd, 0x73, 0x3e, 0x5f, 0xdb, 0xcf, 0xf6, 0x6b, 0xcf, 0x8f, 0x00, 0xe2, 0xd8, 0xbe, 0x58, + 0x7e, 0x21, 0x81, 0x9c, 0x20, 0x33, 0x80, 0x62, 0x05, 0xf1, 0x4a, 0x58, 0xa7, 0xdc, 0xe2, 0xd3, + 0x74, 0x7c, 0x71, 0x00, 0x8c, 0x97, 0x29, 0xa1, 0x84, 0x98, 0x12, 0xeb, 0xef, 0xfd, 0xbd, 0x3e, + 0xf4, 0xf7, 0x68, 0x3e, 0x77, 0x40, 0x0d, 0x1d, 0x44, 0x48, 0x00, 0xa2, 0x2c, 0x88, 0xeb, 0x79, + 0x01, 0xea, 0x53, 0x03, 0x18, 0x71, 0x35, 0x00, 0xff, 0x9e, 0x4f, 0xe7, 0xab, 0x8d, 0x5f, 0x23, + 0x41, 0x35, 0x32, 0x3f, 0xde, 0xaf, 0xb0, 0x63, 0x44, 0x7f, 0x7c, 0x50, 0x2e, 0x03, 0x40, 0x8c, + 0xe5, 0xfe, 0x06, 0x3e, 0x2a, 0x40, 0xe4, 0xf9, 0x0d, 0xe0, 0x63, 0x7c, 0x04, 0x13, 0xd6, 0x76, + 0x99, 0x9e, 0x45, 0x99, 0xef, 0x51, 0xb3, 0x9d, 0x66, 0xfc, 0xc1, 0x7a, 0x2e, 0x68, 0xeb, 0xfc, + 0xeb, 0xeb, 0xab, 0x8f, 0xc3, 0x79, 0x3e, 0x8f, 0xa0, 0x76, 0x2f, 0x35, 0x1d, 0xa6, 0xa9, 0x3e, + 0x88, 0x67, 0xc8, 0xff, 0xd1, 0x7e, 0x2c, 0x03, 0x36, 0xfe, 0xae, 0x67, 0x11, 0xb9, 0x0d, 0x7e, + 0x53, 0x84, 0x8d, 0xbf, 0x05, 0x40, 0xae, 0xb7, 0x94, 0x72, 0x1b, 0x04, 0x80, 0x3e, 0xfe, 0x16, + 0xcb, 0x22, 0x48, 0x6d, 0x60, 0x38, 0xae, 0xb0, 0xf1, 0xd5, 0x87, 0x42, 0x7f, 0xac, 0x01, 0xb0, + 0x31, 0x3b, 0x6c, 0x7c, 0x05, 0x21, 0x6e, 0x37, 0x12, 0xe0, 0x7f, 0x41, 0xf9, 0x34, 0xbd, 0x31, + 0xfe, 0x4c, 0xc3, 0x96, 0x52, 0xba, 0xc9, 0xc3, 0xbf, 0x5e, 0x8b, 0x03, 0x60, 0x7f, 0x7d, 0x5c, + 0x70, 0x7e, 0x89, 0x25, 0x6f, 0x28, 0x12, 0x77, 0x4d, 0x78, 0x43, 0xfb, 0x1b, 0x35, 0x8d, 0x19, + 0x54, 0xab, 0x2f, 0xbb, 0x70, 0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x80, 0x7a, 0x06, + 0x34, 0x94, 0x92, 0xc4, 0x04, 0xe5, 0x00, 0xc0, 0x69, 0x2e, 0xff, 0xd0, 0xff, 0x2b, 0x70, 0x07, + 0x90, 0x8a, 0x9f, 0x28, 0xa6, 0x54, 0x08, 0xe0, 0xd9, 0x4d, 0x4c, 0xb1, 0xc3, 0x97, 0xa1, 0x34, + 0xa9, 0x8a, 0x58, 0xd3, 0x48, 0x63, 0x7f, 0xcd, 0x82, 0xf9, 0x44, 0xa8, 0x5b, 0xf4, 0x0c, 0xc4, + 0x50, 0xfc, 0x79, 0x00, 0xa5, 0xaf, 0xc0, 0xe9, 0x05, 0x78, 0xe4, 0xfa, 0x29, 0x96, 0xa2, 0x09, + 0xf0, 0x4a, 0xb3, 0x28, 0xcc, 0xe9, 0x47, 0x79, 0x3e, 0x00, 0x3e, 0xce, 0x61, 0x3b, 0x0b, 0x2c, + 0x00, 0x40, 0x1e, 0x2c, 0xb8, 0x30, 0xde, 0x0c, 0xee, 0x08, 0x71, 0x5c, 0x28, 0x4a, 0xc4, 0xc3, + 0x69, 0xf6, 0xff, 0xcb, 0x56, 0x45, 0x93, 0x8e, 0xfa, 0x53, 0x31, 0x27, 0xc6, 0x7a, 0xcf, 0x27, + 0x80, 0x83, 0xd6, 0x78, 0x75, 0x15, 0xca, 0x42, 0x3b, 0xce, 0xe0, 0xdc, 0x2c, 0xcb, 0xe1, 0x34, + 0x3d, 0x8b, 0x9a, 0x7d, 0xb9, 0x4b, 0x30, 0xe2, 0xc9, 0x8d, 0xfc, 0x7f, 0x9d, 0xc7, 0x50, 0x97, + 0x60, 0x51, 0x26, 0xeb, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82, }; #endif diff --git a/src/lang/glyph_ru.png b/src/lang/glyph_ru.png index 0c819065d64c4151d0cffd24f370a1d0214cc22d..003556f591e907c596d549daf39bf055bf3f8d20 100644 GIT binary patch delta 2002 zcmV;@2QB#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qlk94KYz9)8xwu4I{#y}Jij1)eOW`8p{DG@ zS;w-W((38cg<*MB?pJ4~8Xe=s4ArnjQ1{7qB%k`imu|C%6v&qMq$NrN%pY?o!=^?C zg50Esa_jIGVW_iku8!KYv3VJw&W=;KQDvE+bo$zZp6q57AjKJ*C)q{NFFhJfoi9Dm zwD~dN-5b5vsY~5g%hBMd^1xD%-H?QeXlRmHIoF#St$V04=cDl?1anXMH~n(5Cti8L z@RdfLS~oIQSJi#6f8_P=&o*yep_65@Ha#RJr!qimPBx`xkS1Jm{emeUmmgl!UZDg{ z9!#Q4Z_zQn95O7MiI|!mv~0|6a%vAuK!b|>#MS5Y*21GnPEBKaB~8J|ZpP+Qr&hwc zm+{iRE4@eGr+Te4;iuoj)tml{ IbHoq-2A8EilK=n! diff --git a/src/lang/hu.h b/src/lang/hu.h index d3fbc52c..26402321 100644 --- a/src/lang/hu.h +++ b/src/lang/hu.h @@ -1,11 +1,7 @@ #ifndef H_LANG_HU #define H_LANG_HU -// Hungarian translation: Varga Viktor -// Comment: Only tilde was used for double for long ö and u -// Todo to correct this: -// 1. add the " accent glpyh to the end of Russian charset, -// 2. modify the ui.h +// Thanks: Varga Viktor const char *STR_HU[] = { "" // help @@ -16,7 +12,7 @@ const char *STR_HU[] = { "" "~OL)ESEK %d@@" "FELVETT %d@@" "TITKOK %d/%d@@" - "SZ~UKS)EGES ID+O %s" + "SZ~UKS)EGES ID\"O %s" , "J)at)ek ment)ese..." , "Ment)es k)esz!" , "MENT)ESI HIBA!" @@ -27,7 +23,7 @@ const char *STR_HU[] = { "" , "Ki" , "Side-By-Side" , "Anaglyph" - , "Osztott k)eperny+o" + , "Osztott k)eperny\"o" , "VR" , "Alacsony" , "K~ozepes" @@ -54,7 +50,7 @@ const char *STR_HU[] = { "" // inventory option , "J)at)ek" , "T)erk)ep" - , "Ir)anyt+u" + , "Ir)anyt\"u" , "Statisztika" , "Lara otthona" , "R)eszletess)egi szintek" @@ -65,34 +61,34 @@ const char *STR_HU[] = { "" , "J)at)ek bet~olt)ese" , ")Uj j)at)ek" , "Szint )ujraind)it)asa" - , "Kil)ep)es a kezd+ok)eperny+oh~oz" + , "Kil)ep)es a kezd\"ok)eperny\"oh~oz" , "Kil)ep)es a j)at)ekb)ol" , "Szint kiv)alaszt)asa" // detail options , "R)eszletek kiv)alaszt)asa" - , "Sz+ur)es" + , "Sz\"ur)es" , "Vil)ag)it)as" , ")Arny)ekok" , "V)iz" , "VSync" , "Sztere)o" - , "Egyszer+u t)argyak" + , "Egyszer\"u t)argyak" , "Felbont)as" , STR_SCALE // sound options - , "Hanger+o be)all)it)asa" - , "Visszaver+od)es" + , "Hanger\"o be)all)it)asa" + , "Visszaver\"od)es" , "Feliratok" , "Nyelv" // controls options , "Ir)any)it)as be)all)it)asa" - , "Billenty+uzet" + , "Billenty\"uzet" , "Gamepad" , "Vibr)aci)o" , ")Uj c)elpont" , "Multi-c)elz)as" // controls - , "Bal", "Jobb", "Fut)as", "Vissza", "Ugr)as", "S)eta", "Akci)o", "Fegyver el+ov)etel", "N)ez", "Gugol", "L~ok", "Gurul", "T)argylista", "Kezd)es" + , "Bal", "Jobb", "Fut)as", "Vissza", "Ugr)as", "S)eta", "Akci)o", "Fegyver el\"ov)etel", "N)ez", "Gugol", "L~ok", "Gurul", "T)argylista", "Kezd)es" , STR_KEYS // inventory items , "Ismeretlen" @@ -134,8 +130,8 @@ const char *STR_HU[] = { "" // TR1 subtitles /* CAFE */ , "[43500]Mit kell tennie az embernek, ahhoz,@hogy megkapja azt a bizonyos figyelmet?" - "[47500]Neh)ez pontosan megmondani,@de )ugy t+unik j)ol vagy." - "[50000]Nos, nagyszer+u. B)ar az az igazs)ag,@nem )en akarlak." + "[47500]Neh)ez pontosan megmondani,@de )ugy t\"unik j)ol vagy." + "[50000]Nos, nagyszer\"u. B)ar az az igazs)ag,@nem )en akarlak." "[54500]Nem?" "[55000]Nem. Miss Jacqueline Natla szeretne,@a Natla Technologies-t)ol." "[59000]Tudod, minden f)enyes@)es sz)ep alkot)oja?" @@ -146,7 +142,7 @@ const char *STR_HU[] = { "" "[73500]Bocs. )En csak a sport)ert j)atszom." "[76000]Akkor tetszeni fog egy nagy park." "[78000]Peru. Hatalmas hegyl)ancok, amit fel kell fedezni.@J)egfalak. )Eles szikl)ak. Vad szelek." - "[87500])Es itt van ez a kis csecsebecse:@+osi id+ok misztikus er+ovel rendelkez+o m+ut)argya" + "[87500])Es itt van ez a kis csecsebecse:@\"osi id\"ok misztikus er\"ovel rendelkez\"o m\"ut)argya" "[92500]eltemetve Qualopec fel nem lelt s)irj)aban." "[96000]Ez az ami )erdekel." "[98000]Holnap elmehetsz.@Elfoglalt vagy holnap?" @@ -154,10 +150,10 @@ const char *STR_HU[] = { "" "[49000])Athelyezve Szt. Ferenc kolostor)aba, )uj k)is)ert)esek k)inoznak engem." "[53500]A testv)erek k~ozt az a h)ir j)arja, hogy a kolostor alatt@ker~ult s)irba Tihocan," "[60000]egyike az elveszett kontinens, Atlantisz,@ legend)as uralkod)oinak," - "[64500])es vele egy~utt fekszik az +o darabja@az Atlantiszi Scion-nak." + "[64500])es vele egy~utt fekszik az \"o darabja@az Atlantiszi Scion-nak." "[68000]A med)alt felosztott)ak a h)arom uralkod)o k~oz~ott@" - "[72500]ami hatalmas er+oket f)ekez meg.@Er+ot, ami meghaladja az alkot)o erej)et is." - "[79000]Izzad a l)abam ezekt+ol a lehet+os)egekt+ol,@amik olyan k~ozel )allnak a haland)o )enemhez." + "[72500]ami hatalmas er\"oket f)ekez meg.@Er\"ot, ami meghaladja az alkot)o erej)et is." + "[79000]Izzad a l)abam ezekt\"ol a lehet\"os)egekt\"ol,@amik olyan k~ozel )allnak a haland)o )enemhez." "[85500]Minden este t)ul teszem magam@ezeken a fant)azi)akon, de ez val)oj)aban egy teszt." "[92000]" "[93500]Pierre. Nee. Te szem)et." @@ -168,7 +164,7 @@ const char *STR_HU[] = { "" "[20000]Ott hagytuk Larson-t szelet aratni, mi?" "[22500]Ha ez a kifejez)es." "[24000]Nos, a kis nyaral)asi zavarg)asnak most m)ar v)ege." - "[27000]Itt az ideje visszaadni azt, amit ellopt)al t+olem." + "[27000]Itt az ideje visszaadni azt, amit ellopt)al t\"olem." "[30000]Pr)ob)aljuk meg az )eteldobozt." "[32000]" "[42500]Nos? ~Old meg!" @@ -180,8 +176,8 @@ const char *STR_HU[] = { "" "[65000]" "[136000]Mi a fene volt ez?" "[138000]Mi?" - "[138500]Egyszer+u." - "[140500]Val)osz)in+uleg csak egy hal." + "[138500]Egyszer\"u." + "[140500]Val)osz)in\"uleg csak egy hal." "[142500]Ez egy hal, k~oly~ok." "[145000]Ember, meg kell tanulnod laz)itani.@Visszamegyek. J~ossz?" "[152000]" @@ -190,21 +186,21 @@ const char *STR_HU[] = { "" "[161500]K)eszen )allsz m)ar?" /* PRISON */ , "[00001]Nem tehetik ezt!" - "[01500]El)it)elj~uk ~Ont, atlantiszi Natla a b+unei)ert." - "[06000]Hatalmaddal er+oteljesen vissza)el)esei miatt,@ )es mert kiraboltad a mi..." + "[01500]El)it)elj~uk ~Ont, atlantiszi Natla a b\"unei)ert." + "[06000]Hatalmaddal er\"oteljesen vissza)el)esei miatt,@ )es mert kiraboltad a mi..." "[11500]Nem tehetik! )En..." "[12500]Megsz~untetve a beleegyez)es szabad k~otel)ek)et@amely alatt n)ep~unket ir)any)itj)ak," "[18500])es megt)amadva Tihocan-t )es engem a sereg~unkkel." "[23500]A harcosaink t)avoztak a piramisunkb)ol" "[27000])igy fel tudod haszn)alni a piramist - annak erej)et@a teremt)esre - az esztelen rombol)asodhoz." "[33500]Esztelen!? N)ezz magadra!" - "[35500]Egyik+ot~oknek sincs egy lelem)enyes@gondolat se a fej)eben." + "[35500]Egyik\"ot~oknek sincs egy lelem)enyes@gondolat se a fej)eben." "[40500]Pazarl)ok!" "[41500]Csak csin)alj)atok." "[44000]Tihocan!" "[45000]Egy szent helyet haszn)alt)al@saj)at ~or~om~odre," "[49500]mint valami korcs gy)arat." - "[51000]+Ok a t)ul)el+ok. Egy )uj gener)aci)o." + "[51000]\"Ok a t)ul)el\"ok. Egy )uj gener)aci)o." "[54000]Egy lem)esz)arolt halom most." "[56000])Es te. A pokol torn)ac)ara z)arunk." "[60000]Az ereid, a sz)ived, a l)abad," @@ -216,17 +212,17 @@ const char *STR_HU[] = { "" "[05500])Es te - a nagy )ujra megnyit)ora, gondolom." "[09500]Az evol)uci)o bajban van - a term)eszetes szelekci)o m)ara alig )erv)enyes~ul..." "[13500]Az )uj h)us megjelen)ese fel fogja ism)et gerjeszteni a ter~uleti vit)akat" - "[17500] - meger+os)it )es el+oseg)it minket..." + "[17500] - meger\"os)it )es el\"oseg)it minket..." "[20500]M)eg )uj fajokat is l)etre hozhat." "[22500]Az evol)uci)o szteroidokon, akkor." "[24500]Egy seggber)ug)as...@a nyomorult Qualopec-enk )es Tihocan-nak nem voltak ~otletei" "[29500] - Atlantisz kataklizm)aja az )ert)ektelen gyeng)ek verseny)et s)ujtotta..." - "[33500]visszazuhan)asra k)enyszer)itve +oket )ujra a t)ul)el)es alapjaihoz..." + "[33500]visszazuhan)asra k)enyszer)itve \"oket )ujra a t)ul)el)es alapjaihoz..." "[37000]Nem volna szabad )ugy t~ort)ennie." "[39000]Vagy )igy." - "[40000]A kikel)es 15 m)asodperc m)ulva kezd+odik." - "[43000]Most m)ar k)es+o le)all)itani!" - "[45000]A m+uvelet sz)ive n)elk~ul nem!" + "[40000]A kikel)es 15 m)asodperc m)ulva kezd\"odik." + "[43000]Most m)ar k)es\"o le)all)itani!" + "[45000]A m\"uvelet sz)ive n)elk~ul nem!" "[47000]Neee!" "[50000]T)IZ" "[54000]~OT..." @@ -236,11 +232,11 @@ const char *STR_HU[] = { "" "[00001]Nos, most m)ar a teljes figyelmem rajtad" "[02500]- M)egsem vagyok biztos abban, hogy )en is megkaptam a tied." "[05000]Hell)o?" - "[06000]Elkaplak )es lel+olek, mint egy kuty)at." + "[06000]Elkaplak )es lel\"olek, mint egy kuty)at." "[09000]Term)eszetesen." "[10000]Te )es az az idi)ota Scion darabod." "[13000]Annyira szeretn)ed megtartani, hogy kihaszn)alom ezt..." - "[17000]V)arjunk... itt most a m+ut)argyr)ol besz)el~unk?" + "[17000]V)arjunk... itt most a m\"ut)argyr)ol besz)el~unk?" "[20000]Egyenesben vagyunk ... eg)eszen ..." "[22000]Tarts ki - Sajn)alom" "[24000]- ez csak egy r)esz, mondtad - hol van a t~obbi?" @@ -248,7 +244,7 @@ const char *STR_HU[] = { "" "[29500])Es hol van az?" "[30500]H)a)a)a. Nem vagy el)eg gyors, hogy utol)erd." "[34000]Sz)oval azt gondolod, ez a besz)elget)es csak arra van, hogy feltartson?" - "[37000]Nem tudom, hogy a kis ny)ul-b)eka l)abai hov)a vezetik +ot." + "[37000]Nem tudom, hogy a kis ny)ul-b)eka l)abai hov)a vezetik \"ot." "[42000]Meg kell k)erdezned Ms. Natla-t)ol." "[46000]" "[51000]K~osz~on~om. Megteszem." @@ -265,32 +261,32 @@ const char *STR_HU[] = { "" /* 28 */ , "OK. Ugr)aljunk egy kicsit.@Nyomd meg az ugr)as gombot." /* 29 */ , "Most nyomd meg )ujra )es gyorsan nyomj hozz)a@egy ir)anyt )es abba az ir)anyba fogok ugrani." /* 30 */ , ")A)a, a nagyterem.@Bocs a l)ad)ak)ert, de n)eh)any dolgot@rakt)arakba vitetek )es sz)all)it)ok m)eg nem j~ottek." - /* 31 */ , "Fuss oda egy l)ad)ahoz, )es am)ig nyomva tartod az el+ore gombot,@nyomj akci)o gombot )es )en felugrok r)a." + /* 31 */ , "Fuss oda egy l)ad)ahoz, )es am)ig nyomva tartod az el\"ore gombot,@nyomj akci)o gombot )es )en felugrok r)a." /* 32 */ , "Ez kor)abban b)alterem volt, de )atalak)itottam@ a saj)at torna termemnek.@Mi a v)elem)enyed?@Nos csin)aljunk n)eh)any gyakorlatot." /* 33 */ , "Nem mindenhova rohanok.@Ha )ovatos akarok lenni, s)et)alok@Tartsd nyomva a s)eta gombot, )es s)et)alj a feh)er vonalhoz." /* 34 */ , "A s)eta gomb nyomva tart)as)aval nem fogok leesni, m)eg akkor sem ha megpr)ob)alod.@Rajta, pr)ob)ald ki." /* 35 */ , "Ha szeretn)el k~orbe n)ezni, tartsd nyomva a n)ez gombot.@Ut)ana nyomd le az ir)anyt amerre n)ezni szeretn)el." - /* 36 */ , "Ha egy ugr)as t)ul nagy nekem, el tudom kapni a peremet )es megmenteni magam@egy cs)unya zuhan)ast)ol. S)et)alj a sz)el)ehez a feh)er vonallal, addig, am)ig @m)ar nem megyek tov)abb. Ut)ana nyomj ugr)ast, ut)ana meg r~ogt~on@ el+ore gombot, )es am)ig a leveg+oben vagyok, nyomd le )es tartsd nyomva az akci)o gombot." - /* 37 */ , "Nyomj el+or)et, )es felm)aszom." + /* 36 */ , "Ha egy ugr)as t)ul nagy nekem, el tudom kapni a peremet )es megmenteni magam@egy cs)unya zuhan)ast)ol. S)et)alj a sz)el)ehez a feh)er vonallal, addig, am)ig @m)ar nem megyek tov)abb. Ut)ana nyomj ugr)ast, ut)ana meg r~ogt~on@ el\"ore gombot, )es am)ig a leveg\"oben vagyok, nyomd le )es tartsd nyomva az akci)o gombot." + /* 37 */ , "Nyomj el\"or)et, )es felm)aszom." /* 38 */ , "Ha fut)o ugr)ast csin)alok, akkor tudok ekkor)at ugrani, nem probl)ema." - /* 39 */ , "S)et)alj a sz)el)ehez a feh)er vonallal, addig, am)ig m)ar nem megyek tov)abb.@Azt)an engedd el a s)et)at, nyomj h)atr)at, hogy neki tudjak futni.@Nyomj el+or)et, )es r~ogt~on nyomd le )es tartsd nyomva az ugr)as gombot.@Nem fogok elugrani az utols)o pillanatig." - /* 40 */ , "Helyes. Ez egy igaz)an nagy@ Csin)alj egy fut)o ugr)ast, mint kor)abban, de am)ig a leveg+oben@vagyok, nyomd le )es tarts nyomva az akci)o gombot, hogy elkapjam a peremet." + /* 39 */ , "S)et)alj a sz)el)ehez a feh)er vonallal, addig, am)ig m)ar nem megyek tov)abb.@Azt)an engedd el a s)et)at, nyomj h)atr)at, hogy neki tudjak futni.@Nyomj el\"or)et, )es r~ogt~on nyomd le )es tartsd nyomva az ugr)as gombot.@Nem fogok elugrani az utols)o pillanatig." + /* 40 */ , "Helyes. Ez egy igaz)an nagy@ Csin)alj egy fut)o ugr)ast, mint kor)abban, de am)ig a leveg\"oben@vagyok, nyomd le )es tarts nyomva az akci)o gombot, hogy elkapjam a peremet." /* 41 */ , "Sz)ep." - /* 42 */ , "Pr)ob)alj meg felm)aszni itt.@Nyomj el+or)et, )es tartsd nyomva az akci)o gombot." - /* 43 */ , "Nem tudok felm)aszni, mert a r)es t)ul kicsi.@Nyomj jobbot, )es oldalra m)aszom,@am)ig el)eg hely lesz, akkor nyomj el+or)et." + /* 42 */ , "Pr)ob)alj meg felm)aszni itt.@Nyomj el\"or)et, )es tartsd nyomva az akci)o gombot." + /* 43 */ , "Nem tudok felm)aszni, mert a r)es t)ul kicsi.@Nyomj jobbot, )es oldalra m)aszom,@am)ig el)eg hely lesz, akkor nyomj el\"or)et." /* 44 */ , "Remek!@Ha nagy a m)elys)eg, )es nem szeretn)ek@s)er~ulni a leugr)assal, le tudom magam ereszteni )ovatosan." /* 45 */ , "Nyomj h)atr)at )es h)atrafel)e ugrok.@Azonnal nyomd meg )es tartsd nyomva az akci)o gombot,@)es elkapom a peremet )utban lefel)e." /* 46 */ , "Akkor engedd el." /* 47 */ , "Menj~unk )uszni egyet." /* 48 */ , "Az ugr)as gomb )es az ir)anyok@navig)alnak engem a v)iz alatt." - /* 49 */ , ")O! Leveg+o!@Csak haszn)ald az el+or)et, balr)at, vagy jobbr)at@a felsz)in k~ozeli man+overez)eshez.@Nyomj ugr)ast egy )ujabb )usz)ashoz lemer~ul)eshez.@Vagy menj a sz)el)ehez, )es nyomj akci)o gombot a kim)asz)ashoz." + /* 49 */ , ")O! Leveg\"o!@Csak haszn)ald az el\"or)et, balr)at, vagy jobbr)at@a felsz)in k~ozeli man\"overez)eshez.@Nyomj ugr)ast egy )ujabb )usz)ashoz lemer~ul)eshez.@Vagy menj a sz)el)ehez, )es nyomj akci)o gombot a kim)asz)ashoz." /* 50 */ , "Helyes. A legjobb lesz, ha leveszem ezeket a nedves ruh)akat." /* 51 */ , "Mond: Cs)i)iz!" /* 52 */ , "Semmi szem)elyes." - /* 53 */ , "M)eg mindig f)aj a fejem t+oled.@)Es m)ok)as ~otleteket ad nekem.@Hogy l+ojelek a pokolra, p)eld)aul!" + /* 53 */ , "M)eg mindig f)aj a fejem t\"oled.@)Es m)ok)as ~otleteket ad nekem.@Hogy l\"ojelek a pokolra, p)eld)aul!" /* 54 */ , "Nem tudsz meg~olni engem vagy a fi)ok)aimat olyan k~onnyed)en, Lara." /* 55 */ , "Egy kicsit elk)esett a d)ij)atad)as, non?@M)eg mindig a r)eszv)etel ami sz)am)it." - /* 56 */ , "R)am l+osz?@R)am l+osz, mi?@Nincs senki m)as itt, csak r)am l+ohetsz!" + /* 56 */ , "R)am l\"osz?@R)am l\"osz, mi?@Nincs senki m)as itt, csak r)am l\"ohetsz!" // TR1 levels , "Lara otthona" , "Barlangok" diff --git a/src/platform/nix/main.cpp b/src/platform/nix/main.cpp index 8696566f..ddc47012 100644 --- a/src/platform/nix/main.cpp +++ b/src/platform/nix/main.cpp @@ -387,6 +387,7 @@ int checkLanguage() { if (id == TWOCC("fi")) return STR_LANG_FI - STR_LANG_EN; if (id == TWOCC("cs")) return STR_LANG_CZ - STR_LANG_EN; if (id == TWOCC("zh")) return STR_LANG_CN - STR_LANG_EN; + if (id == TWOCC("hu")) return STR_LANG_HU - STR_LANG_EN; return 0; } diff --git a/src/platform/rpi/main.cpp b/src/platform/rpi/main.cpp index 26128207..295ece59 100644 --- a/src/platform/rpi/main.cpp +++ b/src/platform/rpi/main.cpp @@ -491,6 +491,7 @@ int checkLanguage() { if (id == TWOCC("fi")) return STR_LANG_FI - STR_LANG_EN; if (id == TWOCC("cs")) return STR_LANG_CZ - STR_LANG_EN; if (id == TWOCC("zh")) return STR_LANG_CN - STR_LANG_EN; + if (id == TWOCC("hu")) return STR_LANG_HU - STR_LANG_EN; return 0; } diff --git a/src/platform/web/index.php b/src/platform/web/index.php index 08550752..591ade63 100644 --- a/src/platform/web/index.php +++ b/src/platform/web/index.php @@ -142,6 +142,8 @@ function getLanguage() { id = 11; } else if (lang == "zh") { id = 12; + } else if (lang == "hu") { + id = 13; } Module.ccall('set_def_lang', 'null', ['number'], [id]); } diff --git a/src/platform/win/OpenLara.vcxproj b/src/platform/win/OpenLara.vcxproj index bd624ddd..1735d655 100644 --- a/src/platform/win/OpenLara.vcxproj +++ b/src/platform/win/OpenLara.vcxproj @@ -149,6 +149,7 @@ + diff --git a/src/platform/win/OpenLara.vcxproj.filters b/src/platform/win/OpenLara.vcxproj.filters index 52a1913f..bb27acfb 100644 --- a/src/platform/win/OpenLara.vcxproj.filters +++ b/src/platform/win/OpenLara.vcxproj.filters @@ -131,6 +131,9 @@ gapi + + lang + diff --git a/src/platform/win/main.cpp b/src/platform/win/main.cpp index daf66a30..2fc987ac 100644 --- a/src/platform/win/main.cpp +++ b/src/platform/win/main.cpp @@ -632,6 +632,7 @@ int checkLanguage() { case LANG_FINNISH : str = STR_LANG_FI; break; case LANG_CZECH : str = STR_LANG_CZ; break; case LANG_CHINESE : str = STR_LANG_CN; break; + case LANG_HUNGARIAN : str = STR_LANG_HU; break; } return str - STR_LANG_EN; } diff --git a/src/platform/xb1/main.cpp b/src/platform/xb1/main.cpp index 1207fb1b..ac66ab92 100644 --- a/src/platform/xb1/main.cpp +++ b/src/platform/xb1/main.cpp @@ -380,6 +380,8 @@ ref class View sealed : public ApplicationModel::Core::IFrameworkView str = STR_LANG_CZ; } else if (CHECK("zh")) { str = STR_LANG_CN; + } else if (CHECK("hu")) { + str = STR_LANG_HU; } return str - STR_LANG_EN; diff --git a/src/ui.h b/src/ui.h index f521d78d..48c8b390 100644 --- a/src/ui.h +++ b/src/ui.h @@ -47,13 +47,13 @@ namespace UI { int advGlyphsStart; - #define RU_MAP "ÁÃÄÆÇÈËÏÓÔÖ×ØÙÚÛÜÝÞßáâãäæçêëìíïòôö÷øùúûüýþÿ" "i~" + #define RU_MAP "ÁÃÄÆÇÈËÏÓÔÖ×ØÙÚÛÜÝÞßáâãäæçêëìíïòôö÷øùúûüýþÿ" "i~\"" #define RU_GLYPH_COUNT (COUNT(RU_MAP) - 1) #define RU_GLYPH_START 102 #define RU_GLYPH_UPPERCASE 20 - #define CHAR_SPR_TILDA (110 + RU_GLYPH_COUNT - 1) + #define CHAR_SPR_TILDA (110 + RU_GLYPH_COUNT - 2) #define CHAR_SPR_I (CHAR_SPR_TILDA - 1) - + #define CHAR_SPR_QUOTE (CHAR_SPR_TILDA + 1) const static uint8 char_width[110 + RU_GLYPH_COUNT] = { 14, 11, 11, 11, 11, 11, 11, 13, 8, 11, 12, 11, 13, 13, 12, 11, 12, 12, 11, 12, 13, 13, 13, 12, 12, 11, // A-Z @@ -65,8 +65,8 @@ namespace UI { 11, 11, 11, 13, 10, 13, 11, 11, 12, 12, 11, 9, 13, 13, 10, 13, // ÁÃÄÆÇÈËÏÓÔÖ×ØÙÚÛ 9, 11, 12, 11, 10, 9, 8, 10, 11, 9, 10, 10, 11, 9, 10, 12, // ÜÝÞßáâãäæçêëìíïò 10, 10, 9, 11, 12, 9, 11, 8, 9, 13, 9, // ôö÷øùúûüýþÿ - // additional latin (i~) - 5, 10 + // additional + 5, 10, 10 // i~" }; static const uint8 char_map[102 + 33*2] = { @@ -95,7 +95,7 @@ namespace UI { } inline bool skipChar(char c) { - return c == '~' || c == '$' || c == '(' || c == ')' || c == '|' || c == '}' || c == '*' || c == '{' || c == '+'; + return c == '~' || c == '\"' || c == '$' || c == '(' || c == ')' || c == '|' || c == '}' || c == '*' || c == '{' || c == '+'; } inline bool upperCase(int index) { @@ -119,7 +119,7 @@ namespace UI { int o = 0; char c = RU_MAP[i]; - if (c == 'á' || c == 'ä' || c == '~') h = 14; + if (c == 'á' || c == 'ä' || c == '~' || c == '\"') h = 14; if (c == 'Ö' || c == 'Ù' || c == 'ö' || c == 'ù') { o = 1; h++; } if (c == 'ô') { o = 2; h += 2; } @@ -422,6 +422,7 @@ namespace UI { int frame = charRemap(charFrame); if (c == '+' && *text && *text != '@') frame = CHAR_SPR_TILDA; if (c == 'i' && skipChar(lastChar)) frame = CHAR_SPR_I; + if (c == '\"') frame = CHAR_SPR_QUOTE; lastChar = c; if (isShadow) { From 764b1899e4d27b464d648fcfdf4bfefad22fb8f0 Mon Sep 17 00:00:00 2001 From: Timur Gagiev Date: Fri, 8 Jan 2021 05:54:05 +0300 Subject: [PATCH 027/190] minor fix for " glyph --- src/lang/glyph_ru.h | 241 +++++++++++++++++++++--------------------- src/lang/glyph_ru.png | Bin 2016 -> 2018 bytes 2 files changed, 121 insertions(+), 120 deletions(-) diff --git a/src/lang/glyph_ru.h b/src/lang/glyph_ru.h index 68d36876..64d1db28 100644 --- a/src/lang/glyph_ru.h +++ b/src/lang/glyph_ru.h @@ -1,7 +1,7 @@ #ifndef __GLYPH_RU__ #define __GLYPH_RU__ -static unsigned int size_GLYPH_RU = 2016; +static unsigned int size_GLYPH_RU = 2018; static unsigned char GLYPH_RU[] = { 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x30, 0x08, 0x03, 0x00, 0x00, 0x00, 0xc9, 0xa1, 0x54, @@ -10,125 +10,126 @@ static unsigned char GLYPH_RU[] = { 0x29, 0x31, 0x08, 0x00, 0x8c, 0x5a, 0x29, 0xff, 0xef, 0x8c, 0x70, 0x5c, 0x2c, 0xa5, 0x7b, 0x4a, 0xdc, 0xa0, 0x64, 0xff, 0xff, 0x9c, 0xff, 0xd6, 0x7b, 0x30, 0x0c, 0x04, 0xe8, 0xc0, 0x70, 0x58, 0x44, 0x00, 0xc8, 0x90, 0x58, 0xb0, 0x80, 0x50, 0x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x90, 0x0c, 0x00, 0x81, 0xb3, 0xe0, 0x8f, 0x01, 0x34, - 0xfb, 0x18, 0x00, 0xc4, 0x2c, 0xd6, 0x4f, 0x00, 0x20, 0x01, 0xe9, 0xf5, 0x13, 0xaa, 0x60, 0x01, - 0x58, 0x45, 0x71, 0x08, 0x60, 0xd5, 0x5e, 0xb2, 0xc0, 0xca, 0x72, 0xa5, 0xd5, 0x00, 0xd4, 0x8f, - 0x00, 0x24, 0x03, 0x90, 0xbe, 0x04, 0xc0, 0x3e, 0x75, 0xe6, 0xf8, 0x5a, 0xab, 0x03, 0xf0, 0x04, - 0x88, 0x3a, 0x01, 0xe8, 0xc7, 0x00, 0x58, 0xf0, 0x95, 0xd2, 0x52, 0xd6, 0x1b, 0x60, 0xf5, 0x1f, - 0x00, 0xe0, 0xfa, 0xeb, 0x26, 0x41, 0x52, 0x92, 0x30, 0x70, 0xa8, 0x54, 0x49, 0x55, 0xf4, 0x43, - 0x00, 0x21, 0x84, 0xaf, 0x00, 0xd0, 0x5e, 0x9f, 0x70, 0x7f, 0x55, 0xd1, 0xe8, 0x00, 0xbc, 0xe0, - 0xa6, 0xf3, 0xef, 0x01, 0xb0, 0xfe, 0xeb, 0xb5, 0x3e, 0x12, 0x20, 0x00, 0x51, 0x96, 0xb8, 0x16, - 0xbc, 0x6a, 0x5e, 0x01, 0x49, 0xa0, 0x52, 0x95, 0xa4, 0x8a, 0xdd, 0x43, 0x00, 0x4e, 0xa0, 0xdb, - 0x97, 0x00, 0xb4, 0xa4, 0x09, 0x40, 0xac, 0x55, 0x35, 0xea, 0x57, 0x00, 0x60, 0xb9, 0xb2, 0x71, - 0xab, 0xd7, 0x7a, 0x8d, 0xf3, 0xdf, 0xe3, 0x98, 0x01, 0x58, 0xfd, 0x9f, 0x02, 0x40, 0xa2, 0x29, - 0x4c, 0xaa, 0x36, 0x0d, 0xc0, 0xa5, 0x12, 0x40, 0x37, 0x00, 0x48, 0x17, 0x4a, 0x8d, 0xc0, 0x74, - 0xe3, 0xea, 0x83, 0x86, 0x26, 0x18, 0xb5, 0x65, 0x7f, 0xa3, 0x4c, 0x00, 0xc1, 0x01, 0x50, 0xd3, - 0x20, 0xbb, 0x79, 0x7c, 0x8d, 0x52, 0x1b, 0x00, 0x27, 0x00, 0x55, 0x10, 0x80, 0x3b, 0x16, 0x00, - 0x01, 0x5c, 0xf4, 0x00, 0x08, 0x0c, 0xc0, 0xc2, 0xdc, 0xb5, 0x03, 0xa8, 0xb5, 0x57, 0xc5, 0x00, - 0x07, 0x70, 0x54, 0x70, 0xd0, 0x18, 0x63, 0x1b, 0x9e, 0x01, 0x95, 0x07, 0x00, 0xe1, 0x1d, 0x80, - 0xc6, 0xbc, 0xc5, 0x97, 0x0f, 0x00, 0x68, 0x31, 0x1b, 0xf1, 0x71, 0xff, 0x0e, 0x50, 0xb7, 0x68, - 0xb2, 0x44, 0x31, 0xe2, 0xd2, 0xd2, 0x99, 0x0f, 0x02, 0x80, 0xfc, 0x06, 0x40, 0x49, 0x60, 0xbd, - 0x87, 0x00, 0xba, 0x2d, 0x57, 0x06, 0x17, 0x02, 0x60, 0xc1, 0xd5, 0x24, 0xa2, 0xba, 0xf9, 0x01, - 0xc4, 0xaf, 0x0c, 0xeb, 0x4d, 0xa9, 0xf2, 0x86, 0x74, 0x63, 0xfd, 0xb6, 0x80, 0x07, 0xf3, 0x72, - 0x0f, 0xc0, 0x59, 0xae, 0xe8, 0x00, 0x20, 0x92, 0x77, 0x02, 0xe2, 0xe9, 0xcc, 0x87, 0x23, 0x86, - 0x06, 0x57, 0x63, 0x3e, 0xde, 0x5f, 0x1c, 0x80, 0x5f, 0x4f, 0x32, 0x9f, 0x8f, 0x50, 0xba, 0x21, - 0x6a, 0x3d, 0x04, 0xb0, 0x16, 0xec, 0xe1, 0xcc, 0xc0, 0x25, 0x99, 0x5d, 0x0a, 0x2f, 0xa8, 0x36, - 0xcd, 0x2b, 0x70, 0x0f, 0x6e, 0xa3, 0x09, 0x6a, 0x13, 0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00, 0x1c, 0xdc, 0x00, 0xb0, 0x7f, 0x57, 0x4c, 0x00, 0xec, - 0xbb, 0x2e, 0x01, 0xa4, 0x84, 0xb2, 0x02, 0xb0, 0xf9, 0x42, 0x00, 0x5d, 0x9b, 0x97, 0x04, 0xde, - 0x46, 0xfd, 0x27, 0xb4, 0x50, 0xcc, 0xcd, 0x9b, 0xa8, 0x58, 0xfd, 0x34, 0x44, 0xb4, 0x7c, 0x1e, - 0x2f, 0x45, 0xc9, 0x5b, 0x24, 0x00, 0x0d, 0xe1, 0x01, 0xc0, 0x69, 0x8d, 0x07, 0x22, 0x80, 0x01, - 0x80, 0xed, 0xf2, 0xfc, 0x19, 0x00, 0x66, 0xe8, 0x23, 0x00, 0x83, 0x33, 0x00, 0x14, 0x76, 0xff, - 0x63, 0xbd, 0xc0, 0xfa, 0x4d, 0xaf, 0x5f, 0xd1, 0x3d, 0x7e, 0x78, 0x7f, 0xbd, 0x5d, 0xdf, 0xae, - 0xd7, 0x5f, 0x0c, 0x81, 0x5a, 0xfd, 0x14, 0x41, 0x24, 0xcc, 0x00, 0xd2, 0x03, 0x00, 0x44, 0x89, - 0x78, 0xd1, 0xec, 0x37, 0x52, 0x6e, 0xb7, 0x19, 0x40, 0x7a, 0x07, 0xe0, 0x24, 0x38, 0xcd, 0x09, - 0x2b, 0x00, 0xd5, 0xda, 0xbd, 0x44, 0x58, 0x9b, 0x6f, 0x71, 0x58, 0xbe, 0x44, 0x8c, 0x79, 0xe7, - 0xec, 0xe4, 0xca, 0x74, 0xa3, 0x72, 0x3a, 0x02, 0x50, 0x15, 0xac, 0xff, 0x9f, 0xf6, 0x47, 0xa0, - 0x11, 0xe0, 0x87, 0x54, 0x29, 0x24, 0x00, 0x4d, 0x80, 0xea, 0x20, 0x90, 0xd1, 0x01, 0xa4, 0x0b, - 0x01, 0x14, 0x44, 0x14, 0xbf, 0xb1, 0xb8, 0xa4, 0x52, 0x9c, 0x0f, 0x6f, 0xe8, 0x12, 0x6f, 0x00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c, 0x20, 0x11, - 0x00, 0xfb, 0xeb, 0x4f, 0x00, 0xe0, 0xff, 0x60, 0x18, 0x4f, 0x84, 0x28, 0x07, 0x42, 0x4e, 0x1f, - 0xf7, 0xff, 0x16, 0x88, 0xc4, 0x33, 0x40, 0x56, 0x00, 0xd0, 0xf8, 0x64, 0x00, 0x21, 0x59, 0xbf, - 0x91, 0x42, 0x99, 0x36, 0x28, 0x5b, 0x2a, 0x63, 0x9e, 0xfd, 0xf5, 0xbb, 0x82, 0xa9, 0xe7, 0x27, - 0x22, 0xa1, 0xf4, 0x6b, 0xb3, 0x4a, 0x07, 0xc0, 0xe9, 0xa5, 0xff, 0x27, 0x70, 0x35, 0xeb, 0x00, - 0xb4, 0xdc, 0x89, 0xc5, 0x8c, 0x79, 0xfe, 0x82, 0xd3, 0x53, 0xad, 0x84, 0xd4, 0x2c, 0x14, 0x12, - 0x06, 0x20, 0xb1, 0x0c, 0xe4, 0x80, 0xf7, 0xd7, 0x47, 0x05, 0x43, 0x22, 0xa0, 0x80, 0x7a, 0x06, - 0x34, 0x94, 0x92, 0xc4, 0x04, 0xe5, 0x00, 0xc0, 0x69, 0x2e, 0xff, 0xd0, 0xff, 0x2b, 0x70, 0x07, - 0x90, 0x8a, 0x9f, 0x28, 0xa6, 0x54, 0x08, 0xe0, 0xd9, 0x4d, 0x4c, 0xb1, 0xc3, 0x97, 0xa1, 0x34, - 0xa9, 0x8a, 0x58, 0xd3, 0x48, 0x63, 0x7f, 0xcd, 0x82, 0xf9, 0x44, 0xa8, 0x5b, 0xf4, 0x0c, 0xc4, - 0x50, 0xfc, 0x79, 0x00, 0xa5, 0xaf, 0xc0, 0xe9, 0x05, 0x78, 0xe4, 0xfa, 0x29, 0x96, 0xa2, 0x09, - 0xf0, 0x4a, 0xb3, 0x28, 0xcc, 0xe9, 0x47, 0x79, 0x3e, 0x00, 0x3e, 0xce, 0x61, 0x3b, 0x0b, 0x2c, - 0x00, 0x40, 0x1e, 0x2c, 0xb8, 0x30, 0xde, 0x0c, 0xee, 0x08, 0x71, 0x5c, 0x28, 0x4a, 0xc4, 0xc3, - 0x69, 0xf6, 0xff, 0xcb, 0x56, 0x45, 0x93, 0x8e, 0xfa, 0x53, 0x31, 0x27, 0xc6, 0x7a, 0xcf, 0x27, - 0x80, 0x83, 0xd6, 0x78, 0x75, 0x15, 0xca, 0x42, 0x3b, 0xce, 0xe0, 0xdc, 0x2c, 0xcb, 0xe1, 0x34, - 0x3d, 0x8b, 0x9a, 0x7d, 0xb9, 0x4b, 0x30, 0xe2, 0xc9, 0x8d, 0xfc, 0x7f, 0x9d, 0xc7, 0x50, 0x97, - 0x60, 0x51, 0x26, 0xeb, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82, + 0x74, 0x52, 0x4e, 0x53, 0x00, 0x40, 0xe6, 0xd8, 0x66, 0x00, 0x00, 0x07, 0x51, 0x49, 0x44, 0x41, + 0x54, 0x78, 0x5e, 0xed, 0x9a, 0xe9, 0x92, 0xdb, 0x38, 0x0c, 0x84, 0xdd, 0x00, 0x4f, 0xf9, 0x98, + 0x23, 0xfb, 0xfe, 0xcf, 0xba, 0x04, 0x2d, 0xa8, 0x49, 0x45, 0xae, 0x78, 0x6a, 0xfd, 0x63, 0x6a, + 0x33, 0xc8, 0xd0, 0x4a, 0x83, 0x00, 0x45, 0x7c, 0xa1, 0x1d, 0x43, 0xc9, 0xe9, 0x7b, 0xdb, 0x8f, + 0xfd, 0x58, 0x35, 0x43, 0x7f, 0x79, 0x36, 0x9e, 0xf6, 0x4c, 0x42, 0xde, 0x8c, 0x9a, 0x8e, 0xd1, + 0x45, 0x71, 0xea, 0xc3, 0x5d, 0x98, 0x36, 0xe7, 0x77, 0x1e, 0x36, 0xc0, 0xed, 0x50, 0x50, 0x33, + 0x6a, 0x0c, 0xa7, 0x5a, 0x16, 0x89, 0xe8, 0x2f, 0xd3, 0xfd, 0xf3, 0x71, 0xc1, 0x3d, 0x1e, 0x8b, + 0x2c, 0x6d, 0xa8, 0x69, 0x56, 0x32, 0xed, 0x8f, 0x80, 0xb2, 0x2e, 0x2d, 0xa5, 0x99, 0x29, 0xd7, + 0x74, 0x98, 0x67, 0x31, 0x53, 0x07, 0x60, 0xbf, 0xab, 0x52, 0x9b, 0x5b, 0xba, 0xab, 0x4a, 0x8b, + 0xd6, 0x8d, 0x40, 0xb0, 0xe0, 0x60, 0x6e, 0x89, 0x6b, 0x89, 0xf7, 0xf5, 0x62, 0xe0, 0xbc, 0xc8, + 0x38, 0x0b, 0x5e, 0xcd, 0xa1, 0x36, 0xbf, 0x2c, 0xea, 0x80, 0xac, 0x74, 0x7b, 0x59, 0x01, 0xdc, + 0x6e, 0x38, 0xe1, 0x76, 0x73, 0x00, 0xfb, 0x82, 0x4f, 0x90, 0x00, 0x08, 0xb0, 0x04, 0xf4, 0xf8, + 0xb6, 0xd4, 0x04, 0xe0, 0xbe, 0xbf, 0xca, 0x1d, 0x64, 0x5b, 0x1b, 0x50, 0xaf, 0x37, 0x74, 0x4d, + 0x47, 0x5e, 0x4c, 0x4b, 0x74, 0x8c, 0x51, 0x60, 0x00, 0x6c, 0xac, 0xf5, 0x2b, 0xb4, 0x13, 0x60, + 0xbe, 0xf9, 0x95, 0x15, 0xf6, 0xfc, 0x69, 0x7d, 0x6a, 0xe8, 0x0a, 0x60, 0x85, 0x18, 0x74, 0x11, + 0x48, 0x82, 0x88, 0xde, 0x89, 0x6d, 0x00, 0xd6, 0x78, 0x8b, 0x83, 0xc8, 0x2a, 0x77, 0x05, 0x53, + 0xdb, 0x85, 0x7f, 0x62, 0x6e, 0xdc, 0x5f, 0xbb, 0x78, 0x81, 0x77, 0x07, 0x9a, 0xe4, 0x0d, 0x07, + 0x07, 0x96, 0xa6, 0x07, 0x00, 0x88, 0x82, 0x2a, 0xd5, 0xc3, 0xaa, 0x5a, 0xed, 0x2b, 0x00, 0xe6, + 0x57, 0xd1, 0x08, 0x6a, 0x74, 0xe7, 0xb1, 0xee, 0x04, 0xaa, 0x24, 0x9c, 0xb6, 0xf5, 0x24, 0xf5, + 0x42, 0x09, 0x74, 0x0f, 0x40, 0x09, 0x60, 0x5f, 0x30, 0x24, 0x76, 0xed, 0x19, 0x58, 0x7c, 0xeb, + 0xac, 0xcf, 0x2f, 0x0e, 0x60, 0xfa, 0xbc, 0xe0, 0xde, 0x66, 0x00, 0x44, 0x1e, 0xa5, 0x4a, 0xbd, + 0xfa, 0xfa, 0x80, 0x43, 0x63, 0xbe, 0xd5, 0xef, 0x00, 0xf0, 0x08, 0x00, 0x8f, 0x4c, 0x07, 0x10, + 0x4c, 0xcc, 0x00, 0x18, 0x5f, 0x95, 0x00, 0x92, 0x01, 0x20, 0x70, 0x16, 0xfc, 0x18, 0x40, 0xb3, + 0xc7, 0x00, 0x20, 0x66, 0xb1, 0x3e, 0x01, 0x80, 0x04, 0xa4, 0xd7, 0x4f, 0xa8, 0x82, 0x09, 0x60, + 0x15, 0xc5, 0x23, 0x00, 0xd4, 0x9e, 0xad, 0x02, 0x2b, 0xcb, 0x95, 0x56, 0x03, 0x50, 0x1f, 0x01, + 0x48, 0x06, 0x20, 0x7d, 0x09, 0x80, 0x7d, 0xea, 0x8c, 0xf1, 0xb5, 0x56, 0x07, 0xe0, 0x09, 0x10, + 0x75, 0x02, 0xd0, 0xc7, 0x00, 0x58, 0xf0, 0x95, 0xd2, 0x52, 0xe6, 0x13, 0x60, 0xf5, 0x3f, 0x06, + 0xa0, 0x11, 0xf3, 0x4d, 0x82, 0xa4, 0x24, 0x61, 0xc3, 0xa1, 0x52, 0x25, 0x55, 0xd1, 0x87, 0x00, + 0x42, 0x08, 0x5f, 0x01, 0xa0, 0xbd, 0x3e, 0xe1, 0xfd, 0x55, 0x45, 0xa3, 0x03, 0xf0, 0x82, 0x9b, + 0xce, 0x7f, 0x06, 0xc0, 0xfa, 0xaf, 0xd7, 0xba, 0x27, 0x40, 0x00, 0xa2, 0x2c, 0x71, 0x2e, 0x78, + 0xd6, 0x3c, 0x02, 0x92, 0x40, 0xa5, 0x2a, 0x49, 0x15, 0xab, 0x87, 0x00, 0x9c, 0x40, 0xb7, 0x2f, + 0x01, 0x68, 0x49, 0x03, 0x80, 0x58, 0xab, 0x6a, 0xd4, 0xaf, 0x00, 0xc0, 0x74, 0x64, 0xe3, 0x52, + 0xaf, 0xf5, 0x1a, 0xc7, 0xbf, 0xc7, 0x31, 0x02, 0xb0, 0xfa, 0x9f, 0x02, 0x40, 0xa2, 0x29, 0x0c, + 0xaa, 0x36, 0x0d, 0xc0, 0xa5, 0x12, 0x40, 0x37, 0x00, 0x48, 0x17, 0x4a, 0x8d, 0xc0, 0x70, 0xe2, + 0xea, 0x4e, 0x43, 0x13, 0x8c, 0xda, 0x74, 0x7f, 0xa3, 0x4c, 0x00, 0xc1, 0x01, 0x50, 0xd3, 0x20, + 0xab, 0x79, 0x7c, 0x8d, 0x52, 0x1b, 0x00, 0x27, 0x00, 0x55, 0x10, 0x80, 0x3b, 0x26, 0x00, 0x01, + 0x5c, 0xf4, 0x00, 0x08, 0x0c, 0xc0, 0xc4, 0xdc, 0xb5, 0x03, 0xa8, 0xb5, 0x57, 0xc5, 0x00, 0x07, + 0x70, 0x54, 0x70, 0xd0, 0x18, 0x63, 0x1b, 0x9e, 0x01, 0x95, 0x1d, 0x80, 0xf0, 0x1b, 0x80, 0xc6, + 0xbc, 0xc5, 0x97, 0x07, 0x00, 0xb4, 0x98, 0x6d, 0xf1, 0x71, 0xfd, 0x0e, 0x50, 0x97, 0x68, 0xb2, + 0x44, 0x31, 0xe2, 0xd2, 0xd2, 0x99, 0x0f, 0x02, 0x80, 0xfc, 0x01, 0x40, 0x49, 0x60, 0xbd, 0x87, + 0x00, 0xba, 0x4d, 0x47, 0x06, 0x17, 0x02, 0x60, 0xc1, 0xd5, 0x24, 0xa2, 0xba, 0xf9, 0x06, 0xc4, + 0x8f, 0x0c, 0xeb, 0x4d, 0xa9, 0xf2, 0x84, 0x74, 0x63, 0xf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f0, + 0x34, 0x70, 0x0b, 0x45, 0x24, 0x81, 0x6f, 0x08, 0xc0, 0x2a, 0x85, 0xca, 0x04, 0x40, 0xe9, 0xa8, + 0x0b, 0xd8, 0x33, 0x76, 0x1d, 0xf1, 0x45, 0xe8, 0x46, 0xe0, 0x5b, 0x01, 0x68, 0xb6, 0xff, 0x34, + 0xab, 0xa2, 0x6c, 0x46, 0x54, 0x71, 0x82, 0x68, 0x5d, 0xf5, 0x04, 0xa0, 0xaa, 0xc2, 0xec, 0xf0, + 0x01, 0x22, 0xf5, 0x00, 0x19, 0x66, 0xea, 0x07, 0xca, 0xa6, 0xce, 0xe7, 0xb3, 0x0d, 0x66, 0x4c, + 0xf9, 0x26, 0x42, 0x80, 0x09, 0xba, 0x00, 0x6c, 0x8a, 0x17, 0x93, 0x21, 0x84, 0xfe, 0xe2, 0xac, + 0x73, 0xf6, 0x78, 0x4f, 0xb6, 0x58, 0xd6, 0x9c, 0x45, 0x6e, 0xb7, 0x9b, 0xa0, 0x0b, 0x42, 0x20, + 0x00, 0xac, 0x00, 0x74, 0x03, 0x20, 0xb0, 0x79, 0x02, 0x80, 0x6a, 0x53, 0xfc, 0x4c, 0x99, 0xd6, + 0xcb, 0xd2, 0x6f, 0x40, 0x00, 0x58, 0xc4, 0x52, 0xfc, 0x1d, 0xf4, 0xbe, 0x7c, 0x9c, 0xcf, 0xed, + 0x67, 0xf9, 0x78, 0xf7, 0xf9, 0x66, 0x6f, 0xcc, 0xbf, 0x2d, 0x38, 0x85, 0x9b, 0x82, 0x48, 0x96, + 0x45, 0xdf, 0xde, 0x04, 0x9b, 0xca, 0xfd, 0x12, 0xb3, 0xdf, 0x1f, 0xf7, 0x97, 0x61, 0x39, 0x55, + 0x8b, 0x77, 0x9d, 0xfb, 0xcf, 0x96, 0x90, 0x12, 0xdb, 0x65, 0xf6, 0xbb, 0x32, 0x00, 0xd0, 0x15, + 0x00, 0x38, 0xcb, 0xe6, 0x08, 0xaa, 0x5a, 0x0a, 0x5b, 0x8b, 0x2c, 0x0a, 0x0c, 0xef, 0xa0, 0xac, + 0x7a, 0xc9, 0xe5, 0x92, 0x59, 0x3f, 0xe3, 0xef, 0x04, 0xae, 0x1f, 0xe7, 0xf6, 0xeb, 0xba, 0xd5, + 0x2f, 0xa5, 0x14, 0xf6, 0xfb, 0x10, 0x81, 0xd7, 0xef, 0x00, 0x80, 0xa2, 0x02, 0x02, 0xce, 0xcd, + 0xf7, 0x26, 0x79, 0x8b, 0xb7, 0x9b, 0x0e, 0xad, 0x47, 0x29, 0x85, 0xf1, 0x10, 0x89, 0xdd, 0xde, + 0x84, 0x00, 0x4e, 0x48, 0x33, 0x00, 0x00, 0x07, 0x27, 0x00, 0xec, 0xdf, 0x15, 0x03, 0x00, 0xfb, + 0xae, 0x4b, 0x00, 0x29, 0xa1, 0xcc, 0x00, 0x6c, 0xbe, 0x10, 0x40, 0xd7, 0xe6, 0x25, 0x81, 0x8f, + 0xad, 0xfe, 0x13, 0x5a, 0x28, 0xc6, 0xe6, 0x4d, 0x54, 0xac, 0x7e, 0x1a, 0x22, 0x5a, 0x3e, 0xb7, + 0x97, 0xa2, 0xe4, 0x25, 0x12, 0x80, 0x86, 0xb0, 0x03, 0x70, 0x9a, 0xe3, 0x81, 0x08, 0x60, 0x03, + 0xc0, 0x76, 0x79, 0xfc, 0x0c, 0x00, 0x33, 0x74, 0x0f, 0xc0, 0xe0, 0x6c, 0x00, 0x0a, 0xbb, 0xff, + 0x6d, 0xbd, 0xc0, 0xfa, 0x4d, 0xcf, 0x5f, 0xd1, 0x3d, 0x7e, 0xf3, 0x7e, 0x7e, 0x5c, 0x3f, 0xae, + 0xd7, 0x4f, 0x86, 0x40, 0xad, 0x7e, 0x8a, 0x20, 0x12, 0x46, 0x00, 0x69, 0x07, 0x00, 0x51, 0x22, + 0xde, 0x34, 0xfb, 0x89, 0x94, 0xdb, 0x6d, 0x04, 0x90, 0xf6, 0x00, 0x70, 0x12, 0x9c, 0xc6, 0x84, + 0x19, 0x80, 0x6a, 0xed, 0x5e, 0x22, 0xac, 0xcd, 0x37, 0x39, 0x2c, 0xdf, 0x00, 0xf8, 0xbc, 0x73, + 0x76, 0x72, 0x65, 0x38, 0x51, 0x39, 0x1d, 0x01, 0xa8, 0x0a, 0xd6, 0xff, 0xab, 0xbd, 0x05, 0x1a, + 0x01, 0x7e, 0x48, 0x95, 0x42, 0x02, 0xd0, 0x04, 0xa8, 0x6e, 0x04, 0x32, 0x3a, 0x80, 0x74, 0x21, + 0x80, 0x82, 0x88, 0xe2, 0x27, 0x16, 0x97, 0x54, 0x8a, 0xf3, 0xe1, 0x09, 0x9d, 0xe2, 0x0d, 0x00, + 0x13, 0x62, 0x02, 0x90, 0xd8, 0xae, 0x47, 0x51, 0x40, 0xe7, 0x67, 0x78, 0x51, 0xdc, 0xe1, 0xf5, + 0x13, 0x40, 0x81, 0x56, 0xf3, 0x39, 0x00, 0xae, 0x77, 0x0c, 0xc0, 0x08, 0x54, 0x85, 0x3b, 0x3f, + 0x97, 0x5f, 0xe7, 0xf3, 0xb5, 0xfd, 0x2c, 0x9f, 0x6b, 0x7e, 0x04, 0x10, 0xf9, 0xb8, 0xc0, 0xf2, + 0x0b, 0x09, 0xe4, 0x04, 0x19, 0x01, 0x14, 0x2b, 0x88, 0x47, 0xc2, 0x3a, 0xe5, 0x16, 0x9f, 0x86, + 0xed, 0x8b, 0x03, 0x60, 0xbc, 0x0c, 0x09, 0x25, 0xc4, 0x94, 0x58, 0x7f, 0xef, 0xef, 0x75, 0xd7, + 0xdf, 0xa3, 0xf9, 0xdc, 0x01, 0x35, 0x74, 0x10, 0x21, 0x01, 0x88, 0xb2, 0xa0, 0xfd, 0x7a, 0x25, + 0xa9, 0x4f, 0x6d, 0xc0, 0x88, 0xab, 0x01, 0xf8, 0xe7, 0x7c, 0x3a, 0x5f, 0x6d, 0x7c, 0x6e, 0x09, + 0xaa, 0x91, 0xf9, 0xf1, 0x7e, 0x84, 0x1d, 0x23, 0xfa, 0xe3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52, 0x21, 0x80, 0x57, 0x37, 0x31, 0xc5, 0x36, 0x5f, 0x36, + 0xa5, 0x49, 0x55, 0xc4, 0x9a, 0x46, 0x1a, 0xfb, 0x6b, 0x16, 0xcc, 0x27, 0x42, 0xdd, 0xa2, 0x67, + 0x20, 0x86, 0xe2, 0xcf, 0x03, 0x28, 0x7d, 0x05, 0x4e, 0x4f, 0xc0, 0x23, 0xd7, 0x4f, 0xb1, 0x14, + 0x4d, 0x80, 0x57, 0x9a, 0x45, 0x61, 0x4e, 0xdf, 0xca, 0xeb, 0x01, 0xf0, 0x71, 0x0e, 0xdb, 0x59, + 0x60, 0x02, 0x00, 0xf2, 0x60, 0xc1, 0x85, 0xf1, 0x66, 0x70, 0x47, 0x88, 0xdb, 0x81, 0xa2, 0x44, + 0x3c, 0x9c, 0x66, 0xff, 0x3f, 0xdd, 0xaa, 0x68, 0x52, 0xaf, 0xdf, 0x0e, 0xc2, 0x00, 0xa8, 0x84, + 0xd7, 0x13, 0xc0, 0x41, 0x6b, 0x3c, 0xbb, 0x0a, 0x65, 0xa1, 0x1d, 0x67, 0x70, 0x6e, 0x94, 0xe5, + 0x68, 0xfa, 0x71, 0xff, 0x4f, 0x5f, 0xee, 0x12, 0x8c, 0x78, 0x71, 0x23, 0xff, 0x2f, 0x01, 0x2b, + 0x50, 0x97, 0xb3, 0xd9, 0x71, 0x34, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, + 0x60, 0x82, }; #endif diff --git a/src/lang/glyph_ru.png b/src/lang/glyph_ru.png index 003556f591e907c596d549daf39bf055bf3f8d20..ed27735962a58b4d1bc1d5acfb8958fd152c2b5e 100644 GIT binary patch delta 1915 zcmV->2ZZ?G58@Aye1B0%L_t(|UhSIclG`{8gxvs7`Isa7{?EDuEvQLFu6SzwV`?+V z&`N^cd@_Hs^O9Ho)yrP%~-_r&<)6E-j^*Dc5wEXE9R;V85$Un}1unt4fR3jX<#AU~Y+P ziTCwl;Jn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2!cR&ptL`VRlEQsrQ0qRo&7;!ZK|DI3htBqeH zK{YZz-mkD@M1OoxE(1V}<$wMLJ}N-u`3>M>d;}BLcA1_rVjS|6mwTgeV6>PJbWw{}zbEGeA}V(D-BkAz8nXLYX!wTPkCo{q?(osplsmq4aCB zN(aE{rT-^zHR}Mh+=<1EdH#aaQ>}#5EEEz3Ah8VOfcMu&1w$gBfO-Zrl#;{*VLJ;f06-orxG>%f?g(*QC`!b`Y4-oiRz;JJ`cp9{#(K{u zfP>a}brs4&JI>(TEX(0EJ&T%sxl1tO$&LJfoySm@U{NOP00000NkvXXu0mjfg}{LN From a25e42e65f46f2f2d31b74dc101c52956ed2dfc2 Mon Sep 17 00:00:00 2001 From: XProger Date: Fri, 8 Jan 2021 09:00:55 +0300 Subject: [PATCH 028/190] rooms export to GLTF (WIP) --- src/core.h | 8 +- src/extension.h | 262 +++++++++++++++++++++++++++++++++++++++++------- src/gapi/gl.h | 104 +++++++++---------- src/gltf.h | 19 +++- src/lang.h | 4 +- src/mesh.h | 26 ++--- 6 files changed, 314 insertions(+), 109 deletions(-) diff --git a/src/core.h b/src/core.h index 603f8c19..777ea9b8 100644 --- a/src/core.h +++ b/src/core.h @@ -151,11 +151,11 @@ #define _OS_X360 1 // TODO #elif __NDLESS__ - #define _OS_TNS 1 - #define _GAPI_SW 1 - #include + #define _OS_TNS 1 + #define _GAPI_SW 1 + #include - #undef OS_PTHREAD_MT + #undef OS_PTHREAD_MT #endif #if !defined(_OS_PSP) && !defined(_OS_TNS) diff --git a/src/extension.h b/src/extension.h index d44dea38..b7878429 100644 --- a/src/extension.h +++ b/src/extension.h @@ -12,35 +12,226 @@ namespace Extension { + const float MESH_SCALE = 1.0f / 256.0f; + #ifdef GEOMETRY_EXPORT - void exportTexture(const char *name, Texture *tex) { + void exportTexture(const char *dir, const char *name, Texture *tex) { char *data32 = new char[tex->width * tex->height * 4]; tex->bind(sDiffuse); glGetTexImage(GL_TEXTURE_2D, 0, GL_RGBA, GL_UNSIGNED_BYTE, data32); - Texture::SaveBMP(name, data32, tex->width, tex->height); + char path[256]; + sprintf(path, "%s/%s", dir, name); + Texture::SaveBMP(path, data32, tex->width, tex->height); delete[] data32; } - void exportModel(IGame *game, TR::Model &model) { + void exportRooms(IGame *game, const char *dir) { TR::Level *level = game->getLevel(); MeshBuilder *mesh = game->getMesh(); - struct ModelVertex { + typedef uint32 MeshIndex; + + struct MeshVertex { vec3 coord; vec3 normal; vec2 texCoord; ubyte4 color; + }; + + char name[256]; + sprintf(name, "%s/rooms.glb", dir); + + LOG("export rooms: %s\n", name); + + FILE *file = fopen(name, "wb"); + if (!file) { + LOG("dump: can't dump rooms to file \"%s\"!\n", name); + return; + } + + Index *indices = new Index[1024 * 1024]; + Vertex *vertices = new Vertex[1024 * 1024]; + + mat4 flip = mat4( + -1, 0, 0, 0, + 0, -1, 0, 0, + 0, 0, 1, 0, + 0, 0, 0, 1 + ); + mat4 flipInv = flip.inverseOrtho(); + + struct RoomParams { + int iStart; + int vStart; + int iCount; + int vCount; + } roomParams[1024]; + + int iCount = 0, vCount = 0; + + // get geometry data + for (int roomIndex = 0; roomIndex < level->roomsCount; roomIndex++) { + RoomParams ¶ms = roomParams[roomIndex]; + params.iStart = iCount; + params.vStart = vCount; + + MeshBuilder::Geometry geom; + + for (int transp = 0; transp < 3; transp++) { + int blendMask = mesh->getBlendMask(transp); + + TR::Room &room = level->rooms[roomIndex]; + + // room geometry + mesh->buildRoom(geom, NULL, blendMask, room, level, indices, vertices, iCount, vCount, params.vStart); + + // static meshes + for (int j = 0; j < room.meshesCount; j++) { + TR::Room::Mesh &m = room.meshes[j]; + TR::StaticMesh *s = &level->staticMeshes[m.meshIndex]; + if (!level->meshOffsets[s->mesh]) continue; + TR::Mesh &staticMesh = level->meshes[level->meshOffsets[s->mesh]]; + + int x = m.x - room.info.x; + int y = m.y; + int z = m.z - room.info.z; + int d = m.rotation.value / 0x4000; + mesh->buildMesh(geom, blendMask, staticMesh, level, indices, vertices, iCount, vCount, params.vStart, 0, x, y, z, d, m.color, true, false); + } + } + + params.iCount = iCount - params.iStart; + params.vCount = vCount - params.vStart; + } + + for (int i = 0; i < iCount; i += 3) { // CCW -> CW + swap(indices[i], indices[i + 2]); + } + + // get model geometry + int verticesOffset = 0; + int indicesOffset = verticesOffset + vCount * sizeof(MeshVertex); + int bufferSize = indicesOffset + iCount * sizeof(MeshIndex); + + char *bufferData = new char[bufferSize]; + + MeshVertex *gVertices = (MeshVertex*)(bufferData + verticesOffset); + for (int i = 0; i < vCount; i++) { + Vertex &src = vertices[i]; + MeshVertex &dst = gVertices[i]; + + dst.coord = src.coord; + + dst.normal = src.normal; + dst.texCoord = src.texCoord; + dst.normal = dst.normal.normal(); + + dst.coord = flip * (dst.coord * MESH_SCALE); + dst.normal = flip * dst.normal; + + dst.texCoord *= (1.0f / 32767.0f); + dst.color = src.light; + } + + for (int i = 0; i < iCount; i++) { + MeshIndex &dst = ((MeshIndex*)(bufferData + indicesOffset))[i]; + dst = indices[i]; + } + + GLTF *gltf = new GLTF(); + + JSON *nodes; + gltf->addScene("Scene", &nodes); + + int accessorIndex = 0; + int nodeIndex = 0; + + for (int roomIndex = 0; roomIndex < level->roomsCount; roomIndex++) { + TR::Room &room = level->rooms[roomIndex]; + + RoomParams ¶ms = roomParams[roomIndex]; + if (params.iCount == 0) { + continue; + } + + sprintf(name, "%d_mesh", roomIndex); + gltf->addMesh(name, 0, accessorIndex + 0, accessorIndex + 1, accessorIndex + 2, accessorIndex + 3, accessorIndex + 4, -1, -1); + + sprintf(name, "%d", roomIndex); + gltf->addNode(name, nodeIndex, -1, vec3(float(-room.info.x), 0, float(room.info.z)) * MESH_SCALE, quat(0, 0, 0, 1)); + nodes->add(NULL, nodeIndex); // mesh + nodeIndex++; + + vec4 vMin(+INF), vMax(-INF); + + for (int i = params.vStart; i < params.vStart + params.vCount; i++) { + MeshVertex &v = gVertices[i]; + + vMin.x = min(vMin.x, v.coord.x); + vMin.y = min(vMin.y, v.coord.y); + vMin.z = min(vMin.z, v.coord.z); + + vMax.x = max(vMax.x, v.coord.x); + vMax.y = max(vMax.y, v.coord.y); + vMax.z = max(vMax.z, v.coord.z); + } + + gltf->addAccessor(0, sizeof(MeshIndex), params.iStart * sizeof(MeshIndex), params.iCount, GLTF::SCALAR, GL_UNSIGNED_INT); // 0 + gltf->addAccessor(1, sizeof(MeshVertex), params.vStart * sizeof(MeshVertex) + (int)OFFSETOF(MeshVertex, coord), params.vCount, GLTF::VEC3, GL_FLOAT, false, vMin, vMax); // 1 + gltf->addAccessor(1, sizeof(MeshVertex), params.vStart * sizeof(MeshVertex) + (int)OFFSETOF(MeshVertex, normal), params.vCount, GLTF::VEC3, GL_FLOAT); // 2 + gltf->addAccessor(1, sizeof(MeshVertex), params.vStart * sizeof(MeshVertex) + (int)OFFSETOF(MeshVertex, texCoord), params.vCount, GLTF::VEC2, GL_FLOAT); // 3 + gltf->addAccessor(1, sizeof(MeshVertex), params.vStart * sizeof(MeshVertex) + (int)OFFSETOF(MeshVertex, color), params.vCount, GLTF::VEC4, GL_UNSIGNED_BYTE, true); // 4 + + accessorIndex += 5; + } + + gltf->addSampler(GL_LINEAR, GL_LINEAR_MIPMAP_LINEAR, GL_REPEAT, GL_REPEAT); + gltf->addImage("rooms.bmp"); + gltf->addTexture("texture", 0, 0); + gltf->addMaterial("material", 0, 0, 1.0f, 0.0f); + + delete[] vertices; + delete[] indices; + + gltf->addBufferView(0, 0, indicesOffset, sizeof(MeshIndex) * iCount); // 0 + gltf->addBufferView(0, sizeof(MeshVertex), verticesOffset, sizeof(MeshVertex) * vCount); // 1 + + gltf->addBuffer(bufferData, bufferSize); // 0 + + delete[] bufferData; + + char *buffer = new char[gltf->getBufferSize()]; + int size = gltf->save(buffer); + delete gltf; + + fwrite(buffer, 1, size, file); + + delete[] buffer; + + fclose(file); + } + + void exportModel(IGame *game, const char *dir, TR::Model &model) { + TR::Level *level = game->getLevel(); + MeshBuilder *mesh = game->getMesh(); + + typedef uint32 MeshIndex; + + struct ModelVertex { + vec3 coord; + vec3 normal; + vec2 texCoord; ubyte4 joints; ubyte4 weights; }; - typedef uint32 ModelIndex; - char name[256]; - sprintf(name, "models/dump/%d.glb", int(model.type)); + sprintf(name, "%s/model_%d.glb", dir, int(model.type)); + + LOG("export model: %s\n", name); FILE *file = fopen(name, "wb"); if (!file) { @@ -61,6 +252,7 @@ namespace Extension { anim->setAnim(0); animRate = max((int)(anim->anims + anim->index)->frameRate, 1); animFrames = anim->framesCount / animRate; + ASSERT(animFrames > 0); } // get model geometry @@ -89,7 +281,7 @@ namespace Extension { int rotationOffset = translationOffset + animFrames * sizeof(vec3); int verticesOffset = rotationOffset + model.mCount * animFrames * sizeof(quat); int indicesOffset = verticesOffset + vCount * sizeof(ModelVertex); - int bufferSize = indicesOffset + iCount * sizeof(ModelIndex); + int bufferSize = indicesOffset + iCount * sizeof(MeshIndex); char *bufferData = new char[bufferSize]; @@ -113,11 +305,10 @@ namespace Extension { dst.texCoord = src.texCoord; dst.normal = dst.normal.normal(); - dst.coord = flip * dst.coord; + dst.coord = flip * (dst.coord * MESH_SCALE); dst.normal = flip * dst.normal; dst.texCoord *= (1.0f / 32767.0f); - dst.color = src.color; dst.joints = ubyte4(uint8(src.coord.w / 2), 0, 0, 0); dst.weights = ubyte4(255, 0, 0, 0); @@ -131,29 +322,28 @@ namespace Extension { } for (int i = 0; i < iCount; i++) { - ModelIndex &dst = ((ModelIndex*)(bufferData + indicesOffset))[i]; + MeshIndex &dst = ((MeshIndex*)(bufferData + indicesOffset))[i]; dst = indices[i]; } GLTF *gltf = new GLTF(); gltf->addSampler(GL_LINEAR, GL_LINEAR_MIPMAP_LINEAR, GL_REPEAT, GL_REPEAT); - gltf->addImage("objects.bmp"); + gltf->addImage("models.bmp"); gltf->addTexture("texture", 0, 0); gltf->addMaterial("material", 0, 0, 1.0f, 0.0f); delete[] vertices; delete[] indices; - gltf->addAccessor(0, 0, iCount, GLTF::SCALAR, GL_UNSIGNED_INT); // 0 - gltf->addAccessor(1, (int)OFFSETOF(ModelVertex, coord), vCount, GLTF::VEC3, GL_FLOAT, false, vMin, vMax); // 1 - gltf->addAccessor(1, (int)OFFSETOF(ModelVertex, normal), vCount, GLTF::VEC3, GL_FLOAT); // 2 - gltf->addAccessor(1, (int)OFFSETOF(ModelVertex, texCoord), vCount, GLTF::VEC2, GL_FLOAT); // 3 - //gltf->addAccessor(1, (int)OFFSETOF(ModelVertex, color), vCount, GLTF::VEC4, GL_UNSIGNED_BYTE); // TODO - gltf->addAccessor(1, (int)OFFSETOF(ModelVertex, joints), vCount, GLTF::VEC4, GL_UNSIGNED_BYTE); // 4 - gltf->addAccessor(1, (int)OFFSETOF(ModelVertex, weights), vCount, GLTF::VEC4, GL_UNSIGNED_BYTE, true); // 5 + gltf->addAccessor(0, sizeof(MeshIndex), 0, iCount, GLTF::SCALAR, GL_UNSIGNED_INT); // 0 + gltf->addAccessor(1, sizeof(ModelVertex), (int)OFFSETOF(ModelVertex, coord), vCount, GLTF::VEC3, GL_FLOAT, false, vMin, vMax); // 1 + gltf->addAccessor(1, sizeof(ModelVertex), (int)OFFSETOF(ModelVertex, normal), vCount, GLTF::VEC3, GL_FLOAT); // 2 + gltf->addAccessor(1, sizeof(ModelVertex), (int)OFFSETOF(ModelVertex, texCoord), vCount, GLTF::VEC2, GL_FLOAT); // 3 + gltf->addAccessor(1, sizeof(ModelVertex), (int)OFFSETOF(ModelVertex, joints), vCount, GLTF::VEC4, GL_UNSIGNED_BYTE); // 4 + gltf->addAccessor(1, sizeof(ModelVertex), (int)OFFSETOF(ModelVertex, weights), vCount, GLTF::VEC4, GL_UNSIGNED_BYTE, true); // 5 - gltf->addBufferView(0, 0, indicesOffset, sizeof(ModelIndex) * iCount); // 0 + gltf->addBufferView(0, 0, indicesOffset, sizeof(MeshIndex) * iCount); // 0 gltf->addBufferView(0, sizeof(ModelVertex), verticesOffset, sizeof(ModelVertex) * vCount); // 1 sprintf(name, "%d_mesh", int(model.type)); @@ -182,13 +372,13 @@ namespace Extension { timeline[i] = i * animRate / 30.0f; } gltf->addBufferView(0, 0, timelineOffset, animFrames * sizeof(float)); // 2 - gltf->addAccessor(2, 0, animFrames, GLTF::SCALAR, GL_FLOAT, false, vec4(timeline[0], 0, 0, 0), vec4(timeline[animFrames - 1], 0, 0, 1)); // 6 + gltf->addAccessor(2, 0, 0, animFrames, GLTF::SCALAR, GL_FLOAT, false, vec4(timeline[0], 0, 0, 0), vec4(timeline[animFrames - 1], 0, 0, 1)); // 6 } { // root translation (output) vec3 *translation = (vec3*)(bufferData + translationOffset); gltf->addBufferView(0, 0, translationOffset, animFrames * sizeof(vec3)); // 3 - gltf->addAccessor(3, 0, animFrames, GLTF::VEC3, GL_FLOAT); // 7+ + gltf->addAccessor(3, 0, 0, animFrames, GLTF::VEC3, GL_FLOAT); // 7+ JSON *sampler = samplers->add(JSON::OBJECT); // 0 sampler->add("input", 6); // timeline @@ -203,8 +393,7 @@ namespace Extension { for (int j = 0; j < animFrames; j++) { TR::AnimFrame *frame = anim->getFrame(anim->anims + anim->index, j); - translation[j] = frame->pos; - translation[j] = flip * translation[j]; + translation[j] = flip * (vec3((float)frame->pos.x, (float)frame->pos.y, (float)frame->pos.z) * MESH_SCALE); } } @@ -227,7 +416,7 @@ namespace Extension { *ptr = matrix.getRot(); ptr++; } - gltf->addAccessor(4, i * animFrames * sizeof(quat), animFrames, GLTF::VEC4, GL_FLOAT); // 8+ + gltf->addAccessor(4, 0, i * animFrames * sizeof(quat), animFrames, GLTF::VEC4, GL_FLOAT); // 8+ JSON *sampler = samplers->add(JSON::OBJECT); // 1+ sampler->add("input", 6); // timeline @@ -271,7 +460,7 @@ namespace Extension { for (int i = 0; i < model.mCount; i++) { sprintf(name, "joint_%d", i + 1); - JSON* node = gltf->addNode(name, -1, -1, jointPos, quat(0, 0, 0, 1)); + JSON* node = gltf->addNode(name, -1, -1, jointPos * MESH_SCALE, quat(0, 0, 0, 1)); JSON* children = new JSON(JSON::ARRAY, "children"); for (int j = 0; j < model.mCount; j++) { @@ -287,13 +476,13 @@ namespace Extension { } joints[i] = i + 1; + TR::Node &t = *((TR::Node*)&level->nodesData[model.node] + i); jointPos = flip * vec3((float)t.x, (float)t.y, (float)t.z); } gltf->addSkin("skin", -1, 1, joints, model.mCount); - char *buffer = new char[gltf->getBufferSize()]; int size = gltf->save(buffer); delete gltf; @@ -302,24 +491,27 @@ namespace Extension { delete[] buffer; - LOG("export model: %s\n", name); - fclose(file); } void exportGeometry(IGame *game, Texture *atlasRooms, Texture *atlasObjects, Texture *atlasSprites) { - CreateDirectory("models", NULL); - CreateDirectory("models/dump/", NULL); - exportTexture("models/dump/rooms", atlasRooms); - exportTexture("models/dump/objects", atlasObjects); - exportTexture("models/dump/sprites", atlasSprites); + char dir[256]; + sprintf(dir, "dump/%s", TR::LEVEL_INFO[game->getLevel()->id].name); + + CreateDirectory("dump", NULL); + CreateDirectory(dir, NULL); + + exportTexture(dir, "rooms", atlasRooms); + exportTexture(dir, "models", atlasObjects); TR::Level *level = game->getLevel(); MeshBuilder *mesh = game->getMesh(); + exportRooms(game, dir); + for (int i = 0; i < level->modelsCount; i++) { - exportModel(game, level->models[i]); + exportModel(game, dir, level->models[i]); } } #endif diff --git a/src/gapi/gl.h b/src/gapi/gl.h index 8baf60f0..64e635df 100644 --- a/src/gapi/gl.h +++ b/src/gapi/gl.h @@ -67,61 +67,61 @@ #include #if defined(_GAPI_GLES) // Default in SDL2 is GLES3. If we want GLES2, pass -D_GAPI_GLES2. - #if defined (_GAPI_GLES2) // We want GLES2 on SDL2 - #include - #include - - #define GL_CLAMP_TO_BORDER 0x812D - #define GL_TEXTURE_BORDER_COLOR 0x1004 - - #define GL_TEXTURE_COMPARE_MODE 0x884C - #define GL_TEXTURE_COMPARE_FUNC 0x884D - #define GL_COMPARE_REF_TO_TEXTURE 0x884E - - #undef GL_RG - #undef GL_RG32F - #undef GL_RG16F - #undef GL_RGBA32F - #undef GL_RGBA16F - #undef GL_HALF_FLOAT - - #define GL_RG GL_RGBA - #define GL_RGBA32F GL_RGBA - #define GL_RGBA16F GL_RGBA - #define GL_RG32F GL_RGBA - #define GL_RG16F GL_RGBA - #define GL_HALF_FLOAT GL_HALF_FLOAT_OES - - #define GL_TEXTURE_WRAP_R 0 - #define GL_DEPTH_STENCIL GL_DEPTH_STENCIL_OES - #define GL_UNSIGNED_INT_24_8 GL_UNSIGNED_INT_24_8_OES - //We need this on GLES2, too. - #define GL_TEXTURE_MAX_LEVEL GL_TEXTURE_MAX_LEVEL_APPLE - - #define glTexImage3D(...) 0 - #ifndef GL_TEXTURE_3D // WUUUUUT!? - #define GL_TEXTURE_3D GL_TEXTURE_3D_OES - #endif - - #define GL_PROGRAM_BINARY_LENGTH GL_PROGRAM_BINARY_LENGTH_OES + #if defined (_GAPI_GLES2) // We want GLES2 on SDL2 + #include + #include + + #define GL_CLAMP_TO_BORDER 0x812D + #define GL_TEXTURE_BORDER_COLOR 0x1004 + + #define GL_TEXTURE_COMPARE_MODE 0x884C + #define GL_TEXTURE_COMPARE_FUNC 0x884D + #define GL_COMPARE_REF_TO_TEXTURE 0x884E + + #undef GL_RG + #undef GL_RG32F + #undef GL_RG16F + #undef GL_RGBA32F + #undef GL_RGBA16F + #undef GL_HALF_FLOAT + + #define GL_RG GL_RGBA + #define GL_RGBA32F GL_RGBA + #define GL_RGBA16F GL_RGBA + #define GL_RG32F GL_RGBA + #define GL_RG16F GL_RGBA + #define GL_HALF_FLOAT GL_HALF_FLOAT_OES + + #define GL_TEXTURE_WRAP_R 0 + #define GL_DEPTH_STENCIL GL_DEPTH_STENCIL_OES + #define GL_UNSIGNED_INT_24_8 GL_UNSIGNED_INT_24_8_OES + //We need this on GLES2, too. + #define GL_TEXTURE_MAX_LEVEL GL_TEXTURE_MAX_LEVEL_APPLE + + #define glTexImage3D(...) 0 + #ifndef GL_TEXTURE_3D // WUUUUUT!? + #define GL_TEXTURE_3D GL_TEXTURE_3D_OES + #endif + + #define GL_PROGRAM_BINARY_LENGTH GL_PROGRAM_BINARY_LENGTH_OES #else // We want GLES3 on SDL2 - #include - #include - #include + #include + #include + #include #endif //GAPI_GLES2 - // These are needed for both GLES2 and GLES3 on SDL2 - #define glGenVertexArrays(...) - #define glDeleteVertexArrays(...) - #define glBindVertexArray(...) - #define glGetProgramBinary(...) - #define glProgramBinary(...) - - #define PFNGLGENVERTEXARRAYSPROC PFNGLGENVERTEXARRAYSOESPROC - #define PFNGLDELETEVERTEXARRAYSPROC PFNGLDELETEVERTEXARRAYSOESPROC - #define PFNGLBINDVERTEXARRAYPROC PFNGLBINDVERTEXARRAYOESPROC - #define PFNGLGETPROGRAMBINARYPROC PFNGLGETPROGRAMBINARYOESPROC - #define PFNGLPROGRAMBINARYPROC PFNGLPROGRAMBINARYOESPROC + // These are needed for both GLES2 and GLES3 on SDL2 + #define glGenVertexArrays(...) + #define glDeleteVertexArrays(...) + #define glBindVertexArray(...) + #define glGetProgramBinary(...) + #define glProgramBinary(...) + + #define PFNGLGENVERTEXARRAYSPROC PFNGLGENVERTEXARRAYSOESPROC + #define PFNGLDELETEVERTEXARRAYSPROC PFNGLDELETEVERTEXARRAYSOESPROC + #define PFNGLBINDVERTEXARRAYPROC PFNGLBINDVERTEXARRAYOESPROC + #define PFNGLGETPROGRAMBINARYPROC PFNGLGETPROGRAMBINARYOESPROC + #define PFNGLPROGRAMBINARYPROC PFNGLPROGRAMBINARYOESPROC #else // We want OpenGL on SDL2, not GLES #include diff --git a/src/gltf.h b/src/gltf.h index 6430cca5..b5e7c8e4 100644 --- a/src/gltf.h +++ b/src/gltf.h @@ -26,9 +26,9 @@ struct GLTF { JSON *textures; JSON *materials; JSON *nodes; + JSON *scenes; JSON *skins; JSON *animations; - JSON *scenes; char *binaryData; int binarySize; @@ -46,9 +46,9 @@ struct GLTF { accessors = root->add(JSON::ARRAY, "accessors"); meshes = root->add(JSON::ARRAY, "meshes"); nodes = root->add(JSON::ARRAY, "nodes"); - skins = root->add(JSON::ARRAY, "skins"); - animations = root->add(JSON::ARRAY, "animations"); scenes = root->add(JSON::ARRAY, "scenes"); + skins = NULL;//root->add(JSON::ARRAY, "skins"); + animations = NULL;//root->add(JSON::ARRAY, "animations"); asset->add("generator", "OpenLara"); asset->add("version", "2.0"); @@ -120,13 +120,17 @@ struct GLTF { return header->length; } - JSON* addAccessor(int bufferView, int byteOffset, int count, AccessorType type, int format, bool normalized = false, const vec4 &vMin = vec4(0.0f), const vec4 &vMax = vec4(0.0f)) { + JSON* addAccessor(int bufferView, int byteStride, int byteOffset, int count, AccessorType type, int format, bool normalized = false, const vec4 &vMin = vec4(0.0f), const vec4 &vMax = vec4(0.0f)) { static const char *AccessorTypeName[ACCESSOR_TYPE_MAX] = { ACCESSOR_TYPES(DECL_STR) }; JSON *item = accessors->add(JSON::OBJECT); item->add("bufferView", bufferView); + if (byteStride) { + //item->add("byteStride", byteStride); + } + if (byteOffset) { item->add("byteOffset", byteOffset); } @@ -280,6 +284,10 @@ struct GLTF { } JSON *addSkin(const char *name, int inverseBindMatrices, int skeleton, int *joints, int jointsCount) { + if (!skins) { + skins = root->add(JSON::ARRAY, "skins"); + } + JSON *item = skins->add(JSON::OBJECT); if (name) { @@ -301,6 +309,9 @@ struct GLTF { } JSON* addAnimation(const char *name, JSON **samplers, JSON **channels) { + if (!animations) { + animations = root->add(JSON::ARRAY, "animations"); + } JSON *item = animations->add(JSON::OBJECT); if (name) item->add("name", name); diff --git a/src/lang.h b/src/lang.h index 2c0738e1..b57c9fc9 100644 --- a/src/lang.h +++ b/src/lang.h @@ -273,7 +273,7 @@ enum StringID { , "Suomi" \ , "{Cesky" \ , "\x11\x02\x8A\x02\x6C\x01\x54\x03\x02\xFF\xFF" \ - , "Magyar" + , "Magyar" #define LANG_PREFIXES "_EN", "_FR", "_DE", "_ES", "_IT", "_PL", "_PT", "_RU", "_JA", "_GR", "_FI", "_CZ", "_CN", "_HU" @@ -341,7 +341,7 @@ void ensureLanguage(int lang) { ASSERT(COUNT(STR_CZ) == STR_MAX); ASSERT(COUNT(STR_CN) == STR_MAX); ASSERT(COUNT(STR_HU) == STR_MAX); - + lang += STR_LANG_EN; switch (lang) { diff --git a/src/mesh.h b/src/mesh.h index cf6e17e6..20d7edf7 100644 --- a/src/mesh.h +++ b/src/mesh.h @@ -348,8 +348,8 @@ struct MeshBuilder { Geometry &geom = range.geometry[transp]; - // rooms geometry - buildRoom(geom, range.dynamic[transp], blendMask, room, level, indices, vertices, iCount, vCount, vStartRoom); + // room geometry + buildRoom(geom, range.dynamic + transp, blendMask, room, level, indices, vertices, iCount, vCount, vStartRoom); // static meshes for (int j = 0; j < room.meshesCount; j++) { @@ -1004,11 +1004,13 @@ struct MeshBuilder { return 1 << texAttribute; } - void buildRoom(Geometry &geom, Dynamic &dyn, int blendMask, const TR::Room &room, TR::Level *level, Index *indices, Vertex *vertices, int &iCount, int &vCount, int vStart) { + void buildRoom(Geometry &geom, Dynamic *dyn, int blendMask, const TR::Room &room, TR::Level *level, Index *indices, Vertex *vertices, int &iCount, int &vCount, int vStart) { const TR::Room::Data &d = room.data; - dyn.count = 0; - dyn.faces = NULL; + if (dyn) { + dyn->count = 0; + dyn->faces = NULL; + } for (int j = 0; j < d.fCount; j++) { TR::Face &f = d.faces[j]; @@ -1023,9 +1025,9 @@ struct MeshBuilder { if (!(blendMask & getBlendMask(t.attribute))) continue; - if (t.animated) { - ASSERT(dyn.count < 0xFFFF); - dyn.count++; + if (dyn && t.animated) { + ASSERT(dyn->count < 0xFFFF); + dyn->count++; continue; } @@ -1036,9 +1038,9 @@ struct MeshBuilder { } // if room has non-static polygons, fill the list of dynamic faces - if (dyn.count) { - dyn.faces = new uint16[dyn.count]; - dyn.count = 0; + if (dyn && dyn->count) { + dyn->faces = new uint16[dyn->count]; + dyn->count = 0; for (int j = 0; j < d.fCount; j++) { TR::Face &f = d.faces[j]; TR::TextureInfo &t = level->objectTextures[f.flags.texture]; @@ -1049,7 +1051,7 @@ struct MeshBuilder { continue; if (t.animated) - dyn.faces[dyn.count++] = j; + dyn->faces[dyn->count++] = j; } } } From d98f62cf721d22ea7373370c12aeeacca503a67c Mon Sep 17 00:00:00 2001 From: XProger Date: Tue, 12 Jan 2021 11:59:54 +0300 Subject: [PATCH 029/190] fix depth buffer size on AMD --- src/platform/win/main.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/platform/win/main.cpp b/src/platform/win/main.cpp index 2fc987ac..79e6f41f 100644 --- a/src/platform/win/main.cpp +++ b/src/platform/win/main.cpp @@ -455,6 +455,7 @@ HWND hWnd; WGL_ACCELERATION_ARB, WGL_FULL_ACCELERATION_ARB, WGL_COLOR_BITS_ARB, 32, WGL_ALPHA_BITS_ARB, 8, + WGL_DEPTH_BITS_ARB, 24, 0 }; From 28b336ea3db4f933af5b1349a3ac35d58b3773d3 Mon Sep 17 00:00:00 2001 From: Leo-89 <62290297+Leo-89@users.noreply.github.com> Date: Tue, 12 Jan 2021 10:02:46 +0100 Subject: [PATCH 030/190] Update it.h (#292) Hi, playing and testing the game during these Xmas holidays I thought to make my past translation a bit "smarter". --- src/lang/it.h | 210 +++++++++++++++++++++++++------------------------- 1 file changed, 105 insertions(+), 105 deletions(-) diff --git a/src/lang/it.h b/src/lang/it.h index 1c540ed0..bda883c8 100644 --- a/src/lang/it.h +++ b/src/lang/it.h @@ -5,7 +5,7 @@ const char *STR_IT[] = { "" // help - , "Caricamento..." + , "Caricamento in corso" , "Premi H per la lista dei comandi" , helpText , "%s@@@" @@ -13,17 +13,17 @@ const char *STR_IT[] = { "" "OGGETTI RACCOLTI %d@@" "SEGRETI %d di %d@@" "TEMPO IMPIEGATO %s" - , "Salvataggio in corso..." - , "Salvataggio completato!" - , "ERRORE DURANTE IL SALVATAGGIO!" + , "Salvataggio in corso" + , "Salvataggio completato" + , "ERRORE DURANTE IL SALVATAGGIO" , "S$I" , "NO" - , "Off" - , "On" - , "Off" + , "Spento" + , "Acceso" + , "Spento" , "Doppio schermo" , "Anaglifo" - , "Visione compressa" + , "Compressione" , "VR" , "Basso" , "Medio" @@ -65,30 +65,30 @@ const char *STR_IT[] = { "" , "Esci dal gioco" , "Selezione del livello" // detail options - , "Imposta i Dettagli" + , "Livello di Dettaglio" , "Textures" , "Illuminazione" , "Ombre" , "Acqua" , "VSync" , "Stereo" - , "Oggetti Semplificati" + , "Oggetti semplificati" , "Risoluzione" , STR_SCALE // sound options - , "Imposta il Volume" + , "Impostazioni audio" , "Riverbero" , "Sottotitoli" , "Lingua" // controls options - , "Controlli Personalizzati" + , "Personalizzazione comandi" , "Tastiera" , "Gamepad" , "Vibrazione" , "Retargeting" , "Mira multipla" // controls - , "Sinistra", "Destra", "Correre", "Indietro", "Saltare", "Camminare", "Azione", "Estrarre l'Arma", "Guardare", "Accovacciarsi", "Scattare", "Capriola", "Inventario", "Start" + , "Sinistra", "Destra", "Avanti", "Indietro", "Salto", "Camminata", "Azione", "Estrarre l'arma", "Osservare", "Accovacciarsi", "Scatto", "Capriola", "Inventario", "Start" , STR_KEYS // inventory items , "Sconosciuto" @@ -97,8 +97,8 @@ const char *STR_IT[] = { "" , "Fucile" , "Magnum" , "Uzi" - , "Munizioni Pistola" - , "Munizioni Fucile" + , "Munizioni pistola" + , "Munizioni fucile" , "Munizioni Magnum" , "Munizioni Uzi" , "Medikit piccolo" @@ -120,7 +120,7 @@ const char *STR_IT[] = { "" , "Puzzle" , "Idolo d'oro" , "Barra d'oro" - , "Ruota Dentata" + , "Ruota dentata" , "Fusibile" , "Ankh" , "Occhio di Horus" @@ -129,57 +129,57 @@ const char *STR_IT[] = { "" , "Chiave della piramide" // TR1 subtitles /* CAFE */ , - "[43500]Cosa deve fare un uomo per ottenere@da te questo tipo di attenzioni?" - "[47500]Difficile dirlo con precisione,@ma sembra che tu sia partito bene." - "[50000]Bene, magnifico. Ma la verit$a@$e che non sono io che ti sto cercando." + "[43500]Che cosa deve fare un uomo@per ricevere da te questo genere di attenzioni?" + "[47500]Difficile dirlo con certezza,@ma forse sei sulla buona strada." + "[50000]Ottimo allora. Anche se a dire il vero@$non sono io che ti sto cercando." "[54500]No?" - "[55000]No. Sono qui per Miss Jacqueline Natla,@della Natla Technologies." - "[59000]Hai presente, creatrice di@cose brillanti e spettacolari?" - "[64500]Sta zitto, Larson." - "[66000]Mmm." + "[55000]No. Sono qui per conto di Miss Jacqueline Natla,@della Natla Technologies." + "[59000]Hai presente la creatrice di cose@brillanti e spettacolari?" + "[64500]Sta' zitto, Larson." + "[66000]Mmm.." "[68000]Rifatti gli occhi, Lara." "[70500]Non senti gi$a il tintinnio del tuo portamonete?" - "[73500]Mi dispiace. Lavoro solo per sport." + "[73500]Mi spiace; Lavoro solo per divertirmi." "[76000]Allora non potrai non amare questo immenso parco giochi." - "[78000]Peru'. Vaste catene montuose da attraversare.@Muri di ghiaccio trasparente. Dirupi rocciosi. Venti selvaggi." - "[87500]E ci sarebbe questo gingillo:@un antichissimo artefatto dai poteri mistici" + "[78000]Peru'. Sterminate catene montuose da valicare.@Muri di ghiaccio trasparente. Dirupi rocciosi. Venti sferzanti." + "[87500]E poi ci sarebbe questo gingillo:@un antichissimo artefatto dai poteri mistici" "[92500]sepolto nella tomba perduta di Qualopec." - "[96000]E' ci$o che mi interessa." - "[98000]Potresti partire gi$a domani.@O hai gi$a altri impegni per domani?" + "[96000]E' tutto ci$o che mi interessa." + "[98000]Potresti partire gi$a domani.@O avevi in previsione altri programmi?" /* LIFT */ , - "[49000]Sono stato riassegnato alle rovine di St. Francis,@nuove tentazioni mi tormentano." + "[49000]Sono stato assegnato alle rovine di St. Francis,@nuove tentazioni mi tormentano." "[53500]Tra i fratelli gira voce che sepolto@sotto il nostro monastero riposi il corpo di Tihocan," "[60000]uno dei tre leggendari sovrani@del continente perduto, Atlantide," - "[64500]e che con lui si trovi il suo frammento@dello Scion di Atlantide." - "[68000]L'amuleto diviso e detenuto tra i tre sovrani" - "[72500]che controlla poteri inimmaginabili.@Poteri che superano quelli dello stesso Creatore." - "[79000]Mi tremano le gambe al solo pensiero@che giaccia cos$i vicino al mio corpo mortale." - "[85500]Ogni notte cerco di rifuggire certe fantasie,@ma $e una sfida ardua." + "[64500]e che con lui si trovi il suo frammento@dello Scion atlantideo." + "[68000]L'amuleto diviso e spartito tra i tre sovrani" + "[72500]capace di controllare poteri inimmaginabili.@Poteri che superano quelli dello stesso Iddio." + "[79000]Mi tremano le gambe al solo pensiero@che giaccia talmente vicino al mio corpo mortale!" + "[85500]Ogni notte provo a rifuggire certe fantasie,@ma $e una sfida estremamente ardua." "[92000]" - "[93500]Pierre. Tsss. Che idiota." + "[93500]Pierre. Tsss. Che idiota!" /* CANYON */ , - "[13500]Sei appena giunta al capolinea." + "[13500]Sei appena giunta al capolinea!" "[16500]Salve." "[17500]Buon pomeriggio." "[20000]E cos$i hai lasciato Larson a bocca asciutta?" "[22500]Se cos$i si pu$o dire." - "[24000]Bene, le tue scorribande sono giunte al termine." + "[24000]Bene, le tue scorribande finiscono qui." "[27000]E' tempo di restituirmi ci$o che mi hai sottratto." "[30000]Diamo un'occhiata nel suo sacchetto per il pranzo." "[32000]" - "[42500]Ottimo! Uccidila!" + "[42500]Ottimo. Sbarazzatene!" "[45000]Hey!" "[48000]" - "[50500]Cretini!" + "[50500]Idioti!" "[53000]" "[62500]Andiamo." "[65000]" - "[136000]Che cavolo era quello?" + "[136000]Che diamine era quello?" "[138000]Cosa?" - "[138500]Quella cosa." - "[140500]Probabilmente era solo un pesce." - "[142500]Deve essere stato un pesce bello grosso, genio." - "[145000]Ragazzo, devi imparare a calmarti.@Torno dentro. Vieni?" + "[138500]Quella cosa.." + "[140500]Sar$a stato solo un pesce." + "[142500]Allora deve essere stato un pesce bello grosso, genio!" + "[145000]Ragazzo, vedi di darti una calmata!@Torno dentro. Vieni con me?" "[152000]" "[158000]Piano..." "[160000]Eccola qui." @@ -191,123 +191,123 @@ const char *STR_IT[] = { "" "[11500]Non ne avete il diritto! Io..." "[12500]Infrangendo le leggi che governano@e tutelano il nostro popolo" "[18500]e sfidando Tihocan e me con il tuo esercito." - "[23500]I nostri guerrieri hanno lasciato la nostra piramide" - "[27000]cosicch)e tu potessi usare - il suo potere creativo -@per la tua dissennata brama di distruzione." + "[23500]I nostri guerrieri hanno lasciato la piramide" + "[27000]cosicch)e tu potessi usare il suo potere creativo@per perseguire la tua dissennata brama di distruzione." "[33500]Dissennata!? Guardatevi!" - "[35500]Nessuno di voi possiede un briciolo@di inventiva nel suo cervello." + "[35500]Nessuno di voi possiede un briciolo di ambizione!" "[40500]Inetti!" "[41500]Facciamolo e basta." "[44000]Tihocan!" - "[45000]Hai usato il luogo sacro@come una fonte di piacere personale," + "[45000]Hai usato il nostro luogo sacro@come fonte di piacere personale," "[49500]come fosse una fabbrica di mostri." - "[51000]Sono dei sopravvissuti. Una nuova generazione." + "[51000]Sono dei sopravvissuti; una nuova generazione!" "[54000]Solo un mucchio di carcasse dilaniate ora." - "[56000]E tu. Verrai imprigionata nel limbo." + "[56000]E tu. Tu verrai imprigionata nel limbo." "[60000]Render$a le tue vene, cuore, gambe," - "[64000]e quella tua mente disturbata un tutt'uno col sangue congelato." - "[70000]Goditi la tua eterna disperazione, Natla." + "[64000]e quella tua mente schizzata un tutt'uno con il sangue gelido." + "[70000]Goditi la tua eterna disperazione, Natla!" "[73000]Neppure tu riposerai bene, o tantomeno il tuo@dannato continente di Atlantide!" /* 22 */ , "[04000]Di nuovo qui?" - "[05500]Anche tu - per la grande riapertura, suppongo." - "[09500]L'evoluzione fluisce - la selezione naturale scorre pi$u lenta che mai..." - "[13500]un rifornimento di carne fresca risveglier$a il nostro orgoglio identitario" + "[05500]Anche tu - per assistere al grande debutto, suppongo." + "[09500]L'evoluzione fluisce ma la selezione naturale scorre pi$u lenta che mai..." + "[13500]Un rifornimento di carne fresca risveglier$a il nostro orgoglio identitario" "[17500] - ci rinforzer$a e ci avvantagger$a..." - "[20500]Dar$a persino origine a nuove razze" + "[20500]..dar$a persino origine a nuove razze." "[22500]Una specie di evoluzione sotto steroidi, quindi." - "[24500]Un calcio nel sedere...@quei poveretti di Qualopec e Tihocan non immaginano neppure" + "[24500]Un bel calcio nel sedere...@quei poveretti di Qualopec e Tihocan non immaginano neppure" "[29500] - il cataclisma che colp$i Atlantide ha spazzato via una razza di rammolliti..." "[33500]facendoli ripiombare alle basi della sopravvivenza..." - "[37000]Non doveva andare in quel modo." + "[37000]..ma non doveva andare in quel modo!" "[39000]O in questo." "[40000]La schiusura avr$a inizio tra 15 secondi." - "[43000]Troppo tardi per tirarsi indietro adesso!" + "[43000]Troppo tardi ormai per tirarsi indietro!" "[45000]Non senza la mente dell'operazione!" "[47000]Noooo!" - "[50000]DIECI" - "[54000]CINQUE..." + "[50000]10" + "[54000]5..." "[55500]4...3...2..." - "[60000]UNO..." + "[60000]1..." /* 23 */ , "[00001]Bene, adesso hai la mia attenzione" "[02500]- Tuttavia, non sono cos$i sicura di avere la tua." "[05000]Hey?" - "[06000]Ti accopper$o e ti sbatter$o dietro la porta di una stalla." + "[06000]Ti accopper$o e ti sbatter$o dentro una stalla." "[09000]Come no." "[10000]Tu e quel dannato pezzo di Scion." - "[13000]Se lo vuoi a tutti i costi, provveder$o immediatamente a..." + "[13000]Se vuoi tenerlo ad ogni costo, provveder$o immediatamente a..." "[17000]Aspetta... stiamo parlando di questo artefatto?" - "[20000]Siamo sulla buona strada ... te lo inf..." - "[22000]Fermo - Scusa un secondo" - "[24000]- hai detto questo pezzo, - dove sono gli altri?" - "[26500]Miss Natla ha messo Pierre Dupont sulle loro tracce." + "[20000]Siamo sulla buona strada ... te lo farò ingoi..." + "[22000]Alt - Scusa un secondo" + "[24000]- hai detto questo pezzo - dove sono gli altri?" + "[26500]Miss Natla ha già messo Pierre Dupont sulle loro tracce." "[29500]E lui dove si trova adesso?" "[30500]Hah. Non sei abbastanza veloce per raggiungerlo." - "[34000]Credi di trattenermi con tutto questo blaterare?" - "[37000]Non so dove lo stiano conducendo le sue gambette da leprotto." + "[34000]Hai forse intenzione di trattenermi blaterando?" + "[37000]Non so dove lo stiano conducendo ora le sue gambette da leprotto." "[42000]Dovresti chiederlo a Miss Natla." "[46000]" "[51000]Grazie. Provveder$o." /* 24 */ , "" /* 25 */ , "[03500]Qui giace Tihocan" - "[05000]...uno dei due indiscussi sovrani di Atlantide..." - "[10000]Che anche dopo la rovina del continente..." - "[13000]...tent$o di stabilire l'ordine in queste lande desolate..." + "[05000]...uno dei leggendari sovrani di Atlantide..." + "[10000]..che anche dopo la rovina del continente..." + "[13000]...tent$o di ristabilire l'ordine in queste lande desolate..." "[19000]Egli mor$i senza un erede e la sua conoscenza non fu tramandata..." "[25500]Veglia su di noi, Tihocan." /* 26 */ , "Benvenuto nella mia casa." - /* 27 */ , "Usa i tasti di controllo per andare nella stanza della musica." + /* 27 */ , "Usa i comandi per andare nella stanza della musica." /* 28 */ , "Ok. Facciamo qualche acrobazia.@Premi il tasto Salto." - /* 29 */ , "Ora fallo di nuovo premendo in una@delle direzioni: salter$o da quella parte." - /* 30 */ , "Ecco l'atrio principale.@Scusa per quelle casse, ho imballato alcune cose@e il fattorino non $e ancora passato." - /* 31 */ , "Corri vicino a una cassa e, continuando a premere in Avanti,@premi Azione e io ci salter$o sopra." - /* 32 */ , "Una volta questa stanza era una sala da ballo,@ma io l'ho trasformata nella mia palestra personale.@Cosa ne pensi?@Ok, facciamo qualche esercizio." - /* 33 */ , "In effetti io non corro sempre.@Quando occorre essere cauta, cammino.@Tieni premuto il tasto Cammina e raggiungi la linea bianca." - /* 34 */ , "Con il tasto Cammina premuto, non cadr$o@nemmeno se mi spingi a farlo.@Avanti, prova pure." - /* 35 */ , "Se vuoi guardarti intorno, premi e tieni premuto il tasto Guarda.@Quindi premi nella direzione in cui vuoi guardare." - /* 36 */ , "Se un salto $e troppo lungo, posso aggrapparmi al@bordo per evitare una brutta caduta.@Cammina verso il bordo con la linea bianca@finch)e non posso pi$u andare avanti.@Quindi premi Salto, immediatamente seguito da Avanti,@e mentre sono in aria premi e tieni premuto il tasto Azione." - /* 37 */ , "Premi Avanti e mi arrampicher$o." - /* 38 */ , "Se faccio un salto con rincorsa, posso arrivare@a quella distanza, senza alcun problema." - /* 39 */ , "Cammina verso il bordo con la linea bianca finch)e non mi fermo.@Quindi rilascia il tasto Cammina e premi una@volta Avanti per farmi prendere la rincorsa.@Premi Avanti e subito dopo premi e tieni premuto il tasto Salto.@Non spiccher$o il salto fino all'ultimo secondo." - /* 40 */ , "Perfetto. Questo $e davvero grande.@Allora, fai un salto con rincorsa esattamente come prima,@ma questa volta, mentre sono in aria premi e tieni premuto@il tasto Azione per farmi aggrappare al bordo." + /* 29 */ , "Ora fallo di nuovo premendo un tasto direzionale;@salter$o verso quella parte." + /* 30 */ , "Ecco l'atrio principale.@Scusa per quelle casse; ho imballato alcune cose@ma come immaginerai il fattorino non $e ancora passato." + /* 31 */ , "Posizionami di fronte a una cassa e continuando a premere Avanti@premi il tasto Azione: mi ci arrampicher$o sopra." + /* 32 */ , "Una volta questa era una sala da ballo@ma io l'ho trasformata nella mia palestra personale. Che te ne pare?@Ok, ora facciamo qualche esercizio." + /* 33 */ , "Come immaginerai io non corro sempre;@quando serve una certa prudenza cammino.@Tieni premuto il tasto Camminata e raggiungi la linea bianca." + /* 34 */ , "Con il tasto Camminata premuto non cadr$o@nemmeno se mi spingi a farlo.@Avanti, prova pure!" + /* 35 */ , "Se vuoi guardarti intorno premi e tieni premuto il tasto Osserva;@infine con i tasti direzionali muovi la visuale verso il punto che vuoi." + /* 36 */ , "Se un salto $e troppo lungo posso aggrapparmi al bordo@per evitarmi una rovinosa caduta.@Cammina verso il bordo con la linea bianca finch)e non posso pi$u andare avanti;@quindi premi Salto, immediatamente seguito da Avanti@e mentre sono in aria premi e tieni premuto il tasto Azione." + /* 37 */ , "Premi il tasto Avanti e mi arrampicher$o." + /* 38 */ , "Facendo un salto con rincorsa arrivare a quella distanza@sarà sicuramente uno scherzo." + /* 39 */ , "Cammina verso il bordo con la linea bianca finch)e non mi fermo.@Quindi rilascia il tasto Cammina e premi una volta Indietro@in modo da farmi prendere la rincorsa.@Premi Avanti e subito dopo premi e tieni premuto il tasto Salto:@non salterò fino all'ultimo secondo." + /* 40 */ , "Perfetto; questo $e davvero un gran bel salto!@Allora: fai un salto con rincorsa esattamente come prima@ma questa volta mentre sono in aria premi e tieni premuto Azione@per permettermi di aggrapparmi al bordo." /* 41 */ , "Bene." - /* 42 */ , "Prova a saltare qui su.@Premi avanti e tieni premuto il tasto Azione." - /* 43 */ , "Non posso tirarmi su perch)e la fessura $e troppo stretta.@Per$o puoi premere verso destra: mi sposter$o@lateralmente finch)e c'$e spazio, poi premi avanti." - /* 44 */ , "Ottimo!@Se c'$e un grosso dislivello e non voglio farmi@male cadendo, posso calarmi gi$u lentamente." - /* 45 */ , "Premi una volta indietro e far$o un salto in quella direzione.@Poi, immediatamente, premi e tieni premuto il@tasto Azione: mi aggrapper$o al bordo per scendere." + /* 42 */ , "Ora prova a sollevarti qui!@Premi Avanti e tieni premuto il tasto Azione." + /* 43 */ , "Come vedi non posso tirarmi su perch)e la fessura $e troppo stretta,@per$o puoi spingere verso destra: mi sposter$o@lateralmente finch)e c'$e spazio. Infine premi Avanti." + /* 44 */ , "Ottimo!@Se c'$e un grosso dislivello e non voglio farmi male cadendo@posso calarmi gi$u lentamente." + /* 45 */ , "Premi una volta Indietro e far$o uno scatto in quella direzione.@Poi, immediatamente, premi e tieni premuto il@tasto Azione: mi aggrapper$o al bordo per scendere." /* 46 */ , "Ora rilascia." - /* 47 */ , "Andiamo a farci una nuotata." - /* 48 */ , "Usa il tasto Salto ed i tasti di controllo@per muovermi sott'acqua." - /* 49 */ , "Ah! Aria!@Usa avanti, sinistra e destra per muoverti quando sei a galla.@Premi Salto per immergerti e fare un'altra nuotata.@Oppure raggiungi il bordo e premi Azione per uscire." - /* 50 */ , "Perfetto. Ora sar$a meglio che mi tolga@questi vestiti bagnati." + /* 47 */ , "Adesso andiamo a farci una bella nuotata!" + /* 48 */ , "Usa il tasto Salto insieme ai tasti direzionali@per farmi muovere quando sono sott'acqua." + /* 49 */ , "Ah! Aria!@Premi Avanti, Indietro Sinistra e Destra per muovermi quando sono a galla.@Premi Salto per farmi immergere di nuovo,@altrimenti raggiungi il bordo e premi Avanti e Azione per farmi uscire." + /* 50 */ , "Perfetto! Ora però sar$a meglio che mi tolga@questi vestiti bagnati.." /* 51 */ , "Sorridi!" /* 52 */ , "Niente di personale." - /* 53 */ , "Maledetto, mi fai ancora venire il mal di testa.@E mi fai venire in mente delle brutte idee@ad esempio spararti!" - /* 54 */ , "Non puoi liberarti di me e della mia@stirpe cos$i facilmente, Lara." - /* 55 */ , "Un po' in ritardo per la premiazione, no?@Ma l'importante $e partecipare, giusto?" + /* 53 */ , "Essere maledetto, mi fai sempre venire il mal di testa.@E mi provochi anche brutti pensieri,@ad esempio quello di spararti!" + /* 54 */ , "Non puoi liberarti di me e della mia stirpe@cos$i facilmente, Lara!" + /* 55 */ , "Un po' in ritardo per la premiazione, no?@Ma l'importante in fin dei conti $e partecipare, sbaglio?" /* 56 */ , "Mi stai sparando?@Ehi, stai sparando a me?@Eh s$i, non c'$e nessun altro, stai proprio sparando a me!" // TR1 levels , "Casa di Lara" , "Caverne" , "Citt$a di Vilcabamba" - , "Valle perduta" + , "La Valle Perduta" , "Tomba di Qualopec" , "Rovine di St. Francis" , "Colosseo" , "Palazzo di Mida" - , "La Cisterna" + , "Cisterna" , "Tomba di Tihocan" , "Citt$a di Khamoon" , "Obelisco di Khamoon" , "Santuario dello Scion" , "Miniere di Natla" , "Atlantide" - , "La grande piramide" + , "La Grande Piramide" , "Ritorno in Egitto" , "Tempio del Gatto" , "Fortezza atlantidea" - , "L'Alveare" + , "L'alveare" // TR2 levels , "Casa di Lara" , "La Grande Muraglia" @@ -323,10 +323,10 @@ const char *STR_IT[] = { "" , "Pendici tibetante" , "Monastero di Barkhang" , "Catacombe di Talion" - , "Palazzo del ghiaccio" + , "Palazzo di ghiaccio" , "Tempio dello Xian" , "Isole galleggianti" - , "La tana del Drago" + , "La tana del drago" , "Casa dolce casa" // TR3 levels , "Casa di Lara" @@ -347,9 +347,9 @@ const char *STR_IT[] = { "" , "Area 51" , "Antartico" , "Miniere RX-Tech" - , "CittГ  perduta di Tinnos" + , "Citt$a perduta di Tinnos" , "Caverna del meteorite" - , "All Hallows" + , "Hallows" }; #endif From e7d84c6bea8a1e04a35bd9047a761df2fa964cac Mon Sep 17 00:00:00 2001 From: XProger Date: Tue, 12 Jan 2021 12:14:22 +0300 Subject: [PATCH 031/190] fix special characters for Italian translation --- src/lang/it.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/lang/it.h b/src/lang/it.h index bda883c8..00166297 100644 --- a/src/lang/it.h +++ b/src/lang/it.h @@ -237,10 +237,10 @@ const char *STR_IT[] = { "" "[10000]Tu e quel dannato pezzo di Scion." "[13000]Se vuoi tenerlo ad ogni costo, provveder$o immediatamente a..." "[17000]Aspetta... stiamo parlando di questo artefatto?" - "[20000]Siamo sulla buona strada ... te lo farò ingoi..." + "[20000]Siamo sulla buona strada ... te lo far$o ingoi..." "[22000]Alt - Scusa un secondo" "[24000]- hai detto questo pezzo - dove sono gli altri?" - "[26500]Miss Natla ha già messo Pierre Dupont sulle loro tracce." + "[26500]Miss Natla ha gi$a messo Pierre Dupont sulle loro tracce." "[29500]E lui dove si trova adesso?" "[30500]Hah. Non sei abbastanza veloce per raggiungerlo." "[34000]Hai forse intenzione di trattenermi blaterando?" @@ -268,8 +268,8 @@ const char *STR_IT[] = { "" /* 35 */ , "Se vuoi guardarti intorno premi e tieni premuto il tasto Osserva;@infine con i tasti direzionali muovi la visuale verso il punto che vuoi." /* 36 */ , "Se un salto $e troppo lungo posso aggrapparmi al bordo@per evitarmi una rovinosa caduta.@Cammina verso il bordo con la linea bianca finch)e non posso pi$u andare avanti;@quindi premi Salto, immediatamente seguito da Avanti@e mentre sono in aria premi e tieni premuto il tasto Azione." /* 37 */ , "Premi il tasto Avanti e mi arrampicher$o." - /* 38 */ , "Facendo un salto con rincorsa arrivare a quella distanza@sarà sicuramente uno scherzo." - /* 39 */ , "Cammina verso il bordo con la linea bianca finch)e non mi fermo.@Quindi rilascia il tasto Cammina e premi una volta Indietro@in modo da farmi prendere la rincorsa.@Premi Avanti e subito dopo premi e tieni premuto il tasto Salto:@non salterò fino all'ultimo secondo." + /* 38 */ , "Facendo un salto con rincorsa arrivare a quella distanza@sar$a sicuramente uno scherzo." + /* 39 */ , "Cammina verso il bordo con la linea bianca finch)e non mi fermo.@Quindi rilascia il tasto Cammina e premi una volta Indietro@in modo da farmi prendere la rincorsa.@Premi Avanti e subito dopo premi e tieni premuto il tasto Salto:@non salter$o fino all'ultimo secondo." /* 40 */ , "Perfetto; questo $e davvero un gran bel salto!@Allora: fai un salto con rincorsa esattamente come prima@ma questa volta mentre sono in aria premi e tieni premuto Azione@per permettermi di aggrapparmi al bordo." /* 41 */ , "Bene." /* 42 */ , "Ora prova a sollevarti qui!@Premi Avanti e tieni premuto il tasto Azione." @@ -280,7 +280,7 @@ const char *STR_IT[] = { "" /* 47 */ , "Adesso andiamo a farci una bella nuotata!" /* 48 */ , "Usa il tasto Salto insieme ai tasti direzionali@per farmi muovere quando sono sott'acqua." /* 49 */ , "Ah! Aria!@Premi Avanti, Indietro Sinistra e Destra per muovermi quando sono a galla.@Premi Salto per farmi immergere di nuovo,@altrimenti raggiungi il bordo e premi Avanti e Azione per farmi uscire." - /* 50 */ , "Perfetto! Ora però sar$a meglio che mi tolga@questi vestiti bagnati.." + /* 50 */ , "Perfetto! Ora per$o sar$a meglio che mi tolga@questi vestiti bagnati.." /* 51 */ , "Sorridi!" /* 52 */ , "Niente di personale." /* 53 */ , "Essere maledetto, mi fai sempre venire il mal di testa.@E mi provochi anche brutti pensieri,@ad esempio quello di spararti!" From 21f0b07f1b2dd46cec3177e974af1532debb3b5c Mon Sep 17 00:00:00 2001 From: Leo-89 <62290297+Leo-89@users.noreply.github.com> Date: Fri, 15 Jan 2021 04:59:37 +0100 Subject: [PATCH 032/190] Update it.h (#296) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Here it is! I swear it's the last change: I read everything 1000 times. 🙄 Thank you very much. 😉👠--- src/lang/it.h | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/src/lang/it.h b/src/lang/it.h index 00166297..d97b40fa 100644 --- a/src/lang/it.h +++ b/src/lang/it.h @@ -256,22 +256,22 @@ const char *STR_IT[] = { "" "[13000]...tent$o di ristabilire l'ordine in queste lande desolate..." "[19000]Egli mor$i senza un erede e la sua conoscenza non fu tramandata..." "[25500]Veglia su di noi, Tihocan." - /* 26 */ , "Benvenuto nella mia casa." - /* 27 */ , "Usa i comandi per andare nella stanza della musica." - /* 28 */ , "Ok. Facciamo qualche acrobazia.@Premi il tasto Salto." - /* 29 */ , "Ora fallo di nuovo premendo un tasto direzionale;@salter$o verso quella parte." - /* 30 */ , "Ecco l'atrio principale.@Scusa per quelle casse; ho imballato alcune cose@ma come immaginerai il fattorino non $e ancora passato." - /* 31 */ , "Posizionami di fronte a una cassa e continuando a premere Avanti@premi il tasto Azione: mi ci arrampicher$o sopra." - /* 32 */ , "Una volta questa era una sala da ballo@ma io l'ho trasformata nella mia palestra personale. Che te ne pare?@Ok, ora facciamo qualche esercizio." - /* 33 */ , "Come immaginerai io non corro sempre;@quando serve una certa prudenza cammino.@Tieni premuto il tasto Camminata e raggiungi la linea bianca." + /* 26 */ , "Benvenuto nella mia casa! Lascia che ti porti a dare un'occhiata in giro." + /* 27 */ , "Usa i tasti direzionali per spostarti nella sala della musica." + /* 28 */ , "Ok, facciamo qualche acrobazia!@Premi il tasto Salto." + /* 29 */ , "Ora fallo di nuovo premendo un tasto direzionale;@io salter$o da quella parte." + /* 30 */ , "Questo $e l'atrio principale!@Vorrai perdonare il disordine ma ho imballato alcune cose@e come immaginerai il fattorino non si $e ancora fatto vivo." + /* 31 */ , "Posizionami di fronte ad una cassa e continuando a premere Avanti@premi il tasto Azione: mi ci arrampicher$o sopra." + /* 32 */ , "Una volta questa era la sala da ballo@ma io l'ho trasformata nella mia palestra personale; Che te ne pare?@Bene, facciamo qualche esercizio!" + /* 33 */ , "Ovviamente io non corro sempre;@quando serve una certa prudenza cammino.@Tieni premuto il tasto Camminata e raggiungi la linea bianca." /* 34 */ , "Con il tasto Camminata premuto non cadr$o@nemmeno se mi spingi a farlo.@Avanti, prova pure!" /* 35 */ , "Se vuoi guardarti intorno premi e tieni premuto il tasto Osserva;@infine con i tasti direzionali muovi la visuale verso il punto che vuoi." - /* 36 */ , "Se un salto $e troppo lungo posso aggrapparmi al bordo@per evitarmi una rovinosa caduta.@Cammina verso il bordo con la linea bianca finch)e non posso pi$u andare avanti;@quindi premi Salto, immediatamente seguito da Avanti@e mentre sono in aria premi e tieni premuto il tasto Azione." - /* 37 */ , "Premi il tasto Avanti e mi arrampicher$o." - /* 38 */ , "Facendo un salto con rincorsa arrivare a quella distanza@sar$a sicuramente uno scherzo." + /* 36 */ , "Se un salto $e troppo lungo posso aggrapparmi al bordo@evitando una rovinosa caduta.@Cammina verso il bordo con la linea bianca finch)e non posso pi$u andare avanti;@quindi premi Salto, immediatamente seguito da Avanti@e mentre sono in aria premi e tieni premuto il tasto Azione." + /* 37 */ , "Adesso premi il tasto Avanti e mi arrampicher$o." + /* 38 */ , "Facendo un salto con rincorsa arrivare a quella distanza@sar$a sicuramente uno scherzo!" /* 39 */ , "Cammina verso il bordo con la linea bianca finch)e non mi fermo.@Quindi rilascia il tasto Cammina e premi una volta Indietro@in modo da farmi prendere la rincorsa.@Premi Avanti e subito dopo premi e tieni premuto il tasto Salto:@non salter$o fino all'ultimo secondo." - /* 40 */ , "Perfetto; questo $e davvero un gran bel salto!@Allora: fai un salto con rincorsa esattamente come prima@ma questa volta mentre sono in aria premi e tieni premuto Azione@per permettermi di aggrapparmi al bordo." - /* 41 */ , "Bene." + /* 40 */ , "Perfetto; questo $e davvero un gran bel salto!@Allora: fai un salto con rincorsa esattamente come prima@ma questa volta mentre sono in aria premi e tieni premuto Azione@per farmi aggrappare al bordo." + /* 41 */ , "Bene!" /* 42 */ , "Ora prova a sollevarti qui!@Premi Avanti e tieni premuto il tasto Azione." /* 43 */ , "Come vedi non posso tirarmi su perch)e la fessura $e troppo stretta,@per$o puoi spingere verso destra: mi sposter$o@lateralmente finch)e c'$e spazio. Infine premi Avanti." /* 44 */ , "Ottimo!@Se c'$e un grosso dislivello e non voglio farmi male cadendo@posso calarmi gi$u lentamente." @@ -279,7 +279,7 @@ const char *STR_IT[] = { "" /* 46 */ , "Ora rilascia." /* 47 */ , "Adesso andiamo a farci una bella nuotata!" /* 48 */ , "Usa il tasto Salto insieme ai tasti direzionali@per farmi muovere quando sono sott'acqua." - /* 49 */ , "Ah! Aria!@Premi Avanti, Indietro Sinistra e Destra per muovermi quando sono a galla.@Premi Salto per farmi immergere di nuovo,@altrimenti raggiungi il bordo e premi Avanti e Azione per farmi uscire." + /* 49 */ , "Ah! Aria!@Premi i tasti direzionali per muovermi quando sono a galla.@Premi Salto per farmi immergere di nuovo,@altrimenti raggiungi il bordo e premi Avanti e Azione per farmi uscire." /* 50 */ , "Perfetto! Ora per$o sar$a meglio che mi tolga@questi vestiti bagnati.." /* 51 */ , "Sorridi!" /* 52 */ , "Niente di personale." From f19ff9813e78aa04da43e9a19d1412ed4599deba Mon Sep 17 00:00:00 2001 From: XProger Date: Sun, 17 Jan 2021 07:34:54 +0300 Subject: [PATCH 033/190] fix GLSL version for OpenGL 3.2 --- src/gapi/gl.h | 36 ++++++++++++++++++++++++++++-------- src/platform/win/main.cpp | 2 ++ 2 files changed, 30 insertions(+), 8 deletions(-) diff --git a/src/gapi/gl.h b/src/gapi/gl.h index 64e635df..10322f59 100644 --- a/src/gapi/gl.h +++ b/src/gapi/gl.h @@ -496,6 +496,8 @@ namespace GAPI { char GLSL_HEADER_VERT[512]; char GLSL_HEADER_FRAG[512]; + bool GL_VER_3 = false; + // Shader #ifndef FFP const char SHADER_COMPOSE[] = @@ -1424,14 +1426,32 @@ namespace GAPI { strcat(GLSL_HEADER_FRAG, "#define sampler2DShadow lowp sampler2DShadow\n"); } #else - // vertex - strcat(GLSL_HEADER_VERT, "#version 110\n" - "#define VERTEX\n"); - // fragment - strcat(GLSL_HEADER_FRAG, "#version 110\n"); - strcat(GLSL_HEADER_FRAG, extHeader); - strcat(GLSL_HEADER_FRAG, "#define FRAGMENT\n" - "#define fragColor gl_FragColor\n"); + if (GL_VER_3) { + strcat(GLSL_HEADER_VERT, "#version 150\n" + "#define VERTEX\n" + "#define varying out\n" + "#define attribute in\n" + "#define texture2D texture\n"); + // fragment + strcat(GLSL_HEADER_FRAG, "#version 150\n"); + strcat(GLSL_HEADER_FRAG, extHeader); + strcat(GLSL_HEADER_FRAG, "#define FRAGMENT\n" + "#define varying in\n" + "#define texture2D texture\n" + "#define texture3D texture\n" + "#define textureCube texture\n" + "#define shadow2DEXT texture\n" + "out vec4 fragColor;\n"); + } else { + // vertex + strcat(GLSL_HEADER_VERT, "#version 110\n" + "#define VERTEX\n"); + // fragment + strcat(GLSL_HEADER_FRAG, "#version 110\n"); + strcat(GLSL_HEADER_FRAG, extHeader); + strcat(GLSL_HEADER_FRAG, "#define FRAGMENT\n" + "#define fragColor gl_FragColor\n"); + } #endif ASSERT(strlen(GLSL_HEADER_VERT) < COUNT(GLSL_HEADER_VERT)); ASSERT(strlen(GLSL_HEADER_FRAG) < COUNT(GLSL_HEADER_FRAG)); diff --git a/src/platform/win/main.cpp b/src/platform/win/main.cpp index 79e6f41f..da742b57 100644 --- a/src/platform/win/main.cpp +++ b/src/platform/win/main.cpp @@ -475,6 +475,8 @@ HWND hWnd; }; hRC = wglCreateContextAttribsARB(hDC, 0, contextAttribs); + + GAPI::GL_VER_3 = true; } else { int format = ChoosePixelFormat(hDC, &pfd); SetPixelFormat(hDC, format, &pfd); From 442e9056554c48bd5bfb31b026c317a0927cc737 Mon Sep 17 00:00:00 2001 From: XProger Date: Sun, 17 Jan 2021 18:44:02 +0300 Subject: [PATCH 034/190] fix default ambient audio tracks for some levels --- src/gameflow.h | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/src/gameflow.h b/src/gameflow.h index b6314693..5eab3e94 100644 --- a/src/gameflow.h +++ b/src/gameflow.h @@ -189,8 +189,8 @@ namespace TR { TRACK_TR1_CAVES = 5, TRACK_TR1_SECRET = 13, TRACK_TR1_CISTERN = 57, - TRACK_TR1_EGYPT = 58, - TRACK_TR1_MINE = 59, + TRACK_TR1_WIND = 58, + TRACK_TR1_PYRAMID = 59, TRACK_TR1_CUT_1 = 23, TRACK_TR1_CUT_2 = 25, TRACK_TR1_CUT_3 = 24, @@ -267,24 +267,24 @@ namespace TR { { "LEVEL3A" , STR_TR1_LEVEL3A , TRACK_TR1_CAVES , 5 }, { "LEVEL3B" , STR_TR1_LEVEL3B , TRACK_TR1_CAVES , 3 }, { "CUT1" , STR_EMPTY , TRACK_TR1_CUT_1 , 0 }, - { "LEVEL4" , STR_TR1_LEVEL4 , TRACK_TR1_CAVES , 4 }, - { "LEVEL5" , STR_TR1_LEVEL5 , TRACK_TR1_CAVES , 3 }, - { "LEVEL6" , STR_TR1_LEVEL6 , TRACK_TR1_CAVES , 3 }, + { "LEVEL4" , STR_TR1_LEVEL4 , TRACK_TR1_WIND , 4 }, + { "LEVEL5" , STR_TR1_LEVEL5 , TRACK_TR1_WIND , 3 }, + { "LEVEL6" , STR_TR1_LEVEL6 , TRACK_TR1_WIND , 3 }, { "LEVEL7A" , STR_TR1_LEVEL7A , TRACK_TR1_CISTERN , 3 }, { "LEVEL7B" , STR_TR1_LEVEL7B , TRACK_TR1_CISTERN , 2 }, { "CUT2" , STR_EMPTY , TRACK_TR1_CUT_2 , 0 }, - { "LEVEL8A" , STR_TR1_LEVEL8A , TRACK_TR1_EGYPT , 3 }, - { "LEVEL8B" , STR_TR1_LEVEL8B , TRACK_TR1_EGYPT , 3 }, - { "LEVEL8C" , STR_TR1_LEVEL8C , TRACK_TR1_EGYPT , 1 }, - { "LEVEL10A" , STR_TR1_LEVEL10A , TRACK_TR1_MINE , 3 }, + { "LEVEL8A" , STR_TR1_LEVEL8A , TRACK_TR1_WIND , 3 }, + { "LEVEL8B" , STR_TR1_LEVEL8B , TRACK_TR1_WIND , 3 }, + { "LEVEL8C" , STR_TR1_LEVEL8C , TRACK_TR1_WIND , 1 }, + { "LEVEL10A" , STR_TR1_LEVEL10A , TRACK_TR1_CISTERN , 3 }, { "CUT3" , STR_EMPTY , TRACK_TR1_CUT_3 , 0 }, - { "LEVEL10B" , STR_TR1_LEVEL10B , TRACK_TR1_MINE , 3 }, + { "LEVEL10B" , STR_TR1_LEVEL10B , TRACK_TR1_PYRAMID , 3 }, { "CUT4" , STR_EMPTY , TRACK_TR1_CUT_4 , 0 }, - { "LEVEL10C" , STR_TR1_LEVEL10C , TRACK_TR1_MINE , 3 }, - { "EGYPT" , STR_TR1_EGYPT , TRACK_TR1_EGYPT , 3 }, - { "CAT" , STR_TR1_CAT , TRACK_TR1_EGYPT , 4 }, - { "END" , STR_TR1_END , TRACK_TR1_EGYPT , 2 }, - { "END2" , STR_TR1_END2 , TRACK_TR1_EGYPT , 1 }, + { "LEVEL10C" , STR_TR1_LEVEL10C , TRACK_TR1_PYRAMID , 3 }, + { "EGYPT" , STR_TR1_EGYPT , TRACK_TR1_WIND , 3 }, + { "CAT" , STR_TR1_CAT , TRACK_TR1_WIND , 4 }, + { "END" , STR_TR1_END , TRACK_TR1_WIND , 2 }, + { "END2" , STR_TR1_END2 , TRACK_TR1_WIND , 1 }, // TR2 { "TITLE" , STR_EMPTY , TRACK_TR2_TITLE , 0 }, { "ASSAULT" , STR_TR2_ASSAULT , NO_TRACK , 0 }, From e69b6ecc5955db8ec3bbaf9ef591c9c430b4bc18 Mon Sep 17 00:00:00 2001 From: XProger Date: Mon, 25 Jan 2021 00:22:53 +0300 Subject: [PATCH 035/190] Swedish translation by Carl Lindmark --- src/inventory.h | 2 +- src/lang.h | 9 +- src/lang/glyph_ru.h | 249 +++++++-------- src/lang/glyph_ru.png | Bin 2018 -> 2035 bytes src/lang/sv.h | 355 ++++++++++++++++++++++ src/platform/nix/main.cpp | 1 + src/platform/rpi/main.cpp | 1 + src/platform/web/index.php | 2 + src/platform/win/OpenLara.vcxproj | 1 + src/platform/win/OpenLara.vcxproj.filters | 3 + src/platform/win/main.cpp | 1 + src/platform/xb1/main.cpp | 2 + src/ui.h | 15 +- 13 files changed, 508 insertions(+), 133 deletions(-) create mode 100644 src/lang/sv.h diff --git a/src/inventory.h b/src/inventory.h index 4cb4f34a..310a844a 100644 --- a/src/inventory.h +++ b/src/inventory.h @@ -190,7 +190,7 @@ static const OptionItem optSound[] = { OptionItem( OptionItem::TYPE_PARAM, STR_REVERBERATION, SETTINGS( audio.reverb ), STR_OFF, 0, 1 ), OptionItem( OptionItem::TYPE_PARAM, STR_OPT_SUBTITLES, SETTINGS( audio.subtitles ), STR_OFF, 0, 1 ), #ifndef FFP - OptionItem( OptionItem::TYPE_PARAM, STR_OPT_LANGUAGE, SETTINGS( audio.language ), STR_LANG_EN, 0, STR_LANG_HU - STR_LANG_EN ), + OptionItem( OptionItem::TYPE_PARAM, STR_OPT_LANGUAGE, SETTINGS( audio.language ), STR_LANG_EN, 0, STR_LANG_SV - STR_LANG_EN ), #endif }; diff --git a/src/lang.h b/src/lang.h index b57c9fc9..9f813d8b 100644 --- a/src/lang.h +++ b/src/lang.h @@ -39,6 +39,7 @@ enum StringID { , STR_LANG_CZ , STR_LANG_CN , STR_LANG_HU + , STR_LANG_SV , STR_APPLY , STR_GAMEPAD_1 , STR_GAMEPAD_2 @@ -273,9 +274,10 @@ enum StringID { , "Suomi" \ , "{Cesky" \ , "\x11\x02\x8A\x02\x6C\x01\x54\x03\x02\xFF\xFF" \ - , "Magyar" + , "Magyar" \ + , "Svenska" -#define LANG_PREFIXES "_EN", "_FR", "_DE", "_ES", "_IT", "_PL", "_PT", "_RU", "_JA", "_GR", "_FI", "_CZ", "_CN", "_HU" +#define LANG_PREFIXES "_EN", "_FR", "_DE", "_ES", "_IT", "_PL", "_PT", "_RU", "_JA", "_GR", "_FI", "_CZ", "_CN", "_HU", "_SV" #define STR_KEYS \ "NONE", "LEFT", "RIGHT", "UP", "DOWN", "SPACE", "TAB", "ENTER", "ESCAPE", "SHIFT", "CTRL", "ALT" \ @@ -323,6 +325,7 @@ const char *helpText = #include "lang/cz.h" #include "lang/cn.h" #include "lang/hu.h" +#include "lang/sv.h" char **STR = NULL; @@ -341,6 +344,7 @@ void ensureLanguage(int lang) { ASSERT(COUNT(STR_CZ) == STR_MAX); ASSERT(COUNT(STR_CN) == STR_MAX); ASSERT(COUNT(STR_HU) == STR_MAX); + ASSERT(COUNT(STR_SV) == STR_MAX); lang += STR_LANG_EN; @@ -358,6 +362,7 @@ void ensureLanguage(int lang) { case STR_LANG_CZ : STR = (char**)STR_CZ; break; case STR_LANG_CN : STR = (char**)STR_CN; break; case STR_LANG_HU : STR = (char**)STR_HU; break; + case STR_LANG_SV : STR = (char**)STR_SV; break; default : STR = (char**)STR_EN; break; } } diff --git a/src/lang/glyph_ru.h b/src/lang/glyph_ru.h index 64d1db28..8015f558 100644 --- a/src/lang/glyph_ru.h +++ b/src/lang/glyph_ru.h @@ -1,135 +1,136 @@ #ifndef __GLYPH_RU__ #define __GLYPH_RU__ -static unsigned int size_GLYPH_RU = 2018; +static unsigned int size_GLYPH_RU = 2035; static unsigned char GLYPH_RU[] = { 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x30, 0x08, 0x03, 0x00, 0x00, 0x00, 0xc9, 0xa1, 0x54, 0x4d, 0x00, 0x00, 0x00, 0x3f, 0x50, 0x4c, 0x54, 0x45, 0x00, 0x00, 0x00, 0x5a, 0x42, 0x00, 0xef, 0xc6, 0x73, 0xde, 0xa5, 0x63, 0xa5, 0x6b, 0x39, 0xb5, 0x84, 0x52, 0xce, 0x94, 0x5a, 0x73, 0x5a, - 0x29, 0x31, 0x08, 0x00, 0x8c, 0x5a, 0x29, 0xff, 0xef, 0x8c, 0x70, 0x5c, 0x2c, 0xa5, 0x7b, 0x4a, - 0xdc, 0xa0, 0x64, 0xff, 0xff, 0x9c, 0xff, 0xd6, 0x7b, 0x30, 0x0c, 0x04, 0xe8, 0xc0, 0x70, 0x58, - 0x44, 0x00, 0xc8, 0x90, 0x58, 0xb0, 0x80, 0x50, 0xfb, 0xc4, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x01, - 0x74, 0x52, 0x4e, 0x53, 0x00, 0x40, 0xe6, 0xd8, 0x66, 0x00, 0x00, 0x07, 0x51, 0x49, 0x44, 0x41, - 0x54, 0x78, 0x5e, 0xed, 0x9a, 0xe9, 0x92, 0xdb, 0x38, 0x0c, 0x84, 0xdd, 0x00, 0x4f, 0xf9, 0x98, - 0x23, 0xfb, 0xfe, 0xcf, 0xba, 0x04, 0x2d, 0xa8, 0x49, 0x45, 0xae, 0x78, 0x6a, 0xfd, 0x63, 0x6a, - 0x33, 0xc8, 0xd0, 0x4a, 0x83, 0x00, 0x45, 0x7c, 0xa1, 0x1d, 0x43, 0xc9, 0xe9, 0x7b, 0xdb, 0x8f, - 0xfd, 0x58, 0x35, 0x43, 0x7f, 0x79, 0x36, 0x9e, 0xf6, 0x4c, 0x42, 0xde, 0x8c, 0x9a, 0x8e, 0xd1, - 0x45, 0x71, 0xea, 0xc3, 0x5d, 0x98, 0x36, 0xe7, 0x77, 0x1e, 0x36, 0xc0, 0xed, 0x50, 0x50, 0x33, - 0x6a, 0x0c, 0xa7, 0x5a, 0x16, 0x89, 0xe8, 0x2f, 0xd3, 0xfd, 0xf3, 0x71, 0xc1, 0x3d, 0x1e, 0x8b, - 0x2c, 0x6d, 0xa8, 0x69, 0x56, 0x32, 0xed, 0x8f, 0x80, 0xb2, 0x2e, 0x2d, 0xa5, 0x99, 0x29, 0xd7, - 0x74, 0x98, 0x67, 0x31, 0x53, 0x07, 0x60, 0xbf, 0xab, 0x52, 0x9b, 0x5b, 0xba, 0xab, 0x4a, 0x8b, - 0xd6, 0x8d, 0x40, 0xb0, 0xe0, 0x60, 0x6e, 0x89, 0x6b, 0x89, 0xf7, 0xf5, 0x62, 0xe0, 0xbc, 0xc8, - 0x38, 0x0b, 0x5e, 0xcd, 0xa1, 0x36, 0xbf, 0x2c, 0xea, 0x80, 0xac, 0x74, 0x7b, 0x59, 0x01, 0xdc, - 0x6e, 0x38, 0xe1, 0x76, 0x73, 0x00, 0xfb, 0x82, 0x4f, 0x90, 0x00, 0x08, 0xb0, 0x04, 0xf4, 0xf8, - 0xb6, 0xd4, 0x04, 0xe0, 0xbe, 0xbf, 0xca, 0x1d, 0x64, 0x5b, 0x1b, 0x50, 0xaf, 0x37, 0x74, 0x4d, - 0x47, 0x5e, 0x4c, 0x4b, 0x74, 0x8c, 0x51, 0x60, 0x00, 0x6c, 0xac, 0xf5, 0x2b, 0xb4, 0x13, 0x60, - 0xbe, 0xf9, 0x95, 0x15, 0xf6, 0xfc, 0x69, 0x7d, 0x6a, 0xe8, 0x0a, 0x60, 0x85, 0x18, 0x74, 0x11, - 0x48, 0x82, 0x88, 0xde, 0x89, 0x6d, 0x00, 0xd6, 0x78, 0x8b, 0x83, 0xc8, 0x2a, 0x77, 0x05, 0x53, - 0xdb, 0x85, 0x7f, 0x62, 0x6e, 0xdc, 0x5f, 0xbb, 0x78, 0x81, 0x77, 0x07, 0x9a, 0xe4, 0x0d, 0x07, - 0x07, 0x96, 0xa6, 0x07, 0x00, 0x88, 0x82, 0x2a, 0xd5, 0xc3, 0xaa, 0x5a, 0xed, 0x2b, 0x00, 0xe6, - 0x57, 0xd1, 0x08, 0x6a, 0x74, 0xe7, 0xb1, 0xee, 0x04, 0xaa, 0x24, 0x9c, 0xb6, 0xf5, 0x24, 0xf5, - 0x42, 0x09, 0x74, 0x0f, 0x40, 0x09, 0x60, 0x5f, 0x30, 0x24, 0x76, 0xed, 0x19, 0x58, 0x7c, 0xeb, - 0xac, 0xcf, 0x2f, 0x0e, 0x60, 0xfa, 0xbc, 0xe0, 0xde, 0x66, 0x00, 0x44, 0x1e, 0xa5, 0x4a, 0xbd, - 0xfa, 0xfa, 0x80, 0x43, 0x63, 0xbe, 0xd5, 0xef, 0x00, 0xf0, 0x08, 0x00, 0x8f, 0x4c, 0x07, 0x10, - 0x4c, 0xcc, 0x00, 0x18, 0x5f, 0x95, 0x00, 0x92, 0x01, 0x20, 0x70, 0x16, 0xfc, 0x18, 0x40, 0xb3, - 0xc7, 0x00, 0x20, 0x66, 0xb1, 0x3e, 0x01, 0x80, 0x04, 0xa4, 0xd7, 0x4f, 0xa8, 0x82, 0x09, 0x60, - 0x15, 0xc5, 0x23, 0x00, 0xd4, 0x9e, 0xad, 0x02, 0x2b, 0xcb, 0x95, 0x56, 0x03, 0x50, 0x1f, 0x01, - 0x48, 0x06, 0x20, 0x7d, 0x09, 0x80, 0x7d, 0xea, 0x8c, 0xf1, 0xb5, 0x56, 0x07, 0xe0, 0x09, 0x10, - 0x75, 0x02, 0xd0, 0xc7, 0x00, 0x58, 0xf0, 0x95, 0xd2, 0x52, 0xe6, 0x13, 0x60, 0xf5, 0x3f, 0x06, - 0xa0, 0x11, 0xf3, 0x4d, 0x82, 0xa4, 0x24, 0x61, 0xc3, 0xa1, 0x52, 0x25, 0x55, 0xd1, 0x87, 0x00, - 0x42, 0x08, 0x5f, 0x01, 0xa0, 0xbd, 0x3e, 0xe1, 0xfd, 0x55, 0x45, 0xa3, 0x03, 0xf0, 0x82, 0x9b, - 0xce, 0x7f, 0x06, 0xc0, 0xfa, 0xaf, 0xd7, 0xba, 0x27, 0x40, 0x00, 0xa2, 0x2c, 0x71, 0x2e, 0x78, - 0xd6, 0x3c, 0x02, 0x92, 0x40, 0xa5, 0x2a, 0x49, 0x15, 0xab, 0x87, 0x00, 0x9c, 0x40, 0xb7, 0x2f, - 0x01, 0x68, 0x49, 0x03, 0x80, 0x58, 0xab, 0x6a, 0xd4, 0xaf, 0x00, 0xc0, 0x74, 0x64, 0xe3, 0x52, - 0xaf, 0xf5, 0x1a, 0xc7, 0xbf, 0xc7, 0x31, 0x02, 0xb0, 0xfa, 0x9f, 0x02, 0x40, 0xa2, 0x29, 0x0c, - 0xaa, 0x36, 0x0d, 0xc0, 0xa5, 0x12, 0x40, 0x37, 0x00, 0x48, 0x17, 0x4a, 0x8d, 0xc0, 0x70, 0xe2, - 0xea, 0x4e, 0x43, 0x13, 0x8c, 0xda, 0x74, 0x7f, 0xa3, 0x4c, 0x00, 0xc1, 0x01, 0x50, 0xd3, 0x20, - 0xab, 0x79, 0x7c, 0x8d, 0x52, 0x1b, 0x00, 0x27, 0x00, 0x55, 0x10, 0x80, 0x3b, 0x26, 0x00, 0x01, - 0x5c, 0xf4, 0x00, 0x08, 0x0c, 0xc0, 0xc4, 0xdc, 0xb5, 0x03, 0xa8, 0xb5, 0x57, 0xc5, 0x00, 0x07, - 0x70, 0x54, 0x70, 0xd0, 0x18, 0x63, 0x1b, 0x9e, 0x01, 0x95, 0x1d, 0x80, 0xf0, 0x1b, 0x80, 0xc6, - 0xbc, 0xc5, 0x97, 0x07, 0x00, 0xb4, 0x98, 0x6d, 0xf1, 0x71, 0xfd, 0x0e, 0x50, 0x97, 0x68, 0xb2, - 0x44, 0x31, 0xe2, 0xd2, 0xd2, 0x99, 0x0f, 0x02, 0x80, 0xfc, 0x01, 0x40, 0x49, 0x60, 0xbd, 0x87, - 0x00, 0xba, 0x4d, 0x47, 0x06, 0x17, 0x02, 0x60, 0xc1, 0xd5, 0x24, 0xa2, 0xba, 0xf9, 0x06, 0xc4, - 0x8f, 0x0c, 0xeb, 0x4d, 0xa9, 0xf2, 0x84, 0x74, 0x63, 0xfd, 0xb6, 0x80, 0x07, 0xf3, 0x70, 0x6f, - 0x80, 0xb3, 0x5c, 0xd1, 0x01, 0x40, 0x24, 0xaf, 0x04, 0xc4, 0xd3, 0x99, 0x0f, 0x47, 0x6c, 0x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f1, 0x45, 0xe8, 0x46, 0xe0, 0x5b, 0x01, 0x68, 0xb6, 0xff, 0x34, - 0xab, 0xa2, 0x6c, 0x46, 0x54, 0x71, 0x82, 0x68, 0x5d, 0xf5, 0x04, 0xa0, 0xaa, 0xc2, 0xec, 0xf0, - 0x01, 0x22, 0xf5, 0x00, 0x19, 0x66, 0xea, 0x07, 0xca, 0xa6, 0xce, 0xe7, 0xb3, 0x0d, 0x66, 0x4c, - 0xf9, 0x26, 0x42, 0x80, 0x09, 0xba, 0x00, 0x6c, 0x8a, 0x17, 0x93, 0x21, 0x84, 0xfe, 0xe2, 0xac, - 0x73, 0xf6, 0x78, 0x4f, 0xb6, 0x58, 0xd6, 0x9c, 0x45, 0x6e, 0xb7, 0x9b, 0xa0, 0x0b, 0x42, 0x20, - 0x00, 0xac, 0x00, 0x74, 0x03, 0x20, 0xb0, 0x79, 0x02, 0x80, 0x6a, 0x53, 0xfc, 0x4c, 0x99, 0xd6, - 0xcb, 0xd2, 0x6f, 0x40, 0x00, 0x58, 0xc4, 0x52, 0xfc, 0x1d, 0xf4, 0xbe, 0x7c, 0x9c, 0xcf, 0xed, - 0x67, 0xf9, 0x78, 0xf7, 0xf9, 0x66, 0x6f, 0xcc, 0xbf, 0x2d, 0x38, 0x85, 0x9b, 0x82, 0x48, 0x96, - 0x45, 0xdf, 0xde, 0x04, 0x9b, 0xca, 0xfd, 0x12, 0xb3, 0xdf, 0x1f, 0xf7, 0x97, 0x61, 0x39, 0x55, - 0x8b, 0x77, 0x9d, 0xfb, 0xcf, 0x96, 0x90, 0x12, 0xdb, 0x65, 0xf6, 0xbb, 0x32, 0x00, 0xd0, 0x15, - 0x00, 0x38, 0xcb, 0xe6, 0x08, 0xaa, 0x5a, 0x0a, 0x5b, 0x8b, 0x2c, 0x0a, 0x0c, 0xef, 0xa0, 0xac, - 0x7a, 0xc9, 0xe5, 0x92, 0x59, 0x3f, 0xe3, 0xef, 0x04, 0xae, 0x1f, 0xe7, 0xf6, 0xeb, 0xba, 0xd5, - 0x2f, 0xa5, 0x14, 0xf6, 0xfb, 0x10, 0x81, 0xd7, 0xef, 0x00, 0x80, 0xa2, 0x02, 0x02, 0xce, 0xcd, - 0xf7, 0x26, 0x79, 0x8b, 0xb7, 0x9b, 0x0e, 0xad, 0x47, 0x29, 0x85, 0xf1, 0x10, 0x89, 0xdd, 0xde, - 0x84, 0x00, 0x4e, 0x48, 0x33, 0x00, 0x00, 0x07, 0x27, 0x00, 0xec, 0xdf, 0x15, 0x03, 0x00, 0xfb, - 0xae, 0x4b, 0x00, 0x29, 0xa1, 0xcc, 0x00, 0x6c, 0xbe, 0x10, 0x40, 0xd7, 0xe6, 0x25, 0x81, 0x8f, - 0xad, 0xfe, 0x13, 0x5a, 0x28, 0xc6, 0xe6, 0x4d, 0x54, 0xac, 0x7e, 0x1a, 0x22, 0x5a, 0x3e, 0xb7, - 0x97, 0xa2, 0xe4, 0x25, 0x12, 0x80, 0x86, 0xb0, 0x03, 0x70, 0x9a, 0xe3, 0x81, 0x08, 0x60, 0x03, - 0xc0, 0x76, 0x79, 0xfc, 0x0c, 0x00, 0x33, 0x74, 0x0f, 0xc0, 0xe0, 0x6c, 0x00, 0x0a, 0xbb, 0xff, - 0x6d, 0xbd, 0xc0, 0xfa, 0x4d, 0xcf, 0x5f, 0xd1, 0x3d, 0x7e, 0xf3, 0x7e, 0x7e, 0x5c, 0x3f, 0xae, - 0xd7, 0x4f, 0x86, 0x40, 0xad, 0x7e, 0x8a, 0x20, 0x12, 0x46, 0x00, 0x69, 0x07, 0x00, 0x51, 0x22, - 0xde, 0x34, 0xfb, 0x89, 0x94, 0xdb, 0x6d, 0x04, 0x90, 0xf6, 0x00, 0x70, 0x12, 0x9c, 0xc6, 0x84, - 0x19, 0x80, 0x6a, 0xed, 0x5e, 0x22, 0xac, 0xcd, 0x37, 0x39, 0x2c, 0xdf, 0x00, 0xf8, 0xbc, 0x73, - 0x76, 0x72, 0x65, 0x38, 0x51, 0x39, 0x1d, 0x01, 0xa8, 0x0a, 0xd6, 0xff, 0xab, 0xbd, 0x05, 0x1a, - 0x01, 0x7e, 0x48, 0x95, 0x42, 0x02, 0xd0, 0x04, 0xa8, 0x6e, 0x04, 0x32, 0x3a, 0x80, 0x74, 0x21, - 0x80, 0x82, 0x88, 0xe2, 0x27, 0x16, 0x97, 0x54, 0x8a, 0xf3, 0xe1, 0x09, 0x9d, 0xe2, 0x0d, 0x00, - 0x13, 0x62, 0x02, 0x90, 0xd8, 0xae, 0x47, 0x51, 0x40, 0xe7, 0x67, 0x78, 0x51, 0xdc, 0xe1, 0xf5, - 0x13, 0x40, 0x81, 0x56, 0xf3, 0x39, 0x00, 0xae, 0x77, 0x0c, 0xc0, 0x08, 0x54, 0x85, 0x3b, 0x3f, - 0x97, 0x5f, 0xe7, 0xf3, 0xb5, 0xfd, 0x2c, 0x9f, 0x6b, 0x7e, 0x04, 0x10, 0xf9, 0xb8, 0xc0, 0xf2, - 0x0b, 0x09, 0xe4, 0x04, 0x19, 0x01, 0x14, 0x2b, 0x88, 0x47, 0xc2, 0x3a, 0xe5, 0x16, 0x9f, 0x86, - 0xed, 0x8b, 0x03, 0x60, 0xbc, 0x0c, 0x09, 0x25, 0xc4, 0x94, 0x58, 0x7f, 0xef, 0xef, 0x75, 0xd7, - 0xdf, 0xa3, 0xf9, 0xdc, 0x01, 0x35, 0x74, 0x10, 0x21, 0x01, 0x88, 0xb2, 0xa0, 0xfd, 0x7a, 0x25, - 0xa9, 0x4f, 0x6d, 0xc0, 0x88, 0xab, 0x01, 0xf8, 0xe7, 0x7c, 0x3a, 0x5f, 0x6d, 0x7c, 0x6e, 0x09, - 0xaa, 0x91, 0xf9, 0xf1, 0x7e, 0x84, 0x1d, 0x23, 0xfa, 0xe3, 0x83, 0x72, 0xd9, 0x00, 0xc4, 0x58, - 0xee, 0x17, 0xf0, 0x51, 0x01, 0x22, 0xf7, 0x6f, 0x00, 0xf7, 0xf1, 0x11, 0x4c, 0x98, 0xdb, 0x65, -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 0xdd, 0xa2, 0x67, - 0x20, 0x86, 0xe2, 0xcf, 0x03, 0x28, 0x7d, 0x05, 0x4e, 0x4f, 0xc0, 0x23, 0xd7, 0x4f, 0xb1, 0x14, - 0x4d, 0x80, 0x57, 0x9a, 0x45, 0x61, 0x4e, 0xdf, 0xca, 0xeb, 0x01, 0xf0, 0x71, 0x0e, 0xdb, 0x59, - 0x60, 0x02, 0x00, 0xf2, 0x60, 0xc1, 0x85, 0xf1, 0x66, 0x70, 0x47, 0x88, 0xdb, 0x81, 0xa2, 0x44, - 0x3c, 0x9c, 0x66, 0xff, 0x3f, 0xdd, 0xaa, 0x68, 0x52, 0xaf, 0xdf, 0x0e, 0xc2, 0x00, 0xa8, 0x84, - 0xd7, 0x13, 0xc0, 0x41, 0x6b, 0x3c, 0xbb, 0x0a, 0x65, 0xa1, 0x1d, 0x67, 0x70, 0x6e, 0x94, 0xe5, - 0x68, 0xfa, 0x71, 0xff, 0x4f, 0x5f, 0xee, 0x12, 0x8c, 0x78, 0x71, 0x23, 0xff, 0x2f, 0x01, 0x2b, - 0x50, 0x97, 0xb3, 0xd9, 0x71, 0x34, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, - 0x60, 0x82, + 0x29, 0x31, 0x08, 0x00, 0x8c, 0x5a, 0x29, 0xff, 0xef, 0x8c, 0xa5, 0x7b, 0x4a, 0xdc, 0xa0, 0x64, + 0xff, 0xff, 0x9c, 0x70, 0x5c, 0x2c, 0xff, 0xd6, 0x7b, 0x30, 0x0c, 0x04, 0xe8, 0xc0, 0x70, 0x58, + 0x44, 0x00, 0xc8, 0x90, 0x58, 0xb0, 0x80, 0x50, 0x53, 0xa3, 0xe1, 0x5f, 0x00, 0x00, 0x00, 0x01, + 0x74, 0x52, 0x4e, 0x53, 0x00, 0x40, 0xe6, 0xd8, 0x66, 0x00, 0x00, 0x07, 0x62, 0x49, 0x44, 0x41, + 0x54, 0x78, 0x5e, 0xed, 0x9a, 0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, 0x80, 0x46, 0xbd, 0x69, 0x68, + 0x3a, 0xea, 0xe6, 0x5a, 0x72, 0x60, 0xcc, 0x02, 0x07, 0xe0, 0xe3, 0x5a, 0xbf, 0x42, 0x07, 0x01, + 0xe6, 0xbb, 0x5f, 0x59, 0xe1, 0xc8, 0x5f, 0xd6, 0xa7, 0x86, 0x5e, 0x01, 0x5c, 0x21, 0x26, 0xdd, + 0x04, 0x52, 0x20, 0xa2, 0x17, 0x62, 0x3b, 0x80, 0x6b, 0xbc, 0xc7, 0x41, 0x64, 0xc8, 0x0f, 0x05, + 0x53, 0xfb, 0x85, 0x7f, 0x63, 0x61, 0xdc, 0x9f, 0x5d, 0xa2, 0xc0, 0x8b, 0x03, 0x26, 0x79, 0xc3, + 0xc9, 0x81, 0xcd, 0xf4, 0x04, 0x00, 0x59, 0x60, 0x00, 0x22, 0xac, 0xab, 0xd7, 0x1e, 0x00, 0x22, + 0xdf, 0xeb, 0xc9, 0xa0, 0xc6, 0x70, 0xde, 0xd7, 0x83, 0x40, 0x97, 0x62, 0x8e, 0x58, 0x4f, 0xca, + 0x28, 0x94, 0x40, 0x6f, 0x01, 0x28, 0x01, 0xdc, 0x16, 0x0c, 0xc9, 0x43, 0x47, 0x06, 0xb6, 0xd8, + 0x3a, 0xeb, 0x8b, 0x4b, 0x00, 0x58, 0x3e, 0x2f, 0xb8, 0xb7, 0x15, 0x00, 0x91, 0x67, 0x31, 0x00, + 0xa7, 0x58, 0x1f, 0x08, 0x68, 0xcc, 0xf7, 0xfa, 0x03, 0x00, 0x3e, 0x01, 0x60, 0x15, 0x0e, 0x00, + 0xc9, 0xc5, 0x0a, 0x80, 0xf1, 0x5d, 0x09, 0xa0, 0x38, 0x00, 0x02, 0x67, 0xc1, 0x8f, 0x01, 0x98, + 0x3d, 0x06, 0x00, 0xe1, 0x3b, 0xf2, 0x13, 0x00, 0x24, 0x20, 0xa3, 0x7e, 0x42, 0x15, 0x2c, 0x00, + 0xbb, 0x28, 0x1e, 0x01, 0xa0, 0x8e, 0x6c, 0x15, 0x78, 0x59, 0xa1, 0xb4, 0x3b, 0x80, 0xfe, 0x08, + 0x40, 0x71, 0x00, 0xe5, 0x5b, 0x00, 0xfc, 0x53, 0x67, 0x8e, 0xef, 0xbd, 0x07, 0x80, 0x48, 0x80, + 0x68, 0x10, 0x80, 0x3e, 0x06, 0xc0, 0x82, 0x4f, 0x94, 0x9e, 0xb2, 0x9e, 0x00, 0xaf, 0xff, 0x31, + 0x00, 0xcd, 0x58, 0x6f, 0x92, 0xa4, 0x14, 0x49, 0x3b, 0x0e, 0x95, 0x2e, 0xa5, 0x8b, 0x3e, 0x04, + 0x90, 0x52, 0xfa, 0x0e, 0x00, 0x1d, 0xf5, 0x09, 0xef, 0xaf, 0x2a, 0x9a, 0x03, 0x40, 0x14, 0x6c, + 0xba, 0x7e, 0x0e, 0x80, 0xf5, 0x9f, 0x4e, 0xfd, 0x96, 0x00, 0x01, 0x88, 0xb2, 0xc4, 0xb5, 0xe0, + 0x55, 0xf3, 0x08, 0x48, 0x01, 0x95, 0xaa, 0x14, 0x55, 0xb8, 0x67, 0x05, 0x10, 0x04, 0xdc, 0xbe, + 0x05, 0xc0, 0x92, 0x26, 0x00, 0xb9, 0x77, 0xd5, 0xac, 0xdf, 0x01, 0x80, 0xe5, 0xc8, 0xe6, 0xad, + 0x9f, 0xfa, 0x29, 0xcf, 0xff, 0x8e, 0x63, 0x06, 0xe0, 0xf5, 0x7f, 0x09, 0x00, 0x89, 0x96, 0x34, + 0xa9, 0x6e, 0x1a, 0x40, 0x48, 0x25, 0x80, 0x61, 0x30, 0x2b, 0x47, 0x4a, 0xcd, 0xc0, 0x74, 0xe2, + 0xfa, 0x8d, 0x86, 0x16, 0x38, 0xb5, 0xe5, 0xfe, 0x4e, 0x99, 0x00, 0x52, 0x00, 0xa0, 0xa6, 0x41, + 0xae, 0x16, 0xf1, 0x3d, 0x4b, 0x37, 0x00, 0x41, 0x00, 0xaa, 0x20, 0x80, 0x70, 0x2c, 0x00, 0x12, + 0xb8, 0xe8, 0x1d, 0x20, 0x70, 0x00, 0x0b, 0xf3, 0xd0, 0x01, 0xa0, 0xf7, 0x51, 0x15, 0x03, 0x08, + 0xe0, 0x63, 0xc1, 0x49, 0x73, 0xce, 0x36, 0x22, 0x03, 0x2a, 0x37, 0x00, 0xd2, 0x07, 0x00, 0xc6, + 0xdc, 0xe2, 0xdb, 0x03, 0x00, 0xda, 0xdc, 0xf6, 0xf8, 0x7c, 0xfd, 0x0e, 0xd0, 0xb7, 0xec, 0xb2, + 0x65, 0x71, 0xe2, 0x62, 0xe9, 0xcc, 0x07, 0x01, 0x40, 0x3e, 0x01, 0xd0, 0x0a, 0x58, 0xef, 0x5d, + 0x00, 0xc3, 0x96, 0x23, 0x83, 0x23, 0x01, 0xb0, 0xe0, 0xee, 0x12, 0x59, 0xc3, 0x62, 0x03, 0x12, + 0x47, 0x86, 0xf5, 0x96, 0xd2, 0x79, 0x42, 0x86, 0xb1, 0x7e, 0x5f, 0x20, 0x82, 0x79, 0xb8, 0x77, + 0xc0, 0x55, 0x4e, 0x18, 0x00, 0x20, 0x52, 0xaf, 0x04, 0x24, 0xd2, 0x99, 0x8f, 0x40, 0xec, 0x3c, + 0x42, 0xc5, 0x7c, 0x46, 0x66, 0x41, 0x8d, 0x6f, 0x68, 0x32, 0x9f, 0xb6, 0xd0, 0x86, 0x21, 0x6b, + 0xbf, 0x0b, 0x60, 0x2d, 0x38, 0xc2, 0x99, 0x81, 0x63, 0x71, 0x3b, 0x36, 0x1e, 0x50, 0x35, 0xcd, + 0x23, 0x70, 0x09, 0xb6, 0x61, 0x82, 0xda, 0x05, 0x35, 0x2f, 0x06, 0xc0, 0xf5, 0x75, 0xd4, 0x88, + 0x70, 0xbd, 0xe6, 0x63, 0xd8, 0x45, 0x87, 0x93, 0xf3, 0xd4, 0x66, 0x4c, 0xa6, 0xe3, 0xae, 0x8f, + 0x0a, 0x54, 0xb1, 0xfd, 0x0f, 0x39, 0x00, 0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b, 0x37, 0x51, 0xf1, 0xfa, 0x69, 0xc8, 0xb0, 0x7c, 0x6e, 0xaf, + 0x64, 0xa9, 0x5b, 0x26, 0x00, 0x4d, 0xe9, 0x06, 0xc0, 0x61, 0x8d, 0x07, 0x32, 0x80, 0x1d, 0x00, + 0xdb, 0xe5, 0xf9, 0x33, 0x00, 0xcc, 0xd0, 0x5b, 0x00, 0x0e, 0x67, 0x07, 0xd0, 0xd8, 0xfd, 0xef, + 0xeb, 0x25, 0xd6, 0xef, 0xda, 0x00, 0xd0, 0x10, 0xf1, 0xbb, 0xf7, 0xcf, 0xfb, 0xe9, 0xfd, 0x74, + 0xfa, 0xc3, 0x10, 0xa8, 0xd7, 0x4f, 0x91, 0x44, 0xd2, 0x0c, 0xa0, 0xdc, 0x00, 0x40, 0x96, 0x8c, + 0x57, 0xad, 0x71, 0x22, 0xe5, 0x7c, 0x9e, 0x01, 0x94, 0x0f, 0x00, 0x0e, 0x82, 0xc3, 0x9c, 0xb0, + 0x02, 0x50, 0xed, 0xc3, 0x4b, 0x84, 0xdd, 0x7c, 0x8b, 0xc3, 0xf3, 0x1d, 0x40, 0xcc, 0x07, 0xe7, + 0x20, 0xd7, 0xa6, 0x13, 0x55, 0xcb, 0x3d, 0x00, 0x5d, 0xc1, 0xfa, 0xff, 0xb1, 0xb7, 0x80, 0x11, + 0xe0, 0x87, 0x54, 0x6b, 0x24, 0x00, 0x2d, 0x80, 0xea, 0x4e, 0xa0, 0x62, 0x00, 0x28, 0x47, 0x02, + 0x68, 0xc8, 0x68, 0x71, 0x62, 0x71, 0x2c, 0xad, 0x05, 0x1f, 0x9e, 0xd0, 0x25, 0xde, 0x01, 0x30, + 0x21, 0x17, 0x00, 0x85, 0xed, 0x7a, 0x16, 0x05, 0x74, 0x7d, 0x86, 0x97, 0x25, 0x1c, 0x51, 0x3f, + 0x01, 0x34, 0x68, 0x77, 0x5f, 0x00, 0xe0, 0x7a, 0xf7, 0x01, 0x38, 0x81, 0xae, 0x68, 0x51, 0xff, + 0xf6, 0xcf, 0xcb, 0xcb, 0xc9, 0x7e, 0xb6, 0x0b, 0x01, 0xe4, 0x0c, 0x20, 0xf3, 0x71, 0x81, 0xe7, + 0x37, 0x12, 0xa8, 0x05, 0x32, 0x03, 0x68, 0x5e, 0x10, 0x8f, 0x84, 0x77, 0xca, 0x16, 0x5f, 0xa6, + 0xed, 0x4b, 0x00, 0x60, 0xbc, 0x4c, 0x09, 0x2d, 0xe5, 0x52, 0x58, 0xff, 0xe8, 0xef, 0xf5, 0xa6, + 0xbf, 0x87, 0xf9, 0xc2, 0x01, 0x75, 0x74, 0x10, 0x21, 0x01, 0x88, 0xb2, 0x20, 0xae, 0x17, 0x05, + 0x68, 0x4c, 0xed, 0xc0, 0x88, 0xcb, 0x00, 0xfc, 0xef, 0xe5, 0x60, 0x00, 0x6c, 0xfc, 0xd9, 0x13, + 0x54, 0x33, 0xf3, 0xf3, 0xe5, 0x08, 0x07, 0x46, 0x8c, 0xc7, 0x07, 0xed, 0xb8, 0x03, 0xc8, 0xb9, + 0x5d, 0x2e, 0xe0, 0xa3, 0x02, 0x64, 0xee, 0xdf, 0x01, 0xde, 0xc6, 0x67, 0x30, 0x61, 0x6d, 0x97, + 0xe9, 0x59, 0x94, 0xfb, 0x56, 0xed, 0x86, 0xc5, 0x45, 0xb1, 0xac, 0x17, 0x82, 0xb6, 0xce, 0xbf, + 0xbd, 0xbd, 0xc5, 0xb8, 0x3b, 0xcf, 0xe7, 0x11, 0xd4, 0xe1, 0xa5, 0xa6, 0xc3, 0x35, 0xd5, 0x83, + 0x78, 0x86, 0xfc, 0xe5, 0xf6, 0x6b, 0x6c, 0x79, 0xff, 0xf6, 0x67, 0x11, 0xd5, 0x46, 0x58, 0x05, + 0xc6, 0xa0, 0x43, 0x36, 0xc1, 0x5f, 0x0b, 0xa0, 0xf6, 0x73, 0x29, 0xd5, 0xc6, 0xf4, 0x55, 0x19, + 0x3e, 0xa6, 0x90, 0xed, 0xa0, 0xed, 0x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2f, 0xb7, 0x32, 0x02, 0x1a, 0xf5, 0xfb, 0x41, 0x20, 0x20, 0xcb, + 0x7f, 0x3e, 0x01, 0xdc, 0x69, 0x8d, 0x57, 0x57, 0xa3, 0x6c, 0xb4, 0xfb, 0x19, 0x9c, 0x9b, 0x65, + 0xbb, 0x37, 0xfd, 0xb8, 0xff, 0xa7, 0xaf, 0x0e, 0x09, 0x46, 0x3c, 0xb9, 0x91, 0xff, 0x3f, 0x00, + 0x75, 0x50, 0xd5, 0x0c, 0x7e, 0x2a, 0xfd, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, + 0x42, 0x60, 0x82, }; #endif diff --git a/src/lang/glyph_ru.png b/src/lang/glyph_ru.png index ed27735962a58b4d1bc1d5acfb8958fd152c2b5e..2af50a85849aaabde43a7f3bddb6e2f0a95b92dd 100644 GIT binary patch delta 1983 zcmV;w2SE7Z5AzR@N`Iw$O5C7i|NoqDTrB_AdoT3NeQ&GkA zELn0}-xvmU=J2!a*M6EsB2cT?2mw|ZkA%^Dl{GL+1xY$_@BCTbIWjbv1r{1Bo9vRmfWKR zUoR)li_Ej&)g9{dcEbSVrTfbj!1;^=&gTHI7HkGdfB;*VEU)HCFUIAPoCfx*5AfgvyJAiAv$3bMs4+T^E zg@0pV+@D>dz>5PWdBe$p&GZBSSzrJntgF`^03zS($)Lt?-q(Xbmtu}sPs%8iKyLvk z0o)c0$wNm5w%9uBi%S4lJ}{Zzj%*cpS)sH$fc^+TaRB980Q^&Dj_ePMH8w0HCHpt`_ka4Y~4xab`qZ~zPQ&;g+LQ56FS;A6o_bAQe@A_FQn0MZ8l#@yoD0|46G_V|4L z4$!ykvSo4NV(H8W0YE+h&!(DBZDIWu;A_zS;Jxj5=VyhmeP4bhOvHMAcA?g zcfeIn7yuwruLLC0nU6s1JVM2MMrJ{cZ)h@~w$O$lYrhL%EjYrNfn#wyHXcwl%_DFL zwtr!Q+66T)2Eg@o)QE7s=404Jhm-TvW=y8zu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uUsw7=IE01=KU3p_H@&pj6#W zbNOBWufQEZD!!wbQXzm>H!;OFUpA#lRm7S`8vAP&%qK$KqGuq6;?DypeFaWWz$4dB zu@p^!SDHm(PT$Jw0q}7S+gV@&0PkHU+xl&cyS~DF99o1m$TV%Gynhq07*qoM6N<$f|6>G Az5oCK diff --git a/src/lang/sv.h b/src/lang/sv.h new file mode 100644 index 00000000..ff01cfcc --- /dev/null +++ b/src/lang/sv.h @@ -0,0 +1,355 @@ +#ifndef H_LANG_SV +#define H_LANG_SV + +// Thanks: Carl Lindmark + +const char *STR_SV[] = { "" +// help + , "Laddar..." + , "Tryck H f~or hj~alp" + , helpText + , "%s@@@" + "D~ODADE %d@@" + "PLOCKAT %d@@" + "HEMLIGHETER %d av %d@@" + "TID TAGEN %s" + , "Sparar spel..." + , "Sparar klar!" + , "SPARA MISSLYCKATS!" + , "JA" + , "NEJ" + , "Av" + , "P^a" + , "Av" + , "Sida-vid-Sida" + , "Anaglyf" + , "Delad sk~arm" + , "VR" + , "L^ag" + , "Mellan" + , "H~og" + , STR_LANGUAGES + , "Till~ampa" + , "Handkontroll 1" + , "Handkontroll 2" + , "Handkontroll 3" + , "Handkontroll 4" + , "Ej Redo" + , "Spelare 1" + , "Spelare 2" + , "Tryck Valfri Knapp" + , "%s - V~alj" + , "%s - Tillbaka" +// inventory pages + , "ALTERNATIV" + , "LAGER" + , "OBJEKT" +// save game page + , "Spara Spel?" + , "Nuvarande Position" +// inventory option + , "Spel" + , "Karta" + , "Kompass" + , "Statistik" + , "Lara's Hem" + , "Detaljniv^aer" + , "Ljud" + , "Kontroller" + , "Gamma" +// passport menu + , "~Oppna Spel" + , "Nytt Spel" + , "Starta om Niv^a" + , "Avsluta till Titel" + , "Avsluta Spel" + , "V~alj Niv^a" +// detail options + , "V~alj detalj" + , "Filtrering" + , "Belysning" + , "Skuggor" + , "Vatten" + , "VSync" + , "Stereo" + , "Enkel Objekt" + , "Uppl~osning" + , STR_SCALE +// sound options + , "St~all in Volym" + , "Eko" + , "Undertexter" + , "Spr^ak" +// controls options + , "St~all in Kontroller" + , "Tangentbord" + , "Handkontroll" + , "Vibration" + , "Ominriktning" + , "Multi-riktning" + // controls + , "V~anster", "H~oger", "Spring", "Backa", "Hoppa", "G^a", "Action", "Dra Vapen", "Titta", "Ducka", "Rusa", "Rulla", "Lager", "Start" + , STR_KEYS +// inventory items + , "Ok~and" + , "Explosivt" + , "Pistoler" + , "Hagelgev~ar" + , "Magnum" + , "Uzis" + , "Pistol-Ammunition" + , "Hagelgev~ar-Ammunition" + , "Magnum-Ammunition" + , "Uzi-Ammunition" + , "Litet First-Aid" + , "Stort First-Aid" + , "Blytacka" + , "Scion" +// keys + , "Nyckel" + , "Nyckel av Silver" + , "Nyckel av Rustier" + , "Nyckel av Guld" + , "Nyckel av Safir" + , "Nyckel av Neptune" + , "Nyckel av Atlas" + , "Nyckel av Damokles" + , "Nyckel av Thor" + , "Nyckel av Ornate" +// puzzles + , "Pussel" + , "Guld-Idol" + , "Guld-Tacka" + , "Kugghjul" + , "Stubin" + , "Ankh" + , "Horus ~Oga" + , "Anubis Sigill" + , "Scarab" + , "Pyramid-Nyckeln" +// TR1 subtitles + /* CAFE */ , + "[43500]Vad m^aste en man g~ora f~or att@f^a er uppm~arskamhet?" + "[47500]Det ~ar sv^art att s~aga,@men du verkar klara det bra." + "[50000]N^a, bra. Men sanningen ~ar,@det ~ar inte jag som vill ha er." + "[54500]Inte?" + "[55000]Nej, men fr~oken Jacqueline Natla,@fr^an Natla Technologies." + "[59000]Du vet, skaparen av@alla ljusa och underbara ting?" + "[64500]Tysta ner dig, Larson." + "[66000]Ma'am." + "[68000]Titta in det h~ar, Lara." + "[70500]Var lite nyfiken?" + "[73500]Jag spelar bara f~or sport, tyv~arr." + "[76000]D^a kanske du kommer att gilla det h~ar." + "[78000]Peru. Majest~atiska bergskedjor, branta v~aggar av ren is,@vilda bergsluttningar, ylande vindar" + "[87500]och sedan finns det Scion:@en gammal artefakt med mystiska krafter," + "[92500]g~omd djupt i Qualopecs f~orlorade grav." + "[96000]Jag vill ha det smycket." + "[98000]Du kan ^aka i morgon.@Har du n^agra planer f~or morgondagen??" + /* LIFT */ , + "[49000]H~ar i den magnifika byggnaden S:t Francis,@pl^agar mig nya frestelser." + "[53500]Mina br~oder ryktar att Tihocans kropp@~ar begravd under v^art kloster," + "[60000]en av de tre mytiska h~arskarna@av den f~orlorade kontinenten Atlantis," + "[64500]och att en bit av Atlanten,@arvet ligger hos honom." + "[68000]en h~angiven som delades mellan de tre h~arskarna@p^a den neds~ankta kontinenten Atlantis," + "[72500]f~or att h^alla sina om~atbara krafter i schack,@krafter bortom den Allsm~aktiges, Skaparen." + "[79000]Jag blir yr av s^adana m~ojligheter som@ligger s^a n~ara mitt d~odliga jag.." + "[85500]Jag klandrar mig sj~alv varje kv~all f~or att leva ut id)en,@men det ~ar verkligen ett sv^art test." + "[92000]" + "[93500]Pierre. Din nerskr~apare." + /* CANYON */ , + "[13500]H~ar har vi ~antligen det lilla odjuret." + "[16500]Howdy." + "[17500]God eftermiddag." + "[20000]Bl^aste du ut ljuset f~or Larson?" + "[22500]Om du vill uttrycka det s^a." + "[24000]N^av~al, din lilla semesterresa ~ar ~over." + "[27000]Dags att ge tillbaka det du stal fr^an mig." + "[30000]L^at oss ta en titt i lunchl^adan." + "[32000]" + "[42500]N^a? D~oda dem!" + "[45000]Hej!" + "[48000]" + "[50500]Era idioter!" + "[53000]" + "[62500]L^at oss g^a." + "[65000]" + "[136000]Vad i helvete var det?" + "[138000]Vad?" + "[138500]D~ar borta." + "[140500]F~ormodligen bara en fisk." + "[142500]Men m^aste ha varit ganska stor." + "[145000]Mannen, du m^aste l~ara dig a det lugnt@Jag g^ar in igen, kommer du?" + "[152000]" + "[158000]H^all dig lugn..." + "[160000]H~ar kommer det." + "[161500]~Ar du redo?" + /* PRISON */ , + "[00001]Du kan inte g~ora det!" + "[01500]Vi d~ommer dig, Natla fr^an Atlantis, f~or dina brott," + "[06000]f~or grovt missbruk av dina befogenheter@och f~or att stj~ala v^ara befogenheter." + "[11500]Du kan inte! Jag..." + "[12500]Du har f~orst~ort den trippelallians som har@lett och skyddat v^art folk..." + "[18500]och utmanade Tihocan och mig med v^ar egen arm)e..." + "[23500]lockade v^ara krigare bort fr^an pyramiden..." + "[27000]s^a att du kan missbruka pyramidens kreativa@kraft f~or din trubbiga destruktivitet." + "[33500]Sj~all~os!? Titta p^a dig!" + "[35500]Ingen av er har en gnista av uppfinning i huvudet." + "[40500]Od^agor!" + "[41500]L^at oss bara g~ora det." + "[44000]Tihocan!" + "[45000]Du har vandaliserat ditt heliga offer av ren girighet," + "[49500]som ett freak show." + "[51000]En ny generation, f~odd f~or att ~overleva." + "[54000]Nu ~ar de k~ottf~ars." + "[56000]Och du, Natla, vi kommer att sm~ada..." + "[60000]dina vener och f~otter, ditt hj~arta..." + "[64000]och din sjuka hj~arna fryses ned till is med ditt blod," + "[70000]Se din eviga rastl~oshet i ~ogonen, Natla.." + "[73000]Du kommer aldrig finna frid,@f~orbannad m^a din kontinent Atlantis!" + /* 22 */ , + "[04000]Tillbaka igen?" + "[05500]Och du - F~or den ceremoniella ^ater~oppningen, antar jag." + "[09500]Evolutionen ~ar i en ^aterv~andsgr~and - n~astan inget naturligt urval..." + "[13500]spridningen av nya varelser" + "[17500] - kommer att stimulera nya regionala krafter..." + "[20500]~Aven skapa nya arter." + "[22500]som en evolution p^a steroider." + "[24500]Ja, med en spark i rumpan...@De d~ar Qualopec och Tihocan hade ingen aning." + "[29500] - Atlantis fall har drabbat ett lopp av tr~otta svagheter..." + "[33500]och kastade dem tillbaka till ursprunget f~or ~overlevnad...." + "[37000]Detta ~ar vad v~arlden beh~over." + "[39000]Inte s^a." + "[40000]Det b~orjar om 15 sekunder." + "[43000]F~or sent f~or att avbryta!" + "[45000]Inte utan hj~artat av operationen!" + "[47000]Neeeeej!" + "[50000]10" + "[54000]5..." + "[55500]4...3...2..." + "[60000]1..." + /* 23 */ , + "[00001]N^a, nu har du min fulla uppm~arksamhet," + "[02500]men har jag din ocks^a?" + "[05000]Hall^a?" + "[06000]V~anta lite. N~ar jag tar tag i dig." + "[09000]Naturligtvis." + "[10000]Du och den d~ar dumma saken av Scion." + "[13000]Om du verkligen vill beh^alla det, s^a ska jag trycka det i din j~avl..." + "[17000]V~anta... pratar vi om artifakten?" + "[20000]Det kan du ta dig p^a ... r~att upp i din ..." + "[22000]V~anta lite - Jag ~ar ledsen" + "[24000]- den h~ar, sa du - var ~ar resten?" + "[26500]Miss Natla satte Pierre Dupont p^a letandet." + "[29500]Vart d^a?" + "[30500]Ha! Du ~ar inte lika snabb som honom." + "[34000]S^a du menar att samtalet h~ar bara hindrar mig?" + "[37000]~Ah, ingen aning var de d~ar kr~okta@skurkbenen leder honom." + "[42000]Du f^ar fr^aga fr~oken Natla." + "[46000]" + "[51000]Det ska jag, tackar." + /* 24 */ , "" + /* 25 */ , + "[03500]H~ar ligger Tihocan" + "[05000]...en av de tv^a r~attf~ardiga h~arskarna i Atlantis..." + "[10000]som ~aven efter bes~oket av kontinenten..." + "[13000]...f~ors~okte h~arska v~al i detta karga, fr~ammande land..." + "[19000]Han dog utan barn och hans kunskap levde intevvidare..." + "[25500]Se v~al ~over oss, Tihocan." + /* 26 */ , "V~alkommen till mitt hem!@L^at oss ta en liten tur." + /* 27 */ , "Anv~and riktningsknappen f~or att g^a till musikrummet." + /* 28 */ , "OK, l^at oss springa lite d^a!@Tryck p^a hoppknappen." + /* 29 */ , "Tryck nu p^a den igen och tryck sedan snabbt p^a en av@riktningsknapparna, d^a hoppar jag i den riktningen." + /* 30 */ , "Ah, den stora salen. Urs~akta l^adorna.@Jag har lagrat n^agra saker och vet inte vad jag ska g~ora med dem." + /* 31 */ , "Spring mot en l^ada och medan du h^aller kontrollknappen upp^at,@tryck p^a actionknappen, d^a kl~attrar jag upp." + /* 32 */ , "Det var en g^ang balsalen, men jag anv~ander det som ett gym@Hur tycker du om det? @ L^at oss sedan g~ora n^agra ~ovningar." + /* 33 */ , "Sj~alvklart springer jag inte ~overallt. Om jag vill vara@s~arskilt f~orsiktig, g^ar jag. H^all ned g^a-knappen@och flytta till den vita linjen." + /* 34 */ , "Medan du h^aller ner g^a-knappen kan jag inte falla av@~aven om du f~ors~oker leda mig ~over kanten. Testa, veta jag." + /* 35 */ , "Om du vill se dig omkring h^aller du ner titta-knappen@och trycker p^a kontrollknappen i den riktning du vill se." + /* 36 */ , "Om ett hopp ~ar f~or l^angt f~or mig kan jag@h^alla fast vid kanten s^a att jag inte faller av. G^a till kanten med den@vita linjen tills jag stannar. Tryck sedan p^a hoppknappen@och omedelbart d~arefter upp kontrollpanelen. Nu, medan jag fortfarande ~ar i luften, tryck p^a ^atg~ardsknappen och h^all den intryckt." + /* 37 */ , "Tryck p^a kontrollknappen upp f~or att kl~attra upp" + /* 38 */ , "Om jag springer och hoppar kan jag g~ora stora hopp." + /* 39 */ , "G^a till kanten med den vita linjen tills jag stannar. Sl~app sedan@startknappen och tryck ner kontrollknappen kort. Nu k~or jag upp. Tryck kontrollknappen upp^at och omedelbart d~arefter hoppa-knappen@Press forward, and almost immediately press and hold the jump button@h^all ned hoppknappen. Jag hoppar i sista stund." + /* 40 */ , "S^a det ~ar riktigt stort! Starta hoppet precis som@f~orklarat, men n~ar jag ~ar i luften trycker du p^a actionknappen@och h^aller den nedtryck, d^a kan jag h^alla fast vid kanten." + /* 41 */ , "Bra." + /* 42 */ , "F~ors~ok att kl~attra upp hit.@Tryck kontrollknappen upp^at och sedan p^a actionknappen." + /* 43 */ , "Jag kan inte kl~attra upp h~ar eftersom gapet ~ar f~or smalt.@Men om du trycker p^a knappen f~or h~oger, h~anger jag@i sidled tills det finns tillr~ackligt med utrymme att dra sig upp." + /* 44 */ , "Om det ~ar en brant nedf~orsbacke och jag inte vill@skada mig sj~alv n~ar jag hoppar, kan jag kl~attra ner f~orsiktigt." + /* 45 */ , "Tryck ner backaknappen s^a att jag hoppar bak^at.@Tryck sedan omedelbart p^a actionknappen och h^all ned den s^a att jag@klamrar fast vid kanten n~ar jag faller." + /* 46 */ , "Sl~app nu." + /* 47 */ , "L^at oss ta en simtur." + /* 48 */ , "Hoppknappen och h~oger- samt v~ansterknappen anv~ands f~or@att styra mig under vatten." + /* 49 */ , "Ah! Luft!@Tryck bara p^a kontrollknappen fram^at, v~anster och h~oger,@f~or att r~ora dig runt ytan. Tryck p^a hoppknappen@om du vill att jag ska dyka igen. Eller g^a till avsatsen och@tryck p^a actionknappen f~or att f^a mig ur vattnet." + /* 50 */ , "S^a nu tar jag av mig de v^ata kl~aderna f~orst." + /* 51 */ , "Va god le!" + /* 52 */ , "Det ~ar inget personligt." + /* 53 */ , "Du ger mig fortfarande huvudv~ark.@En liten f^agel viskade att jag ska skicka dig till helvetet!" + /* 54 */ , "Jag och mina v~anner f~orsvinner inte s^a l~att, Lara." + /* 55 */ , "Inte lite sent f~or prisutdelningen?@Men att vara d~ar ~ar allt, ~aven om inte alla ser det p^a det s~attet." + /* 56 */ , "Du skjuter p^a mig?@Du skjuter p^a mig?@Det finns ingen annan h~ar, s^a du m^aste skjutit p^a mig!" +// TR1 levels + , "Lara's Hem" + , "Grottan" + , "Vilcabambas Stad" + , "F~orlorade Dalen" + , "Qualopec Gravkammare" + , "S:t Francis D^arskap" + , "Kolosseum" + , "Midas Palats" + , "Cisternen" + , "Tihocans Gravkammare" + , "Khamoon Stad" + , "Khamoons Obelisk" + , "Scion Fristad" + , "Natla's Gruvor" + , "Atlantis" + , "Den Stora Pyramid" + , "^Aterv~and till Egypten" + , "Kattens tempel" + , "Atlantiska F~astningen" + , "Kupan" +// TR2 levels + , "Lara's Hem" + , "Den Kinesiska Muren" + , "Venedig" + , "Bartolis G~omst~alle" + , "Operahus" + , "Kustriggen" + , "Dykomr^ade" + , "40 Fathoms" + , "Maria Doria Vrak" + , "Bostads-Kvarter" + , "D~acket" + , "Tibetanska H~ogl~anderna" + , "Barkhang-Klostret" + , "Talion-Katakomberna" + , "Ispalatset" + , "Xian-templet" + , "Den Flytande ~On" + , "Drakens Lya" + , "Hem K~ara Hem" +// TR3 levels + , "Lara's Hus" + , "Djungel" + , "Tempelruinerna" + , "Floden Ganges" + , "Kaliya-Grottorna" + , "Kustby" + , "Kraschplats" + , "Madubu Gorge" + , "Punatemplet" + , "Thames Wharf" + , "Aldwych" + , "Lud's Port" + , "Stad" + , "Nevada~oknen" + , "H~og s~akerhetsf~orening" + , "Area 51" + , "Antarktis" + , "RX-Tech Gruvor" + , "Tinnos F~orlorade Stad" + , "Meteoritgrotta" + , "All Hallows" +}; + +#endif diff --git a/src/platform/nix/main.cpp b/src/platform/nix/main.cpp index ddc47012..e36c1a0a 100644 --- a/src/platform/nix/main.cpp +++ b/src/platform/nix/main.cpp @@ -388,6 +388,7 @@ int checkLanguage() { if (id == TWOCC("cs")) return STR_LANG_CZ - STR_LANG_EN; if (id == TWOCC("zh")) return STR_LANG_CN - STR_LANG_EN; if (id == TWOCC("hu")) return STR_LANG_HU - STR_LANG_EN; + if (id == TWOCC("sv")) return STR_LANG_SV - STR_LANG_EN; return 0; } diff --git a/src/platform/rpi/main.cpp b/src/platform/rpi/main.cpp index 295ece59..2f28dc64 100644 --- a/src/platform/rpi/main.cpp +++ b/src/platform/rpi/main.cpp @@ -492,6 +492,7 @@ int checkLanguage() { if (id == TWOCC("cs")) return STR_LANG_CZ - STR_LANG_EN; if (id == TWOCC("zh")) return STR_LANG_CN - STR_LANG_EN; if (id == TWOCC("hu")) return STR_LANG_HU - STR_LANG_EN; + if (id == TWOCC("sv")) return STR_LANG_SV - STR_LANG_EN; return 0; } diff --git a/src/platform/web/index.php b/src/platform/web/index.php index 591ade63..319012af 100644 --- a/src/platform/web/index.php +++ b/src/platform/web/index.php @@ -144,6 +144,8 @@ function getLanguage() { id = 12; } else if (lang == "hu") { id = 13; + } else if (lang == "sv") { + id = 14; } Module.ccall('set_def_lang', 'null', ['number'], [id]); } diff --git a/src/platform/win/OpenLara.vcxproj b/src/platform/win/OpenLara.vcxproj index 1735d655..3ed74071 100644 --- a/src/platform/win/OpenLara.vcxproj +++ b/src/platform/win/OpenLara.vcxproj @@ -155,6 +155,7 @@ + diff --git a/src/platform/win/OpenLara.vcxproj.filters b/src/platform/win/OpenLara.vcxproj.filters index bb27acfb..ead0abb0 100644 --- a/src/platform/win/OpenLara.vcxproj.filters +++ b/src/platform/win/OpenLara.vcxproj.filters @@ -134,6 +134,9 @@ lang + + lang + diff --git a/src/platform/win/main.cpp b/src/platform/win/main.cpp index da742b57..dcfd14e2 100644 --- a/src/platform/win/main.cpp +++ b/src/platform/win/main.cpp @@ -636,6 +636,7 @@ int checkLanguage() { case LANG_CZECH : str = STR_LANG_CZ; break; case LANG_CHINESE : str = STR_LANG_CN; break; case LANG_HUNGARIAN : str = STR_LANG_HU; break; + case LANG_SWEDISH : str = STR_LANG_SV; break; } return str - STR_LANG_EN; } diff --git a/src/platform/xb1/main.cpp b/src/platform/xb1/main.cpp index ac66ab92..bbe0764a 100644 --- a/src/platform/xb1/main.cpp +++ b/src/platform/xb1/main.cpp @@ -382,6 +382,8 @@ ref class View sealed : public ApplicationModel::Core::IFrameworkView str = STR_LANG_CN; } else if (CHECK("hu")) { str = STR_LANG_HU; + } else if (CHECK("sv")) { + str = STR_LANG_SV; } return str - STR_LANG_EN; diff --git a/src/ui.h b/src/ui.h index 48c8b390..6a24cf40 100644 --- a/src/ui.h +++ b/src/ui.h @@ -47,13 +47,14 @@ namespace UI { int advGlyphsStart; - #define RU_MAP "ÁÃÄÆÇÈËÏÓÔÖ×ØÙÚÛÜÝÞßáâãäæçêëìíïòôö÷øùúûüýþÿ" "i~\"" + #define RU_MAP "ÁÃÄÆÇÈËÏÓÔÖ×ØÙÚÛÜÝÞßáâãäæçêëìíïòôö÷øùúûüýþÿ" "i~\"^" #define RU_GLYPH_COUNT (COUNT(RU_MAP) - 1) #define RU_GLYPH_START 102 #define RU_GLYPH_UPPERCASE 20 - #define CHAR_SPR_TILDA (110 + RU_GLYPH_COUNT - 2) - #define CHAR_SPR_I (CHAR_SPR_TILDA - 1) - #define CHAR_SPR_QUOTE (CHAR_SPR_TILDA + 1) + #define CHAR_SPR_TILDA 154 + #define CHAR_SPR_I 153 + #define CHAR_SPR_QUOTE 155 + #define CHAR_SPR_AUH 156 const static uint8 char_width[110 + RU_GLYPH_COUNT] = { 14, 11, 11, 11, 11, 11, 11, 13, 8, 11, 12, 11, 13, 13, 12, 11, 12, 12, 11, 12, 13, 13, 13, 12, 12, 11, // A-Z @@ -66,7 +67,7 @@ namespace UI { 9, 11, 12, 11, 10, 9, 8, 10, 11, 9, 10, 10, 11, 9, 10, 12, // ÜÝÞßáâãäæçêëìíïò 10, 10, 9, 11, 12, 9, 11, 8, 9, 13, 9, // ôö÷øùúûüýþÿ // additional - 5, 10, 10 // i~" + 5, 10, 10, 10 // i~"^ }; static const uint8 char_map[102 + 33*2] = { @@ -95,7 +96,7 @@ namespace UI { } inline bool skipChar(char c) { - return c == '~' || c == '\"' || c == '$' || c == '(' || c == ')' || c == '|' || c == '}' || c == '*' || c == '{' || c == '+'; + return c == '~' || c == '\"' || c == '^' || c == '$' || c == '(' || c == ')' || c == '|' || c == '}' || c == '*' || c == '{' || c == '+'; } inline bool upperCase(int index) { @@ -120,6 +121,7 @@ namespace UI { char c = RU_MAP[i]; if (c == 'á' || c == 'ä' || c == '~' || c == '\"') h = 14; + if (c == '^') h = 16; if (c == 'Ö' || c == 'Ù' || c == 'ö' || c == 'ù') { o = 1; h++; } if (c == 'ô') { o = 2; h += 2; } @@ -423,6 +425,7 @@ namespace UI { if (c == '+' && *text && *text != '@') frame = CHAR_SPR_TILDA; if (c == 'i' && skipChar(lastChar)) frame = CHAR_SPR_I; if (c == '\"') frame = CHAR_SPR_QUOTE; + if (c == '^') frame = CHAR_SPR_AUH; lastChar = c; if (isShadow) { From 55364779a2e99c2239682eb3375f64f89b781a5a Mon Sep 17 00:00:00 2001 From: Leo-89 <62290297+Leo-89@users.noreply.github.com> Date: Sun, 24 Jan 2021 22:23:57 +0100 Subject: [PATCH 036/190] Update it.h (#300) * Update it.h Corrected a wrong accent in the opening FMV. ;) * Update it.h * Update it.h * Update it.h * Update it.h * Update it.h * Update it.h * Update it.h * Update it.h * Update it.h * Update it.h --- src/lang/it.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/lang/it.h b/src/lang/it.h index d97b40fa..bfdb78e4 100644 --- a/src/lang/it.h +++ b/src/lang/it.h @@ -131,10 +131,10 @@ const char *STR_IT[] = { "" /* CAFE */ , "[43500]Che cosa deve fare un uomo@per ricevere da te questo genere di attenzioni?" "[47500]Difficile dirlo con certezza,@ma forse sei sulla buona strada." - "[50000]Ottimo allora. Anche se a dire il vero@$non sono io che ti sto cercando." + "[50000]Ottimo allora. Anche se a dire il vero@non sono io che ti sto cercando." "[54500]No?" "[55000]No. Sono qui per conto di Miss Jacqueline Natla,@della Natla Technologies." - "[59000]Hai presente la creatrice di cose@brillanti e spettacolari?" + "[59000]Hai presente quella che crea@cose scintillanti e belle?" "[64500]Sta' zitto, Larson." "[66000]Mmm.." "[68000]Rifatti gli occhi, Lara." @@ -187,10 +187,10 @@ const char *STR_IT[] = { "" /* PRISON */ , "[00001]Non puoi farlo!" "[01500]Noi ti condanniamo, Natla di Atlantide, per i tuoi crimini." - "[06000]Per l'abuso dei tuoi poteri@e per averci derubato del nostro..." + "[06000]Per l'uso spregiudicato dei tuoi poteri@e per averci derubato del nostro..." "[11500]Non ne avete il diritto! Io..." "[12500]Infrangendo le leggi che governano@e tutelano il nostro popolo" - "[18500]e sfidando Tihocan e me con il tuo esercito." + "[18500]e invadendo Tihocan e me con il nostro esercito." "[23500]I nostri guerrieri hanno lasciato la piramide" "[27000]cosicch)e tu potessi usare il suo potere creativo@per perseguire la tua dissennata brama di distruzione." "[33500]Dissennata!? Guardatevi!" @@ -202,20 +202,20 @@ const char *STR_IT[] = { "" "[49500]come fosse una fabbrica di mostri." "[51000]Sono dei sopravvissuti; una nuova generazione!" "[54000]Solo un mucchio di carcasse dilaniate ora." - "[56000]E tu. Tu verrai imprigionata nel limbo." + "[56000]E tu, tu verrai imprigionata nel limbo." "[60000]Render$a le tue vene, cuore, gambe," "[64000]e quella tua mente schizzata un tutt'uno con il sangue gelido." - "[70000]Goditi la tua eterna disperazione, Natla!" + "[70000]Saluta la tua eterna disperazione, Natla!" "[73000]Neppure tu riposerai bene, o tantomeno il tuo@dannato continente di Atlantide!" /* 22 */ , "[04000]Di nuovo qui?" - "[05500]Anche tu - per assistere al grande debutto, suppongo." + "[05500]Anche tu - per assistere alla grande riapertura, suppongo." "[09500]L'evoluzione fluisce ma la selezione naturale scorre pi$u lenta che mai..." "[13500]Un rifornimento di carne fresca risveglier$a il nostro orgoglio identitario" "[17500] - ci rinforzer$a e ci avvantagger$a..." "[20500]..dar$a persino origine a nuove razze." "[22500]Una specie di evoluzione sotto steroidi, quindi." - "[24500]Un bel calcio nel sedere...@quei poveretti di Qualopec e Tihocan non immaginano neppure" + "[24500]Una spintarella...quei buoni a nulla@di Qualopec e Tihocan non avevano la bench)e minima idea" "[29500] - il cataclisma che colp$i Atlantide ha spazzato via una razza di rammolliti..." "[33500]facendoli ripiombare alle basi della sopravvivenza..." "[37000]..ma non doveva andare in quel modo!" @@ -251,7 +251,7 @@ const char *STR_IT[] = { "" /* 24 */ , "" /* 25 */ , "[03500]Qui giace Tihocan" - "[05000]...uno dei leggendari sovrani di Atlantide..." + "[05000]...uno dei due onorati sovrani di Atlantide..." "[10000]..che anche dopo la rovina del continente..." "[13000]...tent$o di ristabilire l'ordine in queste lande desolate..." "[19000]Egli mor$i senza un erede e la sua conoscenza non fu tramandata..." From 4a952199524dafa42c63236dbab42089d7b18b88 Mon Sep 17 00:00:00 2001 From: XProger Date: Mon, 25 Jan 2021 04:33:22 +0300 Subject: [PATCH 037/190] fix shaders compilation --- src/gapi/gl.h | 2 +- src/platform/win/OpenLara.vcxproj | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gapi/gl.h b/src/gapi/gl.h index 10322f59..e48a9442 100644 --- a/src/gapi/gl.h +++ b/src/gapi/gl.h @@ -1440,7 +1440,7 @@ namespace GAPI { "#define texture2D texture\n" "#define texture3D texture\n" "#define textureCube texture\n" - "#define shadow2DEXT texture\n" + "#define shadow2D texture\n" "out vec4 fragColor;\n"); } else { // vertex diff --git a/src/platform/win/OpenLara.vcxproj b/src/platform/win/OpenLara.vcxproj index 3ed74071..d7ac0b58 100644 --- a/src/platform/win/OpenLara.vcxproj +++ b/src/platform/win/OpenLara.vcxproj @@ -67,6 +67,7 @@ Strict + MultiThreadedDebug Console From 977fa6e0429a9e9702ab47865fabc640a49b996c Mon Sep 17 00:00:00 2001 From: XProger Date: Mon, 25 Jan 2021 18:04:06 +0300 Subject: [PATCH 038/190] fix shadow sampling for GL3 --- src/gapi/gl.h | 7 ++++--- src/shaders/compose.glsl | 6 +----- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/src/gapi/gl.h b/src/gapi/gl.h index e48a9442..befbd5f0 100644 --- a/src/gapi/gl.h +++ b/src/gapi/gl.h @@ -1381,7 +1381,6 @@ namespace GAPI { if (!GLES3) { strcat(extHeader, "#extension GL_EXT_shadow_samplers : enable\n"); } - strcat(extHeader, "#define USE_GL_EXT_shadow_samplers\n"); } #ifdef _GAPI_GLES @@ -1405,7 +1404,7 @@ namespace GAPI { "#define texture2D texture\n" "#define texture3D texture\n" "#define textureCube texture\n" - "#define shadow2DEXT texture\n" + "#define FETCH_SHADOW2D(a,b) texture(a,b)\n" "out vec4 fragColor;\n"); } else { // vertex @@ -1419,6 +1418,7 @@ namespace GAPI { strcat(GLSL_HEADER_FRAG, "precision lowp int;\n" "precision highp float;\n" "#define FRAGMENT\n" + "#define FETCH_SHADOW2D(a,b) shadow2DEXT(a,b)\n" "#define fragColor gl_FragColor\n"); } @@ -1440,7 +1440,7 @@ namespace GAPI { "#define texture2D texture\n" "#define texture3D texture\n" "#define textureCube texture\n" - "#define shadow2D texture\n" + "#define FETCH_SHADOW2D(a,b) texture(a,b)\n" "out vec4 fragColor;\n"); } else { // vertex @@ -1450,6 +1450,7 @@ namespace GAPI { strcat(GLSL_HEADER_FRAG, "#version 110\n"); strcat(GLSL_HEADER_FRAG, extHeader); strcat(GLSL_HEADER_FRAG, "#define FRAGMENT\n" + "#define FETCH_SHADOW2D(a,b) shadow2D(a,b).x\n" "#define fragColor gl_FragColor\n"); } #endif diff --git a/src/shaders/compose.glsl b/src/shaders/compose.glsl index 4a47b765..76fd0cd1 100644 --- a/src/shaders/compose.glsl +++ b/src/shaders/compose.glsl @@ -262,11 +262,7 @@ varying vec4 vTexCoord; // xy - atlas coords, zw - trapezoidal correction #ifdef OPT_SHADOW #ifdef SHADOW_SAMPLER uniform sampler2DShadow sShadow; - #ifdef USE_GL_EXT_shadow_samplers - #define SHADOW(V) (shadow2DEXT(sShadow, V)) - #else - #define SHADOW(V) (shadow2D(sShadow, V).x) - #endif + #define SHADOW(p) (FETCH_SHADOW2D(sShadow, p)) #else uniform sampler2D sShadow; From 4f40b5f81d5e867576e9a4b3b98a8ca04aa32196 Mon Sep 17 00:00:00 2001 From: laripette <77933011+laripette@users.noreply.github.com> Date: Tue, 26 Jan 2021 00:23:00 +0100 Subject: [PATCH 039/190] Update fr.h (#309) --- src/lang/fr.h | 76 +++++++++++++++++++++++++-------------------------- 1 file changed, 38 insertions(+), 38 deletions(-) diff --git a/src/lang/fr.h b/src/lang/fr.h index 21b5ce17..27b701b2 100644 --- a/src/lang/fr.h +++ b/src/lang/fr.h @@ -309,47 +309,47 @@ const char *STR_FR[] = { "" , "La Forteresse Atlantique" , "La Ruche" // TR2 levels - , "Lara's Home" - , "The Great Wall" - , "Venice" - , "Bartoli's Hideout" - , "Opera House" - , "Offshore Rig" - , "Diving Area" - , "40 Fathoms" - , "Wreck of the Maria Doria" - , "Living Quarters" - , "The Deck" - , "Tibetan Foothills" - , "Barkhang Monastery" - , "Catacombs of the Talion" - , "Ice Palace" - , "Temple of Xian" - , "Floating Islands" - , "The Dragon's Lair" + , "La Demeure de Lara" + , "La Grande Muraille" + , "Venise" + , "La Cache de Bartoli" + , "L'Op)era" + , "La plate-forme p)etroli(ere" + , "L'aire de plongeon" + , "Par 40 brasses de fond" + , "L')epave du Maria Doria" + , "Les Quartiers d')equipage" + , "Le pont" + , "Les collines tib)etaines" + , "Monast(ere de Barkhang" + , "Les Catacombes du Talion" + , "Le Palais des Glaces" + , "Le Temple de Xian" + , "Les ÃŽles du Ciel" + , "L'Antre du Dragon" , "Home Sweet Home" // TR3 levels - , "Lara's House" - , "Jungle" - , "Temple Ruins" - , "The River Ganges" - , "Caves Of Kaliya" - , "Coastal Village" - , "Crash Site" - , "Madubu Gorge" - , "Temple Of Puna" - , "Thames Wharf" + , "La Demeure de Lara" + , "La Jungle" + , "Les Ruines du Temple" + , "Le Gange" + , "Les Grottes de Kaliya" + , "Le Village Côtier" + , "Le Lieu du Crash" + , "La Gorge de Madubu" + , "Le Temple de Puna" + , "Les Quais de la Tamise" , "Aldwych" - , "Lud's Gate" - , "City" - , "Nevada Desert" - , "High Security Compound" - , "Area 51" - , "Antarctica" - , "RX-Tech Mines" - , "Lost City Of Tinnos" - , "Meteorite Cavern" - , "All Hallows" + , "Le Portail du Lude" + , "La Ville" + , "Le Désert du Nevada" + , "Quartier de Haute Sécurit)e" + , "La Zone 51" + , "L'Antarctique" + , "Les Mines de RX-Tech" + , "La Cité Perdu de Tinos" + , "La Caverne du M)etéore" + , "L')Eglise Hallows" }; #endif From 5c5b60f43555e3dd0c267ce9f0316dc925e8f38f Mon Sep 17 00:00:00 2001 From: laripette <77933011+laripette@users.noreply.github.com> Date: Tue, 26 Jan 2021 00:23:35 +0100 Subject: [PATCH 040/190] Update fr.h (#310) --- src/lang/fr.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lang/fr.h b/src/lang/fr.h index 27b701b2..d4cab852 100644 --- a/src/lang/fr.h +++ b/src/lang/fr.h @@ -260,7 +260,7 @@ const char *STR_FR[] = { "" /* 27 */ , "Utilisez les touches fl)ech)ees pour@aller dans le salon de musique." /* 28 */ , "OK. On va bouger un peu.@Appuyez sur la touche de saut." /* 29 */ , "Recommencez en appuyant sur une touche fl)ech)ee@et je sauterai dans cette direction." - /* 30 */ , "Oh! Voici le grand hall!@Excusez le d)esordre, mais je veux tout envoyer au garde-meuble@mais les d)em)enageurs ne sont toujours pas arriv)es." + /* 30 */ , "Oh! Voici le grand hall!@Excusez le d)esordre, mais je veux tout envoyer au garde-meuble@et les d)em)enageurs ne sont toujours pas arriv)es." /* 31 */ , "Courez vers une caisse et appuyez@en m(eme temps sur la touche fl)ech)ee haut et la touche d'action@je sauterai dessus." /* 32 */ , "C')etait autrefois la salle de bal,@mais je l'ai transform)ee en salle de gym personnelle.@C'est chouette, non?@Allez, un peu d'exercice." /* 33 */ , "Je ne cours pas sans arr(et dans ce jeu en fait.@Quand je dois (etre prudente, je peux aussi marcher.@Appuyez sur la touche de marche et avancez@jusqu'$a la ligne blanche." From 4c5d1e3fc748143a52d8d906cd234104002dc7a8 Mon Sep 17 00:00:00 2001 From: laripette <77933011+laripette@users.noreply.github.com> Date: Tue, 26 Jan 2021 00:24:27 +0100 Subject: [PATCH 041/190] Update index.php (#311) --- src/platform/web/index.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/platform/web/index.php b/src/platform/web/index.php index 319012af..e27998d8 100644 --- a/src/platform/web/index.php +++ b/src/platform/web/index.php @@ -5,7 +5,7 @@