1
0
Fork 0
mirror of https://github.com/AquariaOSE/Aquaria.git synced 2025-02-24 15:04:00 +00:00

Rework & cleanup CMake project files

- Building with CMake for development is now actually sane
- Split deps into projects and extra files
- Building against external deps should still work but needs testing
- Can now build out of the box without further adjustments as long as SDL(2) is found properly
- Build Lua in C++ mode (so it can use exceptions instead of setjmp/longjmp)
  - Unfortunately we need to enable exceptions for this :(

- Remove these defines:
  * AQUARIA_BUILD_SCENEEDITOR (now always on)
  * AQUARIA_BUILD_CONSOLE (now always on)
  * BBGE_BUILD_ACHIEVEMENTS_INTERNAL (now always on unless BBGE_BUILD_STEAMWORKS is defined)
  * BBGE_BUILD_OPENGL_DYNAMIC (now always on, define BBGE_BUILD_OPENGL_STATIC if needed)
  * BBGE_BUILD_FMOD_OPENAL_BRIDGE (now always on)
- BBGE_BUILD_STEAMWORKS is not actually implemented (any volunteers?)
- Prepare later removal of SDL & the old vc90 project from the repo. See #74 for extra notes.
This commit is contained in:
fgenesis 2022-04-07 02:38:39 +02:00
parent f0f9f1a719
commit 49b9e0f05a
52 changed files with 719 additions and 1053 deletions

View file

@ -28,9 +28,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "Game.h" #include "Game.h"
#ifdef AQUARIA_BUILD_SCENEEDITOR // Through end of file
int TIMELINE_GRIDSIZE = 10; int TIMELINE_GRIDSIZE = 10;
float TIMELINE_UNIT = 0.1f; float TIMELINE_UNIT = 0.1f;
float TIMELINE_UNIT_STEP = 0.01f; float TIMELINE_UNIT_STEP = 0.01f;
@ -1468,7 +1465,3 @@ void AnimationEditor::updateTimelineGrid()
os << "Grid: " << TIMELINE_GRIDSIZE; os << "Grid: " << TIMELINE_GRIDSIZE;
gridsize->setText(os.str()); gridsize->setText(os.str());
} }
#endif // AQUARIA_BUILD_SCENEEDITOR

View file

@ -1,22 +1,6 @@
#ifndef AQUARIA_COMPILE_CONFIG_H #ifndef AQUARIA_COMPILE_CONFIG_H
#define AQUARIA_COMPILE_CONFIG_H #define AQUARIA_COMPILE_CONFIG_H
// The settings below are also configurable with CMake.
// Define BBGE_SKIP_CONFIG_HEADERS to use CMake-only configuration.
#ifndef BBGE_SKIP_CONFIG_HEADERS
#define AQUARIA_BUILD_CONSOLE 1
#define AQUARIA_BUILD_SCENEEDITOR 1
#define AQUARIA_CUSTOM_BUILD_ID (" Build " __DATE__ " - " __TIME__)
// If defined, this is shown instead of "Aquaria vx.x.x ..." on the title screen.
//#define AQUARIA_OVERRIDE_VERSION_STRING "Aquaria OSE v1.001"
#endif
// Not CMake-configurable defines, change at your own risk // Not CMake-configurable defines, change at your own risk

View file

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 25 KiB

View file

@ -71,21 +71,11 @@ void Beam::onEndOfLife()
void Beam::killAllBeams() void Beam::killAllBeams()
{ {
std::queue<Beam*>beamDeleteQueue; Beams beamsToDelete = beams; // copy
for (Beams::iterator i = beams.begin(); i != beams.end(); i++) for (Beams::iterator it = beamsToDelete.begin(); it != beamsToDelete.end(); it++)
{ if(Beam *s = *it)
beamDeleteQueue.push(*i);
}
Beam *s = 0;
while (!beamDeleteQueue.empty())
{
s = beamDeleteQueue.front();
if (s)
{
s->safeKill(); s->safeKill();
}
beamDeleteQueue.pop();
}
beams.clear(); beams.clear();
} }

82
Aquaria/CMakeLists.txt Normal file
View file

@ -0,0 +1,82 @@
# Main game source code for Aquaria, minus engine and other middleware...
SET(AQUARIA_SRCS
AnimationEditor.cpp
AquariaComboBox.cpp
AquariaMenuItem.cpp
AquariaSaveSlot.cpp
Avatar.cpp
Beam.cpp
BitBlotLogo.cpp
CollideEntity.cpp
Continuity.cpp
Credits.cpp
CurrentRender.cpp
Demo.cpp
DSQ.cpp
Element.cpp
Emote.cpp
Entity.cpp
FlockEntity.cpp
Game.cpp
GameStructs.cpp
GameplayVariables.cpp
GasCloud.cpp
GridRender.cpp
Hair.cpp
Ingredient.cpp
InGameMenu.cpp
Intro.cpp
Logo.cpp
Main.cpp
ManaBall.cpp
MiniMapRender.cpp
Mod.cpp
ModSelector.cpp
ModDownloader.cpp
Network.cpp
ParticleEditor.cpp
Path.cpp
PathFinding.cpp
PathRender.cpp
RecipeMenuEntry.cpp
SceneEditor.cpp
SchoolFish.cpp
Scriptable.cpp
ScriptedEntity.cpp
ScriptInterface.cpp
Segmented.cpp
SFXLoops.cpp
Shot.cpp
Spore.cpp
States.cpp
StatsAndAchievements.cpp
SteamRender.cpp
Strand.cpp
StringBank_gen.h
SubtitlePlayer.cpp
ToolTip.cpp
UserSettings.cpp
WaterSurfaceRender.cpp
Web.cpp
WorldMapRender.cpp
WorldMapTiles.cpp
)
set(EXETYPE)
IF(WIN32)
SET(EXETYPE WIN32)
SET(AQUARIA_SRCS ${AQUARIA_SRCS} aquaria.rc)
ENDIF()
ADD_EXECUTABLE(aquaria ${EXETYPE}
${AQUARIA_SRCS}
)
target_link_libraries(aquaria BBGE lua51)
IF(WIN32)
SET(RC_DEFINES "" FORCE)
SET(RC_INCLUDES "" FORCE)
SET(RC_FLAGS "" FORCE)
endif(WIN32)

View file

@ -133,9 +133,7 @@ static void Linux_CopyTree(const char *src, const char *dst)
const size_t saveSlotPageSize = 4; const size_t saveSlotPageSize = 4;
size_t maxPages = 15; size_t maxPages = 15;
#ifdef AQUARIA_BUILD_CONSOLE
const int MAX_CONSOLELINES = 18; const int MAX_CONSOLELINES = 18;
#endif
DSQ *dsq = 0; DSQ *dsq = 0;
@ -199,14 +197,10 @@ DSQ::DSQ(const std::string& fileSystem, const std::string& extraDataDir)
recentSaveSlot = -1; recentSaveSlot = -1;
arialFontData = 0; arialFontData = 0;
#ifdef BBGE_BUILD_ACHIEVEMENTS_INTERNAL
achievement_text = 0; achievement_text = 0;
achievement_box = 0; achievement_box = 0;
#endif
#ifdef AQUARIA_BUILD_CONSOLE
console = 0; console = 0;
#endif
cmDebug = 0; cmDebug = 0;
saveSlotMode = SSM_NONE; saveSlotMode = SSM_NONE;
afterEffectManagerLayer = LR_AFTER_EFFECTS; // LR_AFTER_EFFECTS afterEffectManagerLayer = LR_AFTER_EFFECTS; // LR_AFTER_EFFECTS
@ -870,14 +864,10 @@ This build is not yet final, and as such there are a couple things lacking. They
addStateInstance(game = new Game); addStateInstance(game = new Game);
addStateInstance(new GameOver); addStateInstance(new GameOver);
#ifdef AQUARIA_BUILD_SCENEEDITOR
addStateInstance(new AnimationEditor); addStateInstance(new AnimationEditor);
#endif
addStateInstance(new Intro2); addStateInstance(new Intro2);
addStateInstance(new BitBlotLogo); addStateInstance(new BitBlotLogo);
#ifdef AQUARIA_BUILD_SCENEEDITOR
addStateInstance(new ParticleEditor); addStateInstance(new ParticleEditor);
#endif
addStateInstance(new Credits); addStateInstance(new Credits);
addStateInstance(new Intro); addStateInstance(new Intro);
addStateInstance(new Nag); addStateInstance(new Nag);
@ -1067,7 +1057,6 @@ This build is not yet final, and as such there are a couple things lacking. They
debugLog("done"); debugLog("done");
#ifdef AQUARIA_BUILD_CONSOLE
debugLog("Creating console"); debugLog("Creating console");
console = new DebugFont; console = new DebugFont;
{ {
@ -1076,9 +1065,6 @@ This build is not yet final, and as such there are a couple things lacking. They
console->setFontSize(6); console->setFontSize(6);
} }
addRenderObject(console, LR_DEBUG_TEXT); addRenderObject(console, LR_DEBUG_TEXT);
#else
debugLog("NOT creating console (disabled in this build)");
#endif
debugLog("1"); debugLog("1");
@ -1130,7 +1116,6 @@ This build is not yet final, and as such there are a couple things lacking. They
addRenderObject(subtext, LR_SUBTITLES); addRenderObject(subtext, LR_SUBTITLES);
#ifdef BBGE_BUILD_ACHIEVEMENTS_INTERNAL
achievement_box = new Quad(); achievement_box = new Quad();
achievement_box->position = Vector(800,0); achievement_box->position = Vector(800,0);
achievement_box->alpha = 0; achievement_box->alpha = 0;
@ -1148,7 +1133,6 @@ This build is not yet final, and as such there are a couple things lacking. They
achievement_text->setWidth(280); achievement_text->setWidth(280);
achievement_text->setAlign(ALIGN_LEFT); achievement_text->setAlign(ALIGN_LEFT);
addRenderObject(achievement_text, LR_SUBTITLES); addRenderObject(achievement_text, LR_SUBTITLES);
#endif
cutscene_bg = new Quad(); cutscene_bg = new Quad();
cutscene_bg->autoWidth = AUTO_VIRTUALWIDTH; cutscene_bg->autoWidth = AUTO_VIRTUALWIDTH;
@ -1728,7 +1712,6 @@ void DSQ::reloadDevice()
recreateBlackBars(); recreateBlackBars();
} }
#ifdef AQUARIA_BUILD_CONSOLE
void DSQ::toggleConsole() void DSQ::toggleConsole()
{ {
if (console && isDeveloperKeys()) if (console && isDeveloperKeys())
@ -1773,7 +1756,6 @@ void DSQ::debugLog(const std::string &s)
} }
Core::debugLog(s); Core::debugLog(s);
} }
#endif // AQUARIA_BUILD_CONSOLE
int DSQ::getEntityTypeIndexByName(std::string s) int DSQ::getEntityTypeIndexByName(std::string s)
{ {
@ -2055,10 +2037,8 @@ void DSQ::shutdown()
UNREFTEX(texCursorSing); UNREFTEX(texCursorSing);
UNREFTEX(texCursorLook); UNREFTEX(texCursorLook);
#ifdef AQUARIA_BUILD_CONSOLE
removeRenderObject(console); removeRenderObject(console);
console = 0; console = 0;
#endif
removeRenderObject(cmDebug); removeRenderObject(cmDebug);
cmDebug = 0; cmDebug = 0;
removeRenderObject(subtext); removeRenderObject(subtext);
@ -2066,12 +2046,10 @@ void DSQ::shutdown()
removeRenderObject(subbox); removeRenderObject(subbox);
subbox = 0; subbox = 0;
#ifdef BBGE_BUILD_ACHIEVEMENTS_INTERNAL
removeRenderObject(achievement_text); removeRenderObject(achievement_text);
achievement_text = 0; achievement_text = 0;
removeRenderObject(achievement_box); removeRenderObject(achievement_box);
achievement_box = 0; achievement_box = 0;
#endif
removeRenderObject(cursor); removeRenderObject(cursor);
removeRenderObject(cursorGlow); // is this necessary? probably removeRenderObject(cursorGlow); // is this necessary? probably
@ -3605,11 +3583,7 @@ bool DSQ::isDeveloperKeys()
bool DSQ::canOpenEditor() const bool DSQ::canOpenEditor() const
{ {
#ifdef AQUARIA_BUILD_SCENEEDITOR
return dsq->isDeveloperKeys() || (dsq->mod.isActive() && !dsq->mod.isEditorBlocked()); return dsq->isDeveloperKeys() || (dsq->mod.isActive() && !dsq->mod.isEditorBlocked());
#else
return false;
#endif
} }
bool DSQ::isQuitFlag() bool DSQ::isQuitFlag()
@ -3704,9 +3678,7 @@ void DSQ::bindInput()
if (isDeveloperKeys()) if (isDeveloperKeys())
{ {
#ifdef AQUARIA_BUILD_CONSOLE
addAction(MakeFunctionEvent(DSQ, toggleConsole), KEY_TILDE, 0); addAction(MakeFunctionEvent(DSQ, toggleConsole), KEY_TILDE, 0);
#endif
addAction(MakeFunctionEvent(DSQ, toggleRenderCollisionShapes), KEY_RETURN, 0); addAction(MakeFunctionEvent(DSQ, toggleRenderCollisionShapes), KEY_RETURN, 0);
} }
addAction(MakeFunctionEvent(DSQ, debugMenu), KEY_BACKSPACE, 0); addAction(MakeFunctionEvent(DSQ, debugMenu), KEY_BACKSPACE, 0);
@ -4009,10 +3981,8 @@ void DSQ::onUpdate(float dt)
fpsText->setText(os.str()); fpsText->setText(os.str());
} }
#ifdef AQUARIA_BUILD_CONSOLE
if(console && console->alpha == 1) if(console && console->alpha == 1)
console->position = Vector(10 - virtualOffX,400); console->position = Vector(10 - virtualOffX,400);
#endif
if (shakeCameraTimer > 0) if (shakeCameraTimer > 0)
{ {

View file

@ -292,9 +292,7 @@ public:
int getEntityTypeIndexByName(std::string s); int getEntityTypeIndexByName(std::string s);
void screenMessage(const std::string &msg); void screenMessage(const std::string &msg);
#ifdef AQUARIA_BUILD_CONSOLE // No need to override it otherwise.
void debugLog(const std::string &s); void debugLog(const std::string &s);
#endif
void toggleConsole(); void toggleConsole();
void toggleEffects(); void toggleEffects();
void debugMenu(); void debugMenu();
@ -388,9 +386,7 @@ public:
Demo demo; Demo demo;
DebugFont *fpsText, *cmDebug; DebugFont *fpsText, *cmDebug;
#ifdef AQUARIA_BUILD_CONSOLE
DebugFont *console; DebugFont *console;
#endif
BitmapText *versionLabel; BitmapText *versionLabel;
void setVersionLabelText(); void setVersionLabelText();
@ -414,10 +410,8 @@ public:
void startSelectedMod(); void startSelectedMod();
ModEntry* getSelectedModEntry(); ModEntry* getSelectedModEntry();
#ifdef BBGE_BUILD_ACHIEVEMENTS_INTERNAL
BitmapText *achievement_text; BitmapText *achievement_text;
Quad *achievement_box; Quad *achievement_box;
#endif
BitmapText *subtext; BitmapText *subtext;
Quad *subbox; Quad *subbox;
@ -515,9 +509,7 @@ protected:
void onMouseInput(); void onMouseInput();
std::vector<std::string> voxQueue; std::vector<std::string> voxQueue;
#ifdef AQUARIA_BUILD_CONSOLE
std::vector<std::string> consoleLines; std::vector<std::string> consoleLines;
#endif
std::vector <AquariaSaveSlot*> saveSlots; std::vector <AquariaSaveSlot*> saveSlots;

View file

@ -292,7 +292,6 @@ void Element::setElementEffectByIndex(int eidx)
void Element::render() void Element::render()
{ {
if (!elementActive) return; if (!elementActive) return;
#ifdef AQUARIA_BUILD_SCENEEDITOR
if (dsq->game->isSceneEditorActive() && this->bgLayer == dsq->game->sceneEditor.bgLayer if (dsq->game->isSceneEditorActive() && this->bgLayer == dsq->game->sceneEditor.bgLayer
&& dsq->game->sceneEditor.editType == ET_ELEMENTS) && dsq->game->sceneEditor.editType == ET_ELEMENTS)
{ {
@ -313,7 +312,6 @@ void Element::render()
renderBorder = true; renderBorder = true;
} }
#endif
Quad::render(); Quad::render();

View file

@ -2491,7 +2491,6 @@ void Entity::render()
color *= multColor; color *= multColor;
} }
#ifdef AQUARIA_BUILD_SCENEEDITOR
if (dsq->game->isSceneEditorActive() && dsq->game->sceneEditor.editType == ET_ENTITIES) if (dsq->game->isSceneEditorActive() && dsq->game->sceneEditor.editType == ET_ENTITIES)
{ {
if (dsq->game->sceneEditor.editingEntity == this) if (dsq->game->sceneEditor.editingEntity == this)
@ -2501,7 +2500,6 @@ void Entity::render()
renderBorder = true; renderBorder = true;
} }
#endif
// HACK: need to multiply base + etc // HACK: need to multiply base + etc
skeletalSprite.setColorMult(this->color, this->alpha.x); skeletalSprite.setColorMult(this->color, this->alpha.x);

View file

@ -846,7 +846,6 @@ void Game::loadEntityTypeList()
} }
in.close(); in.close();
#ifdef AQUARIA_BUILD_SCENEEDITOR
entityGroups.clear(); entityGroups.clear();
std::string fn = "scripts/entities/entitygroups.txt"; std::string fn = "scripts/entities/entitygroups.txt";
@ -886,7 +885,6 @@ void Game::loadEntityTypeList()
game->sceneEditor.entityPageNum = 0; game->sceneEditor.entityPageNum = 0;
//game->sceneEditor.page = entityGroups.begin(); //game->sceneEditor.page = entityGroups.begin();
#endif
} }
EntityClass *Game::getEntityClassForEntityType(const std::string &type) EntityClass *Game::getEntityClassForEntityType(const std::string &type)
@ -2548,9 +2546,7 @@ void Game::action(int id, int state, int source, InputDevice device)
} }
} }
#ifdef AQUARIA_BUILD_SCENEEDITOR
if (id == ACTION_TOGGLESCENEEDITOR && !state) toggleSceneEditor(); if (id == ACTION_TOGGLESCENEEDITOR && !state) toggleSceneEditor();
#endif
if (dsq->isDeveloperKeys() || isSceneEditorActive()) if (dsq->isDeveloperKeys() || isSceneEditorActive())
{ {
@ -2834,13 +2830,10 @@ void Game::applyState()
li = 0; li = 0;
#ifdef AQUARIA_BUILD_SCENEEDITOR
if (dsq->canOpenEditor()) if (dsq->canOpenEditor())
{ {
sceneEditor.init(); sceneEditor.init();
} }
#endif
if (verbose) debugLog("Creating Avatar"); if (verbose) debugLog("Creating Avatar");
avatar = new Avatar(); avatar = new Avatar();
@ -3210,12 +3203,10 @@ void Game::bindInput()
addAction(ACTION_ESC, KEY_ESCAPE, -1); addAction(ACTION_ESC, KEY_ESCAPE, -1);
#ifdef AQUARIA_BUILD_SCENEEDITOR
if (dsq->canOpenEditor()) if (dsq->canOpenEditor())
{ {
addAction(ACTION_TOGGLESCENEEDITOR, KEY_TAB, -1); addAction(ACTION_TOGGLESCENEEDITOR, KEY_TAB, -1);
} }
#endif
if (dsq->canOpenEditor()) if (dsq->canOpenEditor())
{ {
@ -4134,7 +4125,6 @@ void Game::handleShotCollisionsHair(Entity *e, int num, float perc)
} }
} }
#ifdef AQUARIA_BUILD_SCENEEDITOR
void Game::toggleSceneEditor() void Game::toggleSceneEditor()
{ {
if (!core->getAltState()) if (!core->getAltState())
@ -4143,7 +4133,6 @@ void Game::toggleSceneEditor()
setElementLayerFlags(); setElementLayerFlags();
} }
} }
#endif
void Game::toggleMiniMapRender() void Game::toggleMiniMapRender()
{ {
@ -4607,11 +4596,7 @@ void Game::update(float dt)
} }
themenu->update(dt); themenu->update(dt);
#ifdef AQUARIA_BUILD_SCENEEDITOR sceneEditor.update(dt);
{
sceneEditor.update(dt);
}
#endif
dsq->emote.update(dt); dsq->emote.update(dt);
@ -4990,11 +4975,9 @@ void Game::removeState()
avatar->endOfGameState(); avatar->endOfGameState();
} }
#ifdef AQUARIA_BUILD_SCENEEDITOR
debugLog("toggle sceneEditor"); debugLog("toggle sceneEditor");
if (sceneEditor.isOn()) if (sceneEditor.isOn())
sceneEditor.toggle(false); sceneEditor.toggle(false);
#endif
debugLog("gameSpeed"); debugLog("gameSpeed");
dsq->gameSpeed.interpolateTo(1, 0); dsq->gameSpeed.interpolateTo(1, 0);
@ -5066,9 +5049,7 @@ void Game::removeState()
dsq->clearElements(); dsq->clearElements();
dsq->clearEntities(); dsq->clearEntities();
avatar = 0; avatar = 0;
#ifdef AQUARIA_BUILD_SCENEEDITOR
sceneEditor.shutdown(); sceneEditor.shutdown();
#endif
cameraFollow = 0; cameraFollow = 0;
core->cameraPos = Vector(0,0); core->cameraPos = Vector(0,0);

