Skip to content

Commit 77f377b

Browse files
Star1xrSwelter Builder
authored andcommitted
Port Swelter HL2: EP2 mod as swelter game target
- Add #ifdef SWELTER guards to base files (weapons, crosshair, convars) - Create swelter VPC projects (client/server) with new swelter source files - Add swelter-specific weapons, NPCs, achievements, and mod version handler - Add build scripts and CI workflow for swelter Android builds - Add shared swelter ConVars module with proper extern/definition split
1 parent 31adf31 commit 77f377b

69 files changed

Lines changed: 20276 additions & 624 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Build Swelter
2+
on: [push, pull_request]
3+
4+
jobs:
5+
build-android-armv7a-swelter:
6+
runs-on: ubuntu-latest
7+
steps:
8+
- name: Checkout Repository
9+
uses: actions/checkout@v4
10+
11+
- name: Build android-armv7a-swelter
12+
run: |
13+
chmod +x scripts/build-android-armv7a-swelter.sh
14+
./scripts/build-android-armv7a-swelter.sh
15+
16+
- name: Upload Artifact
17+
uses: actions/upload-artifact@v4
18+
with:
19+
name: swelter-android-armv7a-bundle
20+
path: build/**/*.so
21+
22+
build-android-arm64-swelter:
23+
runs-on: ubuntu-latest
24+
steps:
25+
- name: Checkout Repository
26+
uses: actions/checkout@v4
27+
28+
- name: Build android-arm64-swelter
29+
run: |
30+
chmod +x scripts/build-android-arm64-swelter.sh
31+
./scripts/build-android-arm64-swelter.sh
32+
33+
- name: Upload Artifact
34+
uses: actions/upload-artifact@v4
35+
with:
36+
name: swelter-android-arm64-bundle
37+
path: build/**/*.so

common/hl2orange.spa.h

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,30 @@ extern "C" {
359359
// These ids are passed as the dwPictureId parameter to XUserAwardGamerTile.
360360
//
361361

362-
362+
#define ACH_SDE_WEAPON_WRENCH 201
363+
#define ACH_SDE_WEAPON_SOS 202
364+
#define ACH_SDE_WEAPON_357 203
365+
#define ACH_SDE_WEAPON_SMG 204
366+
#define ACH_SDE_BLUE_ROOM 205
367+
#define ACH_SDE_GOOD_END 206
368+
#define ACH_SDE_FLAWLESS_END 207
369+
#define ACH_SDE_LINK 208
370+
#define ACH_SDE_POLIBIUS 209
371+
#define ACH_SDE_DOLL 210
372+
373+
#define ACHIEVEMENT_ACH_SWELTER_END_ANARCHY 250
374+
#define ACHIEVEMENT_ACH_SWELTER_END_RESIST 251
375+
#define ACHIEVEMENT_ACH_SWELTER_RADAR 252
376+
#define ACHIEVEMENT_ACH_SWELTER_VORT 253
377+
#define ACHIEVEMENT_ACH_SWELTER_AK 254
378+
#define ACHIEVEMENT_ACH_SWELTER_SPAWN 255
379+
#define ACHIEVEMENT_ACH_SWELTER_TURRET 256
380+
#define ACHIEVEMENT_ACH_SWELTER_HELI 257
381+
#define ACHIEVEMENT_ACH_SWELTER_APERTURE 258
382+
#define ACHIEVEMENT_ACH_SWELTER_TEA 259
383+
#define ACHIEVEMENT_ACH_SWELTER_TRAIN 260
384+
#define ACHIEVEMENT_ACH_SWELTER_AIR 261
385+
#define ACHIEVEMENT_ACH_SWELTER_ARSENAL 262
363386

364387
#ifdef __cplusplus
365388
}

common/language.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ static const Language_t s_LanguageNames[] =
5656
{ "Brazilian", "brazilian", "#GameUI_Language_Brazilian", "pt_BR", k_Lang_Brazilian, 1046 } ,
5757
{ "Bulgarian", "bulgarian", "#GameUI_Language_Bulgarian", "bg_BG", k_Lang_Bulgarian, 1026 } ,
5858
{ "Greek", "greek", "#GameUI_Language_Greek", "el_GR", k_Lang_Greek, 1032 },
59-
{ "Ukrainian", "ukrainian", "#GameUI_Language_Ukrainian", "uk_UA", k_Lang_Ukrainian, 1058 },
59+
{ "Vietnamese", "vietnamese", "#GameUI_Language_Vietnamese", "vi_VN", k_Lang_Vietnamese, 1066 },
6060
};
6161

6262
//-----------------------------------------------------------------------------

common/language.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ enum ELanguage
4040
k_Lang_Brazilian,
4141
k_Lang_Bulgarian,
4242
k_Lang_Greek,
43-
k_Lang_Ukrainian,
43+
k_Lang_Vietnamese,
4444
k_Lang_MAX
4545
};
4646

game/client/SwelterMapOutdated.cpp

