1 #include "CharProfile.h"
2 #include "ContentManager.h"
3 #include "Directories.h"
4 #include "Font.h"
5 #include "GamePolicy.h"
6 #include "GameInstance.h"
7 #include "IMP_Personality_Entrance.h"
8 #include "IMPVideoObjects.h"
9 #include "Text.h"
10 #include "Render_Dirty.h"
11 #include "Cursors.h"
12 #include "Laptop.h"
13 #include "Button_System.h"
14 #include "Font_Control.h"
15 
16 
17 // IMP personality entrance buttons
18 static BUTTON_PICS* giIMPPersonalityEntranceButtonImage[1];
19 static GUIButtonRef giIMPPersonalityEntranceButton[1];
20 
21 
22 static void BtnIMPPersonalityEntranceDoneCallback(GUI_BUTTON *btn, INT32 reason);
23 
24 
25 static void CreateIMPPersonalityEntranceButtons(void);
26 
27 
EnterIMPPersonalityEntrance(void)28 void EnterIMPPersonalityEntrance( void )
29 {
30 	// create buttons needed
31 	CreateIMPPersonalityEntranceButtons( );
32 }
33 
RenderIMPPersonalityEntrance(void)34 void RenderIMPPersonalityEntrance( void )
35 {
36 	// the background
37 	RenderProfileBackGround( );
38 
39 	// the IMP symbol
40 	//RenderIMPSymbol( 112, 30 );
41 
42 	// indent
43 	RenderAvgMercIndentFrame(90, 40 );
44 }
45 
46 
47 static void DestroyIMPPersonalityEntranceButtons(void);
48 
49 
ExitIMPPersonalityEntrance(void)50 void ExitIMPPersonalityEntrance( void )
51 {
52 	// destroy buttons needed
53 	DestroyIMPPersonalityEntranceButtons( );
54 }
55 
56 
HandleIMPPersonalityEntrance(void)57 void HandleIMPPersonalityEntrance( void )
58 {
59 }
60 
61 
CreateIMPPersonalityEntranceButtons(void)62 static void CreateIMPPersonalityEntranceButtons(void)
63 {
64 	// this function will create the buttons needed for the IMP personality Page
65 
66 	// ths begin button
67 	giIMPPersonalityEntranceButtonImage[0] = LoadButtonImage(LAPTOPDIR "/button_2.sti", 0, 1);
68 		giIMPPersonalityEntranceButton[0] = CreateIconAndTextButton(
69 							giIMPPersonalityEntranceButtonImage[0],
70 							pImpButtonText[ 1 ], FONT12ARIAL,
71 							FONT_WHITE, DEFAULT_SHADOW,
72 							FONT_WHITE, DEFAULT_SHADOW,
73 							LAPTOP_SCREEN_UL_X + 136, LAPTOP_SCREEN_WEB_UL_Y + 314,
74 							MSYS_PRIORITY_HIGH,
75 							BtnIMPPersonalityEntranceDoneCallback);
76 
77 	giIMPPersonalityEntranceButton[0]->SetCursor(CURSOR_WWW);
78 }
79 
80 
DestroyIMPPersonalityEntranceButtons(void)81 static void DestroyIMPPersonalityEntranceButtons(void)
82 {
83 	// this function will destroy the buttons needed for the IMP personality page
84 
85 	// the begin button
86 	RemoveButton(giIMPPersonalityEntranceButton[0] );
87 	UnloadButtonImage(giIMPPersonalityEntranceButtonImage[0] );
88 }
89 
90 
BtnIMPPersonalityEntranceDoneCallback(GUI_BUTTON * btn,INT32 reason)91 static void BtnIMPPersonalityEntranceDoneCallback(GUI_BUTTON *btn, INT32 reason)
92 {
93 	// btn callback for IMP Begin Screen done button
94 
95 	if (reason & MSYS_CALLBACK_REASON_LBUTTON_UP)
96 	{
97 		// done with begin screen, next screen
98 		iCurrentImpPage = gamepolicy(imp_pick_skills_directly) ? IMP_SKILLTRAITS : IMP_PERSONALITY_QUIZ;
99 		fButtonPendingFlag = TRUE;
100 	}
101 }
102