home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Virtual Reality Madness
/
VRMAD96_ONE.ISO
/
virtek
/
libex
/
libex143.c
< prev
next >
Wrap
C/C++ Source or Header
|
1995-08-24
|
2KB
|
37 lines
// Example: 143 from Library Reference
#include "..\3D-Ware\dddware.h"
char mouse_crosshair[] = {0x01,0x03,0x00,0x04,0x06,0x00,0x00,0x00,0x00,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0x00,0xFF,
0x00,0xFF,0x00,0xFF,0x00,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0x00,0x00,
0x00,0x00,0x00,0x00,0x00};
char my_mouse_buffer[128];
void main(void)
{
dddInitAll();
dddCls();
dddBox(2,10,10,310,190);
dddBox(3,20,20,300,180);
dddBox(4,30,30,290,170);
dddPrint7(11,55,97,"PRESS SPACE TO TOGGLE CURSORS.");
dddPrint7(11,60,105,"MOVE THE MOUSE AROUND.");
dddScreenSwap();
dddSetLogbase2CurrentDisplay();
while (dddkeycode!=_ESC)
{
dddHideGraphicsMouse();
if (dddkeypressed[_SPACE]) // If "space" is pressed then change to the new cursor.
{
// New cursor crosshair.
dddSetMouseCursor(mouse_crosshair, my_mouse_buffer, 4,3,5,5,0,0);
}
else // Otherwise use normal cursor.
{
dddSetDefaultMouseCursor(); // Standard mouse cursor.
}
dddReadMousePosition(); // Read any changes to the mouse position.
dddDrawGraphicsMouse(); // Draw the mouse at (mouse_x,mouse_y).
dddVsync(); // Wait for Vertical sync so things don't get messy.
}
dddRestoreAll(); // Restore previous video mode
}