source: trunk/src/entity.cpp @ 2815

Last change on this file since 2815 was 2815, checked in by lolbot, 8 years ago

fixed 542 files out of 2754:

  • removed 0 CR characters
  • removed 0 trailing whitespaces
  • replaced 0 tabs with spaces
  • fixed 542 svn:eol-style properties
  • Property svn:eol-style set to CR
  • Property svn:keywords set to Id
File size: 1.6 KB
RevLine 
[2815]1// // Lol Engine // // Copyright: (c) 2010-2013 Sam Hocevar <sam@hocevar.net> //   This program is free software; you can redistribute it and/or //   modify it under the terms of the Do What The Fuck You Want To //   Public License, Version 2, as published by Sam Hocevar. See //   http://www.wtfpl.net/ for more details. // #if defined HAVE_CONFIG_H #   include "config.h" #endif #include <cstdlib> #include "core.h" namespace lol { /*  * Public Entity class  */ Entity::Entity() :     m_gamenext(0),     m_drawnext(0),     m_ref(0),     m_destroy(0) { #if !LOL_BUILD_RELEASE     m_tickstate = STATE_IDLE; #endif     m_gamegroup = GAMEGROUP_DEFAULT;     m_drawgroup = DRAWGROUP_DEFAULT;     Ticker::Register(this); } Entity::~Entity() { #if !LOL_BUILD_RELEASE     if (!m_destroy)         Log::Error("entity destructor called directly\n"); #endif } char const *Entity::GetName() {     return "<entity>"; } void Entity::TickGame(float seconds) {     UNUSED(seconds); #if !LOL_BUILD_RELEASE     if (m_tickstate != STATE_PRETICK_GAME)         Log::Error("invalid entity game tick\n");     m_tickstate = STATE_POSTTICK_GAME; #endif } void Entity::TickDraw(float seconds) {     (void)seconds; #if !LOL_BUILD_RELEASE     if (m_tickstate != STATE_PRETICK_DRAW)         Log::Error("invalid entity draw tick\n");     m_tickstate = STATE_POSTTICK_DRAW; #endif } void Entity::SetState(uint32_t state) {     Ticker::SetState(this, state); } void Entity::SetStateWhenMatch(uint32_t state,                                Entity *other_entity, uint32_t other_state) {     Ticker::SetStateWhenMatch(this, state, other_entity, other_state); } } /* namespace lol */
Note: See TracBrowser for help on using the repository browser.