The Battle for Wesnoth  1.15.2+dev
animated.cpp
Go to the documentation of this file.
1 /*
2  Copyright (C) 2007 - 2018 by Jeremy Rosen <jeremy.rosen@enst-bretagne.fr>
3  Part of the Battle for Wesnoth Project https://www.wesnoth.org/
4 
5  This program is free software; you can redistribute it and/or modify
6  it under the terms of the GNU General Public License as published by
7  the Free Software Foundation; either version 2 of the License, or
8  (at your option) any later version.
9  This program is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY.
11 
12  See the COPYING file for more details.
13 */
14 
15 /**
16  * @file
17  * Template instantiations for wesnoth-game.
18  */
19 
20 #include "animated.hpp"
21 
22 #include <SDL2/SDL_timer.h>
23 
24 // Put these here to ensure that there's only
25 // one instance of the current_ticks variable
26 namespace {
27  int current_ticks = 0;
28 }
29 
31 {
32  current_ticks = SDL_GetTicks();
33 }
34 
36 {
37  return current_ticks;
38 }
int get_current_animation_tick()
Definition: animated.cpp:35
void new_animation_frame()
Definition: animated.cpp:30
Animate units.