Lines changed: 138 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,138 @@
1+
#include "cbase.h"
2+
using namespace vgui;
3+
#include <vgui/IVGui.h>
4+
#include <vgui_controls/PropertyDialog.h>
5+
#include <vgui_controls/PropertyPage.h>
6+
#include <vgui_controls/PropertySheet.h>
7+
#include <vgui_controls/CheckButton.h>
8+
#include <vgui_controls/RadioButton.h>
9+
#include <vgui_controls/Slider.h>
10+
#include <vgui_controls/Button.h>
11+
#include <vgui_controls/Combobox.h>
12+
#include "ienginevgui.h"
13+
//#include "../server/hl2/hl2_player.h"
14+
15+
16+
17+
class COutdatedSwelter : public vgui::PropertyPage
18+
{
19+
DECLARE_CLASS_SIMPLE(COutdatedSwelter, vgui::PropertyPage);
20+
21+
public:
22+
COutdatedSwelter(vgui::Panel* parent);
23+
~COutdatedSwelter() {}
24+
25+
virtual void OnApplyChanges();
26+
virtual void OnCommand(char const *cmd);
27+
28+
//protected:
29+
// virtual void ApplySchemeSettings(vgui::IScheme* pScheme);
30+
31+
private:
32+
MESSAGE_FUNC_PTR(OnCheckButtonChecked, "CheckButtonChecked", panel);
33+
34+
};
35+
36+
COutdatedSwelter::COutdatedSwelter(vgui::Panel* parent) : PropertyPage(parent, NULL)
37+
{
38+
39+
LoadControlSettings("resource/OptionsSwelter.res");
40+
}
41+
42+
//void ApplyChangesToConVar(const char *pConVarName, int value)
43+
//{
44+
// Assert(cvar->FindVar(pConVarName));
45+
// char szCmd[256];
46+
// Q_snprintf(szCmd, sizeof(szCmd), "%s %d\n", pConVarName, value);
47+
// engine->ClientCmd_Unrestricted(szCmd);
48+
//}
49+
50+
void COutdatedSwelter::OnApplyChanges()
51+
{
52+
53+
}
54+
55+
void COutdatedSwelter::OnCheckButtonChecked(Panel* panel)
56+
{
57+
PostActionSignal(new KeyValues("ApplyButtonEnable"));
58+
}
59+
60+
class CSwelterMenuOutdated : public vgui::PropertyDialog
61+
{
62+
DECLARE_CLASS_SIMPLE(CSwelterMenuOutdated, vgui::PropertyDialog);
63+
64+
public:
65+
CSwelterMenuOutdated(vgui::VPANEL parent);
66+
~CSwelterMenuOutdated() {}
67+
68+
virtual void Activate();
69+
70+
71+
protected:
72+
virtual void OnTick();
73+
virtual void OnClose();
74+
75+
private:
76+
COutdatedSwelter* m_SwelterOutdated;
77+
};
78+
79+
CSwelterMenuOutdated::CSwelterMenuOutdated(vgui::VPANEL parent) : BaseClass(NULL, "CSwelterMenuOutdated")
80+
{
81+
SetDeleteSelfOnClose(true);
82+
SetBounds(0, 0, 640, 512);
83+
SetSizeable(false);
84+
MoveToCenterOfScreen();
85+
ActivateMinimized();
86+
87+
SetTitle("#pht_warning", true);
88+
89+
//m_SwelterOutdated = new COutdatedSwelter(this);
90+
//AddPage(m_SwelterOutdated, "#pht_outdate_title");
91+
LoadControlSettings("resource/SwelterMapOutdated.res");
92+
SetApplyButtonVisible(false);
93+
GetPropertySheet()->SetTabWidth(84);
94+
vgui::ivgui()->AddTickSignal(GetVPanel(), 100);
95+
}
96+
97+
void CSwelterMenuOutdated::Activate()
98+
{
99+
BaseClass::Activate();
100+
EnableApplyButton(false);
101+
}
102+
103+
void CSwelterMenuOutdated::OnTick()
104+
{
105+
BaseClass::OnTick();
106+
if (engine->IsPaused() || engine->IsLevelMainMenuBackground())
107+
SetVisible(true);
108+
else
109+
SetVisible(false);
110+
}
111+
112+
bool isSwelterOutdateActive = false;
113+
114+
void CSwelterMenuOutdated::OnClose()
115+
{
116+
engine->ClientCmd("unpause\n");
117+
BaseClass::OnClose();
118+
isSwelterOutdateActive = false;
119+
}
120+
121+
void COutdatedSwelter::OnCommand(char const *cmd)
122+
{
123+
}
124+
125+
126+
CSwelterMenuOutdated* SwelterMenuOutdated = NULL;
127+
128+
CON_COMMAND(OpenSwelterOutdate, "Turns on Oudtaded map warning Panel")
129+
{
130+
VPANEL gameToolParent = enginevgui->GetPanel(PANEL_CLIENTDLL_TOOLS);
131+
if (!isSwelterOutdateActive)
132+
{
133+
SwelterMenuOutdated = new CSwelterMenuOutdated(gameToolParent);
134+
isSwelterOutdateActive = true;
135+
}
136+
137+
SwelterMenuOutdated->Activate();
138+
}

0 commit comments

Comments
 (0)