mirror of
https://github.com/AquariaOSE/Aquaria.git
synced 2025-02-26 16:03:58 +00:00
Remove some dead code + fix clang warning.
This commit is contained in:
parent
b199e40efd
commit
1168eaf1d9
7 changed files with 1 additions and 184 deletions
|
@ -2431,22 +2431,6 @@ bool Avatar::fireAtNearestValidEntity(const std::string &shot)
|
||||||
return firedShot;
|
return firedShot;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Avatar::spawnSeed()
|
|
||||||
{
|
|
||||||
// max spore children/seeds = 50
|
|
||||||
if (dsq->game->getNumberOfEntitiesNamed("SporeChild") < 4)
|
|
||||||
{
|
|
||||||
if (!dsq->game->isObstructed(TileVector(position)))
|
|
||||||
{
|
|
||||||
dsq->game->createEntity("SporeChild", 0, position, 0, 0, "");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// visual effect and/or sound effect
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Vector Avatar::getFacing()
|
Vector Avatar::getFacing()
|
||||||
{
|
{
|
||||||
if (vel.isLength2DIn(2) && rotation.z == 0)
|
if (vel.isLength2DIn(2) && rotation.z == 0)
|
||||||
|
|
|
@ -358,7 +358,6 @@ protected:
|
||||||
float fallGravityTimer;
|
float fallGravityTimer;
|
||||||
Vector fallGravity;
|
Vector fallGravity;
|
||||||
int lastOutOfWaterMaxSpeed;
|
int lastOutOfWaterMaxSpeed;
|
||||||
void spawnSeed();
|
|
||||||
|
|
||||||
int shieldPoints;
|
int shieldPoints;
|
||||||
|
|
||||||
|
|
|
@ -2997,40 +2997,6 @@ int Continuity::getPathFlag(Path *p)
|
||||||
return entityFlags[os2.str()];
|
return entityFlags[os2.str()];
|
||||||
}
|
}
|
||||||
|
|
||||||
SporeChildData *Continuity::getSporeChildDataForEntity(Entity *e)
|
|
||||||
{
|
|
||||||
SporeChildData *scd=0;
|
|
||||||
for (int i = 0; i < sporeChildData.size(); i++)
|
|
||||||
{
|
|
||||||
if (sporeChildData[i].entity == e)
|
|
||||||
{
|
|
||||||
scd = &sporeChildData[i];
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return scd;
|
|
||||||
}
|
|
||||||
|
|
||||||
void Continuity::registerSporeChildData(Entity *e)
|
|
||||||
{
|
|
||||||
if (!dsq->game->creatingSporeChildren)
|
|
||||||
{
|
|
||||||
SporeChildData *scd=0;
|
|
||||||
if (!(scd = getSporeChildDataForEntity(e)))
|
|
||||||
{
|
|
||||||
SporeChildData d;
|
|
||||||
sporeChildData.push_back(d);
|
|
||||||
scd = &sporeChildData[sporeChildData.size()-1];
|
|
||||||
}
|
|
||||||
if (scd)
|
|
||||||
{
|
|
||||||
scd->state = e->getState();
|
|
||||||
scd->health = e->health;
|
|
||||||
scd->entity = e;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
class GemGet : public Quad
|
class GemGet : public Quad
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
@ -3285,7 +3251,6 @@ void Continuity::reset()
|
||||||
loadPetData();
|
loadPetData();
|
||||||
|
|
||||||
formUpgrades.clear();
|
formUpgrades.clear();
|
||||||
sporeChildData.clear();
|
|
||||||
|
|
||||||
auraType = AURA_NONE;
|
auraType = AURA_NONE;
|
||||||
for (int i = 0; i < MAX_FLAGS; i++)
|
for (int i = 0; i < MAX_FLAGS; i++)
|
||||||
|
|
|
@ -826,28 +826,6 @@ public:
|
||||||
void load();
|
void load();
|
||||||
};
|
};
|
||||||
|
|
||||||
enum CMStat
|
|
||||||
{
|
|
||||||
CM_ID =0,
|
|
||||||
CM_EGO,
|
|
||||||
CM_SEGO
|
|
||||||
};
|
|
||||||
|
|
||||||
class WordColoring
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
std::string word;
|
|
||||||
Vector color;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct SporeChildData
|
|
||||||
{
|
|
||||||
SporeChildData() : state(0), entity(0), health(0) {}
|
|
||||||
int state;
|
|
||||||
int health;
|
|
||||||
Entity *entity;
|
|
||||||
};
|
|
||||||
|
|
||||||
const int FLAG_LI = 1000, FLAG_LICOMBAT = 1001;
|
const int FLAG_LI = 1000, FLAG_LICOMBAT = 1001;
|
||||||
|
|
||||||
const int FLAG_COOKS = 21;
|
const int FLAG_COOKS = 21;
|
||||||
|
@ -1065,12 +1043,6 @@ public:
|
||||||
AuraType auraType;
|
AuraType auraType;
|
||||||
float auraTimer;
|
float auraTimer;
|
||||||
|
|
||||||
SporeChildData *getSporeChildDataForEntity(Entity *e);
|
|
||||||
void registerSporeChildData(Entity *e);
|
|
||||||
|
|
||||||
std::vector<SporeChildData> sporeChildData;
|
|
||||||
|
|
||||||
|
|
||||||
EatData *getEatData(const std::string &name);
|
EatData *getEatData(const std::string &name);
|
||||||
void loadEatBank();
|
void loadEatBank();
|
||||||
|
|
||||||
|
|
|
@ -1867,18 +1867,6 @@ void Game::transitionToScene(std::string scene)
|
||||||
core->enqueueJumpState("Game", false);
|
core->enqueueJumpState("Game", false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Game::transitionToSceneUnder(std::string scene)
|
|
||||||
{
|
|
||||||
if (avatar)
|
|
||||||
{
|
|
||||||
avatar->onWarp();
|
|
||||||
}
|
|
||||||
sceneToLoad = scene;
|
|
||||||
stringToLower(sceneToLoad);
|
|
||||||
core->pushState("Game");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
ElementTemplate *Game::getElementTemplateByIdx(int idx)
|
ElementTemplate *Game::getElementTemplateByIdx(int idx)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < elementTemplates.size(); i++)
|
for (int i = 0; i < elementTemplates.size(); i++)
|
||||||
|
@ -2706,34 +2694,6 @@ EntitySaveData *Game::getEntitySaveDataForEntity(Entity *e, Vector pos)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Game::spawnSporeChildren()
|
|
||||||
{
|
|
||||||
creatingSporeChildren = true;
|
|
||||||
SporeChildData *scd;
|
|
||||||
int sz = dsq->continuity.sporeChildData.size();
|
|
||||||
for (int i=0; i < sz; i++)
|
|
||||||
{
|
|
||||||
scd = &dsq->continuity.sporeChildData[i];
|
|
||||||
scd->entity = 0;
|
|
||||||
}
|
|
||||||
int c = 0;
|
|
||||||
for (int i=0; i < sz; i++)
|
|
||||||
{
|
|
||||||
scd = &dsq->continuity.sporeChildData[i];
|
|
||||||
Entity *e = dsq->game->createEntity("SporeChild", 0, avatar->position+Vector(0,2+c*2), 0, 0, "");
|
|
||||||
if (e)
|
|
||||||
{
|
|
||||||
e->setState(scd->state);
|
|
||||||
if (scd->health < 1)
|
|
||||||
scd->health = 1;
|
|
||||||
e->health = scd->health;
|
|
||||||
scd->entity = e;
|
|
||||||
}
|
|
||||||
c++;
|
|
||||||
}
|
|
||||||
creatingSporeChildren = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
void Game::setTimerTextAlpha(float a, float t)
|
void Game::setTimerTextAlpha(float a, float t)
|
||||||
{
|
{
|
||||||
timerText->alpha.interpolateTo(a, t);
|
timerText->alpha.interpolateTo(a, t);
|
||||||
|
@ -5767,46 +5727,6 @@ void Game::updateParticlePause()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Game::warpKey1()
|
|
||||||
{
|
|
||||||
if (core->getCtrlState())
|
|
||||||
{
|
|
||||||
dsq->game->avatar->heal(1000);
|
|
||||||
dsq->game->avatar->fhTo(true);
|
|
||||||
warpToSceneNode("OPENWATER02", "WARPKEY");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void Game::warpKey2()
|
|
||||||
{
|
|
||||||
if (core->getCtrlState())
|
|
||||||
{
|
|
||||||
dsq->game->avatar->heal(1000);
|
|
||||||
dsq->game->avatar->fhTo(true);
|
|
||||||
warpToSceneNode("VEIL01", "WARPKEY");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void Game::warpKey3()
|
|
||||||
{
|
|
||||||
if (core->getCtrlState())
|
|
||||||
{
|
|
||||||
dsq->game->avatar->heal(1000);
|
|
||||||
dsq->game->avatar->fhTo(true);
|
|
||||||
warpToSceneNode("FOREST03", "WARPKEY");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void Game::warpKey4()
|
|
||||||
{
|
|
||||||
if (core->getCtrlState())
|
|
||||||
{
|
|
||||||
dsq->game->avatar->heal(1000);
|
|
||||||
dsq->game->avatar->fhTo(true);
|
|
||||||
warpToSceneNode("ABYSS01", "WARPKEY");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
int game_collideParticle(Vector pos)
|
int game_collideParticle(Vector pos)
|
||||||
{
|
{
|
||||||
bool aboveWaterLine = (pos.y <= dsq->game->waterLevel.x+20);
|
bool aboveWaterLine = (pos.y <= dsq->game->waterLevel.x+20);
|
||||||
|
@ -6760,9 +6680,6 @@ void Game::applyState()
|
||||||
|
|
||||||
toNode = "";
|
toNode = "";
|
||||||
|
|
||||||
|
|
||||||
spawnSporeChildren();
|
|
||||||
|
|
||||||
createInGameMenu();
|
createInGameMenu();
|
||||||
hideInGameMenu(false);
|
hideInGameMenu(false);
|
||||||
|
|
||||||
|
|
|
@ -125,7 +125,6 @@ typedef std::vector<EntityGroup> EntityGroups;
|
||||||
|
|
||||||
enum EditTypes
|
enum EditTypes
|
||||||
{
|
{
|
||||||
ET_NONE =-1,
|
|
||||||
ET_ELEMENTS =0,
|
ET_ELEMENTS =0,
|
||||||
ET_ENTITIES =1,
|
ET_ENTITIES =1,
|
||||||
ET_PATHS =2,
|
ET_PATHS =2,
|
||||||
|
@ -648,7 +647,6 @@ public:
|
||||||
void updatePreviewRecipe();
|
void updatePreviewRecipe();
|
||||||
|
|
||||||
void transitionToScene(std::string scene);
|
void transitionToScene(std::string scene);
|
||||||
void transitionToSceneUnder(std::string scene);
|
|
||||||
bool loadScene(std::string scene);
|
bool loadScene(std::string scene);
|
||||||
|
|
||||||
void clearGrid(int v = 0);
|
void clearGrid(int v = 0);
|
||||||
|
@ -882,9 +880,6 @@ public:
|
||||||
|
|
||||||
int worldMapIndex;
|
int worldMapIndex;
|
||||||
|
|
||||||
void spawnSporeChildren();
|
|
||||||
|
|
||||||
bool creatingSporeChildren;
|
|
||||||
bool loadingScene;
|
bool loadingScene;
|
||||||
|
|
||||||
WaterSurfaceRender *waterSurfaceRender;
|
WaterSurfaceRender *waterSurfaceRender;
|
||||||
|
@ -1048,10 +1043,6 @@ protected:
|
||||||
|
|
||||||
|
|
||||||
void warpPrep();
|
void warpPrep();
|
||||||
void warpKey1();
|
|
||||||
void warpKey2();
|
|
||||||
void warpKey3();
|
|
||||||
void warpKey4();
|
|
||||||
bool shuttingDownGameState;
|
bool shuttingDownGameState;
|
||||||
void onOptionsMenu();
|
void onOptionsMenu();
|
||||||
bool optionsMenu, foodMenu, petMenu, treasureMenu, keyConfigMenu;
|
bool optionsMenu, foodMenu, petMenu, treasureMenu, keyConfigMenu;
|
||||||
|
|
|
@ -5240,16 +5240,6 @@ luaFunc(warpNaijaToSceneNode)
|
||||||
luaReturnNil();
|
luaReturnNil();
|
||||||
}
|
}
|
||||||
|
|
||||||
luaFunc(registerSporeChildData)
|
|
||||||
{
|
|
||||||
Entity *e = entity(L);
|
|
||||||
if (e)
|
|
||||||
{
|
|
||||||
dsq->continuity.registerSporeChildData(e);
|
|
||||||
}
|
|
||||||
luaReturnNil();
|
|
||||||
}
|
|
||||||
|
|
||||||
luaFunc(entity_setDamageTarget)
|
luaFunc(entity_setDamageTarget)
|
||||||
{
|
{
|
||||||
Entity *e = entity(L);
|
Entity *e = entity(L);
|
||||||
|
@ -6460,7 +6450,7 @@ luaFunc(entity_getNearestEntity)
|
||||||
Entity *e = *i;
|
Entity *e = *i;
|
||||||
if (e != me && e != ignore && e->isPresent() && e->isNormalLayer())
|
if (e != me && e != ignore && e->isPresent() && e->isNormalLayer())
|
||||||
{
|
{
|
||||||
if (type == ET_NONE || e->getEntityType() == type)
|
if (type == ET_NOTYPE || e->getEntityType() == type)
|
||||||
{
|
{
|
||||||
if (damageTarget == DT_NONE || e->isDamageTarget((DamageType)damageTarget))
|
if (damageTarget == DT_NONE || e->isDamageTarget((DamageType)damageTarget))
|
||||||
{
|
{
|
||||||
|
@ -7773,7 +7763,6 @@ static const struct {
|
||||||
luaRegister(entity_sound),
|
luaRegister(entity_sound),
|
||||||
luaRegister(entity_playSfx),
|
luaRegister(entity_playSfx),
|
||||||
|
|
||||||
luaRegister(registerSporeChildData),
|
|
||||||
luaRegister(registerSporeDrop),
|
luaRegister(registerSporeDrop),
|
||||||
|
|
||||||
luaRegister(getIngredientGfx),
|
luaRegister(getIngredientGfx),
|
||||||
|
|
Loading…
Add table
Reference in a new issue