Skip to content

Commit

Permalink
Marked overrided virtual functions as such
Browse files Browse the repository at this point in the history
  • Loading branch information
mmatyas committed Apr 2, 2024
1 parent 92ea5e6 commit bfffb1c
Show file tree
Hide file tree
Showing 74 changed files with 286 additions and 286 deletions.
18 changes: 9 additions & 9 deletions src/smw/objects/blocks/BounceBlock.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,17 @@ class B_BounceBlock : public IO_Block {
return BlockType::Bounce;
}

void update();
void draw();
void reset();
void update() override;
void draw() override;
void reset() override;

bool collide(CPlayer * player, short direction, bool useBehavior);
bool collide(IO_MovingObject * object, short direction);
bool collide(CPlayer * player, short direction, bool useBehavior) override;
bool collide(IO_MovingObject * object, short direction) override;

bool hittop(CPlayer * player, bool useBehavior);
bool hitbottom(CPlayer * player, bool useBehavior);
bool hittop(CPlayer * player, bool useBehavior) override;
bool hitbottom(CPlayer * player, bool useBehavior) override;

bool hittop(IO_MovingObject * object);
bool hittop(IO_MovingObject * object) override;

void triggerBehavior();
void triggerBehavior() override;
};
16 changes: 8 additions & 8 deletions src/smw/objects/blocks/BreakableBlock.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,17 @@ class B_BreakableBlock : public IO_Block {
return BlockType::Breakable;
}

void draw();
void update();
void draw() override;
void update() override;

bool hittop(CPlayer * player, bool useBehavior);
bool hitbottom(CPlayer * player, bool useBehavior);
bool hittop(CPlayer * player, bool useBehavior) override;
bool hitbottom(CPlayer * player, bool useBehavior) override;

bool hittop(IO_MovingObject * object);
bool hitright(IO_MovingObject * object);
bool hitleft(IO_MovingObject * object);
bool hittop(IO_MovingObject * object) override;
bool hitright(IO_MovingObject * object) override;
bool hitleft(IO_MovingObject * object) override;

void triggerBehavior();
void triggerBehavior() override;

private:
short iNumSprites;
Expand Down
6 changes: 3 additions & 3 deletions src/smw/objects/blocks/DonutBlock.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ class B_DonutBlock : public IO_Block {
return BlockType::Donut;
}

void draw();
void update();
void draw() override;
void update() override;

bool hittop(CPlayer * player, bool useBehavior);
bool hittop(CPlayer * player, bool useBehavior) override;

void triggerBehavior(short iPlayerId);

Expand Down
30 changes: 15 additions & 15 deletions src/smw/objects/blocks/FlipBlock.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,28 +11,28 @@ class B_FlipBlock : public IO_Block {
return BlockType::Flip;
}

void draw();
void update();
void reset();
void draw() override;
void update() override;
void reset() override;

bool collide(CPlayer * player, short direction, bool useBehavior);
bool collide(IO_MovingObject * object, short direction);
bool collide(CPlayer * player, short direction, bool useBehavior) override;
bool collide(IO_MovingObject * object, short direction) override;

