Skip to content

Commit

Permalink
Merge branch 'master' into mid_level_cutscenes
Browse files Browse the repository at this point in the history
  • Loading branch information
dileepvr authored Oct 11, 2024
2 parents cac656d + 2479291 commit 24b6ec6
Show file tree
Hide file tree
Showing 78 changed files with 2,066 additions and 999 deletions.
File renamed without changes.
14 changes: 7 additions & 7 deletions .github/workflows/continuous_integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ jobs:
build_type: Release

- name: macOS
os: macos-12
deps_cmdline: brew install libvpx webp
os: macos-14
deps_cmdline: brew install libvpx
build_type: Release

- name: macOS
os: macos-12
os: macos-14
extra_options: -G Xcode -DDYN_OPENAL=OFF
deps_cmdline: brew install libvpx webp
deps_cmdline: brew install libvpx
build_type: Debug

- name: Linux GCC 9
Expand Down Expand Up @@ -71,9 +71,9 @@ jobs:
fi
mkdir build
if [[ "${{ runner.os }}" == 'macOS' ]]; then
export ZMUSIC_PACKAGE=zmusic-1.1.9-macos.tar.xz
export ZMUSIC_PACKAGE=zmusic-1.1.14-macos-arm.tar.xz
elif [[ "${{ runner.os }}" == 'Linux' ]]; then
export ZMUSIC_PACKAGE=zmusic-1.1.9-linux.tar.xz
export ZMUSIC_PACKAGE=zmusic-1.1.14-linux.tar.xz
fi
if [[ -n "${ZMUSIC_PACKAGE}" ]]; then
cd build
Expand Down Expand Up @@ -115,7 +115,7 @@ jobs:
- name: Upload Package
if: runner.os == 'Windows' # Remove to store packages of all targets
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
path: build/package
name: ${{ matrix.config.name }} ${{ matrix.config.build_type }}
Expand Down
1 change: 1 addition & 0 deletions bin/windows/zmusic/include/zmusic.h
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ typedef enum EIntConfigKey_

zmusic_snd_mididevice,
zmusic_snd_outputrate,
zmusic_mod_preferredplayer,

NUM_ZMUSIC_INT_CONFIGS
} EIntConfigKey;
Expand Down
2 changes: 2 additions & 0 deletions libraries/ZWidget/src/widgets/lineedit/lineedit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ LineEdit::LineEdit(Widget* parent) : Widget(parent)

LineEdit::~LineEdit()
{
delete timer;
delete scroll_timer;
}

bool LineEdit::IsReadOnly() const
Expand Down
28 changes: 19 additions & 9 deletions specs/udmf_zdoom.txt
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ Note: All <bool> fields default to false unless mentioned otherwise.
// texture to behave like an impassable line (projectiles
// pass through it).
checkswitchrange = <bool>; // Switches can only be activated when vertically reachable.
walking = <bool>; // Crossing activation checks if creature is on the ground, and fails if they are not.
blockprojectiles = <bool>; // Line blocks all projectiles
blockuse = <bool>; // Line blocks all use actions
blocksight = <bool>; // Line blocks monster line of sight
Expand Down Expand Up @@ -306,6 +307,8 @@ Note: All <bool> fields default to false unless mentioned otherwise.
leakiness = <int>; // Probability of leaking through radiation suit (0 = never, 256 = always), default = 0.
damageterraineffect = <bool>; // Will spawn a terrain splash when damage is inflicted. Default = false.
damagehazard = <bool>; // Changes damage model to Strife's delayed damage for the given sector. Default = false.
hurtmonsters = <bool>; // Non-players like monsters and decorations are hurt by this sector in the same manner as player. Doesn't work with damagehazard.
harminair = <bool>; // Actors in this sector are harmed by the damage effects of the floor even if they aren't touching it.
floorterrain = <string>; // Sets the terrain for the sector's floor. Default = 'use the flat texture's terrain definition.'
ceilingterrain = <string>; // Sets the terrain for the sector's ceiling. Default = 'use the flat texture's terrain definition.'
floor_reflect = <float>; // reflectiveness of floor (OpenGL only, not functional on sloped sectors)
Expand Down Expand Up @@ -423,8 +426,9 @@ Note: All <bool> fields default to false unless mentioned otherwise.
floatbobphase = <int>; // Sets the thing's floatbobphase. Valid phase values are 0-63. Default = -1 (use actor class default).

