Skip to content

Commit

Permalink
Merge remote-tracking branch 'remaster/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
0lvin committed Sep 14, 2024
2 parents d305a33 + 3a5d0af commit 4738ba2
Show file tree
Hide file tree
Showing 14 changed files with 495 additions and 19 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ on:
push:
branches:
- 'master'
tags:
- "*"
pull_request:
types:
- edited
Expand Down Expand Up @@ -58,3 +60,16 @@ jobs:
name: quake2-macos-${{github.sha}}
path: publish/
if-no-files-found: error
- name: Create tag package
if: ${{ startsWith(github.ref, 'refs/tags/') }}
run: |
# create archive
mkdir yquake2remaster-${{matrix.env}}-${{github.ref_name}}
cp -rv publish/quake2-macos-${{github.sha}}/* yquake2remaster-${{matrix.env}}-${{github.ref_name}}
zip -9r yquake2remaster-${{matrix.env}}-${{github.ref_name}}.zip yquake2remaster-${{matrix.env}}-${{github.ref_name}}
- name: Upload Release Asset
uses: softprops/action-gh-release@v2
if: ${{ startsWith(github.ref, 'refs/tags/') }}
with:
files: |
yquake2remaster-${{matrix.env}}-${{github.ref_name}}.zip
4 changes: 2 additions & 2 deletions .github/workflows/win32.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ jobs:
cp doc/080_contributing.md publish/quake2-win32-${{github.sha}}/misc/docs/080_contributing.txt
cp doc/090_filelists.md publish/quake2-win32-${{github.sha}}/misc/docs/090_filelists.md
# SDL2
wget -c https://github.com/libsdl-org/SDL/releases/download/release-2.30.6/SDL2-2.30.6-win32-x86.zip
unzip -o SDL2-2.30.6-win32-x86.zip
wget -c https://github.com/libsdl-org/SDL/releases/download/release-2.30.7/SDL2-2.30.7-win32-x86.zip
unzip -o SDL2-2.30.7-win32-x86.zip
cp SDL2.dll publish/quake2-win32-${{github.sha}}/
# openal-soft
wget -c https://github.com/kcat/openal-soft/releases/download/1.23.1/openal-soft-1.23.1-bin.zip
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/win64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,13 @@ jobs:
cp doc/080_contributing.md publish/quake2-win64-${{github.sha}}/misc/docs/080_contributing.txt
cp doc/090_filelists.md publish/quake2-win64-${{github.sha}}/misc/docs/090_filelists.md
# SDL2
wget -c https://github.com/libsdl-org/SDL/releases/download/release-2.30.6/SDL2-2.30.6-win32-x86.zip
unzip -o SDL2-2.30.6-win32-x86.zip
wget -c https://github.com/libsdl-org/SDL/releases/download/release-2.30.7/SDL2-2.30.7-win32-x64.zip
unzip -o SDL2-2.30.7-win32-x64.zip
cp SDL2.dll publish/quake2-win64-${{github.sha}}/
# static ffmpeg
wget -c https://github.com/BtbN/FFmpeg-Builds/releases/download/autobuild-2023-11-30-12-55/ffmpeg-n6.0.1-win64-lgpl-shared-6.0.zip
unzip -o ffmpeg-n6.0.1-win64-lgpl-shared-6.0.zip
cp ffmpeg-n6.0.1-win64-lgpl-shared-6.0/bin/*.dll publish/quake2-win64-${{github.sha}}/
wget -c https://github.com/BtbN/FFmpeg-Builds/releases/download/autobuild-2024-08-31-12-50/ffmpeg-n7.0.2-6-g7e69129d2f-win64-lgpl-shared-7.0.zip
unzip -o ffmpeg-n7.0.2-6-g7e69129d2f-win64-lgpl-shared-7.0.zip
cp ffmpeg-n7.0.2-6-g7e69129d2f-win64-lgpl-shared-7.0/bin/*.dll publish/quake2-win64-${{github.sha}}/
# remove unused libraries
rm -fv publish/quake2-win64-${{github.sha}}/avdevice*.dll publish/quake2-win64-${{github.sha}}/avfilter*.dll publish/quake2-win64-${{github.sha}}/postproc*.dll
# openal-soft
Expand Down
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -1039,6 +1039,7 @@ GAME_OBJS_ = \
src/game/g_stateinfo.o \
src/game/g_svcmds.o \
src/game/g_target.o \
src/game/g_translate.o \
src/game/g_trigger.o \
src/game/g_utils.o \
src/game/g_waterfx.o \
Expand Down
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,8 @@ Note:
with tranparency or some animations flags and properties.
* If you like support some other maps type, create pull request for Mod_Load2QBSP
function and provide a link to demo maps.
* Use `maptype 1` before load any Heretic 2 maps. Look to
[maptype_t](src/common/header/cmodel.h#L42) for more info.

Games:

Expand Down Expand Up @@ -185,14 +187,15 @@ Goals:
* [x] suport Daikatana/SiN .pak/.sin format from pakextract,
* [x] Support flow/scale flags for Q64 maps,
* [x] Add debug progress loading code for maps,
* [x] MDR model format in Star Trek: Voyager – Elite Force,
* [x] MDR model format from Star Trek: Voyager – Elite Force,
* [ ] MDA entity format from Anachronox,
* [x] RGB particles support instead palette based one,
* [x] Get rid of VID_PaletteColor client internal api use,
* [x] Broken maps groups from base2 to next,
* [ ] Single player ReRelease support,
* [ ] Support effects and additional flags for ReRelease when possible.
* [ ] Use shared model cache in client code insted reimplemnet in each render,
* [ ] Check load soft colormap as 24bit color,
* [x] Check load soft colormap as 24bit color from loaded image,
* [ ] Fix transparent textures in Daikatana/SiN maps,
* [ ] Use separete texture hi-color buffer for ui in soft render,
* [ ] Cleanup function declarations in game save code,
Expand Down
13 changes: 13 additions & 0 deletions src/common/filesystem.c
Original file line number Diff line number Diff line change
Expand Up @@ -2238,6 +2238,19 @@ FS_AddDirToSearchPath(char *dir, qboolean create) {
search->next = fs_searchPaths;
fs_searchPaths = search;

/* remaster additional files */
pack = FS_LoadPK3("Q2Game.kpf");
if (pack)
{
pack->isProtectedPak = true;

FS_SortPack(pack);

search = Z_Malloc(sizeof(fsSearchPath_t));
search->pack = pack;
search->next = fs_searchPaths;
fs_searchPaths = search;
}

