Skip to content

Commit 3ece755

Browse files
committed
Merge branch 'development' into browncoat-lmg
2 parents 089e61b + d8e7869 commit 3ece755

File tree

137 files changed

+636
-233
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

137 files changed

+636
-233
lines changed

.github/parameters/macports.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,5 @@ ports:
1212
- name: luajit
1313
- name: flac
1414
- name: dylibbundler
15-
- name: tree
15+
- name: tree
16+
- name: ccache

.github/workflows/clang-format.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,15 @@ jobs:
3131
- uses: actions/setup-python@v3
3232

3333
- name: Install dependencies
34-
run: sudo apt-get install -y clang-format
34+
run: |
35+
mkdir bin
36+
wget https://github.com/muttleyxd/clang-tools-static-binaries/releases/download/master-8f72ab3c/clang-format-17_linux-amd64 -O bin/clang-format-17
37+
chmod +x bin/clang-format-17
3538
3639
- name: Run clang-format
3740
run: |
3841
.github/scripts/run-clang-format.py \
42+
--clang-format-executable bin/clang-format-17 \
3943
-i \
4044
-r Source Data/Base.rte/Shaders \
4145
--exclude Source/System/Base64 \
@@ -47,7 +51,8 @@ jobs:
4751
- name: Add missing newlines
4852
run: |
4953
.github/scripts/run-clang-format.py \
50-
-i --clang-format-executable .github/scripts/add-eol.sh \
54+
--clang-format-executable .github/scripts/add-eol.sh \
55+
-i \
5156
-r Source Data/Base.rte/Shaders \
5257
--exclude Source/System/Base64 \
5358
--exclude Source/System/BitMask \

.github/workflows/meson.yml

Lines changed: 23 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,14 @@ jobs:
6262
- name: Install Dependencies
6363
run: |
6464
sudo apt-get update -yq
65-
sudo apt-get install --no-install-recommends wget liballegro4-dev libloadpng4-dev libflac++-dev luajit-5.1-dev liblua5.2-dev libminizip-dev liblz4-dev libpng++-dev libx11-dev libboost-dev libtbb-dev libsdl2-dev libsdl2-image-dev libopengl-dev libfuse2 ninja-build
65+
sudo apt-get install --no-install-recommends wget liballegro4-dev libloadpng4-dev libflac++-dev luajit-5.1-dev liblua5.2-dev libminizip-dev liblz4-dev libpng++-dev libx11-dev libboost-dev libtbb-dev libsdl2-dev libsdl2-image-dev libopengl-dev libfuse2 ninja-build ccache
6666
sudo pip install meson
6767
68+
- name: ccache
69+
uses: hendrikmuhs/[email protected]
70+
with:
71+
key: ${{ github.job }}-${{ matrix.os }}
72+
6873
- name: Set Version
6974
if: ${{inputs.new_release_version}}
7075
uses: ./.github/actions/set_version
@@ -74,22 +79,22 @@ jobs:
7479

7580
- name: Setup Meson
7681
env:
77-
CC: "gcc"
78-
CXX: "g++"
82+
CC: "ccache gcc"
83+
CXX: "ccache g++"
7984
run: |
8085
meson setup --buildtype=${{inputs.build_type}} -Ddebug_type=${{inputs.debug_level}} -Db_lto=true build
8186
8287
- name: Configure for AppImage
8388
if: ${{inputs.upload_artefacts}}
8489
env:
85-
CC: "gcc"
86-
CXX: "g++"
90+
CC: "ccache gcc"
91+
CXX: "ccache g++"
8792
run: meson configure -Dinstall_data=false -Dinstall_runner=false -Dfmod_dir=/usr/lib/ --prefix=/usr/ build
8893

8994
- name: Build
9095
env:
91-
CC: "gcc"
92-
CXX: "g++"
96+
CC: "ccache gcc"
97+
CXX: "ccache g++"
9398
run: |
9499
meson compile -C build
95100
@@ -147,19 +152,24 @@ jobs:
147152
new_release_version: ${{inputs.new_release_version}}
148153
github_token: ${{ secrets.GITHUB_TOKEN }}
149154

