Pyrogenesis
13997
|
#include "precompiled.h"
#include "cursor.h"
#include <cstring>
#include <cstdio>
#include <sstream>
#include "lib/ogl.h"
#include "lib/sysdep/cursor.h"
#include "ogl_tex.h"
#include "lib/res/h_mgr.h"
Go to the source code of this file.
Classes | |
class | GLCursor |
struct | Cursor |
Macros | |
#define | ALLOW_SYS_CURSOR 0 |
Enumerations | |
enum | CursorKind { CK_Default, CK_System, CK_OpenGL } |
Functions | |
static Status | load_sys_cursor (const PIVFS &vfs, const VfsPath &pathname, int hx, int hy, sys_cursor *cursor) |
H_TYPE_DEFINE (Cursor) | |
static void | Cursor_init (Cursor *c, va_list args) |
static void | Cursor_dtor (Cursor *c) |
static Status | Cursor_reload (Cursor *c, const PIVFS &vfs, const VfsPath &name, Handle) |
static Status | Cursor_validate (const Cursor *c) |
static Status | Cursor_to_string (const Cursor *c, wchar_t *buf) |
static Handle | cursor_load (const PIVFS &vfs, const VfsPath &name, bool forceGL) |
void | cursor_shutdown () |
Forcibly frees all cursor handles. More... | |
static Status | cursor_free (Handle &h) |
Status | cursor_draw (const PIVFS &vfs, const wchar_t *name, int x, int y, bool forceGL) |
Draw the cursor on-screen. More... | |
#define ALLOW_SYS_CURSOR 0 |
Definition at line 45 of file cursor.cpp.
enum CursorKind |
Enumerator | |
---|---|
CK_Default | |
CK_System | |
CK_OpenGL |
Definition at line 150 of file cursor.cpp.
Draw the cursor on-screen.
vfs | |
name | Base name of cursor or zero to hide the cursor. |
x,y | Coordinates [pixels] (origin at lower left) (the origin is convenient for drawing via OpenGL, but requires the mouse Y coordinate to be subtracted from the client area height. Making the caller responsible for this avoids a dependency on the g_yres global variable.) |
forceGL | Require the OpenGL cursor implementation, not hardware cursor |
Uses a hardware mouse cursor where available, otherwise a portable OpenGL implementation.
Definition at line 309 of file cursor.cpp.
|
static |
Definition at line 179 of file cursor.cpp.
Definition at line 303 of file cursor.cpp.
|
static |
Definition at line 174 of file cursor.cpp.
Definition at line 293 of file cursor.cpp.
Definition at line 201 of file cursor.cpp.
void cursor_shutdown | ( | ) |
Forcibly frees all cursor handles.
Currently used just prior to SDL shutdown.
Definition at line 298 of file cursor.cpp.
Definition at line 259 of file cursor.cpp.
Definition at line 235 of file cursor.cpp.
H_TYPE_DEFINE | ( | Cursor | ) |
|
static |
Definition at line 49 of file cursor.cpp.