2 @Copyright Looking Glass Studios, Inc.
3 1996,1997,1998,1999,2000 Unpublished Work.
6 // $Header: r:/t2repos/thief2/src/shock/shkcharg.h,v 1.14 2000/01/29 13:40:33 adurant Exp $
16 enum EService
{ KServiceBlackOps
, KServiceMarines
, KServiceNavy
, KNumServices
};
17 enum EGenState
{ KGenSelectService
, KGenChooseMission
, KGenDebriefing
, KGenCharSummary
,
18 KGenBirth
, KGenSplash
, KGenNone
, KGenGameSummary
, KGenMain
};
20 class CCharGenerator
{
22 int m_year
; // how many years of character progress have we gone through?
23 EService m_service
; // which service are you in
24 EGenState m_state
; // what state is the interface in
27 int m_mission
; // the mission ID code for the current mission (in KGenDebriefing state)
28 int m_trait
; // the selected trait hack
29 int m_summary_focus
; // hack for giving feedback on stats
30 int m_subskills
[2]; // subskill hacks
34 grs_font
*m_font
; // what font to use!
35 int m_color
; // drawing color
38 // start this puppy up
39 CCharGenerator(CCharacter
*who
);
40 ~CCharGenerator(void);
42 // create the interface for the specified EGenState
43 void BuildInterface(EGenState state
);
44 void BuildInterface(void) { BuildInterface(m_state
); }
46 // destroy the current interface elements (either for shutdown, or for switching to new state)
47 void DestroyInterface(void);
49 // switch to a new state, doing all appropriate interface frobbing
50 void ChangeState(EGenState newstate
);
51 void SetState(EGenState newstate
) { m_state
= newstate
; } // just force a state change (dangerous!)
53 // interface "callbacks"
54 void ChooseService(int button_num
);
56 void ChooseMission(int button_num
);
57 void ChooseTrait(int button_num
);
58 void ChooseSummary(int button_num
, bool redraw
= TRUE
);
59 void PlusMinus(int button_num
);
62 static void ContinueFunc(void *arg
);
63 void ContinueGuts(void);
65 // continuous updating of the teletype in debriefing mode
66 // perhaps should be just an Update function public which calls
67 // this privately, but oh well
68 void DrawTeletypeText(void);
70 // Load/free all the internal art needed
71 void LoadBitmaps(void);
72 void FreeBitmaps(void);
75 static bool KeyHandler(uiEvent
*ev
, Region
*reg
, void *data
);
76 bool ProcessKey(int code
);
78 uint m_teletime
; // what time did we start teletyping
81 // Draw the background art
82 void DrawBackground(char *artname
);
83 void DrawBackground(EGenState state
);
84 void DrawBackground(void) { DrawBackground(m_state
); }
86 // Apply the results of the specified mission ID to the character
87 void ApplyMissionStats(int mission_id
);
89 // text drawing utility func
90 void DrawUnwrappedText(char *text
, Rect
*r
, bool center
= TRUE
);
91 void DrawWrappedText(char *text
, Rect
*r
, bool center
= TRUE
);
93 // draw appropriate service-specific text
94 void DrawServiceText(EService which_service
);
95 void DrawServiceText(void) { DrawServiceText(m_service
); }
97 void DrawJobLongDesc(void);
98 void DrawJobShortDesc(void);
99 void DrawYearInfo(void);
101 void DrawTraitDesc(void);
102 void DrawBirthTraits(void);
103 void DrawBirthName(void);
105 void DrawSummaryStats(void);
106 void DrawSummaryDesc(void);
107 void DrawSummarySubskills(void);
108 void SubskillGuts(int skill_base
);
111 extern CCharGenerator
*gCharGenerator
;