mirror of
https://github.com/AquariaOSE/Aquaria.git
synced 2025-08-09 15:49:52 +00:00
Get rid of AQUARIA_FULL define and move the setting to usersettings.xml. Some changes regarding AQUARIA_DEMO.
This means there are no longer two builds necessary (one normal, one dev), and all mod deveopment can be done using one build, by setting Demo builds now allow browsing the online mod list, but neither downloading nor starting mods or applying patches.
This commit is contained in:
parent
1386e9edb3
commit
45ba35ca4b
13 changed files with 72 additions and 88 deletions
|
@ -5,7 +5,6 @@
|
|||
// Define BBGE_SKIP_CONFIG_HEADERS to use CMake-only configuration.
|
||||
#ifndef BBGE_SKIP_CONFIG_HEADERS
|
||||
|
||||
#define AQUARIA_FULL 1
|
||||
//#define AQUARIA_DEMO 1
|
||||
#define AQUARIA_BUILD_CONSOLE 1
|
||||
#define AQUARIA_BUILD_SCENEEDITOR 1
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 25 KiB |
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 25 KiB |
|
@ -989,7 +989,6 @@ This build is not yet final, and as such there are a couple things lacking. They
|
|||
bool fullscreen = true;
|
||||
int joystickMode = 0;
|
||||
int dsq_filter = 0;
|
||||
developerKeys = false;
|
||||
voiceOversEnabled = true;
|
||||
|
||||
|
||||
|
@ -1013,13 +1012,6 @@ This build is not yet final, and as such there are a couple things lacking. They
|
|||
|
||||
useFrameBuffer = user.video.fbuffer;
|
||||
|
||||
#ifdef AQUARIA_DEMO
|
||||
developerKeys = 0;
|
||||
#endif
|
||||
|
||||
if (exists("unlockdeveloperkeys"))
|
||||
developerKeys = 1;
|
||||
|
||||
if (isDeveloperKeys())
|
||||
{
|
||||
maxPages = 600/saveSlotPageSize;
|
||||
|
@ -1555,11 +1547,15 @@ This build is not yet final, and as such there are a couple things lacking. They
|
|||
sound->playSfx("defense", 0.5);
|
||||
sound->playSfx("visionwakeup");
|
||||
*/
|
||||
#if defined(AQUARIA_FULL) || defined(AQUARIA_DEMO)
|
||||
|
||||
// Don't do transitions for a faster start up in dev mode
|
||||
if (!isDeveloperKeys())
|
||||
{
|
||||
float trans = 0.5;
|
||||
overlay->alpha.interpolateTo(1, trans);
|
||||
core->main(trans);
|
||||
#endif
|
||||
}
|
||||
|
||||
removeRenderObject(loading);
|
||||
loading = 0;
|
||||
removeRenderObject(sidel);
|
||||
|
@ -1581,11 +1577,11 @@ This build is not yet final, and as such there are a couple things lacking. They
|
|||
|
||||
bindInput();
|
||||
|
||||
#if defined(AQUARIA_FULL) || defined(AQUARIA_DEMO)
|
||||
enqueueJumpState("BitBlotLogo");
|
||||
#else
|
||||
// Go directly to the title in dev mode
|
||||
if(isDeveloperKeys())
|
||||
title();
|
||||
#endif
|
||||
else
|
||||
enqueueJumpState("BitBlotLogo");
|
||||
}
|
||||
|
||||
void DSQ::recreateBlackBars()
|
||||
|
@ -2006,7 +2002,7 @@ void DSQ::reloadDevice()
|
|||
#ifdef AQUARIA_BUILD_CONSOLE
|
||||
void DSQ::toggleConsole()
|
||||
{
|
||||
if (console)
|
||||
if (console && isDeveloperKeys())
|
||||
{
|
||||
if (console->alpha == 0)
|
||||
{
|
||||
|
@ -2793,11 +2789,6 @@ void DSQ::nag(NagType type)
|
|||
|
||||
void DSQ::doModSelect()
|
||||
{
|
||||
#ifdef AQUARIA_DEMO
|
||||
nag(NAG_TOTITLE);
|
||||
return;
|
||||
#endif
|
||||
|
||||
modIsSelected = false;
|
||||
|
||||
dsq->loadMods();
|
||||
|
@ -2814,7 +2805,11 @@ void DSQ::doModSelect()
|
|||
|
||||
if (modIsSelected)
|
||||
{
|
||||
#ifdef AQUARIA_DEMO
|
||||
nag(NAG_TOTITLE);
|
||||
#else
|
||||
dsq->startSelectedMod();
|
||||
#endif
|
||||
}
|
||||
|
||||
inModSelector = false;
|
||||
|
@ -4147,21 +4142,11 @@ void DSQ::vision(std::string folder, int num, bool ignoreMusic)
|
|||
|
||||
bool DSQ::isDeveloperKeys()
|
||||
{
|
||||
///HACK TEMPORARY
|
||||
//return true;
|
||||
|
||||
#if !defined(AQUARIA_FULL) && !defined(AQUARIA_DEMO)
|
||||
return true;
|
||||
#endif
|
||||
|
||||
#ifdef AQUARIA_DEMO
|
||||
return false;
|
||||
#endif
|
||||
#ifdef AQUARIA_FULL
|
||||
return false;
|
||||
#endif
|
||||
|
||||
return developerKeys;
|
||||
return user.system.devModeOn;
|
||||
}
|
||||
|
||||
bool DSQ::canOpenEditor() const
|
||||
|
|
|
@ -1612,7 +1612,6 @@ protected:
|
|||
void updatepecue(float dt);
|
||||
std::vector<PECue> pecue;
|
||||
|
||||
bool developerKeys;
|
||||
void onMouseInput();
|
||||
std::vector<std::string> voxQueue;
|
||||
|
||||
|
|
|
@ -31,26 +31,27 @@ static void MakeRan(void)
|
|||
{
|
||||
#ifdef BBGE_BUILD_WINDOWS
|
||||
std::ofstream out("ran");
|
||||
if(out)
|
||||
{
|
||||
for (int i = 0; i < 32; i++)
|
||||
out << rand()%1000;
|
||||
out.close();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
static void StartAQConfig()
|
||||
{
|
||||
#if defined(BBGE_BUILD_WINDOWS)
|
||||
#if defined(AQUARIA_DEMO) || defined(AQUARIA_FULL)
|
||||
if (!exists("ran", false))
|
||||
if (!exists("ran", false, true))
|
||||
{
|
||||
MakeRan();
|
||||
if(exists("aqconfig.exe", false))
|
||||
if(exists("AQConfig.exe", false, true))
|
||||
{
|
||||
ShellExecute(NULL, "open", "aqconfig.exe", NULL, NULL, SW_SHOWNORMAL);
|
||||
ShellExecute(NULL, "open", "AQConfig.exe", NULL, NULL, SW_SHOWNORMAL);
|
||||
exit(0);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
remove("ran");
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -338,14 +338,12 @@ void ModSelectorScreen::initNetPanel()
|
|||
#ifdef BBGE_BUILD_VFS
|
||||
if(!gotServerList)
|
||||
{
|
||||
// FIXME: demo should be able to see downloadable mods imho
|
||||
#ifndef AQUARIA_DEMO
|
||||
moddl.init();
|
||||
std::string serv = dsq->user.network.masterServer;
|
||||
if(serv.empty())
|
||||
serv = DEFAULT_MASTER_SERVER;
|
||||
moddl.GetModlist(serv, true, true);
|
||||
#endif
|
||||
|
||||
gotServerList = true; // try this only once (is automatically reset on failure)
|
||||
}
|
||||
#endif
|
||||
|
@ -502,11 +500,6 @@ void ModIcon::onClick()
|
|||
{
|
||||
dsq->sound->playSfx("click");
|
||||
|
||||
#ifdef AQUARIA_DEMO
|
||||
dsq->nag(NAG_TOTITLE);
|
||||
return;
|
||||
#endif
|
||||
|
||||
switch(modType)
|
||||
{
|
||||
case MODTYPE_MOD:
|
||||
|
@ -520,18 +513,24 @@ void ModIcon::onClick()
|
|||
|
||||
case MODTYPE_PATCH:
|
||||
{
|
||||
#ifdef AQUARIA_DEMO
|
||||
dsq->sound->playSfx("denied");
|
||||
core->quitNestedMain();
|
||||
dsq->modIsSelected = true; // HACK: trigger nag screen
|
||||
dsq->selectedMod = -1;
|
||||
break;
|
||||
#endif
|
||||
|
||||
std::set<std::string>::iterator it = dsq->activePatches.find(fname);
|
||||
if(it != dsq->activePatches.end())
|
||||
{
|
||||
dsq->sound->playSfx("pet-off");
|
||||
dsq->unapplyPatch(fname);
|
||||
//dsq->screenMessage(modname + " - deactivated"); // DEBUG
|
||||
}
|
||||
else
|
||||
{
|
||||
dsq->sound->playSfx("pet-on");
|
||||
dsq->applyPatch(fname);
|
||||
//dsq->screenMessage(modname + " - activated"); // DEBUG
|
||||
}
|
||||
updateStatus();
|
||||
break;
|
||||
|
@ -711,7 +710,9 @@ void ModIconOnline::onClick()
|
|||
dsq->sound->playSfx("click");
|
||||
|
||||
#ifdef AQUARIA_DEMO
|
||||
dsq->nag(NAG_TOTITLE);
|
||||
core->quitNestedMain();
|
||||
dsq->modIsSelected = true; // HACK: trigger nag screen
|
||||
dsq->selectedMod = -1;
|
||||
return;
|
||||
#endif
|
||||
|
||||
|
|
|
@ -39,8 +39,6 @@ extern "C"
|
|||
|
||||
#include "../BBGE/MathFunctions.h"
|
||||
|
||||
#if defined(AQUARIA_FULL) || defined(AQUARIA_DEMO)
|
||||
|
||||
// Define this to 1 to check types of pointers passed to functions,
|
||||
// and warn if a type mismatch is detected. In this case,
|
||||
// the pointer is treated as NULL, to avoid crashing or undefined behavior.
|
||||
|
@ -51,25 +49,16 @@ extern "C"
|
|||
// If true, send all sort of script errors to errorLog instead of debugLog.
|
||||
// On win32/OSX, this pops up message boxes which help to locate errors easily,
|
||||
// but can be annoying for regular gameplay.
|
||||
const bool loudScriptErrors = false;
|
||||
bool loudScriptErrors = false;
|
||||
|
||||
// Set this to true to complain whenever a script tries to
|
||||
// get or set a global variable.
|
||||
const bool complainOnGlobalVar = false;
|
||||
bool complainOnGlobalVar = false;
|
||||
|
||||
// Set this to true to complain whenever a script tries to get an undefined
|
||||
// thread-local variable.
|
||||
const bool complainOnUndefLocal = false;
|
||||
bool complainOnUndefLocal = false;
|
||||
|
||||
#else
|
||||
|
||||
// Use maximal safety for developer builds.
|
||||
#define CHECK_POINTER_TYPES 1
|
||||
const bool loudScriptErrors = true;
|
||||
const bool complainOnGlobalVar = true;
|
||||
const bool complainOnUndefLocal = true;
|
||||
|
||||
#endif
|
||||
|
||||
// List of all interface functions called by C++ code, terminated by NULL.
|
||||
static const char * const interfaceFunctions[] = {
|
||||
|
@ -9739,6 +9728,13 @@ ScriptInterface::ScriptInterface()
|
|||
|
||||
void ScriptInterface::init()
|
||||
{
|
||||
bool devmode = dsq->isDeveloperKeys();
|
||||
|
||||
// Everything on in dev mode, everything off otherwise.
|
||||
bool loudScriptErrors = devmode;
|
||||
bool complainOnGlobalVar = devmode;
|
||||
bool complainOnUndefLocal = devmode;
|
||||
|
||||
if (!baseState)
|
||||
baseState = createLuaVM();
|
||||
}
|
||||
|
|
|
@ -54,6 +54,12 @@ void UserSettings::save()
|
|||
xml_locale.SetAttribute("name", system.locale);
|
||||
}
|
||||
xml_system.InsertEndChild(xml_locale);
|
||||
|
||||
TiXmlElement xml_devmode("DeveloperMode");
|
||||
{
|
||||
xml_devmode.SetAttribute("on", system.devModeOn);
|
||||
}
|
||||
xml_system.InsertEndChild(xml_devmode);
|
||||
}
|
||||
doc.InsertEndChild(xml_system);
|
||||
|
||||
|
@ -370,6 +376,12 @@ void UserSettings::load(bool doApply, const std::string &overrideFile)
|
|||
{
|
||||
system.locale = xml_locale->Attribute("name");
|
||||
}
|
||||
|
||||
TiXmlElement *xml_devmode = xml_system->FirstChildElement("DeveloperMode");
|
||||
if (xml_devmode)
|
||||
{
|
||||
xml_devmode->Attribute("on", &system.devModeOn);
|
||||
}
|
||||
}
|
||||
|
||||
TiXmlElement *xml_audio = doc.FirstChildElement("Audio");
|
||||
|
|
|
@ -78,9 +78,10 @@ class UserSettings
|
|||
public:
|
||||
struct System
|
||||
{
|
||||
System() { debugLogOn = 0; }
|
||||
System() { debugLogOn = 0; devModeOn = 0; }
|
||||
int debugLogOn;
|
||||
std::string locale;
|
||||
int devModeOn;
|
||||
} system;
|
||||
|
||||
struct Audio
|
||||
|
|
|
@ -1220,7 +1220,11 @@ void WorldMapRender::onUpdate(float dt)
|
|||
else
|
||||
{
|
||||
#ifdef AQUARIA_BUILD_MAPVIS
|
||||
if (!dsq->isInCutscene() && dsq->game->avatar && activeTile && !dsq->game->sceneEditor.isOn())
|
||||
if (!dsq->isInCutscene() && dsq->game->avatar && activeTile
|
||||
#ifdef AQUARIA_BUILD_SCENEEDITOR
|
||||
&& !dsq->game->sceneEditor.isOn()
|
||||
#endif
|
||||
)
|
||||
{
|
||||
const float screenWidth = core->getVirtualWidth() * core->invGlobalScale;
|
||||
const float screenHeight = core->getVirtualHeight() * core->invGlobalScale;
|
||||
|
|
|
@ -63,12 +63,5 @@ END
|
|||
END
|
||||
|
||||
// Icon
|
||||
#if defined(AQUARIA_FULL) || defined(AQUARIA_DEMO)
|
||||
101 ICON "AquariaWin32.ico"
|
||||
#else
|
||||
101 ICON "AquariaWin32Dev.ico"
|
||||
#endif
|
||||
|
||||
//101 ICON "Aquaria.ico"
|
||||
|
||||
101 ICON "AquariaWin32OSE.ico"
|
||||
|
||||
|
|
|
@ -27,7 +27,6 @@ IF(NOT CMAKE_BUILD_TYPE)
|
|||
SET(CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build (Debug, RelWithDebInfo, Release)" FORCE)
|
||||
ENDIF(NOT CMAKE_BUILD_TYPE)
|
||||
|
||||
OPTION(AQUARIA_DEVELOPER_BUILD "Developer Build?" FALSE)
|
||||
OPTION(AQUARIA_DEMO_BUILD "Demo Build?" FALSE)
|
||||
OPTION(AQUARIA_USE_VFS "Use Virtual File System? Required for some additional features." TRUE)
|
||||
|
||||
|
@ -258,12 +257,6 @@ IF(AQUARIA_USE_VFS)
|
|||
ADD_DEFINITIONS(-DBBGE_BUILD_VFS=1)
|
||||
ENDIF(AQUARIA_USE_VFS)
|
||||
|
||||
IF(AQUARIA_DEVELOPER_BUILD)
|
||||
message(STATUS "Developer build.")
|
||||
ELSE(AQUARIA_DEVELOPER_BUILD)
|
||||
ADD_DEFINITIONS(-DAQUARIA_FULL=1)
|
||||
ENDIF(AQUARIA_DEVELOPER_BUILD)
|
||||
|
||||
IF(AQUARIA_DEMO_BUILD)
|
||||
message(STATUS "Demo build.")
|
||||
ADD_DEFINITIONS(-DAQUARIA_DEMO=1)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue