This commit is contained in:
nashmuhandes 2024-10-10 22:04:23 +08:00
commit 55940ba21d
14 changed files with 717 additions and 661 deletions

View file

@ -21,14 +21,14 @@ jobs:
build_type: Debug
- 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
@ -66,9 +66,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

View file

@ -151,6 +151,7 @@ typedef enum EIntConfigKey_
zmusic_snd_mididevice,
zmusic_snd_outputrate,
zmusic_mod_preferredplayer,
NUM_ZMUSIC_INT_CONFIGS
} EIntConfigKey;

View file

@ -592,23 +592,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

View file

@ -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)
{
@ -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 --------------------------------------------------------------------
@ -769,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)
@ -781,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)
{

View file

@ -74,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;

View file

@ -700,8 +700,8 @@ void FStartScreen::Render(bool force)
twod->OnFrameDone();
}
auto newtime = I_msTime();
if ((newtime - nowtime) * 2.0 > minwaittime) // slow down drawing the start screen if we're on a slow GPU!
minwaittime = (newtime - nowtime) * 2.0;
if ((newtime - nowtime) * 2 > minwaittime) // slow down drawing the start screen if we're on a slow GPU!
minwaittime = (newtime - nowtime) * 2;
}
FImageSource* CreateStartScreenTexture(FBitmap& srcdata);

View file

@ -106,7 +106,7 @@ int mtherr(char* name, int code)
* which is supposed to be the name of the
* function in which the error occurred:
*/
printf( "\n%s ", name );
//printf( "\n%s ", name );
/* Set global error message word */
merror = code;
@ -116,7 +116,7 @@ merror = code;
*/
if( (code <= 0) || (code >= 7) )
code = 0;
printf( "%s error\n", ermsg[code] );
//printf( "%s error\n", ermsg[code] );
/* Return to calling
* program

View file

@ -445,6 +445,7 @@ enum ActorFlag9
MF9_DECOUPLEDANIMATIONS = 0x00000010, // [RL0] Decouple model animations from states
MF9_NOSECTORDAMAGE = 0x00000020, // [inkoalawetrust] Actor ignores any sector-based damage (i.e damaging floors, NOT crushers)
MF9_ISPUFF = 0x00000040, // [AA] Set on actors by P_SpawnPuff
MF9_FORCESECTORDAMAGE = 0x00000080, // [inkoalawetrust] Actor ALWAYS takes hurt floor damage if there's any. Even if the floor doesn't have SECMF_HURTMONSTERS.
};
// --- mobj.renderflags ---

View file

@ -4436,7 +4436,7 @@ void AActor::Tick ()
if (ObjectFlags & OF_EuthanizeMe) return;
}
//[inkoalawetrust] Genericized level damage handling that makes sector, 3D floor, and TERRAIN flat damage affect monsters and other NPCs too.
if (!(flags9 & MF9_NOSECTORDAMAGE) && (player || (player == nullptr && Sector->MoreFlags & SECMF_HURTMONSTERS)))
if ((!(flags9 & MF9_NOSECTORDAMAGE) || flags9 & MF9_FORCESECTORDAMAGE) && (player || (player == nullptr && (Sector->MoreFlags & SECMF_HURTMONSTERS || flags9 & MF9_FORCESECTORDAMAGE))))
{
P_ActorOnSpecial3DFloor(this);
P_ActorInSpecialSector(this,Sector);

View file

@ -470,7 +470,7 @@ angle_t Clipper::PointToPseudoOrthoAngle(double x, double y)
angle_t af = viewpoint->FrustAngle;
double xproj = disp.XY().Length() * deltaangle(disp.Angle(), viewpoint->Angles.Yaw).Sin();
xproj *= viewpoint->ScreenProj;
if (fabs(xproj) < 2.0)
if (fabs(xproj) < r_viewwindow.WidescreenRatio*1.13) // 2.0)
{
return AngleToPseudo( viewpoint->Angles.Yaw.BAMs() - xproj * 0.5 * af );
}

View file

@ -353,6 +353,7 @@ static FFlagDef ActorFlagDefs[]=
DEFINE_FLAG(MF9, DECOUPLEDANIMATIONS, AActor, flags9),
DEFINE_FLAG(MF9, NOSECTORDAMAGE, AActor, flags9),
DEFINE_PROTECTED_FLAG(MF9, ISPUFF, AActor, flags9), //[AA] was spawned by SpawnPuff
DEFINE_FLAG(MF9, FORCESECTORDAMAGE, AActor, flags9),
// Effect flags
DEFINE_FLAG(FX, VISIBILITYPULSE, AActor, effects),

View file

@ -147,6 +147,7 @@ enum SICommands
SI_EDFOverride,
SI_Attenuation,
SI_PitchSet,
SI_ModPlayer,
};
// Blood was a cool game. If Monolith ever releases the source for it,
@ -236,7 +237,8 @@ static const char *SICommandStrings[] =
"$edfoverride",
"$attenuation",
"$pitchset",
NULL
"$modplayer",
nullptr
};
static TArray<FSavedPlayerSoundInfo> SavedPlayerSounds;
@ -571,6 +573,7 @@ void S_ClearSoundData()
MusicAliases.Clear();
MidiDevices.Clear();
HexenMusic.Clear();
ModPlayers.Clear();
}
//==========================================================================
@ -1109,10 +1112,24 @@ static void S_AddSNDINFO (int lump)
sc.RestorePos(save);
sc.MustGetString();
}
if (lumpnum >= 0) MidiDevices[lumpnum] = devset;
if (lumpnum >= 0) MidiDevices.Insert(lumpnum, devset);
}
break;
case SI_ModPlayer: {
sc.MustGetString();
int lumpnum = mus_cb.FindMusic(sc.String);
int player;
FScanner::SavedPos save = sc.SavePos();
sc.MustGetString();
if (sc.Compare("XMP") || sc.Compare("libXMP")) player = 0;
else if (sc.Compare("dumb") || sc.Compare("libdumb")) player = 1;
else sc.ScriptError("Unknown Module player %s\n", sc.String);
if (lumpnum >= 0) ModPlayers.Insert(lumpnum, player);
}
break;
case SI_IfDoom: //also Chex
case SI_IfStrife:
case SI_IfHeretic:

File diff suppressed because it is too large Load diff

View file

@ -2188,11 +2188,17 @@ OptionValue ModVolumeRamps
2.0, "$OPTVAL_FULLRAMPING"
}
OptionValue ModReplayers
{
0.0, "$OPTVAL_LIBXMP"
1.0, "$OPTVAL_DUMB"
}
OptionMenu ModReplayerOptions protected
{
Title "$MODMNU_TITLE"
Option "$MODMNU_REPLAYER", "mod_preferred_player", "ModReplayers"
Slider "$MODMNU_MASTERVOLUME", "mod_dumb_mastervolume", 0.25, 4, 0.1, 1
Option "$ADVSNDMNU_SAMPLERATE", "mod_samplerate", "SampleRates"
Option "$MODMNU_QUALITY", "mod_interp", "ModQuality"