mirror of
https://github.com/AquariaOSE/Aquaria.git
synced 2025-02-26 07:53: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;
|
||||
}
|
||||
|
||||
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()
|
||||
{
|
||||
if (vel.isLength2DIn(2) && rotation.z == 0)
|
||||
|
|
|
@ -358,7 +358,6 @@ protected:
|
|||
float fallGravityTimer;
|
||||
Vector fallGravity;
|
||||
int lastOutOfWaterMaxSpeed;
|
||||
void spawnSeed();
|
||||
|
||||
int shieldPoints;
|
||||
|
||||
|
|
|
@ -2997,40 +2997,6 @@ int Continuity::getPathFlag(Path *p)
|
|||
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
|
||||
{
|
||||
public:
|
||||
|
@ -3285,7 +3251,6 @@ void Continuity::reset()
|
|||
loadPetData();
|
||||
|
||||
formUpgrades.clear();
|
||||
sporeChildData.clear();
|
||||
|
||||
auraType = AURA_NONE;
|
||||
for (int i = 0; i < MAX_FLAGS; i++)
|
||||
|
|
|
@ -826,28 +826,6 @@ public:
|
|||
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_COOKS = 21;
|
||||
|
@ -1065,12 +1043,6 @@ public:
|
|||
AuraType auraType;
|
||||
float auraTimer;
|
||||
|
||||
SporeChildData *getSporeChildDataForEntity(Entity *e);
|
||||
void registerSporeChildData(Entity *e);
|
||||
|
||||
std::vector<SporeChildData> sporeChildData;
|
||||
|
||||
|
||||
EatData *getEatData(const std::string &name);
|
||||
void loadEatBank();
|
||||
|
||||
|
|
|
@ -1867,18 +1867,6 @@ void Game::transitionToScene(std::string scene)
|
|||
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)
|
||||
{
|
||||
for (int i = 0; i < elementTemplates.size(); i++)
|
||||
|
@ -2706,34 +2694,6 @@ EntitySaveData *Game::getEntitySaveDataForEntity(Entity *e, Vector pos)
|
|||
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)
|
||||
{
|
||||
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)
|
||||
{
|
||||
bool aboveWaterLine = (pos.y <= dsq->game->waterLevel.x+20);
|
||||
|
@ -6760,9 +6680,6 @@ void Game::applyState()
|
|||
|
||||
toNode = "";
|
||||
|
||||
|
||||
spawnSporeChildren();
|
||||
|
||||
createInGameMenu();
|
||||
hideInGameMenu(false);
|
||||
|
||||
|
|
|
@ -125,7 +125,6 @@ typedef std::vector<EntityGroup> EntityGroups;
|
|||
|
||||
enum EditTypes
|
||||
{
|
||||
ET_NONE =-1,
|
||||
ET_ELEMENTS =0,
|
||||
ET_ENTITIES =1,
|
||||
ET_PATHS =2,
|
||||
|
@ -648,7 +647,6 @@ public:
|
|||
void updatePreviewRecipe();
|
||||
|
||||
void transitionToScene(std::string scene);
|
||||
void transitionToSceneUnder(std::string scene);
|
||||
bool loadScene(std::string scene);
|
||||
|
||||
void clearGrid(int v = 0);
|
||||
|
@ -882,9 +880,6 @@ public:
|
|||
|
||||
int worldMapIndex;
|
||||
|
||||
void spawnSporeChildren();
|
||||
|
||||
bool creatingSporeChildren;
|
||||
bool loadingScene;
|
||||
|
||||
WaterSurfaceRender *waterSurfaceRender;
|
||||
|
@ -1048,10 +1043,6 @@ protected:
|
|||
|
||||
|
||||
void warpPrep();
|
||||
void warpKey1();
|
||||
void warpKey2();
|
||||
void warpKey3();
|
||||
void warpKey4();
|
||||
bool shuttingDownGameState;
|
||||
void onOptionsMenu();
|
||||
bool optionsMenu, foodMenu, petMenu, treasureMenu, keyConfigMenu;
|
||||
|
|
|
@ -5240,16 +5240,6 @@ luaFunc(warpNaijaToSceneNode)
|
|||
luaReturnNil();
|
||||
}
|
||||
|
||||
luaFunc(registerSporeChildData)
|
||||
{
|
||||
Entity *e = entity(L);
|
||||
if (e)
|
||||
{
|
||||
dsq->continuity.registerSporeChildData(e);
|
||||
}
|
||||
luaReturnNil();
|
||||
}
|
||||
|
||||
luaFunc(entity_setDamageTarget)
|
||||
{
|
||||
Entity *e = entity(L);
|
||||
|
@ -6460,7 +6450,7 @@ luaFunc(entity_getNearestEntity)
|
|||
Entity *e = *i;
|
||||
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))
|
||||
{
|
||||
|
@ -7773,7 +7763,6 @@ static const struct {
|
|||
luaRegister(entity_sound),
|
||||
luaRegister(entity_playSfx),
|
||||
|
||||
luaRegister(registerSporeChildData),
|
||||
luaRegister(registerSporeDrop),
|
||||
|
||||
luaRegister(getIngredientGfx),
|
||||
|
|
Loading…
Add table
Reference in a new issue