155+
- name: ccache
156+
uses: hendrikmuhs/[email protected]
157+
with:
158+
key: ${{ github.job }}-${{ matrix.os }}
159+
150160
- name: Setup Meson
151161
env:
152-
CC: "gcc-${{env.GCC_VERSION}}"
153-
CXX: "g++-${{env.GCC_VERSION}}"
162+
CC: "ccache gcc-${{env.GCC_VERSION}}"
163+
CXX: "ccache g++-${{env.GCC_VERSION}}"
154164
LDFLAGS: "-static-libgcc -static-libstdc++"
155165
run: |
156166
meson setup --buildtype=${{inputs.build_type}} -Ddebug_type=${{inputs.debug_level}} -Db_lto=false build
157167
158168
- name: Configure for App Bundle
159169
if: ${{inputs.upload_artefacts}}
160170
env:
161-
CC: "gcc-${{env.GCC_VERSION}}"
162-
CXX: "g++-${{env.GCC_VERSION}}"
171+
CC: "ccache gcc-${{env.GCC_VERSION}}"
172+
CXX: "ccache g++-${{env.GCC_VERSION}}"
163173
LDFLAGS: "-static-libgcc -static-libstdc++"
164174
run: |
165175
meson configure \
@@ -170,8 +180,8 @@ jobs:
170180
171181
- name: Build
172182
env:
173-
CC: "gcc-${{env.GCC_VERSION}}"
174-
CXX: "g++-${{env.GCC_VERSION}}"
183+
CC: "ccache gcc-${{env.GCC_VERSION}}"
184+
CXX: "ccache g++-${{env.GCC_VERSION}}"
175185
LDFLAGS: "-static-libgcc -static-libstdc++"
176186
run: |
177187
meson compile -C build

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
124124

125125
- New `FrameMan` Lua functions `SetHudDisabled(disabled, screenId)` and `IsHudDisabled(screenId)` that allows disabling a given screen's HUD, and checking whether it's currently disabled. The screenId parameters are optional and default to screen 0.
126126

127-
- Exposed `FrameMan` property `ScreenCount` to Lua (R).
127+
- Exposed `FrameMan` properties `ScreenCount` and `ResolutionMultiplier` to Lua (R).
128128

129129
</details>
130130

Data/Base.rte/Shaders/Blit8.frag

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ in vec2 textureUV;
66
out vec4 FragColor;
77

88
uniform sampler2D rteTexture;
9-
uniform sampler1D rtePalette;
9+
uniform sampler2D rtePalette;
1010

1111
void main() {
1212
float colorIndex = texture(rteTexture, vec2(textureUV.x, -textureUV.y)).r;
13-
FragColor = texture(rtePalette, colorIndex);
13+
FragColor = texture(rtePalette, vec2(colorIndex, 0.0F));
1414
}

Data/Base.rte/Shaders/ScreenBlit.frag

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,5 @@ void main() {
2020
vec4 guiColor = texture2DAA(rteGUITexture, textureUV);
2121
float guiSolid = step(0.00000001, guiColor.r + guiColor.g + guiColor.b);
2222
float blendRatio = max(guiColor.a, guiSolid);
23-
FragColor = (texture2DAA(rteTexture, textureUV) * (1 - blendRatio)) + guiColor * blendRatio;
23+
FragColor = (texture2DAA(rteTexture, textureUV) * (1.0F - blendRatio)) + guiColor * blendRatio;
2424
}

README.md

