mirror of
https://github.com/1dot13/source.git
synced 2026-07-29 13:52:17 +02:00
Before Patch: Render region for the Game Time and Tooltip region for this region had different x/y coordinate formulas which resulted in missplaced ToolTip on screen resolutions higher then 3. There where 4 different definitions of Clock position: INTERFACE_CLOCK_X, INTERFACE_CLOCK_TM_X, CLOCK_X, CLOCK_REGION_START_X. Also there where 2 different definitions of the region: CLOCK_STRING_WIDTH, CLOCK_REGION_WIDTH. Pause Box had a fixed position on screen regardless of resolution mode or screen size. Two different kinds of defines for the Font where used: CLOCKFONT and CLOCK_FONT After Patch: Only 2 different coords are existant for rendering the clock, of which 1 is currently redundant as it is off screen for NIV. The later can be used once the Teampanel in tactical screen can handle the clock while showing the inventory (currently the clock is not rendered when NIV is used), this however requires new graphics for 6/8/10 squatsizes. Once a new location for this case is determined simply update the RenderTEAMPanel(BOOLEAN) accordingly with new if clause for NIV (Offset of LOCATION_NAME_TM_X can be used, or what everis convinient). Also 2 boundary boxes of the region are present, one for the actual area 66*14 (CLOCK_AREA_WIDTH) and one for a little gap of currently 1 pixel for the mouse region (CLOCK_REGION_OFFSET_X) the later one is kindof not neccessary since the String gets now centered in the Area. But maybe someone will make a mod with small render area but large mouseregion for the clock, who knows :) Pause Box is now rendered in the center of the screen as intended. Only one font for the clock! There was no need for a different define, also the CLOCKFONT.sti is not in GameFolder so I changed that and use the COMP font. All globals are now located in Game Clock.cpp but still get initialized in Interface Panels.cpp since the init function in Game Clock.cpp is called too early and no globals for screen size and resolution are known at this point. git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6316 3b4a5df2-a311-0410-b5c6-a8a6f20db521
169 lines
5.1 KiB
C
169 lines
5.1 KiB
C
#ifndef __INTERFACE_PANELS
|
|
#define __INTERFACE_PANELS
|
|
|
|
|
|
typedef enum
|
|
{
|
|
STANCEUP_BUTTON = 0,
|
|
UPDOWN_BUTTON,
|
|
CLIMB_BUTTON,
|
|
STANCEDOWN_BUTTON,
|
|
HANDCURSOR_BUTTON,
|
|
PREVMERC_BUTTON,
|
|
NEXTMERC_BUTTON,
|
|
OPTIONS_BUTTON,
|
|
BURSTMODE_BUTTON,
|
|
LOOK_BUTTON,
|
|
TALK_BUTTON,
|
|
MUTE_BUTTON,
|
|
SM_DONE_BUTTON,
|
|
SM_MAP_SCREEN_BUTTON,
|
|
//HOP_BUTTON, //Legion by Jazz
|
|
NUM_SM_BUTTONS
|
|
};
|
|
|
|
|
|
typedef enum
|
|
{
|
|
TEAM_DONE_BUTTON = 0,
|
|
TEAM_MAP_SCREEN_BUTTON,
|
|
CHANGE_SQUAD_BUTTON,
|
|
NUM_TEAM_BUTTONS
|
|
};
|
|
|
|
|
|
#define NEW_ITEM_CYCLE_COUNT 19
|
|
#define NEW_ITEM_CYCLES 4
|
|
#define NUM_TEAM_SLOTS 10
|
|
|
|
|
|
#define PASSING_ITEM_DISTANCE_OKLIFE 3
|
|
#define PASSING_ITEM_DISTANCE_NOTOKLIFE 2
|
|
|
|
#define SHOW_LOCATOR_NORMAL 1
|
|
#define SHOW_LOCATOR_FAST 2
|
|
|
|
//extern INT16 INTERFACE_CLOCK_X;
|
|
//extern INT16 INTERFACE_CLOCK_Y;
|
|
extern int LOCATION_NAME_X;
|
|
extern int LOCATION_NAME_Y;
|
|
|
|
|
|
BOOLEAN CreateSMPanelButtons( );
|
|
void RemoveSMPanelButtons( );
|
|
BOOLEAN InitializeSMPanel( );
|
|
BOOLEAN ShutdownSMPanel( );
|
|
void RenderSMPanel( BOOLEAN *pfDirty );
|
|
void EnableSMPanelButtons( BOOLEAN fEnable, BOOLEAN fFromItemPickup );
|
|
|
|
|
|
/* In this function i will initialize all coords for SingleMercPanel
|
|
* If i will success i will return true, i think that could be usefull when
|
|
* we will have our panes more customizable for ex. we can read coords from file
|
|
* and when we will read all values we return TRUE if not we will retunf FALSE
|
|
* any questions? joker
|
|
*/
|
|
//BOOLEAN InitializeSMPanelCoords( );
|
|
BOOLEAN InitializeSMPanelCoordsNew();
|
|
BOOLEAN InitializeSMPanelCoordsOld();
|
|
|
|
|
|
BOOLEAN CreateTEAMPanelButtons( );
|
|
void RemoveTEAMPanelButtons( );
|
|
BOOLEAN InitializeTEAMPanel( );
|
|
BOOLEAN ShutdownTEAMPanel( );
|
|
void RenderTEAMPanel( BOOLEAN fDirty );
|
|
void UpdateTEAMPanel( );
|
|
|
|
/*
|
|
* Just like b4 we will initialize all coords but now for TEAMPanel
|
|
*/
|
|
BOOLEAN InitializeTEAMPanelCoords( );
|
|
|
|
void SetSMPanelCurrentMerc( UINT8 ubNewID );
|
|
void SetTEAMPanelCurrentMerc( UINT8 ubNewID );
|
|
UINT16 GetSMPanelCurrentMerc( );
|
|
void UpdateSMPanel( );
|
|
|
|
BOOLEAN InitTEAMSlots( );
|
|
void AddPlayerToInterfaceTeamSlot( UINT8 ubID );
|
|
BOOLEAN RemovePlayerFromInterfaceTeamSlot( UINT8 ubID );
|
|
BOOLEAN GetPlayerIDFromInterfaceTeamSlot( UINT8 ubPanelSlot, UINT8 *pubID );
|
|
void RemoveAllPlayersFromSlot( );
|
|
BOOLEAN PlayerExistsInSlot( UINT8 ubID );
|
|
BOOLEAN RemovePlayerFromTeamSlotGivenMercID( UINT8 ubMercID );
|
|
void CheckForAndAddMercToTeamPanel( SOLDIERTYPE *pSoldier );
|
|
void CleanUpStack( OBJECTTYPE * pObj, OBJECTTYPE * pCursorObj );
|
|
|
|
void DisableTacticalTeamPanelButtons( BOOLEAN fDisable );
|
|
// CHRISL: Add X,Y coords as parameters so we can control the placement of TownID string on the team and inventory panels seperately
|
|
void RenderTownIDString( INT16 sX, INT16 sY );
|
|
void KeyRingSlotInvClickCallback( MOUSE_REGION * pRegion, INT32 iReason );
|
|
// CHRISL: New functions to handle initialization of inventory systems
|
|
void InitNewInventorySystem( );
|
|
void InitOldInventorySystem( );
|
|
|
|
|
|
|
|
// ATE TO BE MOVED TO INTERFACE_ITEMS.C
|
|
extern INT8 gbNewItem[ NUM_INV_SLOTS ];
|
|
extern INT8 gbNewItemCycle[ NUM_INV_SLOTS ];
|
|
extern UINT8 gubNewItemMerc;
|
|
|
|
void ShowRadioLocator( UINT8 ubID, UINT8 ubLocatorSpeed );
|
|
void EndRadioLocator( UINT8 ubID );
|
|
|
|
|
|
extern MOUSE_REGION gSMPanelRegion;
|
|
extern UINT32 guiSecItemHiddenVO;
|
|
extern BOOLEAN gfDisableTacticalPanelButtons;
|
|
|
|
|
|
typedef struct
|
|
{
|
|
UINT8 ubID;
|
|
BOOLEAN fOccupied;
|
|
|
|
} TEAM_PANEL_SLOTS_TYPE;
|
|
|
|
extern TEAM_PANEL_SLOTS_TYPE gTeamPanel[ NUM_TEAM_SLOTS ];
|
|
|
|
|
|
|
|
//Used when the shop keeper interface is active
|
|
void DisableSMPpanelButtonsWhenInShopKeeperInterface( BOOLEAN fDontDrawButtons );
|
|
//void DisableSMPpanelButtonsWhenInShopKeeperInterface( );
|
|
|
|
//
|
|
void ReEvaluateDisabledINVPanelButtons( );
|
|
void CheckForReEvaluateDisabledINVPanelButtons( );
|
|
|
|
void CheckForDisabledForGiveItem( );
|
|
void ReevaluateItemHatches( SOLDIERTYPE *pSoldier, BOOLEAN fEnable );
|
|
//CHRISL: New function to deal with rendering backpack buttons
|
|
void RenderBackpackButtons(int bpAction);
|
|
|
|
void HandlePanelFaceAnimations( SOLDIERTYPE *pSoldier );
|
|
|
|
void GoToMapScreenFromTactical( void );
|
|
|
|
// Moved to weapons.h by ADB, rev 1513
|
|
//void HandleTacticalEffectsOfEquipmentChange( SOLDIERTYPE *pSoldier, UINT32 uiInvPos, UINT16 usOldItem, UINT16 usNewItem );
|
|
|
|
void FinishAnySkullPanelAnimations( );
|
|
|
|
UINT8 FindNextMercInTeamPanel( SOLDIERTYPE *pSoldier, BOOLEAN fGoodForLessOKLife, BOOLEAN fOnlyRegularMercs );
|
|
|
|
// CHRISL: New callback functions for backpack buttons
|
|
BOOLEAN ChangeDropPackStatus(SOLDIERTYPE *pSoldier, BOOLEAN newStatus);
|
|
|
|
// HEADROCK HAM 4: This variable tells the program what "page" of the description box we are currently looking at.
|
|
// By saving this in memory, we tell the DescBox which background and values to draw, and make sure that we end up
|
|
// on the same page every time we open the description box. UDB buttons allow switching between pages.
|
|
extern UINT8 gubDescBoxPage;
|
|
// Record which line we're looking at. This only applied to the Advanced tab in description boxes.
|
|
extern UINT8 gubDescBoxLine;
|
|
// Record how many lines there are for the current item in the Advanced tab.
|
|
extern UINT8 gubDescBoxTotalAdvLines;
|
|
|
|
#endif |