source: trunk/src/sample.cpp @ 251

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

Skeleton for sample entity and sampler manager classes.

  • Property svn:keywords set to Id
File size: 937 bytes
Line 
1//
2// Lol Engine
3//
4// Copyright: (c) 2010-2011 Sam Hocevar <sam@hocevar.net>
5//   This program is free software; you can redistribute it and/or
6//   modify it under the terms of the Do What The Fuck You Want To
7//   Public License, Version 2, as published by Sam Hocevar. See
8//   http://sam.zoy.org/projects/COPYING.WTFPL for more details.
9//
10
11#if defined HAVE_CONFIG_H
12#   include "config.h"
13#endif
14
15#include <cstdlib>
16#include <cmath>
17
18#include <SDL.h>
19
20#include "core.h"
21
22/*
23 * Sample implementation class
24 */
25
26class SampleData
27{
28    friend class Sample;
29
30private:
31    char *name;
32};
33
34/*
35 * Public Sample class
36 */
37
38Sample::Sample(char const *path)
39{
40    data = new SampleData();
41    data->name = strdup(path);
42}
43
44Sample::~Sample()
45{
46    free(data->name);
47    delete data;
48}
49
50void Sample::TickGame(float deltams)
51{
52    Entity::TickGame(deltams);
53}
54
55char const *Sample::GetName()
56{
57    return data->name;
58}
59
60void Sample::Play()
61{
62}
63
Note: See TracBrowser for help on using the repository browser.