mirror of
https://github.com/AquariaOSE/Aquaria.git
synced 2025-10-15 11:00:46 +00:00
Merge branch 'master' into sdl2
Conflicts: CMakeLists.txt
This commit is contained in:
commit
f4ea746497
35 changed files with 200 additions and 84 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
|
||||
|
|
BIN
Aquaria/AquariaWin32OSE.ico
Normal file
BIN
Aquaria/AquariaWin32OSE.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 25 KiB |
|
@ -1001,7 +1001,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;
|
||||
|
||||
|
||||
|
@ -1025,13 +1024,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;
|
||||
|
@ -1567,11 +1559,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)
|
||||
float trans = 0.5;
|
||||
overlay->alpha.interpolateTo(1, trans);
|
||||
core->main(trans);
|
||||
#endif
|
||||
|
||||
// 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);
|
||||
}
|
||||
|
||||
removeRenderObject(loading);
|
||||
loading = 0;
|
||||
removeRenderObject(sidel);
|
||||
|
@ -1593,11 +1589,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
|
||||
title();
|
||||
#endif
|
||||
// Go directly to the title in dev mode
|
||||
if(isDeveloperKeys())
|
||||
title();
|
||||
else
|
||||
enqueueJumpState("BitBlotLogo");
|
||||
}
|
||||
|
||||
void DSQ::recreateBlackBars()
|
||||
|
@ -2018,7 +2014,7 @@ void DSQ::reloadDevice()
|
|||
#ifdef AQUARIA_BUILD_CONSOLE
|
||||
void DSQ::toggleConsole()
|
||||
{
|
||||
if (console)
|
||||
if (console && isDeveloperKeys())
|
||||
{
|
||||
if (console->alpha == 0)
|
||||
{
|
||||
|
@ -2805,11 +2801,6 @@ void DSQ::nag(NagType type)
|
|||
|
||||
void DSQ::doModSelect()
|
||||
{
|
||||
#ifdef AQUARIA_DEMO
|
||||
nag(NAG_TOTITLE);
|
||||
return;
|
||||
#endif
|
||||
|
||||
modIsSelected = false;
|
||||
|
||||
dsq->loadMods();
|
||||
|
@ -2823,10 +2814,14 @@ void DSQ::doModSelect()
|
|||
main(-1);
|
||||
|
||||
clearModSelector();
|
||||
|
||||
|
||||
if (modIsSelected)
|
||||
{
|
||||
#ifdef AQUARIA_DEMO
|
||||
nag(NAG_TOTITLE);
|
||||
#else
|
||||
dsq->startSelectedMod();
|
||||
#endif
|
||||
}
|
||||
|
||||
inModSelector = false;
|
||||
|
@ -4159,21 +4154,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");
|
||||
for (int i = 0; i < 32; i++)
|
||||
out << rand()%1000;
|
||||
out.close();
|
||||
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[] = {
|
||||
|
@ -3835,7 +3824,7 @@ luaFunc(spawnManaBall)
|
|||
Vector p;
|
||||
p.x = lua_tonumber(L, 1);
|
||||
p.y = lua_tonumber(L, 2);
|
||||
int amount = lua_tonumber(L, 3);
|
||||
float amount = lua_tonumber(L, 3);
|
||||
dsq->game->spawnManaBall(p, amount);
|
||||
luaReturnNil();
|
||||
}
|
||||
|
@ -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;
|
||||
|
|
|
@ -19,11 +19,18 @@ along with this program; if not, write to the Free Software
|
|||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include "AquariaCompileConfig.h"
|
||||
|
||||
#include <Winver.h>
|
||||
#include <Windows.h>
|
||||
|
||||
#include "resource.h" // Might as well use what's there, even though it's questionable.
|
||||
#include "custom-fields.h"
|
||||
|
||||
#define AQUARIA_RC_FILEVERSION 1,1,3,999
|
||||
#define AQUARIA_RC_PRODUCTVERSION 1,1,3,0
|
||||
#define AQUARIA_RC_PRODUCTVERSION_STRING "1.1.3"
|
||||
#define AQUARIA_RC_COMMENTS AQUARIA_OVERRIDE_VERSION_STRING
|
||||
#define AQUARIA_RC_FILEVERSION_STRING "1.1.3.fg"
|
||||
|
||||
// Version information
|
||||
1 VERSIONINFO
|
||||
|
@ -56,6 +63,5 @@ END
|
|||
END
|
||||
|
||||
// Icon
|
||||
101 ICON "Aquaria.ico"
|
||||
|
||||
101 ICON "AquariaWin32OSE.ico"
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue