1
0
Fork 0
mirror of https://github.com/AquariaOSE/Aquaria.git synced 2025-06-08 09:31:58 +00:00

Merge branch 'master' of file:///Users/User/code/coding/Aquaria_fg_clean

This commit is contained in:
fgenesis 2013-07-22 21:19:56 +01:00
commit 21e42bc27e
48 changed files with 521 additions and 136 deletions

View file

@ -5,7 +5,6 @@
// Define BBGE_SKIP_CONFIG_HEADERS to use CMake-only configuration.
#ifndef BBGE_SKIP_CONFIG_HEADERS
#define AQUARIA_FULL 1
//#define AQUARIA_DEMO 1
#define AQUARIA_BUILD_CONSOLE 1
#define AQUARIA_BUILD_SCENEEDITOR 1

BIN
Aquaria/AquariaWin32OSE.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

View file

@ -4508,6 +4508,9 @@ Vector Avatar::getVectorToCursor(bool trueMouse)
void Avatar::action(int id, int state)
{
if(dsq->game->isIgnoreAction((AquariaActions)id))
return;
if (id == ACTION_PRIMARY) { if (state) lmbd(); else lmbu(); }
if (id == ACTION_SECONDARY) { if (state) rmbd(); else rmbu(); }

View file

@ -989,7 +989,6 @@ This build is not yet final, and as such there are a couple things lacking. They
bool fullscreen = true;
int joystickMode = 0;
int dsq_filter = 0;
developerKeys = false;
voiceOversEnabled = true;
@ -1013,13 +1012,6 @@ This build is not yet final, and as such there are a couple things lacking. They
useFrameBuffer = user.video.fbuffer;
#ifdef AQUARIA_DEMO
developerKeys = 0;
#endif
if (exists("unlockdeveloperkeys"))
developerKeys = 1;
if (isDeveloperKeys())
{
maxPages = 600/saveSlotPageSize;
@ -1496,8 +1488,7 @@ This build is not yet final, and as such there are a couple things lacking. They
loadBit(LOAD_TEXTURES);
renderObjectLayers[LR_ENTITIES].startPass = -2;
renderObjectLayers[LR_ENTITIES].endPass = 5;
resetLayerPasses();
renderObjectLayerOrder[LR_BACKGROUND_ELEMENTS1] = LR_ELEMENTS1;
renderObjectLayerOrder[LR_BACKGROUND_ELEMENTS2] = LR_ELEMENTS2;
@ -1556,11 +1547,15 @@ This build is not yet final, and as such there are a couple things lacking. They
sound->playSfx("defense", 0.5);
sound->playSfx("visionwakeup");
*/
#if defined(AQUARIA_FULL) || defined(AQUARIA_DEMO)
// Don't do transitions for a faster start up in dev mode
if (!isDeveloperKeys())
{
float trans = 0.5;
overlay->alpha.interpolateTo(1, trans);
core->main(trans);
#endif
}
removeRenderObject(loading);
loading = 0;
removeRenderObject(sidel);
@ -1582,11 +1577,11 @@ This build is not yet final, and as such there are a couple things lacking. They
bindInput();
#if defined(AQUARIA_FULL) || defined(AQUARIA_DEMO)
enqueueJumpState("BitBlotLogo");
#else
// Go directly to the title in dev mode
if(isDeveloperKeys())
title();
#endif
else
enqueueJumpState("BitBlotLogo");
}
void DSQ::recreateBlackBars()
@ -2007,7 +2002,7 @@ void DSQ::reloadDevice()
#ifdef AQUARIA_BUILD_CONSOLE
void DSQ::toggleConsole()
{
if (console)
if (console && isDeveloperKeys())
{
if (console->alpha == 0)
{
@ -2794,11 +2789,6 @@ void DSQ::nag(NagType type)
void DSQ::doModSelect()
{
#ifdef AQUARIA_DEMO
nag(NAG_TOTITLE);
return;
#endif
modIsSelected = false;
dsq->loadMods();
@ -2815,7 +2805,11 @@ void DSQ::doModSelect()
if (modIsSelected)
{
#ifdef AQUARIA_DEMO
nag(NAG_TOTITLE);
#else
dsq->startSelectedMod();
#endif
}
inModSelector = false;
@ -4148,21 +4142,11 @@ void DSQ::vision(std::string folder, int num, bool ignoreMusic)
bool DSQ::isDeveloperKeys()
{
///HACK TEMPORARY
//return true;
#if !defined(AQUARIA_FULL) && !defined(AQUARIA_DEMO)
return true;
#endif
#ifdef AQUARIA_DEMO
return false;
#endif
#ifdef AQUARIA_FULL
return false;
#endif
return developerKeys;
return user.system.devModeOn;
}
bool DSQ::canOpenEditor() const
@ -5139,3 +5123,13 @@ void DSQ::onBackgroundUpdate()
Core::onBackgroundUpdate();
}
void DSQ::resetLayerPasses()
{
for(size_t i = 0; i < renderObjectLayers.size(); ++i)
{
renderObjectLayers[i].startPass = 0;
renderObjectLayers[i].endPass = 0;
}
renderObjectLayers[LR_ENTITIES].startPass = -2;
renderObjectLayers[LR_ENTITIES].endPass = 5;
}

View file

@ -96,6 +96,9 @@ enum AquariaActions
ACTION_FOODRIGHT,
ACTION_FOODDROP,
ACTION_TOGGLEMENU,
ACTION_SWIMUP = 100,
ACTION_SWIMDOWN,
@ -166,7 +169,8 @@ enum AquariaActions
typedef std::list<Entity*> EntityList;
typedef std::vector<Entity*> EntityContainer;
#define FOR_ENTITIES(i) for (Entity **i = &dsq->entities[0]; *i != 0; i++)
// last entry is always NULL. added if is a little hack to ensure the scope of the iterator variable
#define FOR_ENTITIES(i) for (size_t i##_i = 0; dsq->entities[i##_i] != 0; ++i##_i) if (Entity **i = &dsq->entities[i##_i])
enum MenuPage
@ -1566,6 +1570,8 @@ public:
virtual void onBackgroundUpdate();
void resetLayerPasses();
protected:
Quad *cutscene_bg;
@ -1606,7 +1612,6 @@ protected:
void updatepecue(float dt);
std::vector<PECue> pecue;
bool developerKeys;
void onMouseInput();
std::vector<std::string> voxQueue;

View file

@ -3939,7 +3939,7 @@ void Game::createInGameMenu()
menu[8]->useSound("Click");
menu[8]->position = Vector(400+60, 350);
menu[9]->event.set(MakeFunctionEvent(Game, onToggleHelpScreen));
menu[9]->event.set(MakeFunctionEvent(Game, toggleHelpScreen));
menu[9]->useQuad("gui/icon-help");
menu[9]->useGlow("particles/glow", gs, gs);
menu[9]->useSound("Click");
@ -5846,6 +5846,9 @@ void Game::action(int id, int state)
}
}
if(isIgnoreAction((AquariaActions)id))
return;
if (id == ACTION_TOGGLEHELPSCREEN && !state)
{
onToggleHelpScreen();
@ -5853,6 +5856,13 @@ void Game::action(int id, int state)
}
if (id == ACTION_ESC && !state) onPressEscape();
if (id == ACTION_PRIMARY && !state) onLeftMouseButton();
if (id == ACTION_TOGGLEMENU)
{
if(state)
showInGameMenu();
else
hideInGameMenu();
}
if (id == ACTION_TOGGLEWORLDMAP && !state)
{
if (foodMenu)
@ -6127,6 +6137,10 @@ void Game::applyState()
l->followCameraLock = 0;
}
dsq->resetLayerPasses();
ignoredActions.clear();
cameraLerpDelay = 0;
playingSongInMenu = -1;
sceneColor2 = Vector(1,1,1);
@ -7823,7 +7837,7 @@ void Game::toggleHelpScreen(bool on, const std::string &label)
helpCancel->position = Vector(750, 600-20);
helpCancel->followCamera = 1;
//helpCancel->rotation.z = 90;
helpCancel->event.set(MakeFunctionEvent(Game, onToggleHelpScreen));
helpCancel->event.set(MakeFunctionEvent(Game, toggleHelpScreen));
helpCancel->scale = Vector(0.9, 0.9);
helpCancel->guiInputLevel = 100;
addRenderObject(helpCancel, LR_HELP);
@ -7976,7 +7990,7 @@ void Game::onPressEscape()
if (optionsMenu || keyConfigMenu)
onOptionsCancel();
else
hideInGameMenu();
action(ACTION_TOGGLEMENU, 0); // hide menu
}
}
return;
@ -7985,7 +7999,7 @@ void Game::onPressEscape()
if (!paused)
{
if (core->getNestedMains() == 1 && !core->isStateJumpPending())
showInGameMenu();
action(ACTION_TOGGLEMENU, 1); // show menu
}
else
{
@ -10989,4 +11003,15 @@ void Game::learnedRecipe(Recipe *r, bool effects)
}
}
void Game::setIgnoreAction(AquariaActions ac, bool ignore)
{
if (ignore)
ignoredActions.insert(ac);
else
ignoredActions.erase(ac);
}
bool Game::isIgnoreAction(AquariaActions ac) const
{
return ignoredActions.find(ac) != ignoredActions.end();
}

