From 0e8bf87a1deec0436c6fd62508838ec3875bcd88 Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Sun, 14 Sep 2008 16:06:49 +0000 Subject: Series: [15] Refs #53 --- series/trunk/includes/instadisc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'series/trunk') diff --git a/series/trunk/includes/instadisc.php b/series/trunk/includes/instadisc.php index be44bae..189cf96 100644 --- a/series/trunk/includes/instadisc.php +++ b/series/trunk/includes/instadisc.php @@ -79,7 +79,7 @@ function instaDisc_initSubscription($username, $subscriptionID, $subscriptionURL $getsub3 = mysql_fetch_array($getsub2); if ($getsub3['identity'] == $seriesID) { - if ($getsub3['username'] != $username) + if (!instaDisc_isAdmin($username) && ($getsub3['username'] != $username)) { return false; } -- cgit 1.4.1 s commit A game about lighting up a dark cave.
summary refs log tree commit diff stats
path: root/src/animation.h
blob: f1eddb6f9b0fdc56864953b82f00803dbb02528b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#ifndef ANIMATION_H_332518EB
#define ANIMATION_H_332518EB

#include <string>
#include <map>
#include <vector>
#include <string_view>
#include <SDL.h>
#include "direction.h"
#include "timer.h"

class Animation {
public:
  explicit Animation(std::string_view path);

  void setDirection(Direction dir);
  void setAnimation(std::string_view anim);

  const SDL_Rect& getRenderRect() const {
    return frames_.at(animations_.at(animationId_).at(animationFrame_));
  }

  Direction getDirection() const { return dir_; }

  void update(int dt);

private:

  void updateAnim();

  std::vector<SDL_Rect> frames_;
  std::vector<std::vector<int>> animations_;
  std::map<std::string, std::map<Direction, int>> nameDirToAnim_;
  Direction dir_ = Direction::down;
  std::string animationName_ = "still";
  int animationId_ = 0;
  int animationFrame_ = 0;
  Timer animTimer_ = {1000/5};
};

#endif /* end of include guard: ANIMATION_H_332518EB */