View file

@ -27,14 +27,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "AquariaMenuItem.h" #include "AquariaMenuItem.h"
#include "ScriptedEntity.h" #include "ScriptedEntity.h"
#include "TileVector.h" #include "TileVector.h"
#ifdef AQUARIA_DEMO
#undef AQUARIA_BUILD_SCENEEDITOR
#endif
#ifdef AQUARIA_BUILD_SCENEEDITOR
#include "SceneEditor.h" #include "SceneEditor.h"
#endif
#include <tinyxml2.h> #include <tinyxml2.h>
using namespace tinyxml2; using namespace tinyxml2;
@ -287,12 +280,8 @@ public:
Path *getNearestPath(const Vector &pos, PathType pathType=PATH_NONE); Path *getNearestPath(const Vector &pos, PathType pathType=PATH_NONE);
Path *getNearestPath(Path *p, std::string name); Path *getNearestPath(Path *p, std::string name);
#ifdef AQUARIA_BUILD_SCENEEDITOR
SceneEditor sceneEditor; SceneEditor sceneEditor;
bool isSceneEditorActive() {return sceneEditor.isOn();} bool isSceneEditorActive() {return sceneEditor.isOn();}
#else
bool isSceneEditorActive() const {return false;}
#endif
bool isInGameMenu(); bool isInGameMenu();
@ -362,9 +351,7 @@ public:
WaterSurfaceRender *waterSurfaceRender; WaterSurfaceRender *waterSurfaceRender;
#ifdef AQUARIA_BUILD_SCENEEDITOR
EntityGroups entityGroups; EntityGroups entityGroups;
#endif
std::string getNoteName(int n, const std::string &pre=""); std::string getNoteName(int n, const std::string &pre="");
@ -521,9 +508,7 @@ protected:
Entity *cameraFollowEntity; Entity *cameraFollowEntity;
bool loadSceneXML(std::string scene); bool loadSceneXML(std::string scene);
#ifdef AQUARIA_BUILD_SCENEEDITOR
void toggleSceneEditor(); void toggleSceneEditor();
#endif
Quad *bg, *bg2; Quad *bg, *bg2;

View file

@ -26,9 +26,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "Game.h" #include "Game.h"
#ifdef AQUARIA_BUILD_SCENEEDITOR // Through end of file
ParticleEditor *pe = 0; ParticleEditor *pe = 0;
@ -156,6 +153,3 @@ void ParticleEditor::stop()
{ {
emitter->stop(); emitter->stop();
} }
#endif // AQUARIA_BUILD_SCENEEDITOR

View file

@ -39,11 +39,10 @@ void PathRender::onRender()
for (size_t i = 0; i < pathcount; i++) for (size_t i = 0; i < pathcount; i++)
{ {
Path *p = dsq->game->getPath(i); Path *p = dsq->game->getPath(i);
#ifdef AQUARIA_BUILD_SCENEEDITOR
if (dsq->game->sceneEditor.selectedIdx == i) if (dsq->game->sceneEditor.selectedIdx == i)
glColor4f(1, 1, 1, 0.75); glColor4f(1, 1, 1, 0.75);
else else
#endif
glColor4f(1, 0.5, 0.5, 0.75); glColor4f(1, 0.5, 0.5, 0.75);
glBegin(GL_LINES); glBegin(GL_LINES);
@ -97,11 +96,9 @@ void PathRender::onRender()
if (!p->active) if (!p->active)
a = 0.3f; a = 0.3f;
#ifdef AQUARIA_BUILD_SCENEEDITOR
if (dsq->game->sceneEditor.selectedIdx == i) if (dsq->game->sceneEditor.selectedIdx == i)
glColor4f(1, 1, 1, a); glColor4f(1, 1, 1, a);
else else
#endif
glColor4f(1, 0.5, 0.5, a); glColor4f(1, 0.5, 0.5, a);
glPushMatrix(); glPushMatrix();

View file

@ -32,9 +32,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "Shot.h" #include "Shot.h"
#ifdef AQUARIA_BUILD_SCENEEDITOR // Through end of file
#ifdef BBGE_BUILD_WINDOWS #ifdef BBGE_BUILD_WINDOWS
#define WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN
#include <windows.h> #include <windows.h>
@ -3155,6 +3152,3 @@ void SceneEditor::dumpObs()
tgaSaveRGBA(outfn.c_str(), MAX_GRID, MAX_GRID, data); tgaSaveRGBA(outfn.c_str(), MAX_GRID, MAX_GRID, data);
dsq->screenMessage("Saved grid image to " + outfn); dsq->screenMessage("Saved grid image to " + outfn);
} }
#endif // AQUARIA_BUILD_SCENEEDITOR

View file

@ -7,8 +7,6 @@
#include "ActionMapper.h" #include "ActionMapper.h"
#include "Quad.h" #include "Quad.h"
#ifdef AQUARIA_BUILD_SCENEEDITOR
class Element; class Element;
class Entity; class Entity;
class Path; class Path;
@ -241,6 +239,4 @@ protected:
InterpolatedVector oldGlobalScale; InterpolatedVector oldGlobalScale;
}; };
#endif // AQUARIA_BUILD_SCENEEDITOR
#endif // AQUARIA_SCENEEDITOR_H #endif // AQUARIA_SCENEEDITOR_H

View file

@ -19,17 +19,24 @@ along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/ */
extern "C" // Internal Lua is built as C++ code, so we need to include the headers properly
{ #ifndef AQUARIA_INTERNAL_LUA
extern "C" {
#endif
#include "lua.h" #include "lua.h"
#include "lauxlib.h" #include "lauxlib.h"
#include "lualib.h" #include "lualib.h"
}
#ifndef AQUARIA_INTERNAL_LUA
} // end extern "C"
#endif
#include "luaalloc.h" #include "luaalloc.h"
#include "SDL.h" #include "SDL.h"
#include "ScriptInterface.h" #include "ScriptInterface.h"
#include "../BBGE/ScriptObject.h" #include "ScriptObject.h"
#include "ReadXML.h" #include "ReadXML.h"
@ -55,7 +62,7 @@ extern "C"
#include "ActionMapper.h" #include "ActionMapper.h"
#include "../BBGE/MathFunctions.h" #include "MathFunctions.h"
#undef quad // avoid conflict with quad precision types #undef quad // avoid conflict with quad precision types

View file

@ -88,21 +88,12 @@ void Spore::onEnterState(int state)
void Spore::killAllSpores() void Spore::killAllSpores()
{ {
std::queue<Spore*>sporeDeleteQueue; Spores sporesToDelete = spores; // copy
for (Spores::iterator i = spores.begin(); i != spores.end(); i++)
{ for (Spores::iterator it = sporesToDelete.begin(); it != sporesToDelete.end(); it++)
sporeDeleteQueue.push(*i); if(Spore *s = *it)
}
Spore *s = 0;
while (!sporeDeleteQueue.empty())
{
s = sporeDeleteQueue.front();
if (s)
{
s->safeKill(); s->safeKill();
}
sporeDeleteQueue.pop();
}
spores.clear(); spores.clear();
} }

View file

