]> de.git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
no longer needs ui/mousepointer.lmp
authorlordhavoc <lordhavoc@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 29 Oct 2001 03:28:21 +0000 (03:28 +0000)
committerlordhavoc <lordhavoc@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 29 Oct 2001 03:28:21 +0000 (03:28 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@964 d7cf8633-e32d-0410-b094-e92efae38249

ui.c

diff --git a/ui.c b/ui.c
index 042b3a59bbd1777ae46bd87988a49bfed61df7f8..1e10d337d6de4dee8bc02cf0cb664f35e1086b1c 100644 (file)
--- a/ui.c
+++ b/ui.c
@@ -22,11 +22,33 @@ static ui_item_t    *ui_keyrealitem;
 
 static ui_t *ui_list[MAX_UI_COUNT];
 
 
 static ui_t *ui_list[MAX_UI_COUNT];
 
-static qpic_t *ui_mousepointer;
+//static qpic_t *ui_mousepointer;
+static rtexture_t *ui_mousepointertexture;
+
+static byte pointerimage[256] =
+{
+       0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x02, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 
+       0x02, 0x06, 0x07, 0x07, 0x07, 0x07, 0x06, 0x01, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 
+       0x02, 0x06, 0x05, 0x05, 0x05, 0x04, 0x01, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 
+       0x02, 0x06, 0x05, 0x05, 0x04, 0x01, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 
+       0x02, 0x06, 0x05, 0x04, 0x05, 0x06, 0x01, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 
+       0x02, 0x06, 0x04, 0x01, 0x04,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FF, 0xFF, 
+};
 
 void ui_start(void)
 {
 
 void ui_start(void)
 {
-       ui_mousepointer = Draw_CachePic("ui/mousepointer.lmp");
+//     ui_mousepointer = Draw_CachePic("ui/mousepointer.lmp");
+       ui_mousepointertexture = R_LoadTexture("mousepointer", 16, 16, pointerimage, TEXF_ALPHA | TEXF_PRECACHE);
        ui_mouse_x = vid.width * 0.5;
        ui_mouse_y = vid.height * 0.5;
        ui_alive = true;
        ui_mouse_x = vid.width * 0.5;
        ui_mouse_y = vid.height * 0.5;
        ui_alive = true;
@@ -34,7 +56,8 @@ void ui_start(void)
 
 void ui_shutdown(void)
 {
 
 void ui_shutdown(void)
 {
-       ui_mousepointer = NULL;
+//     ui_mousepointer = NULL;
+       ui_mousepointertexture = NULL;
        ui_alive = false;
 }
 
        ui_alive = false;
 }
 
@@ -386,6 +409,7 @@ void ui_draw(void)
                it = ui_keyrealitem;
                Draw_AdditivePic(it->draw_x, it->draw_y, it->draw_pic);
 
                it = ui_keyrealitem;
                Draw_AdditivePic(it->draw_x, it->draw_y, it->draw_pic);
 
-               Draw_Pic(ui_mouse_x, ui_mouse_y, ui_mousepointer);
+//             Draw_Pic(ui_mouse_x, ui_mouse_y, ui_mousepointer);
+               Draw_GenericPic(ui_mousepointertexture, 1, 1, 1, 1, ui_mouse_x, ui_mouse_y, 16, 16);
        }
 }
        }
 }