[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Stratagus-CVS] stratagus/src/video cursor.c
From: |
address@hidden |
Subject: |
[Stratagus-CVS] stratagus/src/video cursor.c |
Date: |
10 Jan 2004 07:23:26 +1100 |
CVSROOT: /home/strat
Module name: stratagus
Changes by: <address@hidden> 04/01/10 07:23:26
Modified files:
src/video : cursor.c
Log message:
Clean up
Patches:
Index: stratagus/src/video/cursor.c
diff -u stratagus/src/video/cursor.c:1.89 stratagus/src/video/cursor.c:1.90
--- stratagus/src/video/cursor.c:1.89 Sat Jan 3 11:33:41 2004
+++ stratagus/src/video/cursor.c Sat Jan 10 07:23:25 2004
@@ -27,7 +27,7 @@
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
// 02111-1307, USA.
//
-// $Id: cursor.c,v 1.89 2004/01/03 00:33:41 jsalmon3 Exp $
+// $Id: cursor.c,v 1.90 2004/01/09 20:23:25 jsalmon3 Exp $
//@{
@@ -163,11 +163,7 @@
local int OldCursorRectangleY; /// saved cursor
position on screen Y
local int OldCursorRectangleW; /// saved cursor width
in pixel
local int OldCursorRectangleH; /// saved cursor height
in pixel
-#ifdef USE_SDL_SURFACE
-local void* OldCursorRectangle; /// background
saved behind rectangle
-#else
local void* OldCursorRectangle; /// background
saved behind rectangle
-#endif
// Area which is already hidden, but needed for invalidate
// (HiddenCursorRectangleW != 0 denotes it's defined)
@@ -252,13 +248,8 @@
buf = alloca(strlen(file) + 9 + 1);
file = strcat(strcpy(buf,"graphics/"), file);
ShowLoadProgress("Cursor %s", file);
-#ifdef USE_SDL_SURFACE
Cursors[i].Sprite = LoadSprite(file,
Cursors[i].Width, Cursors[i].Height);
-#else
- Cursors[i].Sprite = LoadSprite(file,
- Cursors[i].Width, Cursors[i].Height);
-#endif
}
}
}
@@ -280,11 +271,7 @@
if (strcmp(cursortype->Ident, ident)) {
continue;
}
-#ifdef USE_SDL_SURFACE
if (!cursortype->Race || cursortype->Sprite) {
-#else
- if (!cursortype->Race || cursortype->Sprite) {
-#endif
return cursortype;
}
}
@@ -794,13 +781,8 @@
//
spritex = (x -= type->HotX);
spritey = (y -= type->HotY);
-#ifdef USE_SDL_SURFACE
- w = VideoGraphicWidth(type->Sprite);
- h = VideoGraphicHeight(type->Sprite);
-#else
w = VideoGraphicWidth(type->Sprite);
h = VideoGraphicHeight(type->Sprite);
-#endif
//Reserve enough memory for background of sprite (also for future calls)
#ifdef USE_SDL_SURFACE
@@ -826,11 +808,7 @@
OldCursorW = w, OldCursorH = h);
//Draw sprite (using its own clipping) FIXME: prevent clipping twice
-#ifdef USE_SDL_SURFACE
VideoDrawClip(type->Sprite, frame, spritex, spritey);
-#else
- VideoDrawClip(type->Sprite, frame, spritex, spritey);
-#endif
OldCursorInvalidate = 1;
}
@@ -1064,11 +1042,7 @@
last = ticks + GameCursor->FrameRate;
GameCursor->SpriteFrame++;
if ((GameCursor->SpriteFrame & 127) >=
-#ifdef USE_SDL_SURFACE
VideoGraphicFrames(GameCursor->Sprite)) {
-#else
- VideoGraphicFrames(GameCursor->Sprite)) {
-#endif
GameCursor->SpriteFrame = 0;
}
MustRedraw |= RedrawCursor;
@@ -1287,7 +1261,7 @@
int i;
CLprintf(file, "\n;;; -----------------------------------------\n");
- CLprintf(file, ";;; MODULE: cursors $Id: cursor.c,v 1.89 2004/01/03
00:33:41 jsalmon3 Exp $\n\n");
+ CLprintf(file, ";;; MODULE: cursors $Id: cursor.c,v 1.90 2004/01/09
20:23:25 jsalmon3 Exp $\n\n");
for (i = 0; Cursors[i].OType; ++i) {
CLprintf(file, "(define-cursor '%s '%s\n",