This is Human.h in view mode; [Download] [Up]
// // $Id: Human.h,v 1.3 1997/10/31 03:38:29 nygard Exp $ // // // This file is a part of Empire, a game of exploration and conquest. // Copyright (C) 1996 Steve Nygard // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 2 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. // // You may contact the author by: // e-mail: nygard@telusplanet.net // #import <AppKit/AppKit.h> #import "Empire.h" #import "EmPlayer.h" @class City; @class HState; @class Map; @class MapPathView; @class MapView; @class Unit; @class WorldMapController; //====================================================================== @interface Human : EmPlayer { IBOutlet NSWindow *playerWindow; IBOutlet MapPathView *mapView; IBOutlet NSTextField *turnNumberTextfield; IBOutlet NSTextField *modeTextfield; IBOutlet NSTextField *statusTextfield; IBOutlet NSButton *continueButton; IBOutlet NSButton *endTurnButton; HState *state; NSString *savedStateKey; WorldMapController *worldMapController; NSMutableDictionary *stateGroup; NSMutableArray *combatEvents; Map *savedMap; // As of end of turn // Note: HState's are no longer shared, but this particular // state should still be shared among them... City *selectedCity; } - (void) awakeFromNib; - initWithName:(NSString *)aName number:(Player)number world:(Map *)aMap capital:(City *)capitalCity withEfficiencies:(int)pe:(int)ce gameManager:(GameManager *)theGameManager; - (void) dealloc; //====================================================================== // Turn phases //====================================================================== - (void) yourTurn:(int)turn; //====================================================================== // Interface Management //====================================================================== - (void) continue:sender; - (void) endTurn:sender; - (void) enableContinueButton:(BOOL)flag; - (void) enableEndTurnButton:(BOOL)flag; - (BOOL) validateMenuItem:(NSMenuItem *)menuCell; - (void) clickActiveButton; - (void) setStatusLine:(NSString *)text; // How do the following two methods differ? - (void) selectThing:object; // Rename to setSelectedUnit:? - (void) selectUnit:(Unit *)aUnit; - (MapView *) mapView; //======================================================================- // Commands //======================================================================- - (void) moveMode:sender; - (void) surveyMode:sender; - (void) groupMode:sender; - (void) wait:sender; - (void) flightPaths:sender; - (void) activateUnit:sender; - (void) centerScreen:sender; - (void) centerCursor:sender; - (void) centerSelected:sender; //====================================================================== // End of game Reports //====================================================================== - (void) showFinalCombinedMap:sender; - (void) showFinalPlayer1Map:sender; - (void) showFinalPlayer2Map:sender; - (void) showFinalPlayer3Map:sender; - (void) showFinalMapForPlayer:(Player)number; //======================================================================- // Orders //======================================================================- - (void) goDirection:sender; - (void) goHome:sender; - (void) goRandom:sender; - (void) moveTo:sender; - (void) patrolTo:sender; - (void) escortShip:sender; - (void) explore:sender; - (void) sentry:sender; - (void) clearOrders:sender; - (void) loadShip:sender; - (void) unloadShip:sender; - (void) skipMove:sender; - (void) resignFromGame:sender; //====================================================================== // Reports //====================================================================== - (void) showCombatReport:sender; - (void) showProductionMap:sender; - (void) showShipReport:sender; - (void) showWarReport:sender; - (void) showWorldMap:sender; //====================================================================== // MapView delegate //====================================================================== - (void) mouseDown:(unsigned int)modifierFlags atLocation:(EMMapLocation)target; - (void) mouseUp:(unsigned int)modifierFlags atLocation:(EMMapLocation)target; - (void) rightMouseDown:(unsigned int)modifierFlags atLocation:(EMMapLocation)target; - (void) rightMouseUp:(unsigned int)modifierFlags atLocation:(EMMapLocation)target; - (void) keyDown:(NSEvent *)theEvent; //====================================================================== // Window Delegate //====================================================================== - (BOOL) windowShouldClose:sender; - (void) windowWillClose:(NSNotification *)aNotification; //====================================================================== // End of player //====================================================================== - (void) gameStopped:(int)activePlayers; - (BOOL) playerHasWon:(int)activePlayers; - (void) playerHasLost:(int)activePlayers; - (void) playerHasResigned:(int)activePlayers; //====================================================================== // HState Management //====================================================================== - (void) changeState:(NSString *)newStateName; - (void) saveState; - (void) restoreState; //====================================================================== // HState Access //====================================================================== - (City *) selectedCity; - (void) selectCity:(City *)city; - (Map *) finalMapForPlayer:(Player)number; //====================================================================== // Combat Report //====================================================================== - (Map *) savedMap; - (NSArray *) combatEvents; //====================================================================== // Map Delegate //====================================================================== - (void) refreshLocation:(EMMapLocation)target; - (void) refresh3x3Location:(EMMapLocation)target; - (void) strippedIconsOfPlayer:(Player)number; //====================================================================== // Other //====================================================================== - (void) showExplosions:(int)count atLocation:(EMMapLocation)target; //====================================================================== // Subclass Notifications //====================================================================== - (void) selectedUnitTriedToMove:(MoveResult)moveResult; @end
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.