bool isTransparent() {
bool isTransparent() override {
return state == 1;
}

bool hittop(CPlayer * player, bool useBehavior);
bool hitbottom(CPlayer * player, bool useBehavior);
bool hitright(CPlayer * player, bool useBehavior);
bool hitleft(CPlayer * player, bool useBehavior);
bool hittop(CPlayer * player, bool useBehavior) override;
bool hitbottom(CPlayer * player, bool useBehavior) override;
bool hitright(CPlayer * player, bool useBehavior) override;
bool hitleft(CPlayer * player, bool useBehavior) override;

bool hittop(IO_MovingObject * object);
bool hitbottom(IO_MovingObject * object);
bool hitright(IO_MovingObject * object);
bool hitleft(IO_MovingObject * object);
bool hittop(IO_MovingObject * object) override;
bool hitbottom(IO_MovingObject * object) override;
bool hitright(IO_MovingObject * object) override;
bool hitleft(IO_MovingObject * object) override;

void triggerBehavior();
void triggerBehavior() override;

private:
void explode();
Expand Down
20 changes: 10 additions & 10 deletions src/smw/objects/blocks/NoteBlock.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,19 @@ class B_NoteBlock : public IO_Block {
return BlockType::Note;
}

void draw();
void update();
void reset();
void draw() override;
void update() override;
void reset() override;

bool collide(CPlayer * player, short direction, bool useBehavior);
bool collide(IO_MovingObject * object, short direction);
bool collide(CPlayer * player, short direction, bool useBehavior) override;
bool collide(IO_MovingObject * object, short direction) override;

bool hittop(CPlayer * player, bool useBehavior);
bool hitbottom(CPlayer * player, bool useBehavior);
bool hitright(CPlayer * player, bool useBehavior);
bool hitleft(CPlayer * player, bool useBehavior);
bool hittop(CPlayer * player, bool useBehavior) override;
bool hitbottom(CPlayer * player, bool useBehavior) override;
bool hitright(CPlayer * player, bool useBehavior) override;
bool hitleft(CPlayer * player, bool useBehavior) override;

bool hittop(IO_MovingObject * object);
bool hittop(IO_MovingObject * object) override;

private:
short iNumSprites;
Expand Down
14 changes: 7 additions & 7 deletions src/smw/objects/blocks/OnOffSwitchBlock.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ class B_OnOffSwitchBlock : public IO_Block {
return BlockType::OnOffSwitch;
}

void update();
void draw();
void update() override;
void draw() override;

bool hittop(CPlayer * player, bool useBehavior);
bool hitbottom(CPlayer * player, bool useBehavior);
bool hittop(CPlayer * player, bool useBehavior) override;
bool hitbottom(CPlayer * player, bool useBehavior) override;

bool hittop(IO_MovingObject * object);
bool hitleft(IO_MovingObject * object);
bool hitright(IO_MovingObject * object);
bool hittop(IO_MovingObject * object) override;
bool hitleft(IO_MovingObject * object) override;
bool hitright(IO_MovingObject * object) override;

void FlipState() {
state = (state < 3 ? state + 3 : state - 3);
Expand Down
22 changes: 11 additions & 11 deletions src/smw/objects/blocks/PowerupBlock.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,21 @@ class B_PowerupBlock : public IO_Block {
return BlockType::Powerup;
}

void draw();
void update();
void reset();
void draw() override;
void update() override;
void reset() override;

bool collide(CPlayer* player, short direction, bool useBehavior);
bool collide(IO_MovingObject* object, short direction);
bool collide(CPlayer* player, short direction, bool useBehavior) override;
bool collide(IO_MovingObject* object, short direction) override;

bool hittop(CPlayer* player, bool useBehavior);
bool hitbottom(CPlayer* player, bool useBehavior);
bool hittop(CPlayer* player, bool useBehavior) override;
bool hitbottom(CPlayer* player, bool useBehavior) override;

bool hittop(IO_MovingObject* object);
bool hitright(IO_MovingObject* object);
bool hitleft(IO_MovingObject* object);
bool hittop(IO_MovingObject* object) override;
bool hitright(IO_MovingObject* object) override;
bool hitleft(IO_MovingObject* object) override;

void triggerBehavior();
void triggerBehavior() override;
virtual short SelectPowerup();

protected:
Expand Down
22 changes: 11 additions & 11 deletions src/smw/objects/blocks/SwitchBlock.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,22 @@ class B_SwitchBlock : public IO_Block {
return BlockType::OnOff;
}

void draw();
bool collide(CPlayer * player, short direction, bool useBehavior);
void draw() override;
bool collide(CPlayer * player, short direction, bool useBehavior) override;

bool isTransparent() {
bool isTransparent() override {
return state != 0;
}

bool hittop(CPlayer * player, bool useBehavior);
bool hitbottom(CPlayer * player, bool useBehavior);
bool hitright(CPlayer * player, bool useBehavior);
bool hitleft(CPlayer * player, bool useBehavior);
bool hittop(CPlayer * player, bool useBehavior) override;
bool hitbottom(CPlayer * player, bool useBehavior) override;
bool hitright(CPlayer * player, bool useBehavior) override;
bool hitleft(CPlayer * player, bool useBehavior) override;

bool hittop(IO_MovingObject * object);
bool hitbottom(IO_MovingObject * object);
bool hitright(IO_MovingObject * object);
bool hitleft(IO_MovingObject * object);
bool hittop(IO_MovingObject * object) override;
bool hitbottom(IO_MovingObject * object) override;
bool hitright(IO_MovingObject * object) override;
bool hitleft(IO_MovingObject * object) override;

void FlipState(short playerID);

Expand Down
12 changes: 6 additions & 6 deletions src/smw/objects/blocks/ThrowBlock.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ class B_ThrowBlock : public IO_Block {
return BlockType::Throw;
}

void draw();
void update();
void draw() override;
void update() override;

bool hittop(CPlayer * player, bool useBehavior);
bool hitright(CPlayer * player, bool useBehavior);
bool hitleft(CPlayer * player, bool useBehavior);
bool hittop(CPlayer * player, bool useBehavior) override;
bool hitright(CPlayer * player, bool useBehavior) override;
bool hitleft(CPlayer * player, bool useBehavior) override;

void GiveBlockToPlayer(CPlayer * player);
void triggerBehavior();
void triggerBehavior() override;

private:
short iNumSprites;
Expand Down
7 changes: 3 additions & 4 deletions src/smw/objects/blocks/ViewBlock.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,9 @@ class B_ViewBlock : public B_PowerupBlock {
return BlockType::View;
}

void draw();
void update();

short SelectPowerup();
void draw() override;
void update() override;
short SelectPowerup() override;

protected:
void GetNextPowerup();
Expand Down
24 changes: 12 additions & 12 deletions src/smw/objects/blocks/WeaponBreakableBlock.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,18 @@ class B_WeaponBreakableBlock : public IO_Block {
return BlockType::WeaponBreakable;
}

void draw();
void update();

bool hittop(CPlayer * player, bool useBehavior);
bool hitbottom(CPlayer * player, bool useBehavior);
bool hitleft(CPlayer * player, bool useBehavior);
bool hitright(CPlayer * player, bool useBehavior);

bool hittop(IO_MovingObject * object);
bool hitbottom(IO_MovingObject * object);
bool hitright(IO_MovingObject * object);
bool hitleft(IO_MovingObject * object);
void draw() override;
void update() override;

bool hittop(CPlayer * player, bool useBehavior) override;
bool hitbottom(CPlayer * player, bool useBehavior) override;
bool hitleft(CPlayer * player, bool useBehavior) override;
bool hitright(CPlayer * player, bool useBehavior) override;

bool hittop(IO_MovingObject * object) override;
bool hitbottom(IO_MovingObject * object) override;
bool hitright(IO_MovingObject * object) override;
bool hitleft(IO_MovingObject * object) override;

void triggerBehavior(short iPlayerID, short iTeamID);

Expand Down
8 changes: 4 additions & 4 deletions src/smw/objects/carriable/Bomb.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ class CO_Bomb : public MO_CarriedObject
CO_Bomb(gfxSprite *nspr, short x, short y, float fVelX, float fVelY, short aniSpeed, short iGlobalID, short iTeamID, short iColorID, short timetolive);
~CO_Bomb(){};

void update();
void draw();
bool collide(CPlayer * player);
void update() override;
void draw() override;
bool collide(CPlayer * player) override;

void place();

void Die();
void Die() override;

protected:

Expand Down
8 changes: 4 additions & 4 deletions src/smw/objects/carriable/Egg.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ class CO_Egg : public MO_CarriedObject
CO_Egg(gfxSprite *nspr, short iColor);
~CO_Egg(){};

void update();
void draw();
bool collide(CPlayer * player);
void update() override;
void draw() override;
bool collide(CPlayer * player) override;

void placeEgg();
void Drop();
void Drop() override;

short getColor() { return color; }

Expand Down
10 changes: 5 additions & 5 deletions src/smw/objects/carriable/Flag.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ class CO_Flag : public MO_CarriedObject
CO_Flag(gfxSprite *nspr, MO_FlagBase * base, short iTeamID, short iColorID);
~CO_Flag(){};

void update();
void draw();
bool collide(CPlayer * player);
void update() override;
void draw() override;
bool collide(CPlayer * player) override;

void MoveToOwner();
void MoveToOwner() override;

void placeFlag();
void Drop();
void Drop() override;

bool GetInBase() { return fInBase; }
short GetTeamID() { return teamID; }
Expand Down
6 changes: 3 additions & 3 deletions src/smw/objects/carriable/PhantoKey.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ class CO_PhantoKey : public MO_CarriedObject
CO_PhantoKey(gfxSprite *nspr);
~CO_PhantoKey(){};

void update();
void draw();
bool collide(CPlayer * player);
void update() override;
void draw() override;
bool collide(CPlayer * player) override;

void placeKey();

Expand Down
Loading

0 comments on commit bfffb1c

Please sign in to comment.