diff --git a/Aquaria/AquariaCompileConfig.h b/Aquaria/AquariaCompileConfig.h index a7b9cd6..922d212 100644 --- a/Aquaria/AquariaCompileConfig.h +++ b/Aquaria/AquariaCompileConfig.h @@ -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 diff --git a/Aquaria/AquariaWin32OSE.ico b/Aquaria/AquariaWin32OSE.ico new file mode 100644 index 0000000..e5503b2 Binary files /dev/null and b/Aquaria/AquariaWin32OSE.ico differ diff --git a/Aquaria/DSQ.cpp b/Aquaria/DSQ.cpp index 27a621a..201cac8 100644 --- a/Aquaria/DSQ.cpp +++ b/Aquaria/DSQ.cpp @@ -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 diff --git a/Aquaria/DSQ.h b/Aquaria/DSQ.h index 6e013ba..523ff86 100644 --- a/Aquaria/DSQ.h +++ b/Aquaria/DSQ.h @@ -1612,7 +1612,6 @@ protected: void updatepecue(float dt); std::vector pecue; - bool developerKeys; void onMouseInput(); std::vector voxQueue; diff --git a/Aquaria/Main.cpp b/Aquaria/Main.cpp index 290e54d..ed237b8 100644 --- a/Aquaria/Main.cpp +++ b/Aquaria/Main.cpp @@ -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 } diff --git a/Aquaria/ModSelector.cpp b/Aquaria/ModSelector.cpp index dd03b87..5150475 100644 --- a/Aquaria/ModSelector.cpp +++ b/Aquaria/ModSelector.cpp @@ -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::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 diff --git a/Aquaria/ScriptInterface.cpp b/Aquaria/ScriptInterface.cpp index 88a3a73..aea95ea 100644 --- a/Aquaria/ScriptInterface.cpp +++ b/Aquaria/ScriptInterface.cpp @@ -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(); } diff --git a/Aquaria/UserSettings.cpp b/Aquaria/UserSettings.cpp index 32d47e9..e9ab64d 100644 --- a/Aquaria/UserSettings.cpp +++ b/Aquaria/UserSettings.cpp @@ -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"); diff --git a/Aquaria/UserSettings.h b/Aquaria/UserSettings.h index 1c4607e..c6b0c22 100644 --- a/Aquaria/UserSettings.h +++ b/Aquaria/UserSettings.h @@ -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 diff --git a/Aquaria/WorldMapRender.cpp b/Aquaria/WorldMapRender.cpp index b695cb0..55d9fe0 100644 --- a/Aquaria/WorldMapRender.cpp +++ b/Aquaria/WorldMapRender.cpp @@ -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; diff --git a/Aquaria/aquaria.rc b/Aquaria/aquaria.rc index 1eda658..2084b20 100644 --- a/Aquaria/aquaria.rc +++ b/Aquaria/aquaria.rc @@ -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 #include #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" diff --git a/CMakeLists.txt b/CMakeLists.txt index 2506162..c5a8e6d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) @@ -287,12 +286,6 @@ IF(AQUARIA_USE_SDL2) ADD_DEFINITIONS(-DBBGE_BUILD_SDL2=1) ENDIF(AQUARIA_USE_SDL2) -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) diff --git a/files/data/animations/drasktrident.xml b/files/data/animations/drasktrident.xml new file mode 100644 index 0000000..6b66b59 --- /dev/null +++ b/files/data/animations/drasktrident.xml @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/files/data/animations/queen-statue.xml b/files/data/animations/queen-statue.xml new file mode 100644 index 0000000..8be1414 --- /dev/null +++ b/files/data/animations/queen-statue.xml @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/files/data/animations/skins/drask-statue.xml b/files/data/animations/skins/drask-statue.xml new file mode 100644 index 0000000..7aae332 --- /dev/null +++ b/files/data/animations/skins/drask-statue.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/files/data/shots/li.txt b/files/data/shots/li.txt new file mode 100644 index 0000000..1365ffc --- /dev/null +++ b/files/data/shots/li.txt @@ -0,0 +1,15 @@ +Texture = Shots/EnergyBlastHead +DamageType = DT_AVATAR_LIZAP +BlendType = BLEND_ADD +BounceType = BOUNCE_REAL +HitPrt = EnergyBlastHit +HitSfx = EnergyBlastHit +FirePrt = LiZap +TrailPrt = LiTrail +Damage = 1 +MaxSpeed = 1000 +Homing = 1000 +HomingIncr = 8000 +Scale = 0.6 0.6 +LifeTime = 2 +CheckDamageTarget = 1 diff --git a/files/data/shots/petblasterfire.txt b/files/data/shots/petblasterfire.txt new file mode 100644 index 0000000..bfa7e6d --- /dev/null +++ b/files/data/shots/petblasterfire.txt @@ -0,0 +1,14 @@ +Texture = Shots/Blaster +DamageType = DT_AVATAR_ENERGYBLAST +BounceType = BOUNCE_NONE +BlendType = BLEND_ADD +HitPrt = EnergyBlastHit +HitSfx = EnergyBlastHit +FireSfx = BlasterFire +TrailPrt = BlasterTrail +Damage = 1 +MaxSpeed = 500 +Invisible = 1 +Homing = 1000 +Scale = 0.75 0.75 +CheckDamageTarget = 1 diff --git a/files/gfx/drask/statue-arm1.png b/files/gfx/drask/statue-arm1.png new file mode 100644 index 0000000..07b865a Binary files /dev/null and b/files/gfx/drask/statue-arm1.png differ diff --git a/files/gfx/drask/statue-arm2.png b/files/gfx/drask/statue-arm2.png new file mode 100644 index 0000000..841c5f6 Binary files /dev/null and b/files/gfx/drask/statue-arm2.png differ diff --git a/files/gfx/drask/statue-arm3.png b/files/gfx/drask/statue-arm3.png new file mode 100644 index 0000000..50eeac9 Binary files /dev/null and b/files/gfx/drask/statue-arm3.png differ diff --git a/files/gfx/drask/statue-body.png b/files/gfx/drask/statue-body.png new file mode 100644 index 0000000..58836f5 Binary files /dev/null and b/files/gfx/drask/statue-body.png differ diff --git a/files/gfx/drask/statue-head.png b/files/gfx/drask/statue-head.png new file mode 100644 index 0000000..2719c96 Binary files /dev/null and b/files/gfx/drask/statue-head.png differ diff --git a/files/gfx/drask/statue-leg1.png b/files/gfx/drask/statue-leg1.png new file mode 100644 index 0000000..b5b6cdd Binary files /dev/null and b/files/gfx/drask/statue-leg1.png differ diff --git a/files/gfx/drask/statue-leg2.png b/files/gfx/drask/statue-leg2.png new file mode 100644 index 0000000..ad9c0ea Binary files /dev/null and b/files/gfx/drask/statue-leg2.png differ diff --git a/files/gfx/drask/statue-leg3.png b/files/gfx/drask/statue-leg3.png new file mode 100644 index 0000000..032fcbf Binary files /dev/null and b/files/gfx/drask/statue-leg3.png differ diff --git a/files/gfx/gui/audio.png b/files/gfx/gui/audio.png new file mode 100644 index 0000000..231c641 Binary files /dev/null and b/files/gfx/gui/audio.png differ diff --git a/files/gfx/gui/confirm-bg.png b/files/gfx/gui/confirm-bg.png new file mode 100644 index 0000000..5485592 Binary files /dev/null and b/files/gfx/gui/confirm-bg.png differ diff --git a/files/gfx/queen-statue/arm1.png b/files/gfx/queen-statue/arm1.png new file mode 100644 index 0000000..9087edc Binary files /dev/null and b/files/gfx/queen-statue/arm1.png differ diff --git a/files/gfx/queen-statue/arm2.png b/files/gfx/queen-statue/arm2.png new file mode 100644 index 0000000..4b59c11 Binary files /dev/null and b/files/gfx/queen-statue/arm2.png differ diff --git a/files/gfx/queen-statue/arm3.png b/files/gfx/queen-statue/arm3.png new file mode 100644 index 0000000..e42e40a Binary files /dev/null and b/files/gfx/queen-statue/arm3.png differ diff --git a/files/gfx/queen-statue/body.png b/files/gfx/queen-statue/body.png new file mode 100644 index 0000000..8346b86 Binary files /dev/null and b/files/gfx/queen-statue/body.png differ diff --git a/files/gfx/queen-statue/head.png b/files/gfx/queen-statue/head.png new file mode 100644 index 0000000..7710cde Binary files /dev/null and b/files/gfx/queen-statue/head.png differ diff --git a/files/gfx/queen-statue/leg1.png b/files/gfx/queen-statue/leg1.png new file mode 100644 index 0000000..6b13502 Binary files /dev/null and b/files/gfx/queen-statue/leg1.png differ diff --git a/files/gfx/queen-statue/leg2.png b/files/gfx/queen-statue/leg2.png new file mode 100644 index 0000000..1dbf07b Binary files /dev/null and b/files/gfx/queen-statue/leg2.png differ diff --git a/files/gfx/queen-statue/leg3.png b/files/gfx/queen-statue/leg3.png new file mode 100644 index 0000000..2cc69a5 Binary files /dev/null and b/files/gfx/queen-statue/leg3.png differ