lm_sampledist = <int>; // ZDRay lightmap sample distance for the entire map. Defines the map units each lightmap texel covers. Must be in powers of two. Default = 8
lm_suncolor = <string>; // ZDRay lightmap sun color in hex. Default = "FFFFFF"
SoftShadowRadius = <float>; // ZDRay lightmap light and raytraced dynamic light soft shadow amount. Higher values produce softer shadows. Default = 5.0
lm_suncolor = <int>; // ZDRay lightmap sun color. Default is white (0xFFFFFF).

light_softshadowradius = <float>; // ZDRay lightmap light and raytraced dynamic light soft shadow amount. Higher values produce softer shadows. Default = 5.0

friendlyseeblocks = <int>; // How far (in block units) a friendly monster can see other monsters. Default 10

Expand Down Expand Up @@ -582,23 +586,29 @@ arg0str in dynamic lights.
Added automapstyle and revealed linedef properties.
Replaced tabs with spaces.

1.31 22.12.2019
1.31 31.10.2018
Added destructible level geometry properties.

1.32 22.12.2019
Coloriation options added

1.32 28.06.2021
1.33 28.06.2021
Blocklandmonsters MBF21 flag

1.33 06.11.2021
1.34 06.11.2021
Added separate light levels for sidedef tiers (top/mid/bottom)

1.34 11.09.2023
1.35 11.09.2023
Added/updated ZDRay/lightmap-related properties.

1.35 15.09.2023
1.36 15.09.2023
fixed omissions: Blocklandmonsters and Blockfloaters line flags.

1.36 20.10.2023
Sidedef skewing properties
1.37 20.10.2023
Sidedef skewing properties added

1.38 30.09.2024
Hurtmonsters and harminair added.

