From e3758a1370f6e28c02997184390c195d8255c7a7 Mon Sep 17 00:00:00 2001 From: /dev/urandom Date: Sun, 25 Dec 2016 00:04:46 +0100 Subject: [PATCH 1/3] [Changelog] Add recent changes and fix text for v0.2.1. --- CHANGELOG.md | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8e5c69a6..59f87cb9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,13 +6,25 @@ The format is based on [Keep a Changelog v0.3.0](http://keepachangelog.com/en/0. ## [Unreleased] +This is the third public Alpha version, it mostly consists of bug fixes. + +### Changed + +- Optimized fastfiles, they are now a lot smaller. + +### Fixed + +- Fix issues when spawning more than one bot. +- Fix no ammo bug. +- Fix splash screen hang. + ### Known issues - IW4x on Linux currently requires gnutls to be installed to access the Tor service via HTTPS. ## [0.2.1] - 2016-12-14 -This is going to be the second public Alpha version. +This is the second public Alpha version. ### Added From 33354cbf39a44e8b6b41ce10756d01a095215070 Mon Sep 17 00:00:00 2001 From: /dev/urandom Date: Sun, 25 Dec 2016 00:09:34 +0100 Subject: [PATCH 2/3] [Changelog] Unreleased -> 0.2.2. [ci skip] --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 59f87cb9..de8418ef 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,12 @@ The format is based on [Keep a Changelog v0.3.0](http://keepachangelog.com/en/0. ## [Unreleased] +### Known issues + +- IW4x on Linux currently requires gnutls to be installed to access the Tor service via HTTPS. + +## [0.2.2] - 2016-12-25 + This is the third public Alpha version, it mostly consists of bug fixes. ### Changed From 3af408214391b895642294cda584bd0e308f3f8f Mon Sep 17 00:00:00 2001 From: TheApadayo Date: Sun, 25 Dec 2016 16:23:44 -0500 Subject: [PATCH 3/3] [ZoneBuilder] Update with new structures. Side Note: I changed some stuff in Zones.cpp that could fuck up iw4c map loading so someone needs to test that as I don't have the maps --- src/Components/Modules/Zones.cpp | 12 +++-- src/Game/Structs.hpp | 84 +++++++++++++++++++++++++++----- 2 files changed, 80 insertions(+), 16 deletions(-) diff --git a/src/Components/Modules/Zones.cpp b/src/Components/Modules/Zones.cpp index 3946f236..ac461871 100644 --- a/src/Components/Modules/Zones.cpp +++ b/src/Components/Modules/Zones.cpp @@ -1319,12 +1319,14 @@ namespace Components // Pretty sure that's wrong // Actually, it's not - memcpy(material->drawSurf, material359.drawSurfBegin, 8); + // yes it was lol + memcpy(&material->drawSurf.packed, material359.drawSurfBegin, 8); - material->drawSurf[8] = material359.drawSurf[0]; - material->drawSurf[9] = material359.drawSurf[1]; - material->drawSurf[10] = material359.drawSurf[2]; - material->drawSurf[11] = material359.drawSurf[3]; + memcpy(&material->surfaceTypeBits, &material359.drawSurf[0], 6); // copies both surfaceTypeBits and hashIndex + //material->drawSurf[8] = material359.drawSurf[0]; + //material->drawSurf[9] = material359.drawSurf[1]; + //material->drawSurf[10] = material359.drawSurf[2]; + //material->drawSurf[11] = material359.drawSurf[3]; if (material359.sGameFlags & 0x100) { diff --git a/src/Game/Structs.hpp b/src/Game/Structs.hpp index aabeb604..bdf4d8c3 100644 --- a/src/Game/Structs.hpp +++ b/src/Game/Structs.hpp @@ -434,6 +434,63 @@ namespace Game MaterialPass passes[1]; }; + enum MaterialTechniqueType + { + TECHNIQUE_DEPTH_PREPASS = 0x0, + TECHNIQUE_BUILD_FLOAT_Z = 0x1, + TECHNIQUE_BUILD_SHADOWMAP_DEPTH = 0x2, + TECHNIQUE_BUILD_SHADOWMAP_COLOR = 0x3, + TECHNIQUE_UNLIT = 0x4, + TECHNIQUE_EMISSIVE = 0x5, + TECHNIQUE_EMISSIVE_DFOG = 0x6, + TECHNIQUE_EMISSIVE_SHADOW = 0x7, + TECHNIQUE_EMISSIVE_SHADOW_DFOG = 0x8, + TECHNIQUE_LIT_BEGIN = 0x9, + TECHNIQUE_LIT = 0x9, + TECHNIQUE_LIT_DFOG = 0xA, + TECHNIQUE_LIT_SUN = 0xB, + TECHNIQUE_LIT_SUN_DFOG = 0xC, + TECHNIQUE_LIT_SUN_SHADOW = 0xD, + TECHNIQUE_LIT_SUN_SHADOW_DFOG = 0xE, + TECHNIQUE_LIT_SPOT = 0xF, + TECHNIQUE_LIT_SPOT_DFOG = 0x10, + TECHNIQUE_LIT_SPOT_SHADOW = 0x11, + TECHNIQUE_LIT_SPOT_SHADOW_DFOG = 0x12, + TECHNIQUE_LIT_OMNI = 0x13, + TECHNIQUE_LIT_OMNI_DFOG = 0x14, + TECHNIQUE_LIT_OMNI_SHADOW = 0x15, + TECHNIQUE_LIT_OMNI_SHADOW_DFOG = 0x16, + TECHNIQUE_LIT_INSTANCED = 0x17, + TECHNIQUE_LIT_INSTANCED_DFOG = 0x18, + TECHNIQUE_LIT_INSTANCED_SUN = 0x19, + TECHNIQUE_LIT_INSTANCED_SUN_DFOG = 0x1A, + TECHNIQUE_LIT_INSTANCED_SUN_SHADOW = 0x1B, + TECHNIQUE_LIT_INSTANCED_SUN_SHADOW_DFOG = 0x1C, + TECHNIQUE_LIT_INSTANCED_SPOT = 0x1D, + TECHNIQUE_LIT_INSTANCED_SPOT_DFOG = 0x1E, + TECHNIQUE_LIT_INSTANCED_SPOT_SHADOW = 0x1F, + TECHNIQUE_LIT_INSTANCED_SPOT_SHADOW_DFOG = 0x20, + TECHNIQUE_LIT_INSTANCED_OMNI = 0x21, + TECHNIQUE_LIT_INSTANCED_OMNI_DFOG = 0x22, + TECHNIQUE_LIT_INSTANCED_OMNI_SHADOW = 0x23, + TECHNIQUE_LIT_INSTANCED_OMNI_SHADOW_DFOG = 0x24, + TECHNIQUE_LIT_END = 0x25, + TECHNIQUE_LIGHT_SPOT = 0x25, + TECHNIQUE_LIGHT_OMNI = 0x26, + TECHNIQUE_LIGHT_SPOT_SHADOW = 0x27, + TECHNIQUE_FAKELIGHT_NORMAL = 0x28, + TECHNIQUE_FAKELIGHT_VIEW = 0x29, + TECHNIQUE_SUNLIGHT_PREVIEW = 0x2A, + TECHNIQUE_CASE_TEXTURE = 0x2B, + TECHNIQUE_WIREFRAME_SOLID = 0x2C, + TECHNIQUE_WIREFRAME_SHADED = 0x2D, + TECHNIQUE_DEBUG_BUMPMAP = 0x2E, + TECHNIQUE_DEBUG_BUMPMAP_INSTANCED = 0x2F, + TECHNIQUE_COUNT = 0x30, + TECHNIQUE_TOTAL_COUNT = 0x31, + TECHNIQUE_NONE = 0x32, + }; + struct MaterialTechniqueSet { const char* name; @@ -449,6 +506,18 @@ namespace Game vec4_t literal; }; + struct GfxDrawSurfFields + { + __int64 _bf0; + }; + + union GfxDrawSurf + { + GfxDrawSurfFields fields; + unsigned __int64 packed; + }; + +#pragma pack(push, 4) struct Material { const char *name; @@ -456,8 +525,10 @@ namespace Game char sortKey; char textureAtlasRowCount; char textureAtlasColumnCount; - char drawSurf[12]; + GfxDrawSurf drawSurf; int surfaceTypeBits; + unsigned __int16 hashIndex; + unsigned __int16 pad; char stateBitsEntry[48]; char textureCount; char constantCount; @@ -469,6 +540,7 @@ namespace Game MaterialConstantDef *constantTable; void *stateBitTable; }; +#pragma pack(pop) struct TracerDef { @@ -2888,16 +2960,6 @@ namespace Game //char flags; }; - struct GfxDrawSurfFields - { - __int64 _bf0; - }; - - union GfxDrawSurf - { - GfxDrawSurfFields fields; - unsigned __int64 packed; - }; struct GfxStaticModelDrawInst;