source: trunk/src/asset.cpp @ 111

Last change on this file since 111 was 111, checked in by sam, 11 years ago

The frame counter is now an asset object.

  • Property svn:keywords set to Id
File size: 707 bytes
Line 
1//
2// Deus Hax (working title)
3// Copyright (c) 2010 Sam Hocevar <sam@hocevar.net>
4//
5
6#if defined HAVE_CONFIG_H
7#   include "config.h"
8#endif
9
10#include <cstdlib>
11#include <cstdio>
12
13#include "asset.h"
14#include "ticker.h"
15
16/*
17 * Public Asset class
18 */
19
20Asset::Asset() :
21    next(0),
22    ref(0),
23    destroy(0)
24{
25    Ticker::Register(this);
26}
27
28Asset::~Asset()
29{
30#if !FINAL_RELEASE
31    if (!destroy)
32        fprintf(stderr, "ERROR: asset destructor called directly\n");
33#endif
34}
35
36Asset::Group Asset::GetGroup()
37{
38    return GROUP_DEFAULT;
39}
40
41void Asset::TickGame(float delta_time)
42{
43
44}
45
46void Asset::TickRender(float delta_time)
47{
48
49}
50
51void Asset::Ref()
52{
53    ref++;
54}
55
56int Asset::Unref()
57{
58    return --ref;
59}
60
Note: See TracBrowser for help on using the repository browser.