1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-06 09:09:40 +02:00

faster FoW in minimap, does not work, compiler errors

This commit is contained in:
mateuszb
2007-12-06 18:55:58 +00:00
parent c8c0d0eaaf
commit 58f1a2169f
13 changed files with 204 additions and 394 deletions

View File

@@ -180,58 +180,58 @@ static SDL_Cursor *init_system_cursor(const char *image[])
void CCursorHandler::initCursor()
{
#if SDL_BYTEORDER == SDL_BIG_ENDIAN
int rmask = 0xff000000;
int gmask = 0x00ff0000;
int bmask = 0x0000ff00;
int amask = 0x000000ff;
#else
int rmask = 0x000000ff;
int gmask = 0x0000ff00;
int bmask = 0x00ff0000;
int amask = 0xff000000;
#endif
curVisible = true;
xpos = ypos = 0;
behindCur = SDL_CreateRGBSurface(SDL_SWSURFACE, 32, 32, 32, rmask, gmask, bmask, amask);
xbef = ybef = 0;
adventure = CGI->spriteh->giveDef("CRADVNTR.DEF");
combat = CGI->spriteh->giveDef("CRCOMBAT.DEF");
deflt = CGI->spriteh->giveDef("CRDEFLT.DEF");
spell = CGI->spriteh->giveDef("CRSPELL.DEF");
//SDL_SetCursor(init_system_cursor(arrow));
//SDL_Thread * myth = SDL_CreateThread(&cursorHandlerFunc, this);
//#if SDL_BYTEORDER == SDL_BIG_ENDIAN
// int rmask = 0xff000000;
// int gmask = 0x00ff0000;
// int bmask = 0x0000ff00;
// int amask = 0x000000ff;
//#else
// int rmask = 0x000000ff;
// int gmask = 0x0000ff00;
// int bmask = 0x00ff0000;
// int amask = 0xff000000;
//#endif
// curVisible = true;
// xpos = ypos = 0;
// behindCur = SDL_CreateRGBSurface(SDL_SWSURFACE, 32, 32, 32, rmask, gmask, bmask, amask);
// xbef = ybef = 0;
// adventure = CGI->spriteh->giveDef("CRADVNTR.DEF");
// combat = CGI->spriteh->giveDef("CRCOMBAT.DEF");
// deflt = CGI->spriteh->giveDef("CRDEFLT.DEF");
// spell = CGI->spriteh->giveDef("CRSPELL.DEF");
// //SDL_SetCursor(init_system_cursor(arrow));
// //SDL_Thread * myth = SDL_CreateThread(&cursorHandlerFunc, this);
}
void CCursorHandler::changeGraphic(int type, int no)
{
mode = type;
number = no;
//mode = type;
//number = no;
}
void CCursorHandler::cursorMove(int x, int y)
{
xbef = xpos;
ybef = ypos;
xpos = x;
ypos = y;
//xbef = xpos;
//ybef = ypos;
//xpos = x;
//ypos = y;
}
void CCursorHandler::hardwareCursor()
{
curVisible = false;
SDL_SetCursor(init_system_cursor(arrow2));
//curVisible = false;
//SDL_SetCursor(init_system_cursor(arrow2));
}
void CCursorHandler::hideCursor()
{
curVisible = false;
SDL_SetCursor(init_system_cursor(arrow));
//curVisible = false;
//SDL_SetCursor(init_system_cursor(arrow));
}
void CCursorHandler::showGraphicCursor()
{
curVisible = true;
SDL_SetCursor(init_system_cursor(arrow));
changeGraphic(0, 0);
//curVisible = true;
//SDL_SetCursor(init_system_cursor(arrow));
//changeGraphic(0, 0);
}