1 | /* |
---|
2 | orxonox - the future of 3D-vertical-scrollers |
---|
3 | |
---|
4 | Copyright (C) 2004 orx |
---|
5 | |
---|
6 | This program is free software; you can redistribute it and/or modify |
---|
7 | it under the terms of the GNU General Public License as published by |
---|
8 | the Free Software Foundation; either version 2, or (at your option) |
---|
9 | any later version. |
---|
10 | |
---|
11 | ### File Specific: |
---|
12 | main-programmer: Benjamin Grauer |
---|
13 | co-programmer: ... |
---|
14 | */ |
---|
15 | |
---|
16 | #define DEBUG_SPECIAL_MODULE DEBUG_MODULE_IMPORTER |
---|
17 | |
---|
18 | #include "texture_sequence.h" |
---|
19 | |
---|
20 | #include "debug.h" |
---|
21 | #include "graphics_engine.h" |
---|
22 | |
---|
23 | #include <stdarg.h> |
---|
24 | |
---|
25 | #ifdef HAVE_SDL_IMAGE_H |
---|
26 | #include <SDL_image.h> |
---|
27 | #else |
---|
28 | #include <SDL/SDL_image.h> |
---|
29 | #endif |
---|
30 | |
---|
31 | /** |
---|
32 | * Constructor for a Texture |
---|
33 | */ |
---|
34 | TextureSequence::TextureSequence(unsigned int count, ...) |
---|
35 | { |
---|
36 | this->setClassID(CL_TEXTURE_SEQUENCE, "TextureSequence"); |
---|
37 | |
---|
38 | va_list textureNameList; |
---|
39 | va_start(textureNameList, count); |
---|
40 | |
---|
41 | this->loadImageSeries(count, textureNameList); |
---|
42 | } |
---|
43 | |
---|
44 | /** |
---|
45 | * Destructor of a TextureSequence |
---|
46 | |
---|
47 | Frees Data, and deletes the textures from GL |
---|
48 | */ |
---|
49 | TextureSequence::~TextureSequence() |
---|
50 | { |
---|
51 | } |
---|
52 | |
---|
53 | |
---|
54 | /** |
---|
55 | * rebuilds all the textures from the Images stored in this FrameSequence |
---|
56 | */ |
---|
57 | bool TextureSequence::rebuild() |
---|
58 | { |
---|
59 | // if (this->texture != 0 && glIsTextureSequence(this->texture)) |
---|
60 | // { |
---|
61 | // glDeleteTextureSequences(1,&this->texture); |
---|
62 | // this->texture = 0; |
---|
63 | // } |
---|
64 | // |
---|
65 | // if (this->image != NULL) |
---|
66 | // { |
---|
67 | // PRINTF(3)("Reloading TextureSequence of %s '%s'\n", this->getClassName(), this->getName()); |
---|
68 | // this->texture = loadTexToGL(this->image); |
---|
69 | // } |
---|
70 | |
---|
71 | } |
---|
72 | |
---|
73 | |
---|
74 | |
---|
75 | bool TextureSequence::loadImageSeries(unsigned int count, ...) |
---|
76 | { |
---|
77 | va_list textureNameList; |
---|
78 | va_start(textureNameList, count); |
---|
79 | |
---|
80 | this->loadImageSeries(count, textureNameList); |
---|
81 | } |
---|
82 | |
---|
83 | bool TextureSequence::loadImageSeries(unsigned int count, va_list textures) |
---|
84 | { |
---|
85 | |
---|
86 | |
---|
87 | } |
---|
88 | |
---|
89 | |
---|
90 | bool TextureSequence::addFrame(const char* imageName) |
---|
91 | { |
---|
92 | |
---|
93 | |
---|
94 | } |
---|
95 | |
---|
96 | |
---|
97 | bool TextureSequence::addFrame(SDL_Surface* surface) |
---|
98 | { |
---|
99 | |
---|
100 | |
---|
101 | } |
---|
102 | |
---|
103 | |
---|