UFO: Alien Invasion
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
ui_sprite.h
Go to the documentation of this file.
1 
5 /*
6 Copyright (C) 2002-2020 UFO: Alien Invasion.
7 
8 This program is free software; you can redistribute it and/or
9 modify it under the terms of the GNU General Public License
10 as published by the Free Software Foundation; either version 2
11 of the License, or (at your option) any later version.
12 
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
16 
17 See the GNU General Public License for more details.
18 
19 You should have received a copy of the GNU General Public License
20 along with this program; if not, write to the Free Software
21 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22 
23 */
24 
25 #pragma once
26 
27 #define UI_MAX_SPRITES 512
28 
39 };
40 
41 struct uiSprite_t {
42  char name[MAX_VAR];
44  bool single;
45  bool blend;
46  bool pack64;
50  int border;
51 
55 };
56 
57 extern const value_t ui_spriteProperties[];
58 
59 uiSprite_t* UI_GetSpriteByName(const char* name);
60 uiSprite_t* UI_AllocStaticSprite(const char* name) __attribute__ ((warn_unused_result));
61 void UI_DrawSpriteInBox(bool flip, const uiSprite_t* icon, uiSpriteStatus_t status, int posX, int posY, int sizeX, int sizeY);
vec2_t size
Definition: ui_sprite.h:43
int border
Definition: ui_sprite.h:50
#define __attribute__(x)
Definition: cxx.h:37
bool tiled_17_1_3
Definition: ui_sprite.h:47
#define MAX_VAR
Definition: shared.h:36
bool single
Definition: ui_sprite.h:44
bool tiled_25_1_3
Definition: ui_sprite.h:48
uiSprite_t * UI_AllocStaticSprite(const char *name) __attribute__((warn_unused_result))
Allocate an sprite to the UI static memory.
Definition: ui_sprite.cpp:130
char * image[SPRITE_STATUS_MAX]
Definition: ui_sprite.h:53
void UI_DrawSpriteInBox(bool flip, const uiSprite_t *icon, uiSpriteStatus_t status, int posX, int posY, int sizeX, int sizeY)
Definition: ui_sprite.cpp:187
const value_t ui_spriteProperties[]
Definition: ui_sprite.cpp:31
QGL_EXTERN GLuint GLsizei GLsizei GLint GLenum GLchar * name
Definition: r_gl.h:110
vec4_t color[SPRITE_STATUS_MAX]
Definition: ui_sprite.h:52
uiSpriteStatus_t
Definition: ui_sprite.h:32
char name[MAX_VAR]
Definition: ui_sprite.h:42
vec_t vec2_t[2]
Definition: ufotypes.h:38
vec2_t pos[SPRITE_STATUS_MAX]
Definition: ui_sprite.h:54
bool blend
Definition: ui_sprite.h:45
bool pack64
Definition: ui_sprite.h:46
uiSprite_t * UI_GetSpriteByName(const char *name)
Return an sprite by is name.
Definition: ui_sprite.cpp:115
bool tiled_popup
Definition: ui_sprite.h:49
vec_t vec4_t[4]
Definition: ufotypes.h:40