mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-28 01:40:41 +00:00
- took all script exports out of the namespaces.
It looks like GCC cannot deal with this - on MSVC it works fine.
This commit is contained in:
parent
16fd505f9a
commit
db21d5e946
7 changed files with 55 additions and 70 deletions
|
@ -123,15 +123,6 @@ void CGameMenuItemQAV::Draw(void)
|
||||||
|
|
||||||
static std::unique_ptr<CGameMenuItemQAV> itemBloodQAV; // This must be global to ensure that the animation remains consistent across menus.
|
static std::unique_ptr<CGameMenuItemQAV> itemBloodQAV; // This must be global to ensure that the animation remains consistent across menus.
|
||||||
|
|
||||||
DEFINE_ACTION_FUNCTION(DListMenuItemBloodDripDrawer, Draw)
|
|
||||||
{
|
|
||||||
// For narrow screens this would be mispositioned so skip drawing it there.
|
|
||||||
double ratio = screen->GetWidth() / double(screen->GetHeight());
|
|
||||||
if (ratio > 1.32) itemBloodQAV->Draw();
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void UpdateNetworkMenus(void)
|
void UpdateNetworkMenus(void)
|
||||||
{
|
{
|
||||||
// For now disable the network menu item as it is not functional.
|
// For now disable the network menu item as it is not functional.
|
||||||
|
@ -201,12 +192,23 @@ void GameInterface::QuitToTitle()
|
||||||
gameaction = ga_mainmenu;
|
gameaction = ga_mainmenu;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
END_BLD_NS
|
||||||
|
|
||||||
|
using namespace Blood;
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
DEFINE_ACTION_FUNCTION(DListMenuItemBloodDripDrawer, Draw)
|
||||||
|
{
|
||||||
|
// For narrow screens this would be mispositioned so skip drawing it there.
|
||||||
|
double ratio = screen->GetWidth() / double(screen->GetHeight());
|
||||||
|
if (ratio > 1.32) itemBloodQAV->Draw();
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
DEFINE_ACTION_FUNCTION(_ImageScrollerPageQavDrawer, LoadQav)
|
DEFINE_ACTION_FUNCTION(_ImageScrollerPageQavDrawer, LoadQav)
|
||||||
{
|
{
|
||||||
PARAM_PROLOGUE;
|
PARAM_PROLOGUE;
|
||||||
|
@ -231,5 +233,4 @@ DEFINE_ACTION_FUNCTION(_ImageScrollerPageQavDrawer, DrawQav)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
END_BLD_NS
|
|
||||||
|
|
||||||
|
|
|
@ -462,7 +462,7 @@ namespace ShadowWarrior
|
||||||
{
|
{
|
||||||
::GameInterface* CreateInterface();
|
::GameInterface* CreateInterface();
|
||||||
}
|
}
|
||||||
namespace Powerslave
|
namespace Exhumed
|
||||||
{
|
{
|
||||||
::GameInterface* CreateInterface();
|
::GameInterface* CreateInterface();
|
||||||
}
|
}
|
||||||
|
@ -479,7 +479,7 @@ void CheckFrontend(int flags)
|
||||||
}
|
}
|
||||||
else if (flags & GAMEFLAG_PSEXHUMED)
|
else if (flags & GAMEFLAG_PSEXHUMED)
|
||||||
{
|
{
|
||||||
gi = Powerslave::CreateInterface();
|
gi = Exhumed::CreateInterface();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
#define BEGIN_SW_NS namespace ShadowWarrior {
|
#define BEGIN_SW_NS namespace ShadowWarrior {
|
||||||
#define END_SW_NS }
|
#define END_SW_NS }
|
||||||
|
|
||||||
#define BEGIN_PS_NS namespace Powerslave {
|
#define BEGIN_PS_NS namespace Exhumed {
|
||||||
#define END_PS_NS }
|
#define END_PS_NS }
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
|
@ -39,22 +39,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
|
||||||
BEGIN_PS_NS
|
BEGIN_PS_NS
|
||||||
|
|
||||||
|
|
||||||
DEFINE_ACTION_FUNCTION(_ListMenuItemExhumedPlasma, Draw)
|
|
||||||
{
|
|
||||||
menu_DoPlasma();
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
DEFINE_ACTION_FUNCTION(_ListMenuItemExhumedLogo, Draw)
|
|
||||||
{
|
|
||||||
auto nLogoTile = EXHUMED ? kExhumedLogo : kPowerslaveLogo;
|
|
||||||
DrawRel(nLogoTile, 160, 40);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void GameInterface::MenuOpened()
|
void GameInterface::MenuOpened()
|
||||||
{
|
{
|
||||||
GrabPalette();
|
GrabPalette();
|
||||||
|
@ -105,3 +89,19 @@ FSavegameInfo GameInterface::GetSaveSig()
|
||||||
|
|
||||||
|
|
||||||
END_PS_NS
|
END_PS_NS
|
||||||
|
|
||||||
|
using namespace Exhumed;
|
||||||
|
|
||||||
|
DEFINE_ACTION_FUNCTION(_ListMenuItemExhumedPlasma, Draw)
|
||||||
|
{
|
||||||
|
menu_DoPlasma();
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
DEFINE_ACTION_FUNCTION(_ListMenuItemExhumedLogo, Draw)
|
||||||
|
{
|
||||||
|
auto nLogoTile = EXHUMED ? kExhumedLogo : kPowerslaveLogo;
|
||||||
|
DrawRel(nLogoTile, 160, 40);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -64,23 +64,6 @@ BEGIN_SW_NS
|
||||||
//
|
//
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
|
|
||||||
static bool DidOrderSound;
|
|
||||||
static int zero = 0;
|
|
||||||
|
|
||||||
DEFINE_ACTION_FUNCTION(_SWMenuDelegate, PlayOrderSound)
|
|
||||||
{
|
|
||||||
if (SW_SHAREWARE && !DidOrderSound)
|
|
||||||
{
|
|
||||||
DidOrderSound = true;
|
|
||||||
int choose_snd = STD_RANDOM_RANGE(1000);
|
|
||||||
if (choose_snd > 500)
|
|
||||||
PlaySound(DIGI_WANGORDER1, v3df_dontpan, CHAN_BODY, CHANF_UI);
|
|
||||||
else
|
|
||||||
PlaySound(DIGI_WANGORDER2, v3df_dontpan, CHAN_BODY, CHANF_UI);
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
void GameInterface::QuitToTitle()
|
void GameInterface::QuitToTitle()
|
||||||
{
|
{
|
||||||
Mus_Stop();
|
Mus_Stop();
|
||||||
|
@ -172,3 +155,4 @@ FSavegameInfo GameInterface::GetSaveSig()
|
||||||
|
|
||||||
|
|
||||||
END_SW_NS
|
END_SW_NS
|
||||||
|
|
||||||
|
|
|
@ -573,6 +573,25 @@ void TerminateLevel(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
using namespace ShadowWarrior;
|
||||||
|
static bool DidOrderSound;
|
||||||
|
static int zero = 0;
|
||||||
|
|
||||||
|
static void PlayOrderSound()
|
||||||
|
{
|
||||||
|
if (!DidOrderSound)
|
||||||
|
{
|
||||||
|
DidOrderSound = true;
|
||||||
|
int choose_snd = STD_RANDOM_RANGE(1000);
|
||||||
|
if (choose_snd > 500)
|
||||||
|
PlaySound(DIGI_WANGORDER1, v3df_dontpan, CHAN_BODY, CHANF_UI);
|
||||||
|
else
|
||||||
|
PlaySound(DIGI_WANGORDER2, v3df_dontpan, CHAN_BODY, CHANF_UI);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void GameInterface::LevelCompleted(MapRecord *map, int skill)
|
void GameInterface::LevelCompleted(MapRecord *map, int skill)
|
||||||
{
|
{
|
||||||
//ResetPalette(mpp);
|
//ResetPalette(mpp);
|
||||||
|
@ -587,7 +606,11 @@ void GameInterface::LevelCompleted(MapRecord *map, int skill)
|
||||||
STAT_Update(true);
|
STAT_Update(true);
|
||||||
FinishAnim = false;
|
FinishAnim = false;
|
||||||
PlaySong(nullptr, ThemeSongs[0], ThemeTrack[0]);
|
PlaySong(nullptr, ThemeSongs[0], ThemeTrack[0]);
|
||||||
if (SW_SHAREWARE) gameaction = ga_creditsmenu;
|
if (SW_SHAREWARE)
|
||||||
|
{
|
||||||
|
PlayOrderSound();
|
||||||
|
gameaction = ga_creditsmenu;
|
||||||
|
}
|
||||||
else gameaction = ga_mainmenu;
|
else gameaction = ga_mainmenu;
|
||||||
}
|
}
|
||||||
else gameaction = ga_nextlevel;
|
else gameaction = ga_nextlevel;
|
||||||
|
|
|
@ -53,8 +53,6 @@ class SWMenuDelegate : RazeMenuDelegate
|
||||||
DTA_CenterOffset, true, DTA_Color, 0xfff0f0f0, DTA_ScaleX, 0.5, DTA_ScaleY, 0.5);
|
DTA_CenterOffset, true, DTA_Color, 0xfff0f0f0, DTA_ScaleX, 0.5, DTA_ScaleY, 0.5);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
//native static void PlayOrderSound();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
|
@ -76,27 +74,6 @@ class ListMenuItemSWLogo : ListMenuItem
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//=============================================================================
|
|
||||||
//
|
|
||||||
// SW order sound
|
|
||||||
//
|
|
||||||
//=============================================================================
|
|
||||||
/*
|
|
||||||
class ListMenuItemOrderSound : ListMenuItem
|
|
||||||
{
|
|
||||||
void Init(ListMenuDescriptor desc)
|
|
||||||
{
|
|
||||||
Super.Init(0, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
override void Drawer()
|
|
||||||
{
|
|
||||||
if (mEnabled) SWMenuDelegate.PlayOrderSound();
|
|
||||||
mEnabled = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
//
|
//
|
||||||
// text item
|
// text item
|
||||||
|
|
Loading…
Reference in a new issue