From: <bal...@us...> - 2003-11-26 16:37:29
|
Update of /cvsroot/gemrb/gemrb/gemrb/plugins/Core In directory sc8-pr-cvs1:/tmp/cvs-serv6441/Core Modified Files: GameControl.cpp Log Message: Added Feature : GameControl.cpp : Using ActorBlock. Implemented a simple MouseUp event to cycle Actors orientations Index: GameControl.cpp =================================================================== RCS file: /cvsroot/gemrb/gemrb/gemrb/plugins/Core/GameControl.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** GameControl.cpp 26 Nov 2003 01:15:09 -0000 1.4 --- GameControl.cpp 26 Nov 2003 16:37:26 -0000 1.5 *************** *** 57,61 **** Game * game = core->GetGame(); Map * area = game->GetMap(MapIndex); ! Actor * actor = area->GetActor(GameX, GameY); if(lastActor) lastActor->anims->DrawCircle = false; --- 57,61 ---- Game * game = core->GetGame(); Map * area = game->GetMap(MapIndex); ! ActorBlock * actor = area->GetActor(GameX, GameY); if(lastActor) lastActor->anims->DrawCircle = false; *************** *** 64,68 **** return; } ! lastActor = actor; lastActor->anims->DrawCircle = true; } --- 64,68 ---- return; } ! lastActor = actor->actor; lastActor->anims->DrawCircle = true; } *************** *** 75,79 **** void GameControl::OnMouseUp(unsigned short x, unsigned short y, unsigned char Button, unsigned short Mod) { ! printf("MouseUp\n"); } /** Special Key Press */ --- 75,87 ---- void GameControl::OnMouseUp(unsigned short x, unsigned short y, unsigned char Button, unsigned short Mod) { ! unsigned short GameX = x, GameY = y; ! core->GetVideoDriver()->ConvertToGame(GameX, GameY); ! Game * game = core->GetGame(); ! Map * area = game->GetMap(MapIndex); ! ActorBlock * actor = area->GetActor(GameX, GameY); ! if(!actor) ! return; ! actor->Orientation = ((actor->Orientation+1) % 16); ! printf("%d\n", actor->Orientation); } /** Special Key Press */ |