mirror of
https://github.com/AquariaOSE/Aquaria.git
synced 2025-06-08 09:31:58 +00:00
eliminate some unused code
This commit is contained in:
parent
aa067be1f7
commit
eec6027ccc
7 changed files with 0 additions and 163 deletions
|
@ -2514,66 +2514,6 @@ void Avatar::formAbility()
|
||||||
seedName = "SeedUberVine";
|
seedName = "SeedUberVine";
|
||||||
|
|
||||||
dsq->game->fireShot(seedName, this, 0, pos, getAim());
|
dsq->game->fireShot(seedName, this, 0, pos, getAim());
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
Vector pos = getAim();
|
|
||||||
if (!pos.isZero())
|
|
||||||
pos.setLength2D(64);
|
|
||||||
pos += position;
|
|
||||||
|
|
||||||
|
|
||||||
//dsq->spawnParticleEffect("Fertilizer", pos);
|
|
||||||
|
|
||||||
Entity *e = 0;
|
|
||||||
std::string seedName;
|
|
||||||
if (chargeLevelAttained == 0)
|
|
||||||
seedName = "SeedFlower";
|
|
||||||
else if (chargeLevelAttained == 2)
|
|
||||||
seedName = "SeedUberVine";
|
|
||||||
|
|
||||||
e = dsq->game->createEntity(seedName, 0, pos, 0, false, "");
|
|
||||||
|
|
||||||
Vector add = pos - position;
|
|
||||||
add.setLength2D(800);
|
|
||||||
e->vel += add;
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
if (chargeLevelAttained == 0)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
else if (chargeLevelAttained == 1)
|
|
||||||
{
|
|
||||||
e->setState(STATE_CHARGE1);
|
|
||||||
}
|
|
||||||
else if (chargeLevelAttained == 2)
|
|
||||||
{
|
|
||||||
e->setState(STATE_CHARGE2);
|
|
||||||
}
|
|
||||||
|
|
||||||
e->update(0);
|
|
||||||
*/
|
|
||||||
// idle = charge 0
|
|
||||||
// attack = charge1
|
|
||||||
// something = charge2
|
|
||||||
/*
|
|
||||||
FOR_ENTITIES (i)
|
|
||||||
{
|
|
||||||
Entity *e = *i;
|
|
||||||
if (e && e->getEntityType() == ET_ENEMY && e->isDamageTarget(DT_AVATAR_NATURE))
|
|
||||||
{
|
|
||||||
if ((e->position - pos).isLength2DIn(128))
|
|
||||||
{
|
|
||||||
DamageData d;
|
|
||||||
d.damageType = DT_AVATAR_NATURE;
|
|
||||||
d.damage = 1;
|
|
||||||
d.attacker = this;
|
|
||||||
e->damage(d);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case FORM_BEAST:
|
case FORM_BEAST:
|
||||||
|
@ -2957,9 +2897,7 @@ void Avatar::formAbilityUpdate(float dt)
|
||||||
if (state.abilityDelay == 0)
|
if (state.abilityDelay == 0)
|
||||||
{
|
{
|
||||||
state.abilityDelay = bubbleRate;
|
state.abilityDelay = bubbleRate;
|
||||||
//state.abilityDelay -= bubbleRate;
|
|
||||||
// spawn bubble
|
// spawn bubble
|
||||||
//Entity *bubble = dsq->game->createEntity("FishFormBubble", 0, position, 0, false, "");
|
|
||||||
Vector dir = getAim();
|
Vector dir = getAim();
|
||||||
dir.normalize2D();
|
dir.normalize2D();
|
||||||
|
|
||||||
|
|
|
@ -2445,36 +2445,6 @@ void Entity::fillGrid()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
void Entity::assignUniqueID(bool temporary)
|
|
||||||
{
|
|
||||||
const int inc = temporary ? -1 : 1;
|
|
||||||
int id = inc;
|
|
||||||
while (1)
|
|
||||||
{
|
|
||||||
bool isFree = true;
|
|
||||||
FOR_ENTITIES(i)
|
|
||||||
{
|
|
||||||
Entity *e = *i;
|
|
||||||
if (e != this)
|
|
||||||
{
|
|
||||||
if (e->getID() == id)
|
|
||||||
{
|
|
||||||
isFree = false;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (isFree)
|
|
||||||
{
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
id += inc;
|
|
||||||
}
|
|
||||||
entityID = id;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
// caller must make sure that the ID is unused
|
// caller must make sure that the ID is unused
|
||||||
void Entity::setID(int id)
|
void Entity::setID(int id)
|
||||||
{
|
{
|
||||||
|
|
|
@ -241,7 +241,6 @@ public:
|
||||||
InterpolatedVector maxSpeedLerp;
|
InterpolatedVector maxSpeedLerp;
|
||||||
Hair *hair;
|
Hair *hair;
|
||||||
|
|
||||||
void assignUniqueID(bool temporary);
|
|
||||||
int entityID;
|
int entityID;
|
||||||
int getMaxSpeed();
|
int getMaxSpeed();
|
||||||
std::string deathSound;
|
std::string deathSound;
|
||||||
|
|
|
@ -760,20 +760,6 @@ bool Game::removeEntity(Entity *selected)
|
||||||
{
|
{
|
||||||
selected->setState(Entity::STATE_DEAD);
|
selected->setState(Entity::STATE_DEAD);
|
||||||
selected->safeKill();
|
selected->safeKill();
|
||||||
XMLElement *e = this->saveFile->FirstChildElement("Enemy");
|
|
||||||
while (e)
|
|
||||||
{
|
|
||||||
int x = atoi(e->Attribute("x"));
|
|
||||||
int y = atoi(e->Attribute("y"));
|
|
||||||
if (int(selected->startPos.x) == x && int(selected->startPos.y) == y)
|
|
||||||
{
|
|
||||||
this->saveFile->DeleteChild(e);
|
|
||||||
//delete e;
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
e = e->NextSiblingElement("Enemy");
|
|
||||||
}
|
|
||||||
|
|
||||||
for (size_t i = 0; i < entitySaveData.size(); i++)
|
for (size_t i = 0; i < entitySaveData.size(); i++)
|
||||||
{
|
{
|
||||||
|
|
|
@ -92,7 +92,6 @@ public:
|
||||||
std::vector <TileVector> grid;
|
std::vector <TileVector> grid;
|
||||||
int w,h;
|
int w,h;
|
||||||
float tu1, tu2, tv1, tv2;
|
float tu1, tu2, tv1, tv2;
|
||||||
void setGrid(Vector position);
|
|
||||||
bool cull;
|
bool cull;
|
||||||
float alpha;
|
float alpha;
|
||||||
size_t idx;
|
size_t idx;
|
||||||
|
@ -240,7 +239,6 @@ public:
|
||||||
|
|
||||||
Vector getWallNormal(Vector pos, int sampleArea = 5, int obs = -1);
|
Vector getWallNormal(Vector pos, int sampleArea = 5, int obs = -1);
|
||||||
|
|
||||||
void updateMiniMapHintPosition();
|
|
||||||
EntitySaveData *getEntitySaveDataForEntity(Entity *e);
|
EntitySaveData *getEntitySaveDataForEntity(Entity *e);
|
||||||
Entity *createEntityOnMap(const EntitySaveData& sav); // when loading from save (saved to map). Caller must postInit().
|
Entity *createEntityOnMap(const EntitySaveData& sav); // when loading from save (saved to map). Caller must postInit().
|
||||||
Entity *createEntityOnMap(const char *type, Vector pos); // when spawning in the editor (saved to map). Caller must postInit().
|
Entity *createEntityOnMap(const char *type, Vector pos); // when spawning in the editor (saved to map). Caller must postInit().
|
||||||
|
@ -360,7 +358,6 @@ public:
|
||||||
|
|
||||||
std::string getNoteName(int n, const std::string &pre="");
|
std::string getNoteName(int n, const std::string &pre="");
|
||||||
|
|
||||||
void selectEntityFromGroups();
|
|
||||||
InterpolatedVector cameraInterp;
|
InterpolatedVector cameraInterp;
|
||||||
|
|
||||||
float getWaterLevel();
|
float getWaterLevel();
|
||||||
|
|
|
@ -1022,39 +1022,6 @@ void SceneEditor::deleteSelected()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void SceneEditor::updateSaveFileEnemyPosition(Entity *ent)
|
|
||||||
{
|
|
||||||
XMLElement *exml = dsq->game->saveFile->FirstChildElement("Enemy");
|
|
||||||
while (exml)
|
|
||||||
{
|
|
||||||
int x = atoi(exml->Attribute("x"));
|
|
||||||
int y = atoi(exml->Attribute("y"));
|
|
||||||
if (ent->startPos.x == x && ent->startPos.y == y)
|
|
||||||
{
|
|
||||||
ent->startPos = Vector(int(ent->position.x), int(ent->position.y));
|
|
||||||
exml->SetAttribute("x", int(ent->startPos.x));
|
|
||||||
exml->SetAttribute("y", int(ent->startPos.y));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
exml = exml->NextSiblingElement("Enemy");
|
|
||||||
}
|
|
||||||
exml = dsq->game->saveFile->FirstChildElement("Entity");
|
|
||||||
while (exml)
|
|
||||||
{
|
|
||||||
int x = atoi(exml->Attribute("x"));
|
|
||||||
int y = atoi(exml->Attribute("y"));
|
|
||||||
if (ent->startPos.x == x && ent->startPos.y == y)
|
|
||||||
{
|
|
||||||
ent->startPos = Vector(int(ent->position.x), int(ent->position.y));
|
|
||||||
exml->SetAttribute("x", int(ent->startPos.x));
|
|
||||||
exml->SetAttribute("y", int(ent->startPos.y));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
exml = exml->NextSiblingElement("Entity");
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
void SceneEditor::checkForRebuild()
|
void SceneEditor::checkForRebuild()
|
||||||
{
|
{
|
||||||
if (editType == ET_ELEMENTS && state != ES_SELECTING && !selectedElements.empty())
|
if (editType == ET_ELEMENTS && state != ES_SELECTING && !selectedElements.empty())
|
||||||
|
@ -1454,20 +1421,6 @@ void SceneEditor::mouseButtonRight()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void SceneEditor::startMoveEntity()
|
|
||||||
{
|
|
||||||
movingEntity = dsq->game->getEntityAtCursor();
|
|
||||||
}
|
|
||||||
|
|
||||||
void SceneEditor::endMoveEntity()
|
|
||||||
{
|
|
||||||
if (movingEntity)
|
|
||||||
{
|
|
||||||
updateSaveFileEnemyPosition(movingEntity);
|
|
||||||
movingEntity = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void SceneEditor::up()
|
void SceneEditor::up()
|
||||||
{
|
{
|
||||||
if (editType == ET_ELEMENTS && state == ES_SELECTING)
|
if (editType == ET_ELEMENTS && state == ES_SELECTING)
|
||||||
|
@ -2578,8 +2531,6 @@ void SceneEditor::toggle(bool on)
|
||||||
for (int i = 0; i < 9; i++)
|
for (int i = 0; i < 9; i++)
|
||||||
dsq->getRenderObjectLayer(LR_ELEMENTS1+i)->visible = true;
|
dsq->getRenderObjectLayer(LR_ELEMENTS1+i)->visible = true;
|
||||||
|
|
||||||
if (movingEntity)
|
|
||||||
endMoveEntity();
|
|
||||||
movingEntity = 0;
|
movingEntity = 0;
|
||||||
|
|
||||||
dsq->getRenderObjectLayer(LR_BLACKGROUND)->update = false;
|
dsq->getRenderObjectLayer(LR_BLACKGROUND)->update = false;
|
||||||
|
|
|
@ -109,10 +109,6 @@ public:
|
||||||
|
|
||||||
void regenLevel();
|
void regenLevel();
|
||||||
|
|
||||||
void updateSaveFileEnemyPosition(Entity *ent);
|
|
||||||
void startMoveEntity();
|
|
||||||
void endMoveEntity();
|
|
||||||
|
|
||||||
void down();
|
void down();
|
||||||
void up();
|
void up();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue