[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Stratagus-CVS] stratagus/src/include cursor.h video.h
From: |
address@hidden |
Subject: |
[Stratagus-CVS] stratagus/src/include cursor.h video.h |
Date: |
15 Jan 2004 10:49:51 +1100 |
CVSROOT: /home/strat
Module name: stratagus
Changes by: <address@hidden> 04/01/15 10:49:51
Modified files:
src/include : cursor.h video.h
Log message:
USE_OPENGL fixes
Patches:
Index: stratagus/src/include/cursor.h
diff -u stratagus/src/include/cursor.h:1.39 stratagus/src/include/cursor.h:1.40
--- stratagus/src/include/cursor.h:1.39 Mon Dec 22 12:17:01 2003
+++ stratagus/src/include/cursor.h Thu Jan 15 10:49:50 2004
@@ -26,7 +26,7 @@
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
// 02111-1307, USA.
//
-// $Id: cursor.h,v 1.39 2003/12/22 01:17:01 wizzard Exp $
+// $Id: cursor.h,v 1.40 2004/01/14 23:49:50 jsalmon3 Exp $
#ifndef __CURSOR_H__
#define __CURSOR_H__
@@ -210,8 +210,13 @@
/// Save/load rectangle region from/to screen
/// Note: this is made extern for minimap only
#ifdef USE_SDL_SURFACE
+#ifndef USE_OPENGL
extern void SaveCursorRectangle(void *buffer, int x, int y, int w, int h);
extern void LoadCursorRectangle(void *buffer, int x, int y, int w, int h);
+#else
+#define SaveCursorRectangle(buffer, x, y, w, h)
+#define LoadCursorRectangle(buffer, x, y, w, h)
+#endif
#else
extern void (*SaveCursorRectangle)(void *buffer, int x, int y, int w, int h);
extern void (*LoadCursorRectangle)(void *buffer, int x, int y, int w, int h);
Index: stratagus/src/include/video.h
diff -u stratagus/src/include/video.h:1.112 stratagus/src/include/video.h:1.113
--- stratagus/src/include/video.h:1.112 Thu Jan 15 09:22:42 2004
+++ stratagus/src/include/video.h Thu Jan 15 10:49:50 2004
@@ -26,7 +26,7 @@
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
// 02111-1307, USA.
//
-// $Id: video.h,v 1.112 2004/01/14 22:22:42 wizzard Exp $
+// $Id: video.h,v 1.113 2004/01/14 23:49:50 jsalmon3 Exp $
#ifndef __VIDEO_H__
#define __VIDEO_H__
@@ -37,6 +37,14 @@
#include "SDL.h"
+#ifdef USE_OPENGL
+#define DrawIcon WinDrawIcon
+#define EndMenu WinEndMenu
+#include "SDL_opengl.h"
+#undef EndMenu
+#undef DrawIcon
+#endif
+
typedef struct _graphic_
{
SDL_Surface *Surface;
@@ -44,6 +52,14 @@
int Width;
int Height;
int NumFrames;
+#ifdef USE_OPENGL
+ int GraphicWidth; /// Original graphic width
+ int GraphicHeight; /// Original graphic height
+ GLfloat TextureWidth; /// Width of the texture
+ GLfloat TextureHeight; /// Height of the texture
+ int NumTextureNames; /// Number of textures
+ GLuint* TextureNames; /// Texture names
+#endif
} Graphic;
typedef struct _unit_colors_
@@ -200,6 +216,14 @@
/// Load graphic from PNG file
extern Graphic* LoadGraphicPNG(const char* name);
+
+#ifdef USE_OPENGL
+ /// Make an OpenGL texture
+extern void MakeTexture(Graphic* graphic, int width, int height);
+ /// Make an OpenGL texture of the player color pixels only.
+extern void MakePlayerColorTexture(Graphic** g, Graphic* graphic, int frame,
+ unsigned char* map, int maplen);
+#endif
/// Load graphic
extern Graphic* LoadGraphic(const char* file);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Stratagus-CVS] stratagus/src/include cursor.h video.h,
address@hidden <=