Lines changed: 13 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,9 @@ You'll probably want [Visual Studio Community Edition](https://visualstudio.micr
2424
You also need to have both x86 and x64 versions of the [Visual C++ Redistributable for Visual Studio 2015-2022](https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads) installed in order to run the compiled builds.
2525
You may also want to check out the list of recommended Visual Studio plugins [here](https://github.com/cortex-command-community/Cortex-Command-Community-Project-Source/wiki/Information,-Recommended-Plugins-and-Useful-Links).
2626

27-
2. Clone this Source Repository and the [Data Repository](https://github.com/cortex-command-community/Cortex-Command-Community-Project-Data) in neighboring folders.
28-
**Do Not** change the folder names unless you want to make trouble for yourself.
27+
2. Clone this Repository into a folder.
2928

30-
3. Copy the following libraries from `Cortex-Command-Community-Project-Source\external\lib\win` into the **Data Repository**:
29+
3. Copy the following libraries from `Cortex-Command-Community-Project\external\lib\win` into the root directory:
3130
* `fmod.dll`
3231
* `SDL2.dll`
3332

@@ -85,32 +84,25 @@ For unspecified versions assume compatibility with the latest ubuntu LTS release
8584

8685
1. Install Dependencies (see [below](#installing-dependencies) for instructions).
8786

88-
2. Clone this Source Repository and the [Data Respository](https://github.com/cortex-command-community/Cortex-Command-Community-Project-Data).
87+
2. Clone this Repository and open a terminal in it.
8988

90-
3. Open a terminal in the Source Repository.
91-
92-
4. `meson setup build` or `meson setup --buildtype=debug build` for debug build (default is release build)
89+
3. `meson setup build` or `meson setup --buildtype=debug build` for debug build (default is release build)
9390
For macOS you need to specify gcc, with `env CC=gcc-13 CXX=g++-13 meson setup build`
9491

95-
5. `ninja -C build`
92+
4. `ninja -C build`
9693

97-
6. (optional) `sudo ninja install -C build` (To uninstall later, keep the build directory intact. The game can then be uninstalled by `sudo ninja uninstall -C build`)
94+
5. (optional) `sudo ninja install -C build` (To uninstall later, keep the build directory intact. The game can then be uninstalled by `sudo ninja uninstall -C build`)
9895

99-
If you want to change the buildtype afterwards, you can use `meson configure --buildtype {release or debug}` in the build directory or create a secondary build directory as in Step 4. There are also additional build options documented in the [wiki](https://github.com/cortex-command-community/Cortex-Command-Community-Project-Source/wiki/Meson-build-options) as well as through running `meson configure` in the build directory.
96+
If you want to change the buildtype afterwards, you can use `meson configure --buildtype {release or debug}` in the build directory or create a secondary build directory as in Step 3. There are also additional build options documented in the [wiki](https://github.com/cortex-command-community/Cortex-Command-Community-Project-Source/wiki/Meson-build-options) as well as through running `meson configure` in the build directory.
10097

10198
## Running
102-
(If you installed the game in step 6 above, it should appear with your regular applications and will just run)
103-
104-
1. Copy (or link, might be preferable for testing builds) `build/CortexCommand` or `build/CortexCommand_debug` (depending on if you made a debug build) into the **Data Repository**.
105-
106-
`cd $DATA_REPOSITORY; ln -s ../Cortex-Command-Community-Project-Source/build/CortexCommand . `
107-
108-
2. (*optional*) Copy (link) all `libfmod` files from `external/lib/[os]/[arch]` into the **Data Repository**.
109-
- Linux: `cd $DATA_REPOSITORY; ln -s ../Cortex-Command-Community-Project-Source/external/lib/linux/x86_64/libfmod.so* .`
110-
- macOS: `cd $DATA_REPOSITORY; ln -s ../Cortex-Command-Community-Project-Source/external/lib/macOS/libfmod.dylib .`
99+
(If you installed the game in step 5 above, it should appear with your regular applications and will just run)
111100

101+
1. (*optional*) Copy (link) all `libfmod` files from `external/lib/[os]/[arch]` into the repository.
102+
- Linux: `cd $REPOSITORY; ln -s ../external/lib/linux/x86_64/libfmod.so* .`
103+
- macOS: `cd $REPOSITORY; ln -s ../external/lib/macOS/libfmod.dylib .`
112104

113-
4. Run `./CortexCommand` or `./CortexCommand_debug` in the **Data Repository**.
105+
2. Run `./CortexCommand` or `./CortexCommand_debug`.
114106

115107
## Installing Dependencies
116108

@@ -184,5 +176,4 @@ If you're familiar with github you should be familiar with making issues. It's a
184176

185177
# How to Contribute #
186178

187-
If you've got experience with the game's ini data through modding it, are good at spriting or know Lua, maybe you can contribute some of your time directly to the project. We'll look at any pull requests that come in and are always happy to have more hands on deck.
188-
If you're an experienced programmer (particularly with C++), there's also tons of work to be done in our [source](https://github.com/cortex-command-community/Cortex-Command-Community-Project-Source) repository.
179+
If you've got any C++ experience, experience with the game's ini data through modding it, are good at spriting or know Lua, you can contribute some of your time directly to the project. We'll look at any pull requests that come in and are always happy to have more hands on deck.

RTEA.common.props

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
4+
5+
<ItemDefinitionGroup>
6+
<ClCompile>
7+
<PreprocessorDefinitions>WIN32_LEAN_AND_MEAN;ALLEGRO_STATICLINK;ALLEGRO_NO_STD_HEADERS;ALLEGRO_NO_MAGIC_MAIN;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_WINDOWS;WIN32;NOMINMAX;NOGDI;NOKERNEL;NONLS;NOMEMMGR;NOGDICAPMASKS;NOVIRTUALKEYCODES;NOWINMESSAGES;NOWINSTYLES;NOMETAFILE;NOSCROLL;NOTEXTMETRIC;NOCOMM;NOKANJI;NOHELP;NOPROFILER;NODEFERWINDOWPOS;NOMCX;NOMENUS;NOICONS;NOKEYSTATES;NOSYSCOMMANDS;NORASTEROPS;NOSHOWWINDOW;OEMRESOURCE;NOATOM;NODRAWTEXT;NOCOLOR;NOCTLMGR;NOMSG;NOOPENFILE;NOSERVICE;NOSOUND;NOWH;NOWINOFFSETS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
8+
</ClCompile>
9+
</ItemDefinitionGroup>
10+
</Project>

0 commit comments

Comments
 (0)