My Project: openb3dlib.mod/openb3d/src/sprite.h Source File

My Project

sprite.h
Go to the documentation of this file.
1 /*
2 * sprite.h
3 * iminib3d
4 *
5 * Created by Simon Harrison.
6 * Copyright Si Design. All rights reserved.
7 *
8 */
9
10 #ifndef SPRITE_H
11 #define SPRITE_H
12
13 #include "mesh.h"
14
15 #include <iostream>
16 using namespace std;
17
18 class Sprite : public Mesh{
19
20 public:
21
22 float angle;
23 float scale_x,scale_y;
24 float handle_x,handle_y;
25 int view_mode;
26 int render_mode;
27
28 Sprite* CopyEntity(Entity* parent_ent=NULL);
29 static Sprite* CreateSprite(Entity* parent_ent=NULL);
30 static Sprite* LoadSprite(string tex_file,int tex_flag=1,Entity* parent_ent=NULL);
31 void RotateSprite(float ang);
32 void ScaleSprite(float s_x,float s_y);
33 void HandleSprite(float h_x,float h_y);
34 void SpriteViewMode(int mode);
35 void SpriteRenderMode(int mode);
36 void SpriteTexCoords(int cell_x,int cell_y,int cell_w,int cell_h,int tex_w,int tex_h,int uv_set=0);
37 void SpriteVertexColor(int v,float r,float g,float b);
38
39 Sprite(){
40
41 angle=0.0;
42 scale_x=scale_y=1.0;
43 handle_x=handle_y=0.0;
44 view_mode=1;
45 render_mode=1;
46
47 }
48
49 void FreeEntity(void);
50
51 };
52
53 #endif
ScaleSprite
void ScaleSprite(Sprite *sprite, float s_x, float s_y)
Definition: functions.cpp:1367
Mesh
Definition: mesh.h:34
SpriteViewMode
void SpriteViewMode(Sprite *sprite, int mode)
Definition: functions.cpp:1432
RotateSprite
void RotateSprite(Sprite *sprite, float ang)
Definition: functions.cpp:1339
CopyEntity
Entity * CopyEntity(Entity *ent, Entity *parent)
Definition: functions.cpp:421
mesh.h
CreateSprite
Sprite * CreateSprite(Entity *parent)
Definition: functions.cpp:555
std
Sprite::Sprite
Sprite()
Definition: sprite.h:39
HandleSprite
void HandleSprite(Sprite *sprite, float h_x, float h_y)
Definition: functions.cpp:977
SpriteTexCoords
void SpriteTexCoords(Sprite *obj, int cell_x, int cell_y, int cell_w, int cell_h, int tex_w, int tex_h, int uv_set)
Definition: methods.cpp:374
FreeEntity
void FreeEntity(Entity *ent)
Definition: functions.cpp:882
Sprite
Definition: sprite.h:18
SpriteRenderMode
void SpriteRenderMode(Sprite *sprite, int mode)
Definition: functions.cpp:1425
Entity
Definition: entity.h:27
LoadSprite
Sprite * LoadSprite(char *tex_file, int tex_flag, Entity *parent)
Definition: functions.cpp:1072
Sprite::render_mode
int render_mode
Definition: sprite.h:26
Sprite::angle
float angle
Definition: sprite.h:22
Sprite::handle_y
float handle_y
Definition: sprite.h:24
Sprite::view_mode
int view_mode
Definition: sprite.h:25
Sprite::scale_y
float scale_y
Definition: sprite.h:23
SpriteVertexColor
void SpriteVertexColor(Sprite *obj, int v, float r, float g, float b)
Definition: methods.cpp:378
NULL
#define NULL
Definition: tree.cpp:4