1 #ifndef _LAPTOP_SAVE_H_
2 #define _LAPTOP_SAVE_H_
3 
4 #include "Item_Types.h"
5 #include "Store_Inventory.h"
6 
7 #include <vector>
8 
9 #define MAX_BOOKMARKS			20
10 
11 
12 
13 #define MAX_PURCHASE_AMOUNT		10
14 
15 
16 
17 
18 #define SPECK_QUOTE__ALREADY_TOLD_PLAYER_THAT_LARRY_RELAPSED	0x00000001
19 #define SPECK_QUOTE__SENT_EMAIL_ABOUT_LACK_OF_PAYMENT		0x00000002
20 
21 
22 struct LIFE_INSURANCE_PAYOUT
23 {
24 	BOOLEAN fActive;
25 	UINT8   ubSoldierID;
26 	UINT8   ubMercID;
27 	INT32   iPayOutPrice;
28 };
29 
30 
31 struct LAST_HIRED_MERC_STRUCT
32 {
33 	BOOLEAN fHaveDisplayedPopUpInLaptop; // Is set when the popup gets displayed, reset when entering laptop again.
34 	INT32   iIdOfMerc;
35 	UINT32  uiArrivalTime;
36 };
37 
38 
39 struct BobbyRayPurchaseStruct
40 {
41 	UINT16  usItemIndex;
42 	UINT8   ubNumberPurchased;
43 	INT8    bItemQuality;
44 	UINT16  usBobbyItemIndex; //Item number in the BobbyRayInventory structure
45 	BOOLEAN fUsed; //Indicates wether or not the item is from the used inventory or the regular inventory
46 };
47 
48 
49 struct BobbyRayOrderStruct
50 {
51 	BOOLEAN	fActive;
52 	BobbyRayPurchaseStruct BobbyRayPurchase[ MAX_PURCHASE_AMOUNT ];
53 	UINT8	ubNumberPurchases;
54 };
55 
56 
57 //used when the player goes to bobby rays when it is still down
58 enum
59 {
60 	BOBBYR_NEVER_BEEN_TO_SITE,
61 	BOBBYR_BEEN_TO_SITE_ONCE,
62 	BOBBYR_ALREADY_SENT_EMAIL,
63 };
64 
65 
66 struct LaptopSaveInfoStruct
67 {
68 	//General Laptop Info
69 	BOOLEAN gfNewGameLaptop; //Is it the firs time in Laptop
70 	BOOLEAN fVisitedBookmarkAlready[20]; // have we visitied this site already?
71 	INT32   iBookMarkList[MAX_BOOKMARKS];
72 
73 
74 	INT32   iCurrentBalance; // current players balance
75 
76 
77 	//IMP Information
78 	BOOLEAN fIMPCompletedFlag; // Has the player Completed the IMP process
79 	BOOLEAN fSentImpWarningAlready; // Has the Imp email warning already been sent
80 
81 
82 	//Personnel Info
83 	INT16 ubDeadCharactersList[ 256 ];
84 	INT16 ubLeftCharactersList[ 256 ];
85 	INT16 ubOtherCharactersList[ 256 ];
86 
87 
88 	// MERC site info
89 	UINT8  gubPlayersMercAccountStatus;
90 	UINT32 guiPlayersMercAccountNumber;
91 	UINT8  gubLastMercIndex; //  the index of the last hirable merc profile in M.E.R.C.
92 
93 
94 	// Aim Site
95 
96 
97 	// BobbyRay Site
98 	STORE_INVENTORY BobbyRayInventory[ MAXITEMS ];
99 	STORE_INVENTORY BobbyRayUsedInventory[ MAXITEMS ];
100 
101 	std::vector<BobbyRayOrderStruct> BobbyRayOrdersOnDeliveryArray;
102 	UINT8 usNumberOfBobbyRayOrderUsed; // The number of items in the array that are used
103 
104 
105 	// Flower Site
106 	//NONE
107 
108 	// Insurance Site
109 	std::vector<LIFE_INSURANCE_PAYOUT> pLifeInsurancePayouts;
110 	UINT8   ubNumberLifeInsurancePayoutUsed; // The number of items in the array that are used
111 
112 	BOOLEAN fBobbyRSiteCanBeAccessed;
113 
114 	UINT8   ubPlayerBeenToMercSiteStatus;
115 	BOOLEAN fFirstVisitSinceServerWentDown;
116 	BOOLEAN fNewMercsAvailableAtMercSite;
117 	BOOLEAN fSaidGenericOpeningInMercSite;
118 	BOOLEAN fSpeckSaidFloMarriedCousinQuote;
119 	BOOLEAN fHasAMercDiedAtMercSite;
120 
121 	UINT16  usInventoryListLength[BOBBY_RAY_LISTS];
122 
123 	INT32   iVoiceId;
124 
125 	UINT8   ubHaveBeenToBobbyRaysAtLeastOnceWhileUnderConstruction;
126 
127 	BOOLEAN fMercSiteHasGoneDownYet;
128 
129 	UINT8   ubSpeckCanSayPlayersLostQuote;
130 
131 	LAST_HIRED_MERC_STRUCT sLastHiredMerc;
132 
133 	INT32   iCurrentHistoryPage;
134 	INT32   iCurrentFinancesPage;
135 	INT32   iCurrentEmailPage;
136 
137 	UINT32  uiSpeckQuoteFlags;
138 
139 	UINT32  uiFlowerOrderNumber;
140 
141 	UINT32  uiTotalMoneyPaidToSpeck;
142 
143 	UINT8   ubLastMercAvailableId; // deprecated
144 };
145 
146 
147 extern LaptopSaveInfoStruct LaptopSaveInfo;
148 
149 extern BobbyRayPurchaseStruct BobbyRayPurchases[ MAX_PURCHASE_AMOUNT ];
150 
151 
152 void LoadLaptopInfoFromSavedGame(HWFILE);
153 void SaveLaptopInfoToSavedGame(HWFILE);
154 
155 #endif
156