View file

@ -1001,14 +1001,19 @@ public:
void enqueuePreviewRecipe();
void toggleHelpScreen(bool on, const std::string &label="");
void onToggleHelpScreen();
void toggleHelpScreen() { action(ACTION_TOGGLEHELPSCREEN, 0); }
void setWorldPaused(bool b) { worldPaused = b; }
bool isWorldPaused() const { return worldPaused; }
void setIgnoreAction(AquariaActions ac, bool ignore);
bool isIgnoreAction(AquariaActions ac) const;
protected:
void toggleHelpScreen(bool on, const std::string &label="");
void onToggleHelpScreen();
void onHelpUp();
void onHelpDown();
bool helpWasPaused;
@ -1181,9 +1186,6 @@ protected:
void toggleSceneEditor();
#endif
signed char grid[MAX_GRID][MAX_GRID];
@ -1197,10 +1199,10 @@ protected:
std::string selectedChoice;
void warpCameraTo(Vector position);
std::set<int> ignoredActions;
private:
Ingredients ingredients;
};

View file

@ -24,7 +24,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
IngredientData::IngredientData(const std::string &name, const std::string &gfx, IngredientType type)
: name(name), gfx(gfx), amount(0), maxAmount(MAX_INGREDIENT_AMOUNT), held(0), type(type), marked(0), sorted(false)
, displayName(dsq->continuity.getIngredientDisplayName(name))
, rotKind(!(type == IT_OIL && type == IT_EGG))
, rotKind(!(type == IT_OIL || type == IT_EGG))
{
}

View file

@ -31,26 +31,27 @@ static void MakeRan(void)
{
#ifdef BBGE_BUILD_WINDOWS
std::ofstream out("ran");
if(out)
{
for (int i = 0; i < 32; i++)
out << rand()%1000;
out.close();
}
#endif
}
static void StartAQConfig()
{
#if defined(BBGE_BUILD_WINDOWS)
#if defined(AQUARIA_DEMO) || defined(AQUARIA_FULL)
if (!exists("ran", false))
if (!exists("ran", false, true))
{
MakeRan();
if(exists("aqconfig.exe", false))
if(exists("AQConfig.exe", false, true))
{
ShellExecute(NULL, "open", "aqconfig.exe", NULL, NULL, SW_SHOWNORMAL);
ShellExecute(NULL, "open", "AQConfig.exe", NULL, NULL, SW_SHOWNORMAL);
exit(0);
}
}
#endif
remove("ran");
#endif
}

View file