// Numbered paks contain the official game data, they
// need to be added first and are marked protected.
Expand Down
11 changes: 11 additions & 0 deletions src/common/models.c
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,7 @@ Mod_LoadFileWithoutExt(const char *namewe, void **buffer, const char* ext)
if (!strcmp(ext, "fm") ||
!strcmp(ext, "def") ||
!strcmp(ext, "dkm") ||
!strcmp(ext, "mda") ||
!strcmp(ext, "md2") ||
!strcmp(ext, "md3") ||
!strcmp(ext, "mdr") ||
Expand Down Expand Up @@ -296,6 +297,16 @@ Mod_LoadFileWithoutExt(const char *namewe, void **buffer, const char* ext)
return filesize;
}

/* Check Anachronox model definition */
Q_strlcpy(newname + tlen, ".mda", sizeof(newname));
filesize = FS_LoadFile(newname, buffer);
if (filesize > 0)
{
Com_DPrintf("%s: %s loaded as mda (Anachronox)\n",
__func__, namewe);
return filesize;
}

/* Check Kingpin model */
Q_strlcpy(newname + tlen, ".mdx", sizeof(newname));
filesize = FS_LoadFile(newname, buffer);
Expand Down
14 changes: 13 additions & 1 deletion src/game/g_func.c
Original file line number Diff line number Diff line change
Expand Up @@ -1534,17 +1534,29 @@ door_killed (edict_t *self, edict_t *inflictor, edict_t *attacker, int damage, v
void door_touch (edict_t *self, trace_t *trace)
{
edict_t *other;
int sound_index;

other = trace->ent;

if (!self || !other)
{
return;
}

if (!other->client)
{
return;
}

if (level.time < self->touch_debounce_time)
{
return;
}

self->touch_debounce_time = level.time + 5.0;
G_LevelMsgCenterPrintf(other, (short)atoi(self->message));
sound_index = gi.soundindex("misc/talk1.wav");
gi.centerprintf(other, "%s", LocalizationMessage(self->message, &sound_index));
gi.sound(other, CHAN_AUTO, sound_index, 1, ATTN_NORM, 0);
}

void door_sounds (edict_t *ent)
Expand Down
Loading

0 comments on commit 4738ba2

Please sign in to comment.