===============================================================================
EOF
Expand Down
4 changes: 4 additions & 0 deletions src/common/2d/v_2ddrawer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -592,6 +592,10 @@ void DShape2D::OnDestroy() {

void F2DDrawer::AddShape(FGameTexture* img, DShape2D* shape, DrawParms& parms)
{
// bail if shape is null (shouldn't happen but it might)
if (!shape)
ThrowAbortException(X_OTHER, "shape is null");

// [MK] bail out if vertex/coord array sizes are mismatched
if ( shape->mVertices.Size() != shape->mCoords.Size() )
ThrowAbortException(X_OTHER, "Mismatch in vertex/coord count: %u != %u", shape->mVertices.Size(), shape->mCoords.Size());
Expand Down
27 changes: 27 additions & 0 deletions src/common/audio/music/music.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ float relative_volume = 1.f;
float saved_relative_volume = 1.0f; // this could be used to implement an ACS FadeMusic function
MusicVolumeMap MusicVolumes;
MidiDeviceMap MidiDevices;
TMap<int, int> ModPlayers;

static int DefaultFindMusic(const char* fn)
{
Expand All @@ -93,6 +94,7 @@ EXTERN_CVAR(Float, fluid_gain)

CVAR(Bool, mus_calcgain, true, CVAR_ARCHIVE | CVAR_GLOBALCONFIG) // changing this will only take effect for the next song.
CVAR(Bool, mus_usereplaygain, false, CVAR_ARCHIVE | CVAR_GLOBALCONFIG) // changing this will only take effect for the next song.
CVAR(Int, mod_preferred_player, 0, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)// toggle between libXMP and Dumb. Unlike other sound CVARs this is not directly mapped to ZMusic's config.

// CODE --------------------------------------------------------------------

Expand Down Expand Up @@ -130,6 +132,24 @@ static FileReader OpenMusic(const char* musicname)
return reader;
}

bool MusicExists(const char* music_name)
{
if (music_name == nullptr)
return false;

if (FileExists(music_name))
return true;
else
{
int lumpnum;
lumpnum = mus_cb.FindMusic(music_name);
if (lumpnum == -1) lumpnum = fileSystem.CheckNumForName(music_name, FileSys::ns_music);
if (lumpnum != -1 && fileSystem.FileLength(lumpnum) != 0)
return true;
}
return false;
}

void S_SetMusicCallbacks(MusicCallbacks* cb)
{
mus_cb = *cb;
Expand Down Expand Up @@ -751,6 +771,7 @@ bool S_ChangeMusic(const char* musicname, int order, bool looping, bool force)
{
int lumpnum = mus_cb.FindMusic(musicname);
MidiDeviceSetting* devp = MidiDevices.CheckKey(lumpnum);
int* mplay = ModPlayers.CheckKey(lumpnum);

auto volp = MusicVolumes.CheckKey(lumpnum);
if (volp)
Expand All @@ -763,6 +784,12 @@ bool S_ChangeMusic(const char* musicname, int order, bool looping, bool force)
CheckReplayGain(musicname, devp ? (EMidiDevice)devp->device : MDEV_DEFAULT, devp ? devp->args.GetChars() : "");
}
auto mreader = GetMusicReader(reader); // this passes the file reader to the newly created wrapper.
int mod_player = mplay? *mplay : *mod_preferred_player;
int scratch;

// This config var is only effective when opening a music stream so there's no need for active synchronization. Setting it here is sufficient.
// Ideally this should have been a parameter to ZMusic_OpenSong, but that would have necessitated an API break.
ChangeMusicSettingInt(zmusic_mod_preferredplayer, mus_playing.handle, mod_player, &scratch);
mus_playing.handle = ZMusic_OpenSong(mreader, devp ? (EMidiDevice)devp->device : MDEV_DEFAULT, devp ? devp->args.GetChars() : "");
if (mus_playing.handle == nullptr)
{
Expand Down
4 changes: 4 additions & 0 deletions src/common/audio/music/s_music.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ bool S_StartMusic (const char *music_name);
// Start music using <music_name>, and set whether looping
bool S_ChangeMusic (const char *music_name, int order=0, bool looping=true, bool force=false);

// Check if <music_name> exists
bool MusicExists(const char* music_name);

void S_RestartMusic ();
void S_MIDIDeviceChanged(int newdev);

Expand All @@ -71,6 +74,7 @@ struct MidiDeviceSetting
typedef TMap<int, MidiDeviceSetting> MidiDeviceMap;
typedef TMap<int, float> MusicVolumeMap;

extern TMap<int, int> ModPlayers;
extern MidiDeviceMap MidiDevices;
extern MusicVolumeMap MusicVolumes;
extern MusicCallbacks mus_cb;
Expand Down
2 changes: 2 additions & 0 deletions src/common/engine/namedef.h
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,8 @@ xx(BuiltinNameToClass)
xx(BuiltinClassCast)
xx(BuiltinFunctionPtrCast)
xx(BuiltinFindTranslation)
xx(HandleDeprecatedFlags)
xx(CheckDeprecatedFlags)

xx(ScreenJobRunner)
xx(Action)
27 changes: 26 additions & 1 deletion src/common/engine/serializer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,10 @@ void FSerializer::Close()
}
if (mErrors > 0)
{
I_Error("%d errors parsing JSON", mErrors);
if (mLumpName.IsNotEmpty())
I_Error("%d errors parsing JSON lump %s", mErrors, mLumpName.GetChars());
else
I_Error("%d errors parsing JSON", mErrors);
}
}

Expand Down Expand Up @@ -331,6 +334,28 @@ bool FSerializer::HasObject(const char* name)
//
//==========================================================================

bool FSerializer::IsKeyNull(const char* name)
{
if (isReading())
{
auto val = r->FindKey(name);
if (val != nullptr)
{
if (val->IsNull())
{
return true;
}
}
}
return false;
}

//==========================================================================
//
//
//
//==========================================================================

void FSerializer::EndObject()
{
if (isWriting())
Expand Down
2 changes: 2 additions & 0 deletions src/common/engine/serializer.h
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ class FSerializer
void EndObject();
bool HasKey(const char* name);
bool HasObject(const char* name);
bool IsKeyNull(const char* name);
bool BeginArray(const char *name);
void EndArray();
unsigned GetSize(const char *group);
Expand Down Expand Up @@ -225,6 +226,7 @@ class FSerializer

int mErrors = 0;
int mObjectErrors = 0;
FString mLumpName;
};

FSerializer& Serialize(FSerializer& arc, const char* key, char& value, char* defval);
Expand Down
Loading

0 comments on commit 24b6ec6

Please sign in to comment.