source: trunk/src/asset.h @ 100

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

Slightly improve the documentation in a few files, add the missing
joystick class, and put a header in each source file.

  • Property svn:keywords set to Id
File size: 734 bytes
Line 
1//
2// Deus Hax (working title)
3// Copyright (c) 2010 Sam Hocevar <sam@hocevar.net>
4//
5
6//
7// The Asset class
8// ---------------
9// Assets are objects that can be ticked by the game loop and/or the render
10// loop. Assets are implemented as one or several linked lists. See the
11// Ticker class for the ticking logic and the linked list implementation.
12//
13
14#if !defined __DH_ASSET_H__
15#define __DH_ASSET_H__
16
17#include <stdint.h>
18
19class Asset
20{
21    friend class Ticker;
22
23public:
24    Asset();
25    virtual ~Asset();
26
27    virtual void TickGame(float delta_time);
28    virtual void TickRender(float delta_time);
29
30    virtual void Ref();
31    virtual int Unref();
32
33protected:
34    Asset *next;
35    int ref, destroy;
36};
37
38#endif // __DH_ASSET_H__
39
Note: See TracBrowser for help on using the repository browser.