@ -357,7 +357,7 @@ void MiniMapRender::onUpdate(float dt)
{
doubleClickDelay = 0;
if (!core->isStateJumpPending())
dsq->game->showInGameMenu();
dsq->game->action(ACTION_TOGGLEMENU, 1);
btn = true;
}
break;

View file

@ -181,11 +181,6 @@ void Mod::recache()
{
dsq->precacher.clean();
dsq->unloadResources();
dsq->precacher.precacheList("data/precache.txt");
dsq->reloadResources();
core->resetTimer();
}
if(active)
@ -195,15 +190,24 @@ void Mod::recache()
if(fname[fname.length() - 1] != '/')
fname += '/';
fname += "precache.txt";
fname = localisePath(fname, dsq->mod.getPath());
fname = core->adjustFilenameCase(fname);
if (exists(fname))
{
modcache.precacheList(fname);
core->resetTimer();
}
}
else
{
modcache.clean();
}
if(doRecache)
{
dsq->precacher.precacheList("data/precache.txt");
dsq->reloadResources();
core->resetTimer();
}
}
void Mod::start()

View file

@ -338,14 +338,12 @@ void ModSelectorScreen::initNetPanel()
#ifdef BBGE_BUILD_VFS
if(!gotServerList)
{
// FIXME: demo should be able to see downloadable mods imho
#ifndef AQUARIA_DEMO
moddl.init();
std::string serv = dsq->user.network.masterServer;
if(serv.empty())
serv = DEFAULT_MASTER_SERVER;
moddl.GetModlist(serv, true, true);
#endif
gotServerList = true; // try this only once (is automatically reset on failure)
}
#endif
@ -502,11 +500,6 @@ void ModIcon::onClick()
{
dsq->sound->playSfx("click");
#ifdef AQUARIA_DEMO
dsq->nag(NAG_TOTITLE);
return;
#endif
switch(modType)
{
case MODTYPE_MOD:
@ -520,18 +513,24 @@ void ModIcon::onClick()
case MODTYPE_PATCH:
{
#ifdef AQUARIA_DEMO
dsq->sound->playSfx("denied");
core->quitNestedMain();
dsq->modIsSelected = true; // HACK: trigger nag screen
dsq->selectedMod = -1;
break;
#endif
std::set<std::string>::iterator it = dsq->activePatches.find(fname);
if(it != dsq->activePatches.end())
{
dsq->sound->playSfx("pet-off");
dsq->unapplyPatch(fname);
//dsq->screenMessage(modname + " - deactivated"); // DEBUG
}
else
{
dsq->sound->playSfx("pet-on");
dsq->applyPatch(fname);
//dsq->screenMessage(modname + " - activated"); // DEBUG
}
updateStatus();
break;
@ -711,7 +710,9 @@ void ModIconOnline::onClick()
dsq->sound->playSfx("click");
#ifdef AQUARIA_DEMO
dsq->nag(NAG_TOTITLE);
core->quitNestedMain();
dsq->modIsSelected = true; // HACK: trigger nag screen
dsq->selectedMod = -1;
return;
#endif

View file

@ -235,7 +235,7 @@ void Path::song(SongType songType)
if (!script->call("song", this, int(songType)))
{
songFunc = false;
debugLog("Path [" + name + "] " + script->getLastError());
luaDebugMsg("song", script->getLastError());
}
}
}
@ -247,7 +247,7 @@ void Path::songNote(int note)
if (!script->call("songNote", this, note))
{
songNoteFunc = false;
debugLog("Path [" + name + "] " + script->getLastError() + " songNote");
luaDebugMsg("songNote", script->getLastError());
}
}
}
@ -259,7 +259,7 @@ void Path::songNoteDone(int note, float len)
if (!script->call("songNoteDone", this, note, len))
{
songNoteDoneFunc = false;
debugLog("Path [" + name + "] " + script->getLastError() + " songNoteDone");
luaDebugMsg("songNoteDone", script->getLastError());
}
}
}
@ -472,7 +472,7 @@ void Path::init()
{
if (!script->call("init", this))
{
debugLog(name + " : " + script->getLastError() + " init");
luaDebugMsg("init", script->getLastError());
}
}
}
@ -495,7 +495,7 @@ void Path::update(float dt)
{
if (!script->call("update", this, dt))
{
debugLog(name + " : " + script->getLastError() + " update");
luaDebugMsg("update", script->getLastError());
updateFunction = false;
}
}
@ -641,7 +641,7 @@ bool Path::action(int id, int state)
{
bool dontRemove = true;
if (!script->call("action", this, id, state, &dontRemove))
debugLog(name + " : " + script->getLastError() + " action");
luaDebugMsg("action", script->getLastError());
return dontRemove;
}
return true;
@ -653,7 +653,7 @@ void Path::activate(Entity *e)
{
if (!script->call("activate", this, e))
{
debugLog(name + " : " + script->getLastError() + " activate");
luaDebugMsg("activate", script->getLastError());
activateFunction = false;
}
}
@ -704,3 +704,20 @@ void Path::addNode(int idx)
}
}
int Path::messageVariadic(lua_State *L, int nparams)
{
if (script)
{
int res = script->callVariadic("msg", L, nparams, this);
if (res < 0)
luaDebugMsg("msg", script->getLastError());
else
return res;
}
return 0;
}
void Path::luaDebugMsg(const std::string &func, const std::string &msg)
{
debugLog("luaScriptError: Path [" + name + "]: " + func + " : " + msg);
}

View file

@ -149,6 +149,9 @@ public:
void parseWarpNodeData(const std::string &dataString);
int messageVariadic(lua_State *L, int nparams);
void luaDebugMsg(const std::string &func, const std::string &msg);
};
#endif

View file

