1
0
Fork 0
mirror of https://github.com/AquariaOSE/Aquaria.git synced 2024-12-25 22:25:46 +00:00

clean out some dead code and some old commented out code

This commit is contained in:
fgenesis 2012-12-19 06:23:51 +01:00
parent b6ae2a6baa
commit 9eb5b9828a
9 changed files with 24 additions and 2099 deletions

File diff suppressed because it is too large Load diff

View file

@ -22,7 +22,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#define AVATAR_H
#include "../BBGE/Particles.h"
#include "../BBGE/BitmapFont.h"
#include "DSQ.h"
#include "Hair.h"
@ -30,9 +29,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "Web.h"
class SpringPlant;
//class Item;
class TileVector;
class SongIcon;
@ -106,20 +102,10 @@ protected:
void onUpdate(float dt);
};
class FormIcon : public Quad
{
public:
FormIcon();
protected:
bool cursorIsIn;
void onUpdate(float dt);
};
class AvatarState
{
public:
AvatarState();
Timer dodgeEffectTimer;
Timer blindTimer;
float abilityDelay;
bool blind;
@ -131,7 +117,6 @@ public:
float spellCharge;
bool lockedToWall;
float leachTimer;
bool crawlingOnWall;
bool nearWall;
float swimTimer, rollTimer;
float updateLookAtTime;
@ -151,20 +136,13 @@ public:
void destroy();
void action(int actionID, int state);
AvatarState state;
void setIgnoreInputDelay(float delay)
{
ignoreInputDelay = delay;
}
float burst, burstTimer;
float burstDelay;
bool bursting;
BurstType lastBurstType;
//void damage(int amount);
bool isCharging();
void slowToRest();
void debugMsg(const std::string &msg);
void setBlind(float time);
void onBlindTest();
void revive();
@ -182,10 +160,8 @@ public:
Entity *entityToActivate;
Path *pathToActivate;
Entity *lastEntityActivation;
void shift();
void applyWorldEffects(WorldType type);
Vector extraVel;
void toggleMovement(bool on);
@ -220,16 +196,11 @@ public:
void changeForm(FormType form, bool effects=true, bool onInit=false, FormType lastForm=FORM_NONE);
void singNote(int note);
std::vector<SongIcon*> songIcons;
std::vector<FormIcon*> formIcons;
//std::vector<int> currentsong;
Song currentSong;
int currentSongIdx;
Entity *pullTarget;
bool pickingPullTarget;
void openPullTargetInterface();
void closePullTargetInterface();
void setNearestPullTarget();
void formAbility(int ability);
@ -243,16 +214,11 @@ public:
bool canDie;
bool warpIn;
Vector warpInLocal;
float biteDelay, urchinDelay, jellyDelay;
bool movingOn;
int ropeState;
float ropeTimer;
Vector ropePos, ropeVel;
void fireRope();
void render();
void activateAura(AuraType aura);
void stopAura();
@ -264,7 +230,6 @@ public:
void updateFormVisualEffects(float dt);
bool isSinging();
bool isLockable();
float stopTimer;
int getCursorQuadrant();
void onWarp();
int getBurstDistance();
@ -275,16 +240,12 @@ public:
int rollDir;
std::string getBurstAnimName();
std::string getRollAnimName();
void startWallCrawl();
void stopWallCrawl();
void updateDualFormChargeEffects();
TileVector wallLockTile;
Vector wallNormal, lastWallNormal;
Vector wallNormal;
void openFormInterface();
void closeFormInterface();
void fallOffWall();
float fireDelay;
@ -293,8 +254,6 @@ public:
AuraType activeAura;
float auraTimer;
bool fireAtNearestValidEntity(const std::string &shot);
EatType inTummy;
float tummyTimer;
void checkNearWall();
Vector getAim();
@ -306,7 +265,6 @@ public:
void updatePosition();
float quickSongCastDelay;
void onAnimationKeyPassed(int key);
int tummyAmount;
bool isSwimming();
@ -369,23 +327,17 @@ protected:
int curWebPoint;
void checkUpgradeForShot(Shot *s);
int getNumShots();
void updateCursorFromKeyboard();
void lockToWallCommon();
void onSetBoneLock();
void onUpdateBoneLock();
InterpolatedVector cursorPos;
void adjustHeadRot();
std::string lastHeadTexture;
void updateDualFormGlow(float dt);
Vector getTendrilAimVector(int i, int max);
void applyRidingPosition();
Vector lastWallJumpPos, lastWallJumpDir;
void stopWallJump();
void updateWallJump(float dt);
int wallJumps;
float wallBurstTimer;
float targetUpdateDelay;
std::vector<Target> targets;
@ -410,7 +362,6 @@ protected:
int shieldPoints;
bool inFormInterface;
void onIdle();
void onHeal(int type);
ParticleEffect biteLeftEmitter, biteRightEmitter, swimEmitter, auraHitEmitter;
@ -419,7 +370,6 @@ protected:
ParticleEffect *leftHandEmitter, *rightHandEmitter;
ParticleEffect *chargingEmitter, *chargeEmitter;
void updateCursor(float dt);
float canWarpDelay;
bool rolling;
int rollDidOne;
@ -427,19 +377,12 @@ protected:
void stopRoll();
int getQuadrantDirection(int lastQuad, int quad);
void updateRoll(float dt);
void updateTummy(float dt);
int lastQuad, lastQuadDir;
void onDamage(DamageData &d);
void updateHair(float dt);
void lostTarget(int i, Entity *e);
float doubleClickDelay;
float damageDelay;
bool didShockDamage;
void updateShock(float dt);
float shockTimer;
Vector shieldPosition;
void updateAura(float dt);
@ -455,15 +398,12 @@ protected:
void clampVelocity();
bool canCharge(int ability);
int abilityCharging;
void formAbilityUpdate(float dt);
Entity *potentialPullTarget;
float revertTimer;
void endCharge();
Entity *activateEntity;
bool canMove;
float castShockTimer;
void onEnterState(int action);
void onExitState(int action);
@ -472,28 +412,17 @@ protected:
void applyBlindEffects();
void removeBlindEffects();
//bool blind;
bool animatedBurst;
float zoomVel;
// implement "bobbing" in a lower class
int getBeamWidth();
Vector getWallNormal(TileVector t);
void onToggleDebugMessages();
float spellCastDelay;
float spellChargeMin;
bool checkWarpAreas();
void checkSpecial();
void toggleZoom();
float ignoreInputDelay;
float idleAnimDelay;
float splashDelay;
//Hair *hair;
BitmapText *text;
//Item *currentItem;
void onUpdate(float dt);
void onRender();
@ -503,26 +432,19 @@ protected:
Quad *glow;
bool swimming;
void doRangePush(float dt);
void doRangePull(float dt);
void lmbd();
void lmbu();
void rmbd();
void rmbd2();
void rmbu();
bool charging;
Vector lastPush;
float pushingOffWallEffect;
float lockToWallFallTimer;
Vector dodgeVec;
Vector wallPushVec, wallTurnVec;
Vector lastLockToWallPos;

View file

@ -198,8 +198,6 @@ DSQ::DSQ(std::string fileSystem) : Core(fileSystem, LR_MAX, APPNAME, PARTICLE_AM
menuSelectDelay = 0;
modSelectorScr = 0;
blackout = 0;
useMic = false;
autoSingMenuOpen = false;
inputMode = INPUT_MOUSE;
overlay = 0;
recentSaveSlot = -1;
@ -4492,7 +4490,7 @@ void DSQ::onUpdate(float dt)
dsq->setInputMode(INPUT_MOUSE);
}
if (isDeveloperKeys())
/*if (isDeveloperKeys())
{
if (core->getCtrlState())
{
@ -4505,7 +4503,7 @@ void DSQ::onUpdate(float dt)
if (core->getKeyState(KEY_DOWN))
core->adjustWindowPosition(0, 5);
}
}
}*/
if (isDeveloperKeys() && cmDebug && cmDebug->alpha == 1 && fpsText)
{
@ -4534,8 +4532,7 @@ void DSQ::onUpdate(float dt)
os << "maxSpeed: " << dsq->game->avatar->currentMaxSpeed << " - ";
os << "lockedToWall: " << dsq->game->avatar->state.lockedToWall;
os << std::endl;
os << "crwlng: " << avatar->state.crawlingOnWall;
os << " swmng: " << avatar->isSwimming();
os << "swmng: " << avatar->isSwimming();
os << " dualFormCharge: " << continuity.dualFormCharge;
os << std::endl;
os << "vel(" << avatar->vel.x << ", " << avatar->vel.y << ") ";
@ -4546,7 +4543,6 @@ void DSQ::onUpdate(float dt)
os << "inp: " << avatar->isInputEnabled() << std::endl;
os << "wallNormal(" << avatar->wallNormal.x << ", " << avatar->wallNormal.y << ")" << std::endl;
os << "burst: " << avatar->burst << " burstTimer: " << avatar->burstTimer << std::endl;
os << "inTummy: " << avatar->inTummy << " tummyAmount: " << avatar->tummyAmount << std::endl;
os << "inCurrent: " << avatar->isInCurrent() << std::endl;
os << "qsongCastDelay: " << avatar->quickSongCastDelay << std::endl;
os << "singing: " << dsq->game->avatar->singing << " blockSinging: " << dsq->game->avatar->isBlockSinging();

View file

@ -1452,7 +1452,6 @@ public:
void rumble(float leftMotor, float rightMotor, float time);
void vision(std::string folder, int num, bool ignoreMusic = false);
bool useMic, autoSingMenuOpen;
void watch(float t, int canQuit = 0);
std::string lastVoiceFile;

View file

@ -551,39 +551,6 @@ void Entity::flipToTarget(Vector pos)
}
}
bool Entity::isCollideAgainst(Entity *e)
{
if (this == e) return false;
if (getEntityType()==ET_PET || getEntityType()==ET_AVATAR || getEntityType() == ET_NEUTRAL)
{
if (e->getEntityType()==ET_ENEMY || e->getEntityType()==ET_NEUTRAL)
{
return true;
}
}
if (getEntityType() == ET_ENEMY)
{
if (e->getEntityType()==ET_PET || e->getEntityType()==ET_AVATAR || e->getEntityType()==ET_NEUTRAL)
return true;
}
return false;
}
bool Entity::isOpposedTo(Entity *e)
{
if (getEntityType()==ET_PET || getEntityType()==ET_AVATAR || getEntityType() == ET_NEUTRAL)
{
if (e->getEntityType()==ET_ENEMY || e->getEntityType()==ET_NEUTRAL)
return true;
}
if (getEntityType() == ET_ENEMY)
{
if (e->getEntityType()==ET_PET || e->getEntityType()==ET_AVATAR)
return true;
}
return false;
}
Entity* Entity::getTargetEntity(int t)
{
return targets[t];

View file

@ -341,8 +341,6 @@ public:
void setEntityType(EntityType et);
EntityType getEntityType();
bool isOpposedTo(Entity *e);
bool isCollideAgainst(Entity *e);
void flipToTarget(Vector pos);
bool isFollowingPath();
void stopFollowingPath();

View file

@ -4138,8 +4138,7 @@ void Game::toggleOverrideZoom(bool on)
if (!on && avatar->zoomOverriden == true)
{
dsq->globalScale.stop();
dsq->game->avatar->myZoom = dsq->globalScale;
//dsq->game->avatar->myZoom.interpolateTo(Vector(1,1), 1.0);
avatar->myZoom = dsq->globalScale;
}
avatar->zoomOverriden = on;
}
@ -8400,8 +8399,6 @@ void Game::preLocalWarp(LocalWarpType localWarpType)
{
dsq->game->avatar->warpInLocal = Vector(0,0,0);
}
dsq->game->avatar->warpIn = !dsq->game->avatar->warpIn;
dsq->screenTransition->capture();
core->resetTimer();

View file

@ -1778,7 +1778,6 @@ void Core::onUpdate(float dt)
//script.update(dt);
cameraPos.update(dt);
cameraRot.update(dt);
globalScale.update(dt);
if (afterEffectManager)
@ -3162,10 +3161,8 @@ void Core::clearBuffers()
void Core::setupRenderPositionAndScale()
{
#ifdef BBGE_BUILD_OPENGL
//glRotatef(cameraRot.z, 0, 0, 1);
glScalef(globalScale.x*globalResolutionScale.x*screenCapScale.x, globalScale.y*globalResolutionScale.y*screenCapScale.y, globalScale.z*globalResolutionScale.z);
glTranslatef(-(cameraPos.x+cameraOffset.x), -(cameraPos.y+cameraOffset.y), -(cameraPos.z+cameraOffset.z));
//glRotatef(180, 0, 1, 0);
#endif
}

View file

@ -1133,7 +1133,7 @@ public:
virtual void onPlayedVoice(const std::string &name){}
InterpolatedVector cameraPos, cameraRot;
InterpolatedVector cameraPos;
int fps;
bool loopDone;