@ -129,7 +129,7 @@ StatsAndAchievements::StatsAndAchievements()
{ {
#ifdef BBGE_BUILD_ACHIEVEMENTS_INTERNAL #ifndef BBGE_BUILD_STEAMWORKS
unlockedDisplayTimestamp = -1.0f; unlockedDisplayTimestamp = -1.0f;
#endif #endif
@ -148,7 +148,7 @@ StatsAndAchievements::StatsAndAchievements()
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
void StatsAndAchievements::RunFrame() void StatsAndAchievements::RunFrame()
{ {
#ifdef BBGE_BUILD_ACHIEVEMENTS_INTERNAL #ifndef BBGE_BUILD_STEAMWORKS
if ( !requestedStats ) if ( !requestedStats )
{ {
requestedStats = true; requestedStats = true;
@ -731,7 +731,7 @@ void StatsAndAchievements::update(float dt)
} }
} }
#ifdef BBGE_BUILD_ACHIEVEMENTS_INTERNAL #ifndef BBGE_BUILD_STEAMWORKS
// change no state if we're still fading in/out. // change no state if we're still fading in/out.
if (!dsq->achievement_box->alpha.isInterpolating()) if (!dsq->achievement_box->alpha.isInterpolating())
{ {
@ -755,7 +755,7 @@ void StatsAndAchievements::update(float dt)
unlockedDisplayTimestamp = maxUnlockDisplayTime; unlockedDisplayTimestamp = maxUnlockDisplayTime;
std::string text("Achievement Unlocked:\n"); std::string text("Achievement Unlocked:\n");
text += name; text += name;
unlockedToBeDisplayed.pop(); unlockedToBeDisplayed.pop_front();
dsq->achievement_text->setText(text); dsq->achievement_text->setText(text);
dsq->achievement_text->alpha.interpolateTo(1, 1); dsq->achievement_text->alpha.interpolateTo(1, 1);
dsq->achievement_box->alpha.interpolateTo(1, 0.1f); dsq->achievement_box->alpha.interpolateTo(1, 0.1f);
@ -777,8 +777,8 @@ void StatsAndAchievements::UnlockAchievement( Achievement &achievement )
// the icon may change once it's unlocked // the icon may change once it's unlocked
achievement.iconImage = 0; achievement.iconImage = 0;
#ifdef BBGE_BUILD_ACHIEVEMENTS_INTERNAL #ifndef BBGE_BUILD_STEAMWORKS
unlockedToBeDisplayed.push( std::string(achievement.name) ); unlockedToBeDisplayed.push_back(achievement.name);
#endif #endif
// Store stats end of frame // Store stats end of frame
@ -794,7 +794,7 @@ void StatsAndAchievements::StoreStatsIfNecessary()
{ {
// already set any achievements in UnlockAchievement // already set any achievements in UnlockAchievement
#ifdef BBGE_BUILD_ACHIEVEMENTS_INTERNAL #ifndef BBGE_BUILD_STEAMWORKS
storeStats = false; // only ever try once. storeStats = false; // only ever try once.
// FIXME: We should use a temporary file to ensure that data // FIXME: We should use a temporary file to ensure that data
@ -836,4 +836,6 @@ void StatsAndAchievements::StoreStatsIfNecessary()
} }
} }
#ifdef BBGE_BUILD_STEAMWORKS
#error Someone with access to the Steamworks SDK actually has to implement this!
#endif

View file

@ -21,8 +21,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#ifndef STATS_ACH_H #ifndef STATS_ACH_H
#define STATS_ACH_H #define STATS_ACH_H
#ifdef BBGE_BUILD_ACHIEVEMENTS_INTERNAL #ifndef BBGE_BUILD_STEAMWORKS
#include <queue> #include <list>
#endif #endif
enum Achievements enum Achievements
@ -143,9 +143,9 @@ private:
// Store stats // Store stats
void StoreStatsIfNecessary(); void StoreStatsIfNecessary();
#ifdef BBGE_BUILD_ACHIEVEMENTS_INTERNAL #ifndef BBGE_BUILD_STEAMWORKS
float unlockedDisplayTimestamp; float unlockedDisplayTimestamp;
std::queue<std::string> unlockedToBeDisplayed; std::list<std::string> unlockedToBeDisplayed;
#endif #endif
// Did we get the stats from Steam? // Did we get the stats from Steam?

View file

@ -42,21 +42,11 @@ void Web::setParentEntity(Entity *e)
void Web::killAllWebs() void Web::killAllWebs()
{ {
std::queue<Web*>shotDeleteQueue; Webs websToDelete = webs; // copy
for (Webs::iterator i = webs.begin(); i != webs.end(); i++) for (Webs::iterator it = websToDelete.begin(); it != websToDelete.end(); it++)
{ if(Web *s = *it)
shotDeleteQueue.push(*i);
}
Web *s = 0;
while (!shotDeleteQueue.empty())
{
s = shotDeleteQueue.front();
if (s)
{
s->safeKill(); s->safeKill();
}
shotDeleteQueue.pop();
}
webs.clear(); webs.clear();
} }

View file

@ -1166,9 +1166,7 @@ void WorldMapRender::onUpdate(float dt)
else else
{ {
if (!dsq->isInCutscene() && dsq->game->avatar && activeTile if (!dsq->isInCutscene() && dsq->game->avatar && activeTile
#ifdef AQUARIA_BUILD_SCENEEDITOR
&& !dsq->game->sceneEditor.isOn() && !dsq->game->sceneEditor.isOn()
#endif
) )
{ {
const float screenWidth = core->getVirtualWidth() * core->invGlobalScale; const float screenWidth = core->getVirtualWidth() * core->invGlobalScale;

View file

@ -32,14 +32,14 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#else #else
# define AQUARIA_RC_COMMENTS "Open Source Build" # define AQUARIA_RC_COMMENTS "Open Source Build"
#endif #endif
#define AQUARIA_RC_FILEVERSION_STRING "1.1.3.fg" #define AQUARIA_RC_FILEVERSION_STRING "1.1.3.OSE"
// Version information // Version information
1 VERSIONINFO 1 VERSIONINFO
FILEVERSION AQUARIA_RC_FILEVERSION FILEVERSION AQUARIA_RC_FILEVERSION
PRODUCTVERSION AQUARIA_RC_PRODUCTVERSION PRODUCTVERSION AQUARIA_RC_PRODUCTVERSION
FILEOS VOS__WINDOWS32 //FILEOS VOS__WINDOWS32
FILETYPE VFT_APP //FILETYPE VFT_APP
BEGIN BEGIN
BLOCK "StringFileInfo" BLOCK "StringFileInfo"
@ -65,5 +65,5 @@ END
END END
// Icon // Icon
101 ICON "AquariaWin32OSE.ico" 101 ICON "AquariaOSE.ico"

View file

@ -1,13 +0,0 @@
#ifndef BBGE_COMPILE_CONFIG_H
#define BBGE_COMPILE_CONFIG_H
#ifndef BBGE_SKIP_CONFIG_HEADERS
#define BBGE_BUILD_OPENGL_DYNAMIC 1
#define BBGE_BUILD_FMOD_OPENAL_BRIDGE 1
#define BBGE_BUILD_ACHIEVEMENTS_INTERNAL 1
#define BBGE_BUILD_VFS 1
#endif
#endif

View file

@ -29,8 +29,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#endif #endif
#endif #endif
#include "BBGECompileConfig.h"
#define compile_assert(pred) switch(0){case 0:case (pred):;} #define compile_assert(pred) switch(0){case 0:case (pred):;}
#ifdef _MSC_VER #ifdef _MSC_VER

116
BBGE/CMakeLists.txt Normal file
View file

@ -0,0 +1,116 @@
# Bit Blot Game Engine sources...
set(BBGE_SRCS
ActionInput.cpp
ActionInput.h
ActionMapper.cpp
ActionMapper.h
ActionSet.cpp
ActionSet.h
ActionStatus.cpp
ActionStatus.h
AfterEffect.cpp
AfterEffect.h
Base.cpp
Base.h
BaseText.h
bithacks.h
BitmapFont.cpp
BitmapFont.h
CMakeLists.txt
Core.cpp
Core.h
DarkLayer.cpp
DarkLayer.h
DebugFont.cpp
DebugFont.h
Effects.cpp
Effects.h
Emitter.cpp
Event.cpp
Event.h
FmodOpenALBridge.cpp
FmodOpenALBridge.h
FrameBuffer.cpp
FrameBuffer.h
GameKeyNames.cpp
GameKeyNames.h
GameKeys.h
GLLoad.cpp
GLLoad.h
Gradient.cpp
Gradient.h
Image.cpp
Image.h
Joystick.cpp
Joystick.h
LensFlare.cpp
LensFlare.h
Localization.cpp
Localization.h
MathFunctions.h
MT.cpp
MT.h
OpenGLStubs.h
OSFunctions.cpp
OSFunctions.h
ParticleEffect.cpp
ParticleManager.cpp
Particles.cpp
Particles.h
Precacher.cpp
Precacher.h
Quad.cpp
Quad.h
QuadTrail.cpp
QuadTrail.h
ReadXML.cpp
ReadXML.h
Rect.h
Refcounted.h
RenderBase.cpp
RenderBase.h
RenderObject.cpp
RenderObject.h
RenderObject_inline.h
RenderObjectLayer.cpp
RenderRect.cpp
RoundedRect.cpp
RoundedRect.h
ScreenTransition.cpp
ScreenTransition.h
ScriptObject.cpp
ScriptObject.h
Shader.cpp
Shader.h
SimpleIStringStream.h
SkeletalSprite.cpp
SkeletalSprite.h
Slider.cpp
Slider.h
SoundManager.cpp
SoundManager.h
SpawnParticleData.cpp
StateMachine.cpp
StateMachine.h
StateManager.cpp
StateManager.h
StringBank.cpp
StringBank.h
Texture.cpp
Texture.h
TTFFont.cpp
TTFFont.h
Vector.cpp
Vector.h
Window.cpp
Window.h
Window_SDL1.cpp
Window_SDL2.cpp
)
if(APPLE AND NOT AQUARIA_USE_SDL2)
set(BBGE_SRCS ${BBGE_SRCS} Cocoa.mm)
endif()
add_library(BBGE ${BBGE_SRCS})
target_link_libraries(BBGE ExternalLibs ${SDL_LIBRARY})

View file

@ -51,6 +51,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#ifdef BBGE_BUILD_VFS #ifdef BBGE_BUILD_VFS
#include "ttvfs.h" #include "ttvfs.h"
#endif #endif
#include "ttvfs_stdio.h"
Core *core = 0; Core *core = 0;
@ -709,7 +710,6 @@ void Core::initGraphicsLibrary(int width, int height, bool fullscreen, bool vsyn
window->open(width, height, fullscreen, bpp, vsync, display, hz); window->open(width, height, fullscreen, bpp, vsync, display, hz);
window->setTitle(appName.c_str()); window->setTitle(appName.c_str());
#ifdef BBGE_BUILD_OPENGL_DYNAMIC
// get GL symbols AFTER opening the window, otherwise we get a super old GL context on windows and nothing works // get GL symbols AFTER opening the window, otherwise we get a super old GL context on windows and nothing works
if (!lookup_all_glsyms()) if (!lookup_all_glsyms())
{ {
@ -718,7 +718,6 @@ void Core::initGraphicsLibrary(int width, int height, bool fullscreen, bool vsyn
SDL_Quit(); SDL_Quit();
exit_error(os.str()); exit_error(os.str());
} }
#endif
debugLog("GL vendor, renderer & version:"); debugLog("GL vendor, renderer & version:");
debugLog((const char*)glGetString(GL_VENDOR)); debugLog((const char*)glGetString(GL_VENDOR));
@ -833,9 +832,7 @@ void Core::shutdownGraphicsLibrary()
delete window; delete window;
window = NULL; window = NULL;
SDL_QuitSubSystem(SDL_INIT_VIDEO); SDL_QuitSubSystem(SDL_INIT_VIDEO);
#ifdef BBGE_BUILD_OPENGL_DYNAMIC
unload_all_glsyms(); unload_all_glsyms();
#endif
lib_graphics = false; lib_graphics = false;

View file

@ -1,7 +1,16 @@
#include "GLLoad.h"
#ifdef BBGE_BUILD_OPENGL_STATIC
bool lookup_all_glsyms() { return true; }
bool void unload_all_glsyms() { return false; }
#else
#include "Base.h" #include "Base.h"
#include "RenderBase.h" #include "RenderBase.h"
#include "GLLoad.h"
#include <sstream> #include <sstream>
#ifdef GLAPIENTRY #ifdef GLAPIENTRY
@ -16,7 +25,6 @@
#include <GL/glext.h> #include <GL/glext.h>
#ifdef BBGE_BUILD_OPENGL_DYNAMIC
PFNGLGENERATEMIPMAPEXTPROC glGenerateMipmapEXT = NULL; PFNGLGENERATEMIPMAPEXTPROC glGenerateMipmapEXT = NULL;
@ -89,6 +97,7 @@ static bool lookup_glsym(const char *funcname, void **func)
bool lookup_all_glsyms() bool lookup_all_glsyms()
{ {
bool retval = true; bool retval = true;
#define GL_FUNC(ret,fn,params,call,rt) \ #define GL_FUNC(ret,fn,params,call,rt) \
if (!lookup_glsym(#fn, (void **) &p##fn)) retval = false; if (!lookup_glsym(#fn, (void **) &p##fn)) retval = false;
#include "OpenGLStubs.h" #include "OpenGLStubs.h"
@ -210,4 +219,4 @@ void unload_all_glsyms()
glUniform4ivARB = NULL; glUniform4ivARB = NULL;
} }
#endif // BBGE_BUILD_OPENGL_DYNAMIC #endif // BBGE_BUILD_OPENGL_STATIC

View file

@ -2,7 +2,6 @@
#define BBGE_GAME_KEYS_H #define BBGE_GAME_KEYS_H
#include <SDL_version.h> #include <SDL_version.h>
#include "BBGECompileConfig.h"
#if SDL_VERSION_ATLEAST(2,0,0) #if SDL_VERSION_ATLEAST(2,0,0)

View file

@ -37,7 +37,7 @@ void Shader::staticInit()
bool use = true; bool use = true;
#ifdef BBGE_BUILD_OPENGL_DYNAMIC #ifndef BBGE_BUILD_OPENGL_STATIC
if( !glCreateProgramObjectARB || !glDeleteObjectARB || !glUseProgramObjectARB || if( !glCreateProgramObjectARB || !glDeleteObjectARB || !glUseProgramObjectARB ||
!glCreateShaderObjectARB || !glCreateShaderObjectARB || !glCompileShaderARB || !glCreateShaderObjectARB || !glCreateShaderObjectARB || !glCompileShaderARB ||
!glGetObjectParameterivARB || !glAttachObjectARB || !glGetInfoLogARB || !glGetObjectParameterivARB || !glAttachObjectARB || !glGetInfoLogARB ||

View file

@ -24,15 +24,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "Base.h" #include "Base.h"
#include "ttvfs_stdio.h" #include "ttvfs_stdio.h"
#ifdef BBGE_BUILD_FMOD_OPENAL_BRIDGE #include "FmodOpenALBridge.h"
#include "FmodOpenALBridge.h"
#else
#include <fmod.h>
#include <fmod.hpp>
#ifdef BBGE_BUILD_WINDOWS
#pragma comment(lib, "fmodex_vc.lib")
#endif
#endif
SoundManager *sound = 0; SoundManager *sound = 0;
@ -328,11 +321,6 @@ SoundManager::SoundManager(const std::string &defaultDevice)
if (checkError()) goto get_out; if (checkError()) goto get_out;
} }
#ifdef BBGE_BUILD_FMOD_OPENAL_BRIDGE
SoundCore::system->getNumChannels(&channels);
#endif
debugLog("set file system"); debugLog("set file system");
result = SoundCore::system->setFileSystem(myopen, myclose, myread, myseek, 2048); result = SoundCore::system->setFileSystem(myopen, myclose, myread, myseek, 2048);

View file

@ -1,173 +0,0 @@
/*
Copyright (C) 2007, 2010 - Bit-Blot
This file is part of Aquaria.
Aquaria is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "Core.h"
typedef std::map<std::string, int> InputCodeMap;
InputCodeMap inputCodeMap;
void initInputCodeMap()
{
inputCodeMap["0"] = 0;
inputCodeMap["KEY_A"] = KEY_A;
inputCodeMap["KEY_B"] = KEY_B;
inputCodeMap["KEY_C"] = KEY_C;
inputCodeMap["KEY_D"] = KEY_D;
inputCodeMap["KEY_E"] = KEY_E;
inputCodeMap["KEY_F"] = KEY_F;
inputCodeMap["KEY_G"] = KEY_G;
inputCodeMap["KEY_H"] = KEY_H;
inputCodeMap["KEY_I"] = KEY_I;
inputCodeMap["KEY_J"] = KEY_J;
inputCodeMap["KEY_K"] = KEY_K;
inputCodeMap["KEY_L"] = KEY_L;
inputCodeMap["KEY_M"] = KEY_M;
inputCodeMap["KEY_N"] = KEY_N;
inputCodeMap["KEY_O"] = KEY_O;
inputCodeMap["KEY_P"] = KEY_P;
inputCodeMap["KEY_Q"] = KEY_Q;
inputCodeMap["KEY_R"] = KEY_R;
inputCodeMap["KEY_S"] = KEY_S;
inputCodeMap["KEY_T"] = KEY_T;
inputCodeMap["KEY_U"] = KEY_U;
inputCodeMap["KEY_V"] = KEY_V;
inputCodeMap["KEY_W"] = KEY_W;
inputCodeMap["KEY_X"] = KEY_X;
inputCodeMap["KEY_Y"] = KEY_Y;
inputCodeMap["KEY_Z"] = KEY_Z;
inputCodeMap["KEY_1"] = KEY_1;
inputCodeMap["KEY_2"] = KEY_2;
inputCodeMap["KEY_3"] = KEY_3;
inputCodeMap["KEY_4"] = KEY_4;
inputCodeMap["KEY_5"] = KEY_5;
inputCodeMap["KEY_6"] = KEY_6;
inputCodeMap["KEY_7"] = KEY_7;
inputCodeMap["KEY_8"] = KEY_8;
inputCodeMap["KEY_9"] = KEY_9;
inputCodeMap["KEY_0"] = KEY_0;
inputCodeMap["KEY_NUMPAD1"] = KEY_NUMPAD1;
inputCodeMap["KEY_NUMPAD2"] = KEY_NUMPAD2;
inputCodeMap["KEY_NUMPAD3"] = KEY_NUMPAD3;
inputCodeMap["KEY_NUMPAD4"] = KEY_NUMPAD4;
inputCodeMap["KEY_NUMPAD5"] = KEY_NUMPAD5;
inputCodeMap["KEY_NUMPAD6"] = KEY_NUMPAD6;
inputCodeMap["KEY_NUMPAD7"] = KEY_NUMPAD7;
inputCodeMap["KEY_NUMPAD8"] = KEY_NUMPAD8;
inputCodeMap["KEY_NUMPAD9"] = KEY_NUMPAD9;
inputCodeMap["KEY_NUMPAD0"] = KEY_NUMPAD0;
inputCodeMap["KEY_F1"] = KEY_F1;
inputCodeMap["KEY_F2"] = KEY_F2;
inputCodeMap["KEY_F3"] = KEY_F3;
inputCodeMap["KEY_F4"] = KEY_F4;
inputCodeMap["KEY_F5"] = KEY_F5;
inputCodeMap["KEY_F6"] = KEY_F6;
inputCodeMap["KEY_F7"] = KEY_F7;
inputCodeMap["KEY_F8"] = KEY_F8;
inputCodeMap["KEY_F9"] = KEY_F9;
inputCodeMap["KEY_F10"] = KEY_F10;
inputCodeMap["KEY_F11"] = KEY_F11;
inputCodeMap["KEY_F12"] = KEY_F12;
inputCodeMap["KEY_LEFT"] = KEY_LEFT;
inputCodeMap["KEY_RIGHT"] = KEY_RIGHT;
inputCodeMap["KEY_UP"] = KEY_UP;
inputCodeMap["KEY_DOWN"] = KEY_DOWN;
inputCodeMap["KEY_SPACE"] = KEY_SPACE;
inputCodeMap["KEY_LCONTROL"] = KEY_LCONTROL;
inputCodeMap["KEY_RCONTROL"] = KEY_RCONTROL;
inputCodeMap["KEY_LSHIFT"] = KEY_LSHIFT;
inputCodeMap["KEY_RSHIFT"] = KEY_RSHIFT;
inputCodeMap["KEY_LMETA"] = KEY_LMETA;
inputCodeMap["KEY_RMETA"] = KEY_RMETA;
inputCodeMap["KEY_LALT"] = KEY_LALT;
inputCodeMap["KEY_RALT"] = KEY_RALT;
inputCodeMap["KEY_RETURN"] = KEY_RETURN;
inputCodeMap["KEY_TAB"] = KEY_TAB;
inputCodeMap["KEY_ESCAPE"] = KEY_ESCAPE;
inputCodeMap["MOUSE_BUTTON_LEFT"] = ActionMapper::MOUSE_BUTTON_LEFT;
inputCodeMap["MOUSE_BUTTON_RIGHT"] = ActionMapper::MOUSE_BUTTON_RIGHT;
inputCodeMap["MOUSE_BUTTON_MIDDLE"] = ActionMapper::MOUSE_BUTTON_MIDDLE;
for (int i = 0; i < 17; i++)
{
std::ostringstream os;
os << "JOY_BUTTON_" << i;
inputCodeMap[os.str()] = ActionMapper::JOY1_BUTTON_0+i;
}
}
void clearInputCodeMap()
{
inputCodeMap.clear();
}
std::string getInputCodeToString(int key)
{
for (InputCodeMap::iterator i = inputCodeMap.begin(); i != inputCodeMap.end(); i++)
{
if ((*i).second == key)
{
return (*i).first;
}
}
return "";
}
// FIXME: Move stringbank to BBGE and move these strings into it. -- fg
std::string getInputCodeToUserString(int key)
{
for (InputCodeMap::iterator i = inputCodeMap.begin(); i != inputCodeMap.end(); i++)
{
if ((*i).second == key)
{
std::string use = (*i).first;
size_t idx = 0;
idx = use.find("KEY_");
if (idx != std::string::npos)
{
use = use.substr(4, use.size());
}
if (use == "MOUSE_BUTTON_LEFT")
use = "Left Mouse Button";
if (use == "MOUSE_BUTTON_RIGHT")
use = "Right Mouse Button";
if (use == "MOUSE_BUTTON_MIDDLE")
use = "Middle Mouse Button";
return use;
}
}
return "";
}
int getStringToInputCode(const std::string &string)
{
return inputCodeMap[string];
}

View file

@ -1,32 +1,21 @@
CMAKE_MINIMUM_REQUIRED(VERSION 2.6) CMAKE_MINIMUM_REQUIRED(VERSION 2.6...3.20)
PROJECT(Aquaria) PROJECT(Aquaria)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/")
INCLUDE(CheckCCompilerFlag) INCLUDE(CheckCCompilerFlag)
INCLUDE(CheckCXXCompilerFlag) INCLUDE(CheckCXXCompilerFlag)
INCLUDE(CheckFunctionExists) INCLUDE(CheckFunctionExists)
# if no build type was provided, set a default one
IF(NOT CMAKE_BUILD_TYPE) IF(NOT CMAKE_BUILD_TYPE)
SET(CMAKE_BUILD_TYPE Release CACHE STRING "None Debug Release RelWithDebInfo MinSizeRel" FORCE) SET(CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build (Debug, RelWithDebInfo, Release)" FORCE)
ENDIF(NOT CMAKE_BUILD_TYPE) ENDIF(NOT CMAKE_BUILD_TYPE)
IF(APPLE)
SET(MACOSX TRUE)
ENDIF(APPLE)
IF(CMAKE_SYSTEM_NAME STREQUAL "Haiku") IF(CMAKE_SYSTEM_NAME STREQUAL "Haiku")
SET(HAIKU TRUE) SET(HAIKU TRUE)
ENDIF() ENDIF()
IF(WIN32)
SET(WIN32_TRUE TRUE)
ELSE(WIN32)
SET(WIN32_TRUE FALSE)
ENDIF(WIN32)
# if no build type was provided, set a default one
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_DEMO_BUILD "Demo Build?" FALSE) OPTION(AQUARIA_DEMO_BUILD "Demo Build?" FALSE)
OPTION(AQUARIA_USE_VFS "Use Virtual File System? Required for some additional features." TRUE) OPTION(AQUARIA_USE_VFS "Use Virtual File System? Required for some additional features." TRUE)
@ -34,223 +23,26 @@ OPTION(AQUARIA_USE_VFS "Use Virtual File System? Required for some additional fe
OPTION(AQUARIA_USE_SDL2 "Use SDL2" TRUE) OPTION(AQUARIA_USE_SDL2 "Use SDL2" TRUE)
OPTION(AQUARIA_USE_GLM "Use GLM for matrix math" TRUE) OPTION(AQUARIA_USE_GLM "Use GLM for matrix math" TRUE)
# No Steamworks SDK for Linux at the moment. Roll our own achievements.
ADD_DEFINITIONS(-DBBGE_BUILD_ACHIEVEMENTS_INTERNAL=1)
SET(BBGEDIR ${CMAKE_CURRENT_SOURCE_DIR}/BBGE)
SET(SRCDIR ${CMAKE_CURRENT_SOURCE_DIR}/Aquaria)
SET(EXTLIBDIR ${CMAKE_CURRENT_SOURCE_DIR}/ExternalLibs)
SET(FTGLDIR ${EXTLIBDIR}/FTGL)
SET(FTGLSRCDIR ${FTGLDIR}/src)
SET(FREETYPE2DIR ${EXTLIBDIR}/freetype2)
SET(FREETYPE2SRCDIR ${FREETYPE2DIR}/src)
SET(LUADIR ${EXTLIBDIR}/lua-5.1.4)
SET(LUASRCDIR ${LUADIR}/src)
SET(LIBOGGDIR ${EXTLIBDIR}/libogg)
SET(LIBVORBISDIR ${EXTLIBDIR}/libvorbis)
################ Look for external libraries ################ Look for external libraries
### FreeType ### Pick one: SDL 1.2 or SDL2
OPTION(AQUARIA_INTERNAL_FREETYPE "Always use included FreeType library" TRUE)
if(NOT AQUARIA_INTERNAL_FREETYPE)
find_package(Freetype)
endif(NOT AQUARIA_INTERNAL_FREETYPE)
if(NOT FREETYPE_FOUND)
set(FREETYPE_INCLUDE_DIRS ${FREETYPE2DIR}/include)
endif(NOT FREETYPE_FOUND)
### Lua
OPTION(AQUARIA_INTERNAL_LUA "Always use included Lua library" TRUE)
if(NOT AQUARIA_INTERNAL_LUA)
find_package(Lua51)
endif(NOT AQUARIA_INTERNAL_LUA)
if(NOT LUA51_FOUND)
set(LUA_INCLUDE_DIR ${LUASRCDIR})
endif(NOT LUA51_FOUND)
### Ogg/Vorbis
OPTION(AQUARIA_INTERNAL_OGGVORBIS "Always use included Ogg/Vorbis libraries" TRUE)
if(NOT AQUARIA_INTERNAL_OGGVORBIS)
# CMake doesn't seem to have a module for libogg or libvorbis yet, so
# we roll our own based on existing find_package modules.
find_path(OGG_INCLUDE_DIR ogg.h
HINTS $ENV{OGG_DIR}
PATH_SUFFIXES include/ogg include
PATHS ~/Library/Frameworks /Library/Frameworks /usr/local /usr /sw /opt/local /opt/csw /opt
)
find_library(OGG_LIBRARY
NAMES ogg
HINTS $ENV{OGG_DIR}
PATH_SUFFIXES lib64 lib
PATHS ~/Library/Frameworks /Library/Frameworks /usr/local /usr /sw /opt/local /opt/csw /opt
)
if(OGG_LIBRARY)
find_path(VORBIS_INCLUDE_DIR vorbisfile.h
HINTS $ENV{VORBIS_DIR}
PATH_SUFFIXES include/vorbis include
PATHS ~/Library/Frameworks /Library/Frameworks /usr/local /usr /sw /opt/local /opt/csw /opt
)
find_library(VORBIS_LIBRARY
NAMES vorbis
HINTS $ENV{VORBIS_DIR}
PATH_SUFFIXES lib64 lib
PATHS ~/Library/Frameworks /Library/Frameworks /usr/local /usr /sw /opt/local /opt/csw /opt
)
find_library(VORBISFILE_LIBRARY
NAMES vorbisfile
HINTS $ENV{VORBIS_DIR}
PATH_SUFFIXES lib64 lib
PATHS ~/Library/Frameworks /Library/Frameworks /usr/local /usr /sw /opt/local /opt/csw /opt
)
if(VORBIS_LIBRARY AND VORBISFILE_LIBRARY)
set(OGGVORBIS_INCLUDE_DIRS "${OGG_INCLUDE_DIR};${VORBIS_INCLUDE_DIR}" CACHE STRING "Ogg/Vorbis include directories")
if(UNIX AND NOT APPLE)
find_library(VORBIS_MATH_LIBRARY m)
set(OGGVORBIS_LIBRARIES "${VORBISFILE_LIBRARY};${VORBIS_LIBRARY};${VORBIS_MATH_LIBRARY};${OGG_LIBRARY}" CACHE STRING "Ogg/Vorbis libraries")
else(UNIX AND NOT APPLE)
set(OGGVORBIS_LIBRARIES "${VORBISFILE_LIBRARY};${VORBIS_LIBRARY};${OGG_LIBRARY}" CACHE STRING "Ogg/Vorbis libraries")
endif(UNIX AND NOT APPLE)
endif(VORBIS_LIBRARY AND VORBISFILE_LIBRARY)
endif(OGG_LIBRARY)
find_package_handle_standard_args(OggVorbis DEFAULT_MSG OGGVORBIS_LIBRARIES OGGVORBIS_INCLUDE_DIRS)
mark_as_advanced(OGG_INCLUDE_DIR VORBIS_INCLUDE_DIR OGGVORBIS_INCLUDE_DIRS)
mark_as_advanced(OGG_LIBRARY VORBIS_LIBRARY VORBISFILE_LIBRARY VORBIS_MATH_LIBRARY OGGVORBIS_LIBRARIES)
endif(NOT AQUARIA_INTERNAL_OGGVORBIS)
if(NOT OGGVORBIS_FOUND)
set(OGGVORBIS_INCLUDE_DIRS ${LIBOGGDIR}/include ${LIBVORBISDIR}/include)
endif(NOT OGGVORBIS_FOUND)
### SDL
OPTION(AQUARIA_INTERNAL_SDL "Always use included SDL library" ${WIN32_TRUE})
if(NOT AQUARIA_INTERNAL_SDL)
if(AQUARIA_USE_SDL2)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/")
find_package(SDL2)
if(SDL2_FOUND)
set(SDL_FOUND TRUE)
set(SDL_INCLUDE_DIR ${SDL2_INCLUDE_DIR})
set(SDL_LIBRARY ${SDL2_LIBRARY})
endif(SDL2_FOUND)
else(AQUARIA_USE_SDL2)
find_package(SDL)
endif(AQUARIA_USE_SDL2)
endif(NOT AQUARIA_INTERNAL_SDL)
if(NOT SDL_FOUND)
if(AQUARIA_USE_SDL2)
set(SDLDIR "${EXTLIBDIR}/SDL2")
else(AQUARIA_USE_SDL2)
set(SDLDIR "${EXTLIBDIR}/SDL12")
endif(AQUARIA_USE_SDL2)
if(MACOSX)
set(SDL_INCLUDE_DIR "${SDLDIR}/include")
message(STATUS "Using internal copy of SDL")
if(AQUARIA_USE_SDL2)
set(SDL_LIBRARY "${SDLDIR}/lib/macosx/libSDL-2.0.0.dylib")
else(AQUARIA_USE_SDL2)
set(SDL_LIBRARY "${SDLDIR}/lib/macosx/libSDL-1.2.0.dylib;${SDLDIR}/lib/macosx/libSDLmain.a")
endif(AQUARIA_USE_SDL2)
elseif(WIN32)
set(SDL_INCLUDE_DIR "${SDLDIR}/include" CACHE PATH "SDL include directory" FORCE)
message(STATUS "Using internal copy of SDL")
if(AQUARIA_USE_SDL2)
set(SDLMAIN_LIBRARY "${SDLDIR}/lib/win32/SDL2main.lib" CACHE FILEPATH "Where the SDL2main library can be found" FORCE)
set(SDL_LIBRARY "${SDLDIR}/lib/win32/SDL2.lib" CACHE FILEPATH "Where the SDL2 library can be found" FORCE)
else(AQUARIA_USE_SDL2)
set(SDLMAIN_LIBRARY "${SDLDIR}/lib/win32/SDLmain.lib" CACHE FILEPATH "Where the SDLmain library can be found" FORCE)
set(SDL_LIBRARY "${SDLDIR}/lib/win32/SDL.lib" CACHE FILEPATH "Where the SDL library can be found" FORCE)
endif(AQUARIA_USE_SDL2)
set(SDL_LIBRARY ${SDLMAIN_LIBRARY} ${SDL_LIBRARY}) # not seen by user
else(MACOSX)
message(SEND_ERROR "We don't have a prebuilt SDL for this platform.")
endif(MACOSX)
endif(NOT SDL_FOUND)
### OpenAL
if(AQUARIA_USE_SDL2) if(AQUARIA_USE_SDL2)
OPTION(AQUARIA_USE_MOJOAL "Use mojoAL instead of OpenAL (requires SDL2)" TRUE) find_package(SDL2 REQUIRED)
endif() if(SDL2_FOUND)
set(SDL_FOUND TRUE)
if(AQUARIA_USE_MOJOAL) set(SDL_INCLUDE_DIR ${SDL2_INCLUDE_DIR})
set(OPENALDIR "${EXTLIBDIR}/AL") set(SDL_LIBRARY ${SDL2_LIBRARY})
set(OPENAL_INCLUDE_DIR "${OPENALDIR}/include" CACHE PATH "OpenAL include directory" FORCE) endif(SDL2_FOUND)
else() else()
OPTION(AQUARIA_INTERNAL_OPENAL "Always use included OpenAL library" ${WIN32_TRUE}) find_package(SDL REQUIRED)
if(NOT AQUARIA_INTERNAL_OPENAL)
find_package(OpenAL)
endif(NOT AQUARIA_INTERNAL_OPENAL)
if (NOT OPENAL_FOUND)
if(WIN32)
set(OPENALDIR "${EXTLIBDIR}/AL")
set(OPENAL_INCLUDE_DIR "${OPENALDIR}/include" CACHE PATH "OpenAL include directory" FORCE)
message(STATUS "Using internal copy of OpenAL")
set(OPENAL_LIBRARY "${OPENALDIR}/lib/win32/OpenAL32.lib" CACHE FILEPATH "Where the OpenAL library can be found" FORCE)
else(WIN32)
message(SEND_ERROR "We don't have a prebuilt OpenAL for this platform.")
endif(WIN32)
endif (NOT OPENAL_FOUND)
endif() endif()
### TinyXML2 SET(BBGEDIR ${CMAKE_CURRENT_SOURCE_DIR}/BBGE)
SET(EXTLIBDIR ${CMAKE_CURRENT_SOURCE_DIR}/ExternalLibs)
OPTION(AQUARIA_INTERNAL_TINYXML2 "Always use included TinyXML2 library" ${WIN32_TRUE})
if(NOT AQUARIA_INTERNAL_TINYXML2)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/")
find_package(TinyXML2)
endif(NOT AQUARIA_INTERNAL_TINYXML2)
if(NOT TINYXML2_FOUND)
message(STATUS "Using internal copy of TinyXML2")
set(TINYXML2_INCLUDE_DIRS "${EXTLIBDIR}/tinyxml2")
set(TINYXML2_SRCS "${EXTLIBDIR}/tinyxml2/tinyxml2.cpp")
endif(NOT TINYXML2_FOUND)
### FTGL
OPTION(AQUARIA_INTERNAL_FTGL "Always use included FTGL library" TRUE)
if(NOT AQUARIA_INTERNAL_FTGL)
find_package(FTGL)
endif(NOT AQUARIA_INTERNAL_FTGL)
if(FTGL_FOUND)
# Nothing else uses freetype2 directly
set(FREETYPE_INCLUDE_DIRS)
else(FTGL_FOUND)
message(STATUS "Using internal copy of FTGL")
set(FTGL_INCLUDE_DIRS "${FTGLDIR}/include")
ADD_DEFINITIONS(-DAQUARIA_INTERNAL_FTGL=1)
endif(FTGL_FOUND)
################ End of external libraries ################ End of external libraries
INCLUDE_DIRECTORIES(${BBGEDIR})
INCLUDE_DIRECTORIES(${BBGEDIR}/GL)
INCLUDE_DIRECTORIES(${SRCDIR})
INCLUDE_DIRECTORIES(${FTGL_INCLUDE_DIRS})
INCLUDE_DIRECTORIES(${FREETYPE_INCLUDE_DIRS})
INCLUDE_DIRECTORIES(${LUA_INCLUDE_DIR})
INCLUDE_DIRECTORIES(${OGGVORBIS_INCLUDE_DIRS})
INCLUDE_DIRECTORIES(${SDL_INCLUDE_DIR})
INCLUDE_DIRECTORIES(${OPENAL_INCLUDE_DIR})
INCLUDE_DIRECTORIES(${TINYXML2_INCLUDE_DIRS})
INCLUDE_DIRECTORIES(${EXTLIBDIR})
# Custom build ID: e.g. "-custom", " (my very own build)" # Custom build ID: e.g. "-custom", " (my very own build)"
SET(AQUARIA_CUSTOM_BUILD_ID "" CACHE STRING SET(AQUARIA_CUSTOM_BUILD_ID "" CACHE STRING
"Text to append to the Aquaria version ID on the title screen.") "Text to append to the Aquaria version ID on the title screen.")
@ -278,27 +70,28 @@ if(NOT(AQUARIA_EXTRA_DATA_DIR STREQUAL ""))
ADD_DEFINITIONS("-DAQUARIA_EXTRA_DATA_DIR=\"${AQUARIA_EXTRA_DATA_DIR}\"") ADD_DEFINITIONS("-DAQUARIA_EXTRA_DATA_DIR=\"${AQUARIA_EXTRA_DATA_DIR}\"")
endif(NOT(AQUARIA_EXTRA_DATA_DIR STREQUAL "")) endif(NOT(AQUARIA_EXTRA_DATA_DIR STREQUAL ""))
# Aquaria/BBGE specific defines... # Without #define VFS_ENABLE_C_API this is just stubbed out
include_directories(ttvfs_cfileapi)
ADD_DEFINITIONS(-DBBGE_SKIP_CONFIG_HEADERS=1) # if this is not defined, it will use .h files to set the necessary defines if(AQUARIA_USE_VFS)
ADD_DEFINITIONS(-DBBGE_BUILD_OPENGL_DYNAMIC=1)
ADD_DEFINITIONS(-DBBGE_BUILD_FMOD_OPENAL_BRIDGE=1)
IF(AQUARIA_USE_VFS)
ADD_DEFINITIONS(-DBBGE_BUILD_VFS=1)
ADD_DEFINITIONS(-DVFS_ENABLE_C_API=1) ADD_DEFINITIONS(-DVFS_ENABLE_C_API=1)
ADD_DEFINITIONS(-DBBGE_BUILD_VFS=1)
INCLUDE_DIRECTORIES(${EXTLIBDIR}/ttvfs) INCLUDE_DIRECTORIES(${EXTLIBDIR}/ttvfs)
INCLUDE_DIRECTORIES(${EXTLIBDIR}/ttvfs_zip) INCLUDE_DIRECTORIES(${EXTLIBDIR}/ttvfs_zip)
INCLUDE_DIRECTORIES(${EXTLIBDIR}/ttvfs_cfileapi) INCLUDE_DIRECTORIES(${EXTLIBDIR}/ttvfs_cfileapi)
ENDIF(AQUARIA_USE_VFS) ENDIF(AQUARIA_USE_VFS)
IF(AQUARIA_USE_SDL2)
ADD_DEFINITIONS(-DBBGE_BUILD_SDL2=1)
ENDIF(AQUARIA_USE_SDL2)
IF(AQUARIA_USE_GLM) IF(AQUARIA_USE_GLM)
ADD_DEFINITIONS(-DBBGE_USE_GLM=1) ADD_DEFINITIONS(-DBBGE_USE_GLM=1)
ENDIF(AQUARIA_USE_GLM) ENDIF(AQUARIA_USE_GLM)
if(AQUARIA_INTERNAL_FTGL)
ADD_DEFINITIONS(-DAQUARIA_INTERNAL_FTGL=1)
endif()
if(AQUARIA_INTERNAL_LUA)
ADD_DEFINITIONS(-DAQUARIA_INTERNAL_LUA=1)
endif()
IF(AQUARIA_DEMO_BUILD) IF(AQUARIA_DEMO_BUILD)
message(STATUS "Demo build.") message(STATUS "Demo build.")
ADD_DEFINITIONS(-DAQUARIA_DEMO=1) ADD_DEFINITIONS(-DAQUARIA_DEMO=1)
@ -316,26 +109,19 @@ IF(CMAKE_BUILD_TYPE STREQUAL "Debug")
message(STATUS "This is a debug build.") message(STATUS "This is a debug build.")
ENDIF(CMAKE_BUILD_TYPE STREQUAL "Debug") ENDIF(CMAKE_BUILD_TYPE STREQUAL "Debug")
# FIXME: These should go
IF(UNIX) IF(UNIX)
ADD_DEFINITIONS(-DBBGE_BUILD_UNIX=1) ADD_DEFINITIONS(-DBBGE_BUILD_UNIX=1)
ENDIF(UNIX) ENDIF(UNIX)
IF(MACOSX) IF(MACOSX)
ADD_DEFINITIONS(-DBBGE_BUILD_MACOSX=1) ADD_DEFINITIONS(-DBBGE_BUILD_MACOSX=1)
ENDIF(MACOSX) ENDIF(MACOSX)
IF(WIN32) IF(WIN32)
ADD_DEFINITIONS(-DBBGE_BUILD_WINDOWS=1) ADD_DEFINITIONS(-DBBGE_BUILD_WINDOWS=1)
SET(EXETYPE WIN32) ADD_DEFINITIONS(-D_CRT_SECURE_NO_WARNINGS)
SET(OPTIONAL_SRCS ${OPTIONAL_SRCS} aquaria.rc) ADD_DEFINITIONS(-D_CRT_SECURE_NO_DEPRECATE)
ENDIF(WIN32) ENDIF(WIN32)
# Build Lua with Unix _setjmp/_longjmp support.
IF(UNIX AND NOT HAIKU)
ADD_DEFINITIONS(-DLUA_USE_ULONGJMP=1)
ENDIF()
IF(CMAKE_COMPILER_IS_GNUCC) IF(CMAKE_COMPILER_IS_GNUCC)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -pedantic -pipe -fsigned-char") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -pedantic -pipe -fsigned-char")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -pedantic -pipe -fsigned-char -std=gnu99") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -pedantic -pipe -fsigned-char -std=gnu99")
@ -348,11 +134,6 @@ IF(CMAKE_COMPILER_IS_GNUCC)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -fno-stack-protector") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -fno-stack-protector")
ENDIF(AQUARIA_GCC_HAS_STACKPROT) ENDIF(AQUARIA_GCC_HAS_STACKPROT)
# -O3 breaks on some GCC/MinGW versions, make sure CMake does not set this as default.
# Exceptions are not used, excluding support for release builds adds less bulk as well.
set(CMAKE_C_FLAGS_RELEASE "-O2" CACHE STRING "Flags used for release builds" FORCE)
set(CMAKE_CXX_FLAGS_RELEASE "-O2 -fno-exceptions" CACHE STRING "Flags used for release builds" FORCE)
# !!! FIXME: probably not safe long-term. # !!! FIXME: probably not safe long-term.
# CMake mailing list had this hack for getting rid of -rdynamic: # CMake mailing list had this hack for getting rid of -rdynamic:
# http://public.kitware.com/pipermail/cmake/2006-July/010404.html # http://public.kitware.com/pipermail/cmake/2006-July/010404.html
@ -362,387 +143,30 @@ IF(CMAKE_COMPILER_IS_GNUCC)
ENDIF(CMAKE_SYSTEM_NAME STREQUAL "Linux") ENDIF(CMAKE_SYSTEM_NAME STREQUAL "Linux")
ENDIF(CMAKE_COMPILER_IS_GNUCC) ENDIF(CMAKE_COMPILER_IS_GNUCC)
CHECK_CXX_COMPILER_FLAG("-std=gnu++11" AQUARIA_CC_HAS_GNUXX11)
CHECK_CXX_COMPILER_FLAG("-std=gnu++1x" AQUARIA_CC_HAS_GNUXX1X)
CHECK_CXX_COMPILER_FLAG("-std=gnu++0x" AQUARIA_CC_HAS_GNUXX0X)
IF(AQUARIA_CC_HAS_GNUXX11)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11")
ELSEIF(AQUARIA_CC_HAS_GNUXX1X)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++1x")
ELSEIF(AQUARIA_CC_HAS_GNUXX0X)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++0x")
ENDIF(AQUARIA_CC_HAS_GNUXX11)
CHECK_FUNCTION_EXISTS(strcasecmp HAVE_STRCASECMP) CHECK_FUNCTION_EXISTS(strcasecmp HAVE_STRCASECMP)
IF(HAVE_STRCASECMP) IF(HAVE_STRCASECMP)
ADD_DEFINITIONS(-DHAVE_STRCASECMP) ADD_DEFINITIONS(-DHAVE_STRCASECMP)
ENDIF(HAVE_STRCASECMP) ENDIF(HAVE_STRCASECMP)
# Main game source code for Aquaria, minus engine and other middleware...
SET(AQUARIA_SRCS
${SRCDIR}/AnimationEditor.cpp
${SRCDIR}/AquariaComboBox.cpp
${SRCDIR}/AquariaMenuItem.cpp
${SRCDIR}/AquariaSaveSlot.cpp
${SRCDIR}/Avatar.cpp
${SRCDIR}/Beam.cpp
${SRCDIR}/BitBlotLogo.cpp
${SRCDIR}/CollideEntity.cpp
${SRCDIR}/Continuity.cpp
${SRCDIR}/Credits.cpp
${SRCDIR}/CurrentRender.cpp
${SRCDIR}/Demo.cpp
${SRCDIR}/DSQ.cpp
${SRCDIR}/Element.cpp
${SRCDIR}/Emote.cpp
${SRCDIR}/Entity.cpp
${SRCDIR}/FlockEntity.cpp
${SRCDIR}/Game.cpp
${SRCDIR}/GameStructs.cpp
${SRCDIR}/GameplayVariables.cpp
${SRCDIR}/GasCloud.cpp
${SRCDIR}/GridRender.cpp
${SRCDIR}/Hair.cpp
${SRCDIR}/Ingredient.cpp
${SRCDIR}/InGameMenu.cpp
${SRCDIR}/Intro.cpp
${SRCDIR}/Logo.cpp
${SRCDIR}/Main.cpp
${SRCDIR}/ManaBall.cpp
${SRCDIR}/MiniMapRender.cpp
${SRCDIR}/Mod.cpp
${SRCDIR}/ModSelector.cpp
${SRCDIR}/ModDownloader.cpp
${SRCDIR}/Network.cpp
${SRCDIR}/ParticleEditor.cpp
${SRCDIR}/Path.cpp
${SRCDIR}/PathFinding.cpp
${SRCDIR}/PathRender.cpp
${SRCDIR}/RecipeMenuEntry.cpp
${SRCDIR}/SceneEditor.cpp
${SRCDIR}/SchoolFish.cpp
${SRCDIR}/Scriptable.cpp
${SRCDIR}/ScriptedEntity.cpp
${SRCDIR}/ScriptInterface.cpp
${SRCDIR}/Segmented.cpp
${SRCDIR}/SFXLoops.cpp
${SRCDIR}/Shot.cpp
${SRCDIR}/Spore.cpp
${SRCDIR}/States.cpp
${SRCDIR}/StatsAndAchievements.cpp
${SRCDIR}/SteamRender.cpp
${SRCDIR}/Strand.cpp
${SRCDIR}/StringBank_gen.h
${SRCDIR}/SubtitlePlayer.cpp
${SRCDIR}/ToolTip.cpp
${SRCDIR}/UserSettings.cpp
${SRCDIR}/WaterSurfaceRender.cpp
${SRCDIR}/Web.cpp
${SRCDIR}/WorldMapRender.cpp
${SRCDIR}/WorldMapTiles.cpp
)
IF(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX) add_subdirectory(ExternalLibs)
SET_SOURCE_FILES_PROPERTIES(
# We knowingly apply offsetof to non-POD types.
${SRCDIR}/ScriptInterface.cpp
PROPERTIES COMPILE_FLAGS "-Wno-invalid-offsetof"
)
ENDIF()
IF(MACOSX) # Set external libs as deps for BBGE & Aquaria...
IF(NOT AQUARIA_USE_SDL2) INCLUDE_DIRECTORIES(${BBGEDIR})
SET(COCOA_SRCS "${BBGEDIR}/Cocoa.mm") message(STATUS "FTGL_INCLUDE_DIRS: ${FTGL_INCLUDE_DIRS}")
ENDIF(NOT AQUARIA_USE_SDL2) INCLUDE_DIRECTORIES(${FTGL_INCLUDE_DIRS})
ENDIF(MACOSX) message(STATUS "LUA_INCLUDE_DIR: ${LUA_INCLUDE_DIR}")
INCLUDE_DIRECTORIES(${LUA_INCLUDE_DIR})
# Bit Blot Game Engine sources... message(STATUS "OGGVORBIS_INCLUDE_DIRS: ${OGGVORBIS_INCLUDE_DIRS}")
SET(BBGE_SRCS INCLUDE_DIRECTORIES(${OGGVORBIS_INCLUDE_DIRS})
${BBGEDIR}/ActionInput.cpp message(STATUS "SDL_INCLUDE_DIR: ${SDL_INCLUDE_DIR}")
${BBGEDIR}/ActionMapper.cpp INCLUDE_DIRECTORIES(${SDL_INCLUDE_DIR})
${BBGEDIR}/ActionSet.cpp message(STATUS "OPENAL_INCLUDE_DIR: ${OPENAL_INCLUDE_DIR}")
${BBGEDIR}/ActionStatus.cpp INCLUDE_DIRECTORIES(${OPENAL_INCLUDE_DIR})
${BBGEDIR}/AfterEffect.cpp message(STATUS "TINYXML2_INCLUDE_DIRS: ${TINYXML2_INCLUDE_DIRS}")
${BBGEDIR}/Base.cpp INCLUDE_DIRECTORIES(${TINYXML2_INCLUDE_DIRS})
${BBGEDIR}/BitmapFont.cpp INCLUDE_DIRECTORIES(${EXTLIBDIR})
${BBGEDIR}/Core.cpp
${BBGEDIR}/DarkLayer.cpp
${BBGEDIR}/DebugFont.cpp
${BBGEDIR}/Effects.cpp
${BBGEDIR}/Emitter.cpp
${BBGEDIR}/Event.cpp
${BBGEDIR}/FrameBuffer.cpp
${BBGEDIR}/GameKeyNames.cpp
${BBGEDIR}/Gradient.cpp
${BBGEDIR}/GLLoad.cpp
${BBGEDIR}/Image.cpp
${BBGEDIR}/Joystick.cpp
${BBGEDIR}/LensFlare.cpp
${BBGEDIR}/Localization.cpp
${BBGEDIR}/MT.cpp
${BBGEDIR}/OSFunctions.cpp
${BBGEDIR}/ParticleEffect.cpp
${BBGEDIR}/ParticleManager.cpp
${BBGEDIR}/Particles.cpp
${BBGEDIR}/Precacher.cpp
${BBGEDIR}/Quad.cpp
${BBGEDIR}/QuadTrail.cpp
${BBGEDIR}/ReadXML.cpp
${BBGEDIR}/RenderBase.cpp
${BBGEDIR}/RenderObject.cpp
${BBGEDIR}/RenderObjectLayer.cpp
${BBGEDIR}/RenderRect.cpp
${BBGEDIR}/RoundedRect.cpp
${BBGEDIR}/ScreenTransition.cpp
${BBGEDIR}/ScriptObject.cpp
${BBGEDIR}/Shader.cpp
${BBGEDIR}/SkeletalSprite.cpp
${BBGEDIR}/Slider.cpp
${BBGEDIR}/SoundManager.cpp
${BBGEDIR}/SpawnParticleData.cpp
${BBGEDIR}/StateMachine.cpp
${BBGEDIR}/StateManager.cpp
${BBGEDIR}/StringBank.cpp
${BBGEDIR}/Texture.cpp
${BBGEDIR}/TTFFont.cpp
${BBGEDIR}/Vector.cpp
${BBGEDIR}/Window.cpp
${BBGEDIR}/Window_SDL1.cpp
${BBGEDIR}/Window_SDL2.cpp
${BBGEDIR}/FmodOpenALBridge.cpp
${COCOA_SRCS}
${EXTLIBDIR}/DeflateCompressor.cpp
${EXTLIBDIR}/luaalloc.cpp
${EXTLIBDIR}/glfont2/glfont2.cpp
${EXTLIBDIR}/minihttp.cpp
${EXTLIBDIR}/jps.hh
${EXTLIBDIR}/miniz.cpp
${EXTLIBDIR}/tinylibs.cpp
)
if(AQUARIA_USE_MOJOAL)
set(BBGE_SRCS ${BBGE_SRCS} ${EXTLIBDIR}/mojoal.c)
endif()
IF(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
SET_SOURCE_FILES_PROPERTIES(
${BBGEDIR}/MT.cpp
PROPERTIES COMPILE_FLAGS "-fpermissive"
)
ENDIF()
SET(FTGL_SRCS
${FTGLSRCDIR}/FTCharmap.cpp
${FTGLSRCDIR}/FTContour.cpp
${FTGLSRCDIR}/FTFace.cpp
${FTGLSRCDIR}/FTFont.cpp
${FTGLSRCDIR}/FTGLTextureFont.cpp
${FTGLSRCDIR}/FTGlyph.cpp
${FTGLSRCDIR}/FTGlyphContainer.cpp
${FTGLSRCDIR}/FTLibrary.cpp
${FTGLSRCDIR}/FTPoint.cpp
${FTGLSRCDIR}/FTSize.cpp
${FTGLSRCDIR}/FTTextureGlyph.cpp
)
SET_SOURCE_FILES_PROPERTIES(
${FTGL_SRCS}
PROPERTIES COMPILE_FLAGS "-DFTGL_LIBRARY_STATIC"
)
SET(OGGVORBIS_SRCS
${LIBOGGDIR}/src/bitwise.c
${LIBOGGDIR}/src/framing.c
${LIBVORBISDIR}/lib/analysis.c
${LIBVORBISDIR}/lib/bitrate.c
${LIBVORBISDIR}/lib/block.c
${LIBVORBISDIR}/lib/codebook.c
${LIBVORBISDIR}/lib/envelope.c
${LIBVORBISDIR}/lib/floor0.c
${LIBVORBISDIR}/lib/floor1.c
${LIBVORBISDIR}/lib/info.c
${LIBVORBISDIR}/lib/lpc.c
${LIBVORBISDIR}/lib/lsp.c
${LIBVORBISDIR}/lib/mapping0.c
${LIBVORBISDIR}/lib/mdct.c
${LIBVORBISDIR}/lib/psy.c
${LIBVORBISDIR}/lib/registry.c
${LIBVORBISDIR}/lib/res0.c
${LIBVORBISDIR}/lib/sharedbook.c
${LIBVORBISDIR}/lib/smallft.c
${LIBVORBISDIR}/lib/synthesis.c
${LIBVORBISDIR}/lib/vorbisfile.c
${LIBVORBISDIR}/lib/window.c
)
SET(FREETYPE2_SRCS
${FREETYPE2SRCDIR}/base/ftsystem.c
${FREETYPE2SRCDIR}/base/ftdebug.c
${FREETYPE2SRCDIR}/base/ftinit.c
${FREETYPE2SRCDIR}/base/ftbase.c
${FREETYPE2SRCDIR}/base/ftbbox.c
${FREETYPE2SRCDIR}/base/ftbdf.c
${FREETYPE2SRCDIR}/base/ftbitmap.c
${FREETYPE2SRCDIR}/base/ftcid.c
${FREETYPE2SRCDIR}/base/ftfstype.c
${FREETYPE2SRCDIR}/base/ftgasp.c
${FREETYPE2SRCDIR}/base/ftglyph.c
${FREETYPE2SRCDIR}/base/ftgxval.c
${FREETYPE2SRCDIR}/base/ftlcdfil.c
${FREETYPE2SRCDIR}/base/ftmm.c
${FREETYPE2SRCDIR}/base/ftotval.c
${FREETYPE2SRCDIR}/base/ftpatent.c
${FREETYPE2SRCDIR}/base/ftpfr.c
${FREETYPE2SRCDIR}/base/ftstroke.c
${FREETYPE2SRCDIR}/base/ftsynth.c
${FREETYPE2SRCDIR}/base/fttype1.c
${FREETYPE2SRCDIR}/base/ftwinfnt.c
${FREETYPE2SRCDIR}/truetype/truetype.c
${FREETYPE2SRCDIR}/type1/type1.c
${FREETYPE2SRCDIR}/cff/cff.c
${FREETYPE2SRCDIR}/cid/type1cid.c
${FREETYPE2SRCDIR}/pfr/pfr.c
${FREETYPE2SRCDIR}/type42/type42.c
${FREETYPE2SRCDIR}/winfonts/winfnt.c
${FREETYPE2SRCDIR}/pcf/pcf.c
${FREETYPE2SRCDIR}/bdf/bdf.c
${FREETYPE2SRCDIR}/sfnt/sfnt.c
${FREETYPE2SRCDIR}/autofit/autofit.c
${FREETYPE2SRCDIR}/pshinter/pshinter.c
${FREETYPE2SRCDIR}/raster/raster.c
${FREETYPE2SRCDIR}/smooth/smooth.c
${FREETYPE2SRCDIR}/cache/ftcache.c
${FREETYPE2SRCDIR}/gzip/ftgzip.c
${FREETYPE2SRCDIR}/lzw/ftlzw.c
${FREETYPE2SRCDIR}/psaux/psaux.c
${FREETYPE2SRCDIR}/psnames/psmodule.c
)
IF(MSVC)
SET_SOURCE_FILES_PROPERTIES(
${FREETYPE2_SRCS}
PROPERTIES COMPILE_FLAGS "-DFT_CONFIG_OPTION_SYSTEM_ZLIB -DFT2_BUILD_LIBRARY -I${FREETYPE2SRCDIR} -I${FREETYPE2DIR}/include/freetype/config -DHAVE_FCNTL_H"
)
ELSE(MSVC)
# FT2 seems to not be strict-aliasing safe, so disable that in GCC.
CHECK_C_COMPILER_FLAG("-fno-strict-aliasing" COMPILER_HAS_NOSTRICTALIAS)
IF(COMPILER_HAS_NOSTRICTALIAS)
SET(NOSTRICTALIAS "-fno-strict-aliasing")
ELSE(COMPILER_HAS_NOSTRICTALIAS)
SET(NOSTRICTALIAS "")
ENDIF(COMPILER_HAS_NOSTRICTALIAS)
SET_SOURCE_FILES_PROPERTIES(
${FREETYPE2_SRCS}
PROPERTIES COMPILE_FLAGS "-Wno-extended-offsetof -DFT_CONFIG_OPTION_SYSTEM_ZLIB -DFT_CONFIG_CONFIG_H='\"${FREETYPE2DIR}/include/freetype/config/ftconfig.h\"' -DFT2_BUILD_LIBRARY -DFT_CONFIG_MODULES_H='\"${FREETYPE2DIR}/include/freetype/config/ftmodule.h\"' -I${FREETYPE2SRCDIR} -I${FREETYPE2DIR}/include/freetype/config -DHAVE_FCNTL_H ${NOSTRICTALIAS}"
)
ENDIF(MSVC)
SET(LUA_SRCS add_subdirectory(Aquaria)
${LUASRCDIR}/lapi.c add_subdirectory(BBGE)
${LUASRCDIR}/ldblib.c
${LUASRCDIR}/ldebug.c
${LUASRCDIR}/ldo.c
${LUASRCDIR}/ldump.c
${LUASRCDIR}/lfunc.c
${LUASRCDIR}/lgc.c
${LUASRCDIR}/linit.c
${LUASRCDIR}/liolib.c
${LUASRCDIR}/lmem.c
${LUASRCDIR}/loadlib.c
${LUASRCDIR}/lobject.c
${LUASRCDIR}/lopcodes.c
${LUASRCDIR}/loslib.c
${LUASRCDIR}/lstate.c
${LUASRCDIR}/lstring.c
${LUASRCDIR}/ltable.c
${LUASRCDIR}/ltm.c
${LUASRCDIR}/lundump.c
${LUASRCDIR}/lvm.c
${LUASRCDIR}/lzio.c
${LUASRCDIR}/lauxlib.c
${LUASRCDIR}/lbaselib.c
${LUASRCDIR}/lstrlib.c
${LUASRCDIR}/ltablib.c
${LUASRCDIR}/lparser.c
${LUASRCDIR}/llex.c
${LUASRCDIR}/lcode.c
${LUASRCDIR}/lmathlib.c
)
IF(AQUARIA_USE_VFS)
ADD_SUBDIRECTORY("${EXTLIBDIR}/ttvfs")
ADD_SUBDIRECTORY("${EXTLIBDIR}/ttvfs_zip")
ADD_SUBDIRECTORY("${EXTLIBDIR}/ttvfs_cfileapi")
SET(OPTIONAL_LIBS ${OPTIONAL_LIBS} "ttvfs")
SET(OPTIONAL_LIBS ${OPTIONAL_LIBS} "ttvfs_zip")
SET(OPTIONAL_LIBS ${OPTIONAL_LIBS} "ttvfs_cfileapi")
ENDIF(AQUARIA_USE_VFS)
IF(WIN32)
SET(OPTIONAL_LIBS ${OPTIONAL_LIBS} "ws2_32")
ENDIF(WIN32)
IF(MACOSX)
SET(OPTIONAL_LIBS ${OPTIONAL_LIBS} "-framework Carbon")
SET(OPTIONAL_LIBS ${OPTIONAL_LIBS} "-framework Cocoa")
#SET(OPTIONAL_LIBS ${OPTIONAL_LIBS} "-framework OpenAL")
ENDIF(MACOSX)
IF(HAIKU)
SET(OPTIONAL_LIBS ${OPTIONAL_LIBS} "network")
ENDIF()
SET(OPTIONAL_LIBS ${OPTIONAL_LIBS} ${SDL_LIBRARY})
if(NOT AQUARIA_USE_MOJOAL)
SET(OPTIONAL_LIBS ${OPTIONAL_LIBS} ${OPENAL_LIBRARY})
endif()
IF(NOT FTGL_FOUND)
IF(FREETYPE_FOUND)
SET(OPTIONAL_LIBS ${OPTIONAL_LIBS} ${FREETYPE_LIBRARIES})
ELSE(FREETYPE_FOUND)
SET(OPTIONAL_SRCS ${OPTIONAL_SRCS} ${FREETYPE2_SRCS})
ENDIF(FREETYPE_FOUND)
ENDIF(NOT FTGL_FOUND)
IF(LUA51_FOUND)
SET(OPTIONAL_LIBS ${OPTIONAL_LIBS} ${LUA_LIBRARIES})
ELSE(LUA51_FOUND)
SET(OPTIONAL_SRCS ${OPTIONAL_SRCS} ${LUA_SRCS})
ENDIF(LUA51_FOUND)
IF(OGGVORBIS_FOUND)
SET(OPTIONAL_LIBS ${OPTIONAL_LIBS} ${OGGVORBIS_LIBRARIES})
ELSE(OGGVORBIS_FOUND)
SET(OPTIONAL_SRCS ${OPTIONAL_SRCS} ${OGGVORBIS_SRCS})
ENDIF(OGGVORBIS_FOUND)
IF(TINYXML2_FOUND)
SET(OPTIONAL_LIBS ${OPTIONAL_LIBS} ${TINYXML2_LIBRARIES})
ELSE(TINYXML2_FOUND)
SET(OPTIONAL_SRCS ${OPTIONAL_SRCS} ${TINYXML2_SRCS})
ENDIF(TINYXML2_FOUND)
IF(FTGL_FOUND)
SET(OPTIONAL_LIBS ${OPTIONAL_LIBS} ${FTGL_LIBRARIES})
ELSE(FTGL_FOUND)
SET(OPTIONAL_SRCS ${OPTIONAL_SRCS} ${FTGL_SRCS})
ENDIF(FTGL_FOUND)
ADD_EXECUTABLE(aquaria ${EXETYPE}
${AQUARIA_SRCS}
${BBGE_SRCS}
${OPTIONAL_SRCS}
)
TARGET_LINK_LIBRARIES(aquaria ${OPTIONAL_LIBS})
IF(WIN32)
SET(RC_DEFINES "" FORCE)
SET(RC_INCLUDES "" FORCE)
SET(RC_FLAGS "" FORCE)
endif(WIN32)
# end of CMakeLists.txt ...

View file

@ -0,0 +1,69 @@
include(tinyxml2.cmake)
include(FTGL.cmake)
include(oggvorbis.cmake)
include(lua51.cmake)
INCLUDE_DIRECTORIES(${SDL_INCLUDE_DIR})
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/AL)
set(xdeps)
if(AQUARIA_USE_VFS)
add_subdirectory(ttvfs)
add_subdirectory(ttvfs_zip)
add_subdirectory(ttvfs_cfileapi)
set(xdeps ${xdeps} ttvfs ttvfs_zip ttvfs_cfileapi)
endif()
set(xsrc
algorithmx.h
ByteBuffer.h
DeflateCompressor.cpp
DeflateCompressor.h
jps.hh
luaalloc.cpp
luaalloc.h
minihttp.cpp
minihttp.h
minipstdint.h
miniz.cpp
miniz.h
stb_image.h
stb_image_resize.h
stb_image_write.h
tinylibs.cpp
# Modified version, can't use external lib
glfont2/glfont2.cpp
glfont2/glfont2.h
)
if(AQUARIA_USE_SDL2 AND SDL2_FOUND)
OPTION(AQUARIA_USE_MOJOAL "Use mojoAL instead of OpenAL (requires SDL2)" TRUE)
endif()
if(AQUARIA_USE_MOJOAL)
set(xsrc ${xsrc} mojoal.c)
set(OPENAL_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/AL" CACHE PATH "OpenAL include directory" FORCE)
else()
find_package(OpenAL REQUIRED)
SET(xdeps ${xdeps} ${OPENAL_LIBRARY})
endif()
IF(WIN32)
SET(xdeps ${xdeps} "ws2_32")
ENDIF(WIN32)
IF(HAIKU)
SET(xdeps ${xdeps} "network")
ENDIF()
IF(APPLE)
SET(xdeps ${xdeps} "-framework Carbon")
SET(xdeps ${xdeps} "-framework Cocoa")
#SET(xdeps ${xdeps} "-framework OpenAL")
ENDIF()
add_library(ExternalLibs ${xsrc})
target_link_libraries(ExternalLibs FTGL libogg tinyxml2 libvorbis ${SDL_LIBRARY} ${xdeps})

11
ExternalLibs/FTGL.cmake Normal file
View file

@ -0,0 +1,11 @@
OPTION(AQUARIA_INTERNAL_FTGL "Always use included FTGL library" TRUE)
if(AQUARIA_INTERNAL_FTGL)
message(STATUS "Using internal copy of FTGL")
SET(FTGLDIR ${CMAKE_CURRENT_SOURCE_DIR}/FTGL)
set(FTGL_INCLUDE_DIRS "${FTGLDIR}/include;${FREETYPE_INCLUDE_DIRS}" CACHE INTERNAL "")
include(freetype2.cmake) # Nothing else uses freetype2 directly
INCLUDE_DIRECTORIES(${FREETYPE_INCLUDE_DIRS})
add_subdirectory(FTGL)
else()
find_package(FTGL REQUIRED)
endif()

View file

@ -0,0 +1,63 @@
# For building Aquaria
include_directories(include)
set(FTGL_SRCS
include/FTBBox.h
include/FTBitmapGlyph.h
include/FTCharmap.h
include/FTCharToGlyphIndexMap.h
include/FTContour.h
include/FTExtrdGlyph.h
include/FTFace.h
include/FTFont.h
include/FTGL.h
include/FTGLBitmapFont.h
include/FTGLExtrdFont.h
include/FTGLOutlineFont.h
include/FTGLPixmapFont.h
include/FTGLPolygonFont.h
include/FTGLTextureFont.h
include/FTGlyph.h
include/FTGlyphContainer.h
include/FTLibrary.h
include/FTList.h
include/FTOutlineGlyph.h
include/FTPixmapGlyph.h
include/FTPoint.h
include/FTPolyGlyph.h
include/FTSize.h
include/FTTextureGlyph.h
include/FTVector.h
# include/FTVectoriser.h
src/FTBitmapGlyph.cpp
src/FTCharmap.cpp
src/FTContour.cpp
src/FTExtrdGlyph.cpp
src/FTFace.cpp
src/FTFont.cpp
src/FTGLBitmapFont.cpp
src/FTGLExtrdFont.cpp
src/FTGLOutlineFont.cpp
src/FTGLPixmapFont.cpp
src/FTGLPolygonFont.cpp
src/FTGLTextureFont.cpp
src/FTGlyph.cpp
src/FTGlyphContainer.cpp
src/FTLibrary.cpp
src/FTOutlineGlyph.cpp
src/FTPixmapGlyph.cpp
src/FTPoint.cpp
src/FTPolyGlyph.cpp
src/FTSize.cpp
src/FTTextureGlyph.cpp
# src/FTVectoriser.cpp
)
SET_SOURCE_FILES_PROPERTIES(
${FTGL_SRCS}
PROPERTIES COMPILE_FLAGS "-DFTGL_LIBRARY_STATIC"
)
add_library(FTGL ${FTGL_SRCS})
target_link_libraries(FTGL freetype)

Binary file not shown.

View file

@ -0,0 +1,79 @@
# For building freetype2 in Aquaria
# Using a separate cmakefile for this since FT2 comes with its own CMakeLists.txt
# that we'd rather leave alone
OPTION(AQUARIA_INTERNAL_FREETYPE "Always use included FreeType library" TRUE)
if(AQUARIA_INTERNAL_FREETYPE)
message(STATUS "Using internal copy of freetype2")
SET(FREETYPE2DIR ${CMAKE_CURRENT_SOURCE_DIR}/freetype2)
SET(FREETYPE2SRCDIR ${FREETYPE2DIR}/src)
set(FREETYPE_INCLUDE_DIRS "${FREETYPE2DIR}/include" CACHE INTERNAL "")
SET(FREETYPE2_SRCS
${FREETYPE2SRCDIR}/base/ftsystem.c
${FREETYPE2SRCDIR}/base/ftdebug.c
${FREETYPE2SRCDIR}/base/ftinit.c
${FREETYPE2SRCDIR}/base/ftbase.c
${FREETYPE2SRCDIR}/base/ftbbox.c
${FREETYPE2SRCDIR}/base/ftbdf.c
${FREETYPE2SRCDIR}/base/ftbitmap.c
${FREETYPE2SRCDIR}/base/ftcid.c
${FREETYPE2SRCDIR}/base/ftfstype.c
${FREETYPE2SRCDIR}/base/ftgasp.c
${FREETYPE2SRCDIR}/base/ftglyph.c
${FREETYPE2SRCDIR}/base/ftgxval.c
${FREETYPE2SRCDIR}/base/ftlcdfil.c
${FREETYPE2SRCDIR}/base/ftmm.c
${FREETYPE2SRCDIR}/base/ftotval.c
${FREETYPE2SRCDIR}/base/ftpatent.c
${FREETYPE2SRCDIR}/base/ftpfr.c
${FREETYPE2SRCDIR}/base/ftstroke.c
${FREETYPE2SRCDIR}/base/ftsynth.c
${FREETYPE2SRCDIR}/base/fttype1.c
${FREETYPE2SRCDIR}/base/ftwinfnt.c
${FREETYPE2SRCDIR}/truetype/truetype.c
${FREETYPE2SRCDIR}/type1/type1.c
${FREETYPE2SRCDIR}/cff/cff.c
${FREETYPE2SRCDIR}/cid/type1cid.c
${FREETYPE2SRCDIR}/pfr/pfr.c
${FREETYPE2SRCDIR}/type42/type42.c
${FREETYPE2SRCDIR}/winfonts/winfnt.c
${FREETYPE2SRCDIR}/pcf/pcf.c
${FREETYPE2SRCDIR}/bdf/bdf.c
${FREETYPE2SRCDIR}/sfnt/sfnt.c
${FREETYPE2SRCDIR}/autofit/autofit.c
${FREETYPE2SRCDIR}/pshinter/pshinter.c
${FREETYPE2SRCDIR}/raster/raster.c
${FREETYPE2SRCDIR}/smooth/smooth.c
${FREETYPE2SRCDIR}/cache/ftcache.c
${FREETYPE2SRCDIR}/gzip/ftgzip.c
${FREETYPE2SRCDIR}/lzw/ftlzw.c
${FREETYPE2SRCDIR}/psaux/psaux.c
${FREETYPE2SRCDIR}/psnames/psmodule.c
)
IF(MSVC)
SET_SOURCE_FILES_PROPERTIES(
${FREETYPE2_SRCS}
PROPERTIES COMPILE_FLAGS "-DFT_CONFIG_OPTION_SYSTEM_ZLIB -DFT2_BUILD_LIBRARY -I${FREETYPE2SRCDIR} -I${FREETYPE2DIR}/include/freetype/config -DHAVE_FCNTL_H"
)
ELSE(MSVC)
# FT2 seems to not be strict-aliasing safe, so disable that in GCC.
CHECK_C_COMPILER_FLAG("-fno-strict-aliasing" COMPILER_HAS_NOSTRICTALIAS)
IF(COMPILER_HAS_NOSTRICTALIAS)
SET(NOSTRICTALIAS "-fno-strict-aliasing")
ELSE(COMPILER_HAS_NOSTRICTALIAS)
SET(NOSTRICTALIAS "")
ENDIF(COMPILER_HAS_NOSTRICTALIAS)
SET_SOURCE_FILES_PROPERTIES(
${FREETYPE2_SRCS}
PROPERTIES COMPILE_FLAGS "-Wno-extended-offsetof -DFT_CONFIG_OPTION_SYSTEM_ZLIB -DFT_CONFIG_CONFIG_H='\"${FREETYPE2DIR}/include/freetype/config/ftconfig.h\"' -DFT2_BUILD_LIBRARY -DFT_CONFIG_MODULES_H='\"${FREETYPE2DIR}/include/freetype/config/ftmodule.h\"' -I${FREETYPE2SRCDIR} -I${FREETYPE2DIR}/include/freetype/config -DHAVE_FCNTL_H ${NOSTRICTALIAS}"
)
ENDIF(MSVC)
add_library(freetype ${FREETYPE2_SRCS})
else()
find_package(Freetype REQUIRED)
endif()

View file

@ -0,0 +1,64 @@
# For building in Aquaria
set(lua51_src
src/lapi.c
src/lapi.h
src/lauxlib.c
src/lauxlib.h
src/lbaselib.c
src/lcode.c
src/lcode.h
src/ldblib.c
src/ldebug.c
src/ldebug.h
src/ldo.c
src/ldo.h
src/ldump.c
src/lfunc.c
src/lfunc.h
src/lgc.c
src/lgc.h
src/linit.c
src/liolib.c
src/llex.c
src/llex.h
src/llimits.h
src/lmathlib.c
src/lmem.c
src/lmem.h
src/loadlib.c
src/lobject.c
src/lobject.h
src/lopcodes.c
src/lopcodes.h
src/loslib.c
src/lparser.c
src/lparser.h
src/lstate.c
src/lstate.h
src/lstring.c
src/lstring.h
src/lstrlib.c
src/ltable.c
src/ltable.h
src/ltablib.c
src/ltm.c
src/ltm.h
# src/lua.c
src/lua.h
# src/luac.c
src/luaconf.h
src/lualib.h
src/lundump.c
src/lundump.h
src/lvm.c
src/lvm.h
src/lzio.c
src/lzio.h
src/print.c
)
# Use C++ exceptions instead of setjmp() & longjmp()
set_source_files_properties(${lua51_src} PROPERTIES LANGUAGE CXX)
add_library(lua51 ${lua51_src})

8
ExternalLibs/lua51.cmake Normal file
View file

@ -0,0 +1,8 @@
OPTION(AQUARIA_INTERNAL_LUA "Always use included Lua library" TRUE)
if(AQUARIA_INTERNAL_LUA)
message(STATUS "Using internal copy of Lua 5.1")
set(LUA_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/lua-5.1.4/src" CACHE INTERNAL "")
add_subdirectory(lua-5.1.4)
else()
find_package(Lua51 REQUIRED)
endif()

View file

@ -0,0 +1,88 @@
OPTION(AQUARIA_INTERNAL_OGGVORBIS "Always use included Ogg/Vorbis libraries" TRUE)
if(AQUARIA_INTERNAL_OGGVORBIS)
message(STATUS "Using internal copy of ogg/vorbis")
SET(LIBOGGDIR ${CMAKE_CURRENT_SOURCE_DIR}/libogg)
SET(LIBVORBISDIR ${CMAKE_CURRENT_SOURCE_DIR}/libvorbis)
set(OGGVORBIS_INCLUDE_DIRS "${LIBOGGDIR}/include;${LIBVORBISDIR}/include" CACHE INTERNAL "")
include_directories(${OGGVORBIS_INCLUDE_DIRS})
add_library(libogg
${LIBOGGDIR}/src/bitwise.c
${LIBOGGDIR}/src/framing.c
)
add_library(libvorbis
${LIBVORBISDIR}/lib/analysis.c
${LIBVORBISDIR}/lib/bitrate.c
${LIBVORBISDIR}/lib/block.c
${LIBVORBISDIR}/lib/codebook.c
${LIBVORBISDIR}/lib/envelope.c
${LIBVORBISDIR}/lib/floor0.c
${LIBVORBISDIR}/lib/floor1.c
${LIBVORBISDIR}/lib/info.c
${LIBVORBISDIR}/lib/lpc.c
${LIBVORBISDIR}/lib/lsp.c
${LIBVORBISDIR}/lib/mapping0.c
${LIBVORBISDIR}/lib/mdct.c
${LIBVORBISDIR}/lib/psy.c
${LIBVORBISDIR}/lib/registry.c
${LIBVORBISDIR}/lib/res0.c
${LIBVORBISDIR}/lib/sharedbook.c
${LIBVORBISDIR}/lib/smallft.c
${LIBVORBISDIR}/lib/synthesis.c
${LIBVORBISDIR}/lib/vorbisfile.c
${LIBVORBISDIR}/lib/window.c
)
else()
# CMake doesn't seem to have a module for libogg or libvorbis yet, so
# we roll our own based on existing find_package modules.
find_path(OGG_INCLUDE_DIR ogg.h
HINTS $ENV{OGG_DIR}
PATH_SUFFIXES include/ogg include
PATHS ~/Library/Frameworks /Library/Frameworks /usr/local /usr /sw /opt/local /opt/csw /opt
)
find_library(OGG_LIBRARY
NAMES ogg
HINTS $ENV{OGG_DIR}
PATH_SUFFIXES lib64 lib
PATHS ~/Library/Frameworks /Library/Frameworks /usr/local /usr /sw /opt/local /opt/csw /opt
)
if(OGG_LIBRARY)
find_path(VORBIS_INCLUDE_DIR vorbisfile.h
HINTS $ENV{VORBIS_DIR}
PATH_SUFFIXES include/vorbis include
PATHS ~/Library/Frameworks /Library/Frameworks /usr/local /usr /sw /opt/local /opt/csw /opt
)
find_library(VORBIS_LIBRARY
NAMES vorbis
HINTS $ENV{VORBIS_DIR}
PATH_SUFFIXES lib64 lib
PATHS ~/Library/Frameworks /Library/Frameworks /usr/local /usr /sw /opt/local /opt/csw /opt
)
find_library(VORBISFILE_LIBRARY
NAMES vorbisfile
HINTS $ENV{VORBIS_DIR}
PATH_SUFFIXES lib64 lib
PATHS ~/Library/Frameworks /Library/Frameworks /usr/local /usr /sw /opt/local /opt/csw /opt
)
if(VORBIS_LIBRARY AND VORBISFILE_LIBRARY)
set(OGGVORBIS_INCLUDE_DIRS "${OGG_INCLUDE_DIR};${VORBIS_INCLUDE_DIR}" CACHE STRING "Ogg/Vorbis include directories")
if(UNIX AND NOT APPLE)
find_library(VORBIS_MATH_LIBRARY m)
set(OGGVORBIS_LIBRARIES "${VORBISFILE_LIBRARY};${VORBIS_LIBRARY};${VORBIS_MATH_LIBRARY};${OGG_LIBRARY}" CACHE STRING "Ogg/Vorbis libraries")
else(UNIX AND NOT APPLE)
set(OGGVORBIS_LIBRARIES "${VORBISFILE_LIBRARY};${VORBIS_LIBRARY};${OGG_LIBRARY}" CACHE STRING "Ogg/Vorbis libraries")
endif(UNIX AND NOT APPLE)
endif(VORBIS_LIBRARY AND VORBISFILE_LIBRARY)
endif(OGG_LIBRARY)
find_package_handle_standard_args(OggVorbis DEFAULT_MSG OGGVORBIS_LIBRARIES OGGVORBIS_INCLUDE_DIRS)
mark_as_advanced(OGG_INCLUDE_DIR VORBIS_INCLUDE_DIR OGGVORBIS_INCLUDE_DIRS)
mark_as_advanced(OGG_LIBRARY VORBIS_LIBRARY VORBISFILE_LIBRARY VORBIS_MATH_LIBRARY OGGVORBIS_LIBRARIES)
endif()

View file

@ -0,0 +1,8 @@
OPTION(AQUARIA_INTERNAL_TINYXML2 "Always use included TinyXML2 library" TRUE)
if(AQUARIA_INTERNAL_TINYXML2)
message(STATUS "Using internal copy of TinyXML2")
set(TINYXML2_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/tinyxml2" CACHE INTERNAL "")
add_library(tinyxml2 tinyxml2/tinyxml2.cpp tinyxml2/tinyxml2.h)
else()
find_package(TinyXML2 REQUIRED)
endif()

View file

@ -30,8 +30,3 @@ set(ttvfs_SRC
) )
add_library(ttvfs ${ttvfs_SRC}) add_library(ttvfs ${ttvfs_SRC})
install(TARGETS ttvfs DESTINATION lib)
install(DIRECTORY ./ DESTINATION include/ttvfs
FILES_MATCHING PATTERN "*.h")

View file

@ -9,8 +9,3 @@ include_directories(${TTVFS_INCLUDE_DIRS})
add_library(ttvfs_cfileapi ${cfileapi_SRC}) add_library(ttvfs_cfileapi ${cfileapi_SRC})
target_link_libraries(ttvfs_cfileapi ttvfs) target_link_libraries(ttvfs_cfileapi ttvfs)
install(TARGETS ttvfs_cfileapi DESTINATION lib)
install(DIRECTORY ./ DESTINATION include/ttvfs
FILES_MATCHING PATTERN "*.h")

View file

@ -1,6 +1,6 @@
#define VFS_ENABLE_C_API 1 #define VFS_ENABLE_C_API 1
#include "ttvfs.h" #include <ttvfs.h>
#include "ttvfs_stdio.h" #include "ttvfs_stdio.h"
#include <assert.h> #include <assert.h>
#include <sstream> #include <sstream>

View file

@ -1,7 +1,7 @@
#include "VFSInternal.h" #include "VFSInternal.h"
#include "VFSZipArchiveRef.h" #include "VFSZipArchiveRef.h"
#include <stdio.h> #include <stdio.h>
#include "miniz.h" #include <miniz.h>
VFS_NAMESPACE_START VFS_NAMESPACE_START

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

View file

@ -1 +0,0 @@
IDI_ICON1 ICON DISCARDABLE "aquaria.ico"

View file

@ -43,8 +43,8 @@
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
AdditionalOptions="/MP" AdditionalOptions="/MP"
Optimization="0" Optimization="0"
AdditionalIncludeDirectories="&quot;$(SolutionDir)\..\ExternalLibs\freetype2\include\freetype\config&quot;;&quot;$(SolutionDir)\..\ExternalLibs\glpng&quot;;&quot;$(SolutionDir)\..\BBGE&quot;;&quot;$(SolutionDir)\..\ExternalLibs\zlib&quot;;&quot;$(SolutionDir)\..\ExternalLibs\png&quot;;&quot;$(SolutionDir)\..\ExternalLibs\libogg\include&quot;;&quot;$(SolutionDir)\..\ExternalLibs\libvorbis\include&quot;;&quot;$(SolutionDir)\..\ExternalLibs\freetype2\include&quot;;&quot;$(SolutionDir)\..\ExternalLibs\FTGL\include&quot;;&quot;$(SolutionDir)\..\ExternalLibs\SDL2\include&quot;;&quot;$(SolutionDir)\..\ExternalLibs\AL\include&quot;;&quot;$(SolutionDir)\..\ExternalLibs\tinyxml2&quot;;&quot;$(SolutionDir)\..\ExternalLibs\ttvfs&quot;;&quot;$(SolutionDir)\..\ExternalLibs\ttvfs_cfileapi&quot;;&quot;$(SolutionDir)\..\ExternalLibs\lvpa&quot;;&quot;$(SolutionDir)\..\ExternalLibs\lvpa\include&quot;;&quot;$(SolutionDir)\..\ExternalLibs&quot;" AdditionalIncludeDirectories="&quot;$(SolutionDir)\..\ExternalLibs\freetype2\include\freetype\config&quot;;&quot;$(SolutionDir)\..\ExternalLibs\glpng&quot;;&quot;$(SolutionDir)\..\BBGE&quot;;&quot;$(SolutionDir)\..\ExternalLibs\zlib&quot;;&quot;$(SolutionDir)\..\ExternalLibs\png&quot;;&quot;$(SolutionDir)\..\ExternalLibs\libogg\include&quot;;&quot;$(SolutionDir)\..\ExternalLibs\libvorbis\include&quot;;&quot;$(SolutionDir)\..\ExternalLibs\freetype2\include&quot;;&quot;$(SolutionDir)\..\ExternalLibs\FTGL\include&quot;;&quot;$(SolutionDir)\..\ExternalLibs\SDL2\include&quot;;&quot;$(SolutionDir)\..\ExternalLibs\AL&quot;;&quot;$(SolutionDir)\..\ExternalLibs\tinyxml2&quot;;&quot;$(SolutionDir)\..\ExternalLibs\ttvfs&quot;;&quot;$(SolutionDir)\..\ExternalLibs\ttvfs_cfileapi&quot;;&quot;$(SolutionDir)\..\ExternalLibs\lvpa&quot;;&quot;$(SolutionDir)\..\ExternalLibs\lvpa\include&quot;;&quot;$(SolutionDir)\..\ExternalLibs&quot;"
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;GL_GLEXT_LEGACY=1;HAVE_PUTENV=1;FTGL_LIBRARY_STATIC;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;BBGE_BUILD_WINDOWS=1;VFS_ENABLE_C_API=1;BBGE_USE_GLM=1;AQUARIA_INTERNAL_FTGL=1" PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;GL_GLEXT_LEGACY=1;HAVE_PUTENV=1;FTGL_LIBRARY_STATIC;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;BBGE_BUILD_WINDOWS=1;BBGE_BUILD_VFS=1;VFS_ENABLE_C_API=1;BBGE_USE_GLM=1;AQUARIA_INTERNAL_FTGL=1"
MinimalRebuild="false" MinimalRebuild="false"
BasicRuntimeChecks="0" BasicRuntimeChecks="0"
RuntimeLibrary="3" RuntimeLibrary="3"
@ -116,8 +116,8 @@
FavorSizeOrSpeed="1" FavorSizeOrSpeed="1"
OmitFramePointers="true" OmitFramePointers="true"
EnableFiberSafeOptimizations="true" EnableFiberSafeOptimizations="true"
AdditionalIncludeDirectories="&quot;$(SolutionDir)\..\ExternalLibs\freetype2\include\freetype\config&quot;;&quot;$(SolutionDir)\..\ExternalLibs\glpng&quot;;&quot;$(SolutionDir)\..\BBGE&quot;;&quot;$(SolutionDir)\..\ExternalLibs\zlib&quot;;&quot;$(SolutionDir)\..\ExternalLibs\png&quot;;&quot;$(SolutionDir)\..\ExternalLibs\libogg\include&quot;;&quot;$(SolutionDir)\..\ExternalLibs\libvorbis\include&quot;;&quot;$(SolutionDir)\..\ExternalLibs\freetype2\include&quot;;&quot;$(SolutionDir)\..\ExternalLibs\FTGL\include&quot;;&quot;$(SolutionDir)\..\ExternalLibs\SDL2\include&quot;;&quot;$(SolutionDir)\..\ExternalLibs\AL\include&quot;;&quot;$(SolutionDir)\..\ExternalLibs\tinyxml2&quot;;&quot;$(SolutionDir)\..\ExternalLibs\ttvfs&quot;;&quot;$(SolutionDir)\..\ExternalLibs\ttvfs_cfileapi&quot;;&quot;$(SolutionDir)\..\ExternalLibs\lvpa&quot;;&quot;$(SolutionDir)\..\ExternalLibs\lvpa\include&quot;;&quot;$(SolutionDir)\..\ExternalLibs&quot;" AdditionalIncludeDirectories="&quot;$(SolutionDir)\..\ExternalLibs\freetype2\include\freetype\config&quot;;&quot;$(SolutionDir)\..\ExternalLibs\glpng&quot;;&quot;$(SolutionDir)\..\BBGE&quot;;&quot;$(SolutionDir)\..\ExternalLibs\zlib&quot;;&quot;$(SolutionDir)\..\ExternalLibs\png&quot;;&quot;$(SolutionDir)\..\ExternalLibs\libogg\include&quot;;&quot;$(SolutionDir)\..\ExternalLibs\libvorbis\include&quot;;&quot;$(SolutionDir)\..\ExternalLibs\freetype2\include&quot;;&quot;$(SolutionDir)\..\ExternalLibs\FTGL\include&quot;;&quot;$(SolutionDir)\..\ExternalLibs\SDL2\include&quot;;&quot;$(SolutionDir)\..\ExternalLibs\AL&quot;;&quot;$(SolutionDir)\..\ExternalLibs\tinyxml2&quot;;&quot;$(SolutionDir)\..\ExternalLibs\ttvfs&quot;;&quot;$(SolutionDir)\..\ExternalLibs\ttvfs_cfileapi&quot;;&quot;$(SolutionDir)\..\ExternalLibs\lvpa&quot;;&quot;$(SolutionDir)\..\ExternalLibs\lvpa\include&quot;;&quot;$(SolutionDir)\..\ExternalLibs&quot;"
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;GL_GLEXT_LEGACY=1;HAVE_PUTENV=1;FTGL_LIBRARY_STATIC;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;BBGE_BUILD_WINDOWS=1;_HAS_EXCEPTIONS=0;VFS_ENABLE_C_API=1;BBGE_USE_GLM=1;AQUARIA_INTERNAL_FTGL=1" PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;GL_GLEXT_LEGACY=1;HAVE_PUTENV=1;FTGL_LIBRARY_STATIC;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;BBGE_BUILD_WINDOWS=1;_HAS_EXCEPTIONS=0;BBGE_BUILD_VFS=1;VFS_ENABLE_C_API=1;BBGE_USE_GLM=1;AQUARIA_INTERNAL_FTGL=1"
StringPooling="true" StringPooling="true"
ExceptionHandling="0" ExceptionHandling="0"
RuntimeLibrary="0" RuntimeLibrary="0"
@ -187,8 +187,8 @@
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
AdditionalOptions="/MP" AdditionalOptions="/MP"
Optimization="0" Optimization="0"
AdditionalIncludeDirectories="&quot;$(SolutionDir)\..\ExternalLibs\freetype2\include\freetype\config&quot;;&quot;$(SolutionDir)\..\ExternalLibs\glpng&quot;;&quot;$(SolutionDir)\..\BBGE&quot;;&quot;$(SolutionDir)\..\ExternalLibs\zlib&quot;;&quot;$(SolutionDir)\..\ExternalLibs\png&quot;;&quot;$(SolutionDir)\..\ExternalLibs\libogg\include&quot;;&quot;$(SolutionDir)\..\ExternalLibs\libvorbis\include&quot;;&quot;$(SolutionDir)\..\ExternalLibs\freetype2\include&quot;;&quot;$(SolutionDir)\..\ExternalLibs\FTGL\include&quot;;&quot;$(SolutionDir)\..\ExternalLibs\SDL12\include&quot;;&quot;$(SolutionDir)\..\ExternalLibs\AL\include&quot;;&quot;$(SolutionDir)\..\ExternalLibs\tinyxml2&quot;;&quot;$(SolutionDir)\..\ExternalLibs\ttvfs&quot;;&quot;$(SolutionDir)\..\ExternalLibs\ttvfs_cfileapi&quot;;&quot;$(SolutionDir)\..\ExternalLibs\lvpa&quot;;&quot;$(SolutionDir)\..\ExternalLibs\lvpa\include&quot;;&quot;$(SolutionDir)\..\ExternalLibs&quot;" AdditionalIncludeDirectories="&quot;$(SolutionDir)\..\ExternalLibs\freetype2\include\freetype\config&quot;;&quot;$(SolutionDir)\..\ExternalLibs\glpng&quot;;&quot;$(SolutionDir)\..\BBGE&quot;;&quot;$(SolutionDir)\..\ExternalLibs\zlib&quot;;&quot;$(SolutionDir)\..\ExternalLibs\png&quot;;&quot;$(SolutionDir)\..\ExternalLibs\libogg\include&quot;;&quot;$(SolutionDir)\..\ExternalLibs\libvorbis\include&quot;;&quot;$(SolutionDir)\..\ExternalLibs\freetype2\include&quot;;&quot;$(SolutionDir)\..\ExternalLibs\FTGL\include&quot;;&quot;$(SolutionDir)\..\ExternalLibs\SDL12\include&quot;;&quot;$(SolutionDir)\..\ExternalLibs\AL&quot;;&quot;$(SolutionDir)\..\ExternalLibs\tinyxml2&quot;;&quot;$(SolutionDir)\..\ExternalLibs\ttvfs&quot;;&quot;$(SolutionDir)\..\ExternalLibs\ttvfs_cfileapi&quot;;&quot;$(SolutionDir)\..\ExternalLibs\lvpa&quot;;&quot;$(SolutionDir)\..\ExternalLibs\lvpa\include&quot;;&quot;$(SolutionDir)\..\ExternalLibs&quot;"
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;GL_GLEXT_LEGACY=1;HAVE_PUTENV=1;FTGL_LIBRARY_STATIC;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;BBGE_BUILD_WINDOWS=1;VFS_ENABLE_C_API=1;BBGE_USE_GLM=1;AQUARIA_INTERNAL_FTGL=1" PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;GL_GLEXT_LEGACY=1;HAVE_PUTENV=1;FTGL_LIBRARY_STATIC;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;BBGE_BUILD_WINDOWS=1;BBGE_BUILD_VFS=1;VFS_ENABLE_C_API=1;BBGE_USE_GLM=1;AQUARIA_INTERNAL_FTGL=1"
MinimalRebuild="false" MinimalRebuild="false"
BasicRuntimeChecks="0" BasicRuntimeChecks="0"
RuntimeLibrary="3" RuntimeLibrary="3"
@ -261,8 +261,8 @@
OmitFramePointers="true" OmitFramePointers="true"
EnableFiberSafeOptimizations="true" EnableFiberSafeOptimizations="true"
WholeProgramOptimization="true" WholeProgramOptimization="true"
AdditionalIncludeDirectories="&quot;$(SolutionDir)\..\ExternalLibs\freetype2\include\freetype\config&quot;;&quot;$(SolutionDir)\..\ExternalLibs\glpng&quot;;&quot;$(SolutionDir)\..\BBGE&quot;;&quot;$(SolutionDir)\..\ExternalLibs\zlib&quot;;&quot;$(SolutionDir)\..\ExternalLibs\png&quot;;&quot;$(SolutionDir)\..\ExternalLibs\libogg\include&quot;;&quot;$(SolutionDir)\..\ExternalLibs\libvorbis\include&quot;;&quot;$(SolutionDir)\..\ExternalLibs\freetype2\include&quot;;&quot;$(SolutionDir)\..\ExternalLibs\FTGL\include&quot;;&quot;$(SolutionDir)\..\ExternalLibs\SDL12\include&quot;;&quot;$(SolutionDir)\..\ExternalLibs\AL\include&quot;;&quot;$(SolutionDir)\..\ExternalLibs\tinyxml2&quot;;&quot;$(SolutionDir)\..\ExternalLibs\ttvfs&quot;;&quot;$(SolutionDir)\..\ExternalLibs\ttvfs_cfileapi&quot;;&quot;$(SolutionDir)\..\ExternalLibs\lvpa&quot;;&quot;$(SolutionDir)\..\ExternalLibs\lvpa\include&quot;;&quot;$(SolutionDir)\..\ExternalLibs&quot;" AdditionalIncludeDirectories="&quot;$(SolutionDir)\..\ExternalLibs\freetype2\include\freetype\config&quot;;&quot;$(SolutionDir)\..\ExternalLibs\glpng&quot;;&quot;$(SolutionDir)\..\BBGE&quot;;&quot;$(SolutionDir)\..\ExternalLibs\zlib&quot;;&quot;$(SolutionDir)\..\ExternalLibs\png&quot;;&quot;$(SolutionDir)\..\ExternalLibs\libogg\include&quot;;&quot;$(SolutionDir)\..\ExternalLibs\libvorbis\include&quot;;&quot;$(SolutionDir)\..\ExternalLibs\freetype2\include&quot;;&quot;$(SolutionDir)\..\ExternalLibs\FTGL\include&quot;;&quot;$(SolutionDir)\..\ExternalLibs\SDL12\include&quot;;&quot;$(SolutionDir)\..\ExternalLibs\AL&quot;;&quot;$(SolutionDir)\..\ExternalLibs\tinyxml2&quot;;&quot;$(SolutionDir)\..\ExternalLibs\ttvfs&quot;;&quot;$(SolutionDir)\..\ExternalLibs\ttvfs_cfileapi&quot;;&quot;$(SolutionDir)\..\ExternalLibs\lvpa&quot;;&quot;$(SolutionDir)\..\ExternalLibs\lvpa\include&quot;;&quot;$(SolutionDir)\..\ExternalLibs&quot;"
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;GL_GLEXT_LEGACY=1;HAVE_PUTENV=1;FTGL_LIBRARY_STATIC;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;BBGE_BUILD_WINDOWS=1;_HAS_EXCEPTIONS=0;VFS_ENABLE_C_API=1;BBGE_USE_GLM=1;AQUARIA_INTERNAL_FTGL=1" PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;GL_GLEXT_LEGACY=1;HAVE_PUTENV=1;FTGL_LIBRARY_STATIC;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;BBGE_BUILD_WINDOWS=1;_HAS_EXCEPTIONS=0;BBGE_BUILD_VFS=1;VFS_ENABLE_C_API=1;BBGE_USE_GLM=1;AQUARIA_INTERNAL_FTGL=1"
StringPooling="true" StringPooling="true"
ExceptionHandling="0" ExceptionHandling="0"
BufferSecurityCheck="false" BufferSecurityCheck="false"