[Bastion-cvs] bastion/src/team Team.cpp,1.43,1.44 TeamBrain.cpp,1.42,1.43 TeamCommand.cpp,1.13,1.14
Brought to you by:
jacek_kolodziej
|
From: Jacek K. <jac...@us...> - 2004-06-30 13:52:48
|
Update of /cvsroot/bastion/bastion/src/team In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28722/src/team Modified Files: Team.cpp TeamBrain.cpp TeamCommand.cpp Log Message: - krok w kierunku umozliwienia istnienia swiata, bez istnienia jego wizualizacji: przeniesienie EventDispatchera z klasy GameView do statycznego pola klasy EventDispatcher. Aby pobrac EventDispatchera wystarczy teraz wywolac EvnetDispatcher::get(). Pozostaje jeszcze zrobic tak aby figurki w UnitHandlerze i InformationCollectorze byly przypisywane z zewnatrz. Index: TeamCommand.cpp =================================================================== RCS file: /cvsroot/bastion/bastion/src/team/TeamCommand.cpp,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** TeamCommand.cpp 31 May 2004 19:14:23 -0000 1.13 --- TeamCommand.cpp 30 Jun 2004 13:52:38 -0000 1.14 *************** *** 49,53 **** }; // MICHA£ - zg³aszam eventa o koñcu walki ! team->getArmy()->getWorld()->getGameView()->getEventDispatcher()-> dispatch(EventDispatcher::EEnemyDefeated,new EventEnemyDefeated(team)); return true; --- 49,53 ---- }; // MICHA£ - zg³aszam eventa o koñcu walki ! EventDispatcher::get()-> dispatch(EventDispatcher::EEnemyDefeated,new EventEnemyDefeated(team)); return true; *************** *** 66,70 **** } // MICHA£ - zg³aszam eventa o koñcu walki ! team->getArmy()->getWorld()->getGameView()->getEventDispatcher()-> dispatch(EventDispatcher::EEnemyDefeated,new EventEnemyDefeated(team)); return true; --- 66,70 ---- } // MICHA£ - zg³aszam eventa o koñcu walki ! EventDispatcher::get()-> dispatch(EventDispatcher::EEnemyDefeated,new EventEnemyDefeated(team)); return true; Index: TeamBrain.cpp =================================================================== RCS file: /cvsroot/bastion/bastion/src/team/TeamBrain.cpp,v retrieving revision 1.42 retrieving revision 1.43 diff -C2 -d -r1.42 -r1.43 *** TeamBrain.cpp 31 May 2004 19:14:23 -0000 1.42 --- TeamBrain.cpp 30 Jun 2004 13:52:38 -0000 1.43 *************** *** 69,73 **** if (enemy != 0) { // MICHA£ - Moje: tu zg³aszam eventa ! getTeam()->getArmy()->getWorld()->getGameView()->getEventDispatcher()-> dispatch(EventDispatcher::EAttacked,new EventUnderAttack(team)); --- 69,73 ---- if (enemy != 0) { // MICHA£ - Moje: tu zg³aszam eventa ! EventDispatcher::get()-> dispatch(EventDispatcher::EAttacked,new EventUnderAttack(team)); *************** *** 274,279 **** //MICHA£ - Wysy³am eventa... ! getTeam()->getArmy()->getWorld()->getGameView()-> ! getEventDispatcher()->dispatch(EventDispatcher::EOrderCompleted, new EventOrderCompleted(getTeam())); --- 274,278 ---- //MICHA£ - Wysy³am eventa... ! EventDispatcher::get()->dispatch(EventDispatcher::EOrderCompleted, new EventOrderCompleted(getTeam())); *************** *** 284,289 **** // Aby menu bylo aktualne, trzeba przy robieniu czegos z // rozkazami generowac takiego oto eventa. ! getTeam()->getArmy()->getWorld()->getGameView()-> ! getEventDispatcher()->dispatch(EventDispatcher::EOrderManipulation, new EventOrderManipulation()); } --- 283,287 ---- // Aby menu bylo aktualne, trzeba przy robieniu czegos z // rozkazami generowac takiego oto eventa. ! EventDispatcher::get()->dispatch(EventDispatcher::EOrderManipulation, new EventOrderManipulation()); } *************** *** 332,336 **** // Aby menu bylo aktualne, trzeba przy robieniu czegos z rozkazami generowac // eventa. ! getTeam()->getArmy()->getWorld()->getGameView()->getEventDispatcher()->dispatch( EventDispatcher::EOrderManipulation, new EventOrderManipulation()); } --- 330,334 ---- // Aby menu bylo aktualne, trzeba przy robieniu czegos z rozkazami generowac // eventa. ! EventDispatcher::get()->dispatch( EventDispatcher::EOrderManipulation, new EventOrderManipulation()); } *************** *** 363,367 **** // Aby menu bylo aktualne, trzeba przy robieniu czegos z rozkazami generowac // eventa. ! getTeam()->getArmy()->getWorld()->getGameView()->getEventDispatcher()->dispatch( EventDispatcher::EOrderManipulation, new EventOrderManipulation()); } --- 361,365 ---- // Aby menu bylo aktualne, trzeba przy robieniu czegos z rozkazami generowac // eventa. ! EventDispatcher::get()->dispatch( EventDispatcher::EOrderManipulation, new EventOrderManipulation()); } *************** *** 376,381 **** // rozkaz z galezi porazki. orderManager->giveNextOrder(this, order::OrderManager::ORDER_FINISH_FAILED); ! getTeam()->getArmy()->getWorld()-> ! getGameView()->getEventDispatcher()->dispatch( EventDispatcher::EOrderManipulation, new EventOrderManipulation() ); --- 374,378 ---- // rozkaz z galezi porazki. orderManager->giveNextOrder(this, order::OrderManager::ORDER_FINISH_FAILED); ! EventDispatcher::get()->dispatch( EventDispatcher::EOrderManipulation, new EventOrderManipulation() ); Index: Team.cpp =================================================================== RCS file: /cvsroot/bastion/bastion/src/team/Team.cpp,v retrieving revision 1.43 retrieving revision 1.44 diff -C2 -d -r1.43 -r1.44 *** Team.cpp 31 May 2004 19:14:08 -0000 1.43 --- Team.cpp 30 Jun 2004 13:52:38 -0000 1.44 *************** *** 245,249 **** if (getCount() == 0) { // MICHA£ - Zg³aszamy eventa ! army->getWorld()->getGameView()->getEventDispatcher()-> dispatch(EventDispatcher::ETeamDestroyed,new EventTeamDestroyed(this)); observer->destroyed(); --- 245,249 ---- if (getCount() == 0) { // MICHA£ - Zg³aszamy eventa ! EventDispatcher::get()-> dispatch(EventDispatcher::ETeamDestroyed,new EventTeamDestroyed(this)); observer->destroyed(); *************** *** 460,464 **** // MICHA£ - Zg³aszanie event'ów if (getSeenSet()->getSeenEnemyCounter()>0) { ! army->getWorld()->getGameView()->getEventDispatcher()-> dispatch(EventDispatcher::EEnemySpotted,new EventEnemySpotted(this)); }; --- 460,464 ---- // MICHA£ - Zg³aszanie event'ów if (getSeenSet()->getSeenEnemyCounter()>0) { ! EventDispatcher::get()-> dispatch(EventDispatcher::EEnemySpotted,new EventEnemySpotted(this)); }; |