@ -18,6 +18,7 @@ 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 "ScriptInterface.h"
#include "../BBGE/ScriptObject.h"
extern "C"
@ -38,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.
@ -50,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[] = {
@ -1314,6 +1304,15 @@ luaFunc(obj_setRenderPass)
luaReturnNil();
}
luaFunc(obj_setOverrideRenderPass)
{
RenderObject *r = robj(L);
int pass = lua_tointeger(L, 2);
if (r)
r->setOverrideRenderPass(pass);
luaReturnNil();
}
luaFunc(obj_fh)
{
RenderObject *r = robj(L);
@ -1462,7 +1461,6 @@ luaFunc(obj_collideCircleVsLine)
luaReturnBool(v);
}
luaFunc(obj_collideCircleVsLineAngle)
{
RenderObject *r = robj(L);
@ -1476,6 +1474,14 @@ luaFunc(obj_collideCircleVsLineAngle)
luaReturnBool(v);
}
luaFunc(obj_fadeAlphaWithLife)
{
RenderObject *r = robj(L);
if (r)
r->fadeAlphaWithLife = getBool(L, 2);
luaReturnNil();
}
// ----- end RenderObject common functions -----
@ -1531,6 +1537,27 @@ luaFunc(quad_setSegs)
luaReturnNil();
}
luaFunc(quad_setRepeatTexture)
{
Quad *b = getQuad(L);
if (b)
b->repeatTextureToFill(getBool(L, 2));
luaReturnNil();
}
luaFunc(quad_setRepeatScale)
{
Quad *b = getQuad(L);
if (b)
b->repeatToFillScale = Vector(lua_tonumber(L, 2), lua_tonumber(L, 3));
luaReturnNil();
}
luaFunc(quad_isRepeatTexture)
{
Quad *b = getQuad(L);
luaReturnBool(b ? b->isRepeatingTextureToFill() : false);
}
// --- standard set/get functions for each type, wrapping RenderObject functions ---
@ -1612,6 +1639,7 @@ luaFunc(quad_setSegs)
RO_FUNC(getter, prefix, setCullRadius ) \
RO_FUNC(getter, prefix, setUpdateCull ) \
RO_FUNC(getter, prefix, setRenderPass ) \
RO_FUNC(getter, prefix, setOverrideRenderPass ) \
RO_FUNC(getter, prefix, setPositionX ) \
RO_FUNC(getter, prefix, setPositionY ) \
RO_FUNC(getter, prefix, enableMotionBlur ) \
@ -1619,6 +1647,7 @@ luaFunc(quad_setSegs)
RO_FUNC(getter, prefix, collideCircleVsLine) \
RO_FUNC(getter, prefix, collideCircleVsLineAngle) \
RO_FUNC(getter, prefix, getVectorToObj ) \
RO_FUNC(getter, prefix, fadeAlphaWithLife ) \
MK_ALIAS(prefix, fh, flipHorizontal ) \
MK_ALIAS(prefix, fv, flipVertical )
@ -1630,7 +1659,10 @@ luaFunc(quad_setSegs)
Q_FUNC(getter, prefix, setHeight ) \
Q_FUNC(getter, prefix, getWidth ) \
Q_FUNC(getter, prefix, getHeight ) \
Q_FUNC(getter, prefix, setSegs )
Q_FUNC(getter, prefix, setSegs ) \
Q_FUNC(getter, prefix, setRepeatTexture) \
Q_FUNC(getter, prefix, isRepeatTexture ) \
Q_FUNC(getter, prefix, setRepeatScale )
// This should reflect the internal class hierarchy,
// e.g. a Beam is a Quad, so it can use quad_* functions
@ -1647,6 +1679,38 @@ luaFunc(quad_setSegs)
EXPAND_FUNC_PROTOTYPES
luaFunc(debugBreak)
{
debugLog("DEBUG BREAK");
triggerBreakpoint();
luaReturnNil();
}
luaFunc(setIgnoreAction)
{
dsq->game->setIgnoreAction((AquariaActions)lua_tointeger(L, 1), getBool(L, 2));
luaReturnNil();
}
luaFunc(isIgnoreAction)
{
luaReturnBool(dsq->game->isIgnoreAction((AquariaActions)lua_tointeger(L, 1)));
}
luaFunc(sendAction)
{
AquariaActions ac = (AquariaActions)lua_tointeger(L, 1);
int state = lua_tointeger(L, 2);
int mask = lua_tointeger(L, 3);
if(!mask)
mask = -1;
if(mask & 1)
dsq->game->action(ac, state);
if((mask & 2) && dsq->game->avatar)
dsq->game->avatar->action(ac, state);
luaReturnNil();
}
luaFunc(randRange)
{
int n1 = lua_tointeger(L, 1);
@ -3760,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();
}
@ -3910,6 +3974,12 @@ luaFunc(savePoint)
luaReturnNil();
}
luaFunc(saveMenu)
{
dsq->doSaveSlotMenu(SSM_SAVE);
luaReturnNil();
}
luaFunc(pause)
{
dsq->game->togglePause(1);
@ -4728,6 +4798,19 @@ luaFunc(entity_msg)
luaReturnNil();
}
luaFunc(node_msg)
{
Path *p = path(L);
if (p)
{
// pass everything on the stack except the entity pointer
int res = p->messageVariadic(L, lua_gettop(L) - 1);
if (res >= 0)
return res;
}
luaReturnNil();
}
luaFunc(entity_updateCurrents)
{
Entity *e = entity(L);
@ -6229,6 +6312,16 @@ luaFunc(getHalfTimer)
luaReturnNum(dsq->game->getHalfTimer(n));
}
luaFunc(getOldDT)
{
luaReturnNum(core->get_old_dt());
}
luaFunc(getDT)
{
luaReturnNum(core->get_current_dt());
}
luaFunc(isNested)
{
luaReturnBool(core->isNested());
@ -7443,6 +7536,52 @@ luaFunc(pickupGem)
luaReturnNil();
}
luaFunc(setGemPosition)
{
int gemId = lua_tointeger(L, 1);
std::string mapname = getString(L, 4);
if(mapname.empty())
mapname = dsq->game->sceneName;
Vector pos(lua_tonumber(L, 2), lua_tonumber(L, 3));
WorldMapTile *tile = dsq->continuity.worldMap.getWorldMapTile(getString(L, 1));
if(tile)
{
pos = dsq->game->worldMapRender->getWorldToTile(tile, pos, true, true);
if(gemId >= 0 && gemId < dsq->continuity.gems.size())
{
Continuity::Gems::iterator it = dsq->continuity.gems.begin();
std::advance(it, gemId);
GemData& gem = *it;
gem.pos = pos;
gem.mapName = mapname;
}
else
{
debugLog("setGemPosition: invalid index");
}
}
else
{
debugLog("setGemPosition: Map tile does not exist: " + mapname);
}
luaReturnNil();
}
luaFunc(removeGem)
{
int gemId = lua_tointeger(L, 1);
if(gemId >= 0 && gemId < dsq->continuity.gems.size())
{
Continuity::Gems::iterator it = dsq->continuity.gems.begin();
std::advance(it, gemId);
dsq->continuity.removeGemData(&(*it));
if(dsq->game->worldMapRender->isOn())
dsq->game->worldMapRender->fixGems();
}
luaReturnNil();
}
luaFunc(beaconEffect)
{
int index = lua_tointeger(L, 1);
@ -7504,6 +7643,19 @@ luaFunc(setCostume)
luaReturnNil();
}
luaFunc(setLayerRenderPass)
{
int layer = lua_tointeger(L, 1);
int startPass = lua_tointeger(L, 2);
int endPass = lua_tointeger(L, 3);
if(layer >= 0 && layer < core->renderObjectLayers.size())
{
core->renderObjectLayers[layer].startPass = startPass;
core->renderObjectLayers[layer].endPass = endPass;
}
luaReturnNil();
}
luaFunc(setElementLayerVisible)
{
int l = lua_tonumber(L, 1);
@ -7951,6 +8103,11 @@ static const struct {
{"dofile", l_dofile_caseinsensitive},
{"loadfile", l_loadfile_caseinsensitive},
luaRegister(debugBreak),
luaRegister(setIgnoreAction),
luaRegister(isIgnoreAction),
luaRegister(sendAction),
luaRegister(shakeCamera),
luaRegister(upgradeHealth),
@ -7969,6 +8126,8 @@ static const struct {
luaRegister(getPetPower),
luaRegister(getTimer),
luaRegister(getHalfTimer),
luaRegister(getOldDT),
luaRegister(getDT),
luaRegister(setCostume),
luaRegister(getCostume),
luaRegister(getNoteName),
@ -8046,7 +8205,6 @@ static const struct {
luaRegister(entity_setCullRadius),
luaRegister(entity_setUpdateCull),
luaRegister(entity_switchLayer),
@ -8214,6 +8372,7 @@ static const struct {
luaRegister(entity_getMaxHealth),
luaRegister(entity_pushTarget),
luaRegister(entity_msg),
luaRegister(node_msg),
luaRegister(entity_updateMovement),
luaRegister(entity_updateCurrents),
luaRegister(entity_updateLocalWarpAreas),
@ -8397,6 +8556,7 @@ static const struct {
luaRegister(savePoint),
luaRegister(saveMenu),
luaRegister(wait),
luaRegister(watch),
@ -8408,6 +8568,7 @@ static const struct {
luaRegister(centerText),
luaRegister(watchForVoice),
luaRegister(setLayerRenderPass),
luaRegister(setElementLayerVisible),
luaRegister(isElementLayerVisible),
@ -8416,6 +8577,8 @@ static const struct {
luaRegister(pickupGem),
luaRegister(setGemPosition),
luaRegister(removeGem),
luaRegister(setBeacon),
luaRegister(getBeacon),
luaRegister(beaconEffect),
@ -9565,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();
}

View file

@ -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");

View file

@ -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

View file

@ -865,7 +865,7 @@ WorldMapRender::WorldMapRender() : RenderObject(), ActionMapper()
void WorldMapRender::onToggleHelpScreen()
{
game->onToggleHelpScreen();
game->toggleHelpScreen();
}
void WorldMapRender::bindInput()
@ -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;

View file

@ -19,11 +19,22 @@ along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "AquariaCompileConfig.h"
#include <Winver.h>
#include <Windows.h>
#include "resource.h" // Might as well use what's there, even though it's questionable.
#include "custom-fields.h"
#define AQUARIA_RC_FILEVERSION 1,1,3,999
#define AQUARIA_RC_PRODUCTVERSION 1,1,3,0
#define AQUARIA_RC_PRODUCTVERSION_STRING "1.1.3"
#ifdef AQUARIA_OVERRIDE_VERSION_STRING
# define AQUARIA_RC_COMMENTS AQUARIA_OVERRIDE_VERSION_STRING
#else
# define AQUARIA_RC_COMMENTS "Open Source Build"
#endif
#define AQUARIA_RC_FILEVERSION_STRING "1.1.3.fg"
// Version information
1 VERSIONINFO
@ -56,6 +67,5 @@ END
END
// Icon
101 ICON "Aquaria.ico"
101 ICON "AquariaWin32OSE.ico"

View file

@ -26,6 +26,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <shellapi.h>
#endif
#ifdef _MSC_VER
# include <intrin.h>
#endif
#if defined(BBGE_BUILD_UNIX)
#include <sys/types.h>
#include <dirent.h>
@ -773,6 +777,10 @@ std::vector<std::string> getFileList(std::string path, std::string type, int par
return list;
}
#if defined(BBGE_BUILD_MACOSX)
void cocoaMessageBox(const std::string &title, const std::string &msg);
#endif
void messageBox(const std::string& title, const std::string &msg)
{
#ifdef BBGE_BUILD_WINDOWS
@ -1113,6 +1121,16 @@ std::string spacesToUnderscores(const std::string &str)
return s;
}
void triggerBreakpoint()
{
#ifdef _MSC_VER
__debugbreak();
#elif defined(__GNUC__) && ((__i386__) || (__x86_64__))
__asm__ __volatile__ ( "int $3\n\t" );
#else
raise(SIGTRAP);
#endif
}
#include "DeflateCompressor.h"

View file

@ -296,4 +296,7 @@ void openURL(const std::string &url);
std::string underscoresToSpaces(const std::string &str);
std::string spacesToUnderscores(const std::string &str);
void triggerBreakpoint();
#endif

View file

@ -822,10 +822,6 @@ void Core::errorLog(const std::string &s)
debugLog(s);
}
#if defined(BBGE_BUILD_MACOSX)
void cocoaMessageBox(const std::string &title, const std::string &msg);
#endif
void Core::messageBox(const std::string &title, const std::string &msg)
{
::messageBox(title, msg);
@ -957,6 +953,7 @@ Core::Core(const std::string &filesystem, const std::string& extraDataDir, int n
srand(time(NULL));
old_dt = 0;
current_dt = 0;
aspectX = 4;
aspectY = 3;
@ -2960,6 +2957,7 @@ void Core::main(float runTime)
if (verbose) debugLog("modify dt");
modifyDt(dt);
current_dt = dt;
if (verbose) debugLog("check runtime/quit");

View file

@ -1277,6 +1277,7 @@ public:
float aspectX, aspectY;
float get_old_dt() { return old_dt; }
float get_current_dt() { return current_dt; }
bool debugLogActive;
@ -1330,6 +1331,7 @@ protected:
void initIcon();
float old_dt;
float current_dt;
std::string debugLogPath;

View file

@ -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)
@ -200,19 +199,19 @@ endif (NOT OPENAL_FOUND)
################ End of external libraries
INCLUDE_DIRECTORIES("${BBGEDIR}")
INCLUDE_DIRECTORIES("${BBGEDIR}/GL")
INCLUDE_DIRECTORIES("${ZLIB_INCLUDE_DIRS}")
INCLUDE_DIRECTORIES("${PNG_INCLUDE_DIR}")
INCLUDE_DIRECTORIES("${SRCDIR}")
INCLUDE_DIRECTORIES("${FTGLDIR}/include")
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("${EXTLIBDIR}")
INCLUDE_DIRECTORIES("${EXTLIBDIR}/ttvfs")
INCLUDE_DIRECTORIES(${BBGEDIR})
INCLUDE_DIRECTORIES(${BBGEDIR}/GL)
INCLUDE_DIRECTORIES(${ZLIB_INCLUDE_DIRS})
INCLUDE_DIRECTORIES(${PNG_INCLUDE_DIR})
INCLUDE_DIRECTORIES(${SRCDIR})
INCLUDE_DIRECTORIES(${FTGLDIR}/include)
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(${EXTLIBDIR})
INCLUDE_DIRECTORIES(${EXTLIBDIR}/ttvfs)
# Custom build ID: e.g. "-custom", " (my very own build)"
@ -226,7 +225,7 @@ endif (NOT(AQUARIA_CUSTOM_BUILD_ID STREQUAL ""))
SET(AQUARIA_OVERRIDE_VERSION_STRING "" CACHE STRING
"Text to display instead of the Aquaria version ID on the title screen. (Overrides AQUARIA_CUSTOM_BUILD_ID as well)")
if (NOT(AQUARIA_OVERRIDE_VERSION_STRING STREQUAL ""))
ADD_DEFINITIONS("-AQUARIA_OVERRIDE_VERSION_STRING=\"${AQUARIA_OVERRIDE_VERSION_STRING}\"")
ADD_DEFINITIONS("-DAQUARIA_OVERRIDE_VERSION_STRING=\"${AQUARIA_OVERRIDE_VERSION_STRING}\"")
endif (NOT(AQUARIA_OVERRIDE_VERSION_STRING STREQUAL ""))
# Custom data directories
@ -258,12 +257,6 @@ IF(AQUARIA_USE_VFS)
ADD_DEFINITIONS(-DBBGE_BUILD_VFS=1)
ENDIF(AQUARIA_USE_VFS)
IF(AQUARIA_DEVELOPER_BUILD)
message(STATUS "Developer build.")
ELSE(AQUARIA_DEVELOPER_BUILD)
ADD_DEFINITIONS(-DAQUARIA_FULL=1)
ENDIF(AQUARIA_DEVELOPER_BUILD)
IF(AQUARIA_DEMO_BUILD)
message(STATUS "Demo build.")
ADD_DEFINITIONS(-DAQUARIA_DEMO=1)

View file

@ -0,0 +1,42 @@
<AnimationLayers>
<AnimationLayer />
</AnimationLayers>
<Bones>
<Bone idx="0" gfx="Drask/Body" pidx="-1" name="Body" fh="0" fv="0" gc="1" cr="0" cp="0 0" />
<Bone idx="1" gfx="Drask/Leg1" pidx="0" name="" fh="0" fv="0" gc="1" cr="0" cp="0 0" rbp="1" />
<Bone idx="2" gfx="Drask/Leg2" pidx="1" name="" fh="0" fv="0" gc="1" cr="0" cp="0 0" rbp="1" />
<Bone idx="3" gfx="Drask/Leg3" pidx="2" name="" fh="0" fv="0" gc="1" cr="0" cp="0 0" rbp="1" />
<Bone idx="4" gfx="Drask/Leg1" pidx="0" name="" fh="0" fv="0" gc="1" cr="0" cp="0 0" />
<Bone idx="5" gfx="Drask/Leg2" pidx="4" name="" fh="0" fv="0" gc="1" cr="0" cp="0 0" rbp="1" />
<Bone idx="6" gfx="Drask/Leg3" pidx="5" name="" fh="0" fv="0" gc="1" cr="0" cp="0 0" rbp="1" />
<Bone idx="7" gfx="Drask/Head" pidx="0" name="Head" fh="0" fv="0" gc="1" cr="0" cp="0 0" />
<Bone idx="8" gfx="Drask/Arm1" pidx="0" name="" fh="1" fv="0" gc="1" cr="0" cp="0 0" rbp="1" />
<Bone idx="9" gfx="Drask/Arm2" pidx="8" name="" fh="0" fv="0" gc="1" cr="0" cp="0 0" />
<Bone idx="10" gfx="Drask/Arm3" pidx="9" name="" fh="0" fv="0" gc="1" cr="0" cp="0 0" rbp="1" />
<Bone idx="11" gfx="Drask/Arm1" pidx="0" name="" fh="0" fv="0" gc="1" cr="0" cp="0 0" />
<Bone idx="12" gfx="Drask/Arm2" pidx="11" name="" fh="0" fv="0" gc="1" cr="0" cp="0 0" />
<Bone idx="13" gfx="Drask/Arm3" pidx="12" name="" fh="0" fv="0" gc="1" cr="0" cp="0 0" rbp="1" />
<Bone idx="20" gfx="Drask/Trident" pidx="13" name="Trident" fh="0" fv="0" gc="1" cr="0" cp="0 0" rbp="1" />
</Bones>
<Animations>
<Animation name="idle">
<Key e="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 -10 46 0 0 2 0 21 0 0 3 9 38 0 0 4 2 47 0 0 5 1 22 0 0 6 7 35 0 0 7 -3 -62 0 0 8 -13 -23 -1 0 9 12 37 0 0 10 5 17 11 0 11 14 -25 -10 0 12 10 37 10 0 13 4 18 15 0 14 0 0 0 0 15 0 0 0 0 20 -5 0 -22 0 " />
<Key lerp="2" e="0.8 0 -2 21 0 0 0 0 0 0 0 0 0 0 0 0 1 -13 43 4 0 2 0 21 0 0 3 9 38 0 0 4 4 47 -5 0 5 1 22 0 0 6 7 35 0 0 7 -3 -62 0 0 8 -13 -21 16 0 9 16 36 -13 0 10 5 17 -22 0 11 15 -23 -11 0 12 6 35 25 0 13 3 18 -8 0 14 0 0 0 0 15 0 0 0 0 20 1 7 -9 0 " />
<Key lerp="2" e="2.1 0 0 -10 0 0 0 0 0 0 0 0 0 0 0 0 1 -11 45 0 0 2 1 23 0 0 3 12 33 -21 0 4 1 47 0 0 5 1 23 2 0 6 14 34 -26 0 7 -3 -62 0 0 8 -13 -21 -5 0 9 11 36 3 0 10 5 17 -9 0 11 15 -23 2 0 12 9 37 9 0 13 5 19 9 0 14 0 0 0 0 15 0 0 0 0 20 -4 0 -20 0 " />
<Key e="2.5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 -10 46 0 0 2 0 21 0 0 3 9 38 0 0 4 2 47 0 0 5 1 22 0 0 6 7 35 0 0 7 -3 -62 0 0 8 -13 -23 -1 0 9 12 37 0 0 10 5 17 11 0 11 14 -25 -10 0 12 10 37 10 0 13 4 18 15 0 14 0 0 0 0 15 0 0 0 0 20 -5 0 -22 0 " />
</Animation>
<Animation name="sit">
<Key e="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 -13 35 44 0 2 4 21 -39 0 3 12 38 -10 0 4 -7 43 29 0 5 5 24 -29 0 6 10 35 -12 0 7 -3 -62 0 0 8 -13 -23 15 0 9 19 33 -37 0 10 5 17 11 0 11 15 -24 -10 0 12 7 37 24 0 13 4 18 17 0 14 0 0 0 0 15 0 0 0 0 20 -11 -3 -21 0 " />
<Key lerp="1" e="1.6 0 0 0 4 0 0 0 0 0 0 0 0 0 0 0 1 -13 35 39 0 2 4 21 -39 0 3 12 38 -10 0 4 -6 43 25 0 5 5 24 -29 0 6 10 35 -12 0 7 -5 -64 -3 0 8 -15 -23 8 0 9 19 33 -37 0 10 5 17 11 0 11 15 -24 -10 0 12 7 37 24 0 13 4 18 17 0 14 0 0 0 0 15 0 0 0 0 20 -11 -3 -21 0 " />
<Key e="3.4 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 -13 35 44 0 2 4 21 -39 0 3 12 38 -10 0 4 -7 43 29 0 5 5 24 -29 0 6 10 35 -12 0 7 -3 -62 0 0 8 -13 -23 15 0 9 19 33 -37 0 10 5 17 11 0 11 15 -24 -10 0 12 7 37 24 0 13 4 18 17 0 14 0 0 0 0 15 0 0 0 0 20 -11 -3 -21 0 " />
</Animation>
<Animation name="ball">
<Key e="0 0 0 0 0 0 1 0 0 0 0 2 0 0 0 0 3 0 0 0 0 4 0 0 0 0 5 0 0 0 0 6 0 0 0 0 7 0 0 0 0 8 0 0 0 0 9 0 0 0 0 10 0 0 0 0 11 0 0 0 0 12 0 0 0 0 13 0 0 0 0 14 0 0 0 0 15 0 0 0 0 20 0 0 0 0 " />
</Animation>
<Animation name="figure">
<Key e="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 -10 46 0 0 2 0 21 0 0 3 9 38 0 0 4 2 47 0 0 5 1 22 0 0 6 7 35 0 0 7 -3 -62 0 0 8 -13 -23 -1 0 9 12 37 0 0 10 5 17 11 0 11 14 -25 4 0 12 13 38 0 0 13 4 18 10 0 14 0 0 0 0 15 0 0 0 0 20 0 0 0 0 " />
</Animation>
<Animation name="sitstill">
<Key e="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 -20 34 59 0 2 4 21 -56 0 3 12 38 -10 0 4 -8 37 48 0 5 5 21 -48 0 6 10 35 -12 0 7 -3 -62 0 0 8 -13 -23 -8 0 9 19 33 -37 0 10 5 17 11 0 11 15 -24 -10 0 12 7 37 24 0 13 4 18 17 0 14 0 0 0 0 15 0 0 0 0 20 -9 0 -22 0 " />
</Animation>
</Animations>

View file

@ -0,0 +1,32 @@
<AnimationLayers>
<AnimationLayer />
</AnimationLayers>
<Bones>
<Bone idx="0" gfx="queen-statue/body" pidx="-1" name="body" fh="0" fv="0" gc="1" cr="0" cp="0 0" />
<Bone idx="1" gfx="queen-statue/head" pidx="0" name="head" fh="0" fv="0" gc="1" cr="0" cp="0 0" />
<Bone idx="2" gfx="queen-statue/arm1" pidx="0" name="" fh="1" fv="0" gc="1" cr="0" cp="0 0" rbp="1" />
<Bone idx="3" gfx="queen-statue/arm2" pidx="2" name="" fh="0" fv="0" gc="1" cr="0" cp="0 0" />
<Bone idx="4" gfx="queen-statue/arm3" pidx="3" name="" fh="0" fv="0" gc="1" cr="0" cp="0 0" rbp="1" />
<Bone idx="8" gfx="queen-statue/leg1" pidx="0" name="" fh="0" fv="0" gc="1" cr="0" cp="0 0" rbp="1" />
<Bone idx="9" gfx="queen-statue/leg2" pidx="8" name="" fh="0" fv="0" gc="1" cr="0" cp="0 0" rbp="1" />
<Bone idx="10" gfx="queen-statue/leg3" pidx="9" name="" fh="0" fv="0" gc="1" cr="0" cp="0 0" rbp="1" />
<Bone idx="11" gfx="queen-statue/leg1" pidx="0" name="" fh="0" fv="0" gc="1" cr="0" cp="0 0" />
<Bone idx="12" gfx="queen-statue/leg2" pidx="11" name="" fh="0" fv="0" gc="1" cr="0" cp="0 0" rbp="1" />
<Bone idx="13" gfx="queen-statue/leg3" pidx="12" name="" fh="0" fv="0" gc="1" cr="0" cp="0 0" rbp="1" />
<Bone idx="5" gfx="queen-statue/arm1" pidx="0" name="" fh="0" fv="0" gc="1" cr="0" cp="0 0" />
<Bone idx="6" gfx="queen-statue/arm2" pidx="5" name="" fh="0" fv="0" gc="1" cr="0" cp="0 0" />
<Bone idx="7" gfx="queen-statue/arm3" pidx="6" name="" fh="0" fv="0" gc="1" cr="0" cp="0 0" rbp="1" />
</Bones>
<Animations>
<Animation name="idle">
<Key lerp="1" e="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 -66 0 0 2 -20 -10 0 0 3 11 34 0 0 4 3 32 0 0 8 -4 51 0 0 9 0 47 0 0 10 -5 46 0 0 11 10 54 0 0 12 1 47 0 0 13 -5 47 0 0 5 24 -7 0 0 6 11 34 0 0 7 3 32 0 0 " />
</Animation>
<Animation name="sleep">
<Key lerp="1" e="0 0 -22 19 -90 0 0 0 0 0 0 0 0 0 0 0 1 1 -66 0 0 2 -13 -9 -19 0 3 14 34 -7 0 4 3 32 0 0 8 -4 52 7 0 9 0 47 0 0 10 6 48 -30 0 11 -2 45 35 0 12 10 46 -27 0 13 4 48 -25 0 5 7 -6 48 0 6 12 35 -3 0 7 6 32 -19 0 " />
<Key lerp="1" e="2.3 0 -22 19 -92 0 0 0 0 0 0 0 0 0 0 0 1 3 -65 4 0 2 -13 -9 -19 0 3 14 34 -7 0 4 3 32 0 0 8 -8 53 9 0 9 0 47 0 0 10 6 48 -30 0 11 -5 46 40 0 12 10 46 -27 0 13 4 48 -25 0 5 7 -6 51 0 6 14 36 -6 0 7 6 32 -19 0 " />
<Key lerp="1" e="4.8 0 -22 19 -90 0 0 0 0 0 0 0 0 0 0 0 1 1 -66 0 0 2 -13 -9 -19 0 3 14 34 -7 0 4 3 32 0 0 8 -4 52 7 0 9 0 47 0 0 10 6 48 -30 0 11 -2 45 35 0 12 10 46 -27 0 13 4 48 -25 0 5 7 -6 48 0 6 12 35 -3 0 7 6 32 -19 0 " />
</Animation>
<Animation name="sitstill">
<Key lerp="1" e="0 0 0 0 -2 0 0 0 0 0 0 0 0 0 0 0 1 1 -66 0 0 2 -21 -7 -3 0 3 19 27 -41 0 4 3 32 0 0 8 -20 41 64 0 9 18 28 -64 0 10 -1 47 -9 0 11 -9 44 56 0 12 16 38 -48 0 13 3 46 -24 0 5 24 -8 -1 0 6 11 34 -2 0 7 3 32 -5 0 " />
</Animation>
</Animations>

View file

@ -0,0 +1,16 @@
<Bones>
<Bone idx="0" gfx="drask/statue-body" />
<Bone idx="1" gfx="drask/statue-leg1" />
<Bone idx="2" gfx="drask/statue-leg2" />
<Bone idx="3" gfx="drask/statue-leg3" />
<Bone idx="4" gfx="drask/statue-leg1" />
<Bone idx="5" gfx="drask/statue-leg2" />
<Bone idx="6" gfx="drask/statue-leg3" />
<Bone idx="7" gfx="drask/statue-head" />
<Bone idx="8" gfx="drask/statue-arm1" />
<Bone idx="9" gfx="drask/statue-arm2" />
<Bone idx="10" gfx="drask/statue-arm3" />
<Bone idx="11" gfx="drask/statue-arm1" />
<Bone idx="12" gfx="drask/statue-arm2" />
<Bone idx="13" gfx="drask/statue-arm3" />
</Bones>

15
files/data/shots/li.txt Normal file
View file

@ -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

View file

@ -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

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

BIN
files/gfx/gui/audio.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 127 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

View file

@ -41,6 +41,7 @@ local STATE_DIE = 1008
v.n = 0
v.fight = false
v.cut = false
v.spawnPoint = 0