mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-02-28 14:11:13 +00:00
Merge branch 'master' into newrenderer2
This commit is contained in:
commit
a530dfbe35
9 changed files with 21 additions and 11 deletions
|
@ -296,6 +296,9 @@ std::unique_ptr<VulkanShader> VkShaderManager::LoadFragShader(FString shadername
|
||||||
code << defines;
|
code << defines;
|
||||||
code << "\n$placeholder$"; // here the code can later add more needed #defines.
|
code << "\n$placeholder$"; // here the code can later add more needed #defines.
|
||||||
code << "\n#define MAX_STREAM_DATA " << std::to_string(MAX_STREAM_DATA).c_str() << "\n";
|
code << "\n#define MAX_STREAM_DATA " << std::to_string(MAX_STREAM_DATA).c_str() << "\n";
|
||||||
|
#ifdef NPOT_EMULATION
|
||||||
|
code << "#define NPOT_EMULATION\n";
|
||||||
|
#endif
|
||||||
code << shaderBindings;
|
code << shaderBindings;
|
||||||
FString placeholder = "\n";
|
FString placeholder = "\n";
|
||||||
|
|
||||||
|
|
|
@ -38,6 +38,7 @@
|
||||||
#include "raze_music.h"
|
#include "raze_music.h"
|
||||||
#include "filesystem.h"
|
#include "filesystem.h"
|
||||||
#include "printf.h"
|
#include "printf.h"
|
||||||
|
#include "raze_sound.h"
|
||||||
|
|
||||||
FString gSkillNames[MAXSKILLS];
|
FString gSkillNames[MAXSKILLS];
|
||||||
FString gVolumeNames[MAXVOLUMES];
|
FString gVolumeNames[MAXVOLUMES];
|
||||||
|
@ -109,7 +110,8 @@ bool SetMusicForMap(const char* mapname, const char* music, bool namehack)
|
||||||
{
|
{
|
||||||
if (!stricmp(mapname, specials[i]))
|
if (!stricmp(mapname, specials[i]))
|
||||||
{
|
{
|
||||||
// todo: store this properly.
|
if (specialmusic.Size() <= i) specialmusic.Resize(i + 1);
|
||||||
|
specialmusic[i] = music;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -127,7 +129,7 @@ bool SetMusicForMap(const char* mapname, const char* music, bool namehack)
|
||||||
if (numMatches != 4 || toupper(b1) != 'E' || toupper(b2) != 'L')
|
if (numMatches != 4 || toupper(b1) != 'E' || toupper(b2) != 'L')
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
index = FindMapByLevelNum(ep*100 + lev);
|
index = FindMapByLevelNum(levelnum(ep - 1, lev - 1));
|
||||||
|
|
||||||
}
|
}
|
||||||
if (index != nullptr)
|
if (index != nullptr)
|
||||||
|
|
|
@ -46,6 +46,7 @@
|
||||||
|
|
||||||
static bool mus_blocked;
|
static bool mus_blocked;
|
||||||
static FString lastStartedMusic;
|
static FString lastStartedMusic;
|
||||||
|
TArray<FString> specialmusic;
|
||||||
|
|
||||||
MusicAliasMap MusicAliases;
|
MusicAliasMap MusicAliases;
|
||||||
MusicAliasMap LevelMusicAliases;
|
MusicAliasMap LevelMusicAliases;
|
||||||
|
@ -138,7 +139,8 @@ FileReader OpenMusic(const char* musicname)
|
||||||
auto rfn = fileSystem.GetResourceFileName(fileSystem.GetFileContainer(lumpnum));
|
auto rfn = fileSystem.GetResourceFileName(fileSystem.GetFileContainer(lumpnum));
|
||||||
auto rfbase = ExtractFileBase(rfn);
|
auto rfbase = ExtractFileBase(rfn);
|
||||||
FStringf aliasMusicname("music/%s/%s", rfbase.GetChars(), musicname);
|
FStringf aliasMusicname("music/%s/%s", rfbase.GetChars(), musicname);
|
||||||
lumpnum = LookupMusic(aliasMusicname);
|
int newlumpnum = LookupMusic(aliasMusicname);
|
||||||
|
if (newlumpnum >= 0) lumpnum = newlumpnum;
|
||||||
}
|
}
|
||||||
if (lumpnum == -1)
|
if (lumpnum == -1)
|
||||||
{
|
{
|
||||||
|
@ -148,7 +150,7 @@ FileReader OpenMusic(const char* musicname)
|
||||||
}
|
}
|
||||||
if (lumpnum == -1 && (g_gameType & GAMEFLAG_SW))
|
if (lumpnum == -1 && (g_gameType & GAMEFLAG_SW))
|
||||||
{
|
{
|
||||||
// Some Shadow Warrioe distributions have the music in a subfolder named 'classic'. Check that, too.
|
// Some Shadow Warrior distributions have the music in a subfolder named 'classic'. Check that, too.
|
||||||
FStringf aliasMusicname("classic/music/%s", musicname);
|
FStringf aliasMusicname("classic/music/%s", musicname);
|
||||||
lumpnum = fileSystem.FindFile(aliasMusicname);
|
lumpnum = fileSystem.FindFile(aliasMusicname);
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
|
|
||||||
typedef TMap<FName, FName> MusicAliasMap;
|
typedef TMap<FName, FName> MusicAliasMap;
|
||||||
extern MusicAliasMap MusicAliases;
|
extern MusicAliasMap MusicAliases;
|
||||||
|
extern TArray<FString> specialmusic;
|
||||||
|
|
||||||
// Totally minimalistic interface - should be all the game modules need.
|
// Totally minimalistic interface - should be all the game modules need.
|
||||||
void Mus_InitMusic();
|
void Mus_InitMusic();
|
||||||
|
|
|
@ -142,7 +142,11 @@ int S_LookupSound(const char* fn)
|
||||||
static const char * const sndformats[] = { "OGG", "FLAC", "WAV" };
|
static const char * const sndformats[] = { "OGG", "FLAC", "WAV" };
|
||||||
if (snd_extendedlookup)
|
if (snd_extendedlookup)
|
||||||
{
|
{
|
||||||
int lump = fileSystem.FindFileWithExtensions(StripExtension(fn), sndformats, countof(sndformats));
|
auto newfn = StripExtension(fn);
|
||||||
|
int lump = fileSystem.FindFileWithExtensions(newfn, sndformats, countof(sndformats));
|
||||||
|
if (lump >= 0) return lump;
|
||||||
|
newfn = "sound/" + newfn;
|
||||||
|
lump = fileSystem.FindFileWithExtensions(newfn, sndformats, countof(sndformats));
|
||||||
if (lump >= 0) return lump;
|
if (lump >= 0) return lump;
|
||||||
}
|
}
|
||||||
return fileSystem.FindFile(fn);
|
return fileSystem.FindFile(fn);
|
||||||
|
|
|
@ -840,7 +840,7 @@ public:
|
||||||
clock += now - lastTime;
|
clock += now - lastTime;
|
||||||
if (clock == 0) clock = 1;
|
if (clock == 0) clock = 1;
|
||||||
}
|
}
|
||||||
bool skiprequest = clock > 100'000'000 && inputState.CheckAllInput() && !processed;
|
bool skiprequest = clock > 100'000'000 && inputState.CheckAllInput() && !processed && job.job->fadestate != DScreenJob::fadeout;
|
||||||
lastTime = now;
|
lastTime = now;
|
||||||
|
|
||||||
if (screenfade < 1.f && !M_Active())
|
if (screenfade < 1.f && !M_Active())
|
||||||
|
@ -848,7 +848,8 @@ public:
|
||||||
float ms = (clock / 1'000'000) / job.job->fadetime;
|
float ms = (clock / 1'000'000) / job.job->fadetime;
|
||||||
screenfade = clamp(ms, 0.f, 1.f);
|
screenfade = clamp(ms, 0.f, 1.f);
|
||||||
twod->SetScreenFade(screenfade);
|
twod->SetScreenFade(screenfade);
|
||||||
job.job->fadestate = DScreenJob::fadein;
|
if (job.job->fadestate != DScreenJob::fadeout)
|
||||||
|
job.job->fadestate = DScreenJob::fadein;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -65,7 +65,6 @@ inline DDukeActor* getSndActor(const void* source)
|
||||||
return source ? &hittype[((spritetype*)source) - sprite] : nullptr;
|
return source ? &hittype[((spritetype*)source) - sprite] : nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
TArray<FString> specialmusic;
|
|
||||||
static FSoundID currentCommentarySound;
|
static FSoundID currentCommentarySound;
|
||||||
static DDukeActor* currentCommentarySprite; // todo: GC this once actors become objects
|
static DDukeActor* currentCommentarySprite; // todo: GC this once actors become objects
|
||||||
|
|
||||||
|
|
|
@ -74,8 +74,6 @@ void S_ParseDeveloperCommentary();
|
||||||
void StopCommentary();
|
void StopCommentary();
|
||||||
bool StartCommentary(int tag, DDukeActor* sprnum);
|
bool StartCommentary(int tag, DDukeActor* sprnum);
|
||||||
|
|
||||||
extern TArray<FString> specialmusic;
|
|
||||||
|
|
||||||
|
|
||||||
END_DUKE_NS
|
END_DUKE_NS
|
||||||
|
|
||||||
|
|
|
@ -695,7 +695,7 @@ private:
|
||||||
void DisplayMinibarInventory(PLAYERp pp)
|
void DisplayMinibarInventory(PLAYERp pp)
|
||||||
{
|
{
|
||||||
int InventoryBoxX = MINI_BAR_INVENTORY_BOX_X;
|
int InventoryBoxX = MINI_BAR_INVENTORY_BOX_X;
|
||||||
int InventoryBoxY = MINI_BAR_INVENTORY_BOX_Y;
|
int InventoryBoxY = MINI_BAR_INVENTORY_BOX_Y - 200;
|
||||||
|
|
||||||
int InventoryXoff = 0;
|
int InventoryXoff = 0;
|
||||||
int InventoryYoff = 1;
|
int InventoryYoff = 1;
|
||||||
|
|
Loading…
Reference in a new issue