Files
source/Editor/selectwin.h
T
00fb898600 Delete builddefines.h
Nothing was left in it but the include of profiler.h, and 132 translation units
were including it for that alone. Fifteen files were leaning on profiler.h to
drag in <set>, <vector> and <ostream> for them; those now include what they use.

This is the commit that moves line numbers. Removing an include line shifts
__LINE__ by one for everything below it, and __LINE__ is an immediate operand in
every Assert() and DebugMsg() call, so the four game executables differ from
their predecessors by roughly a thousand 32-bit constants each. Every one of
those is accounted for: each is a single immediate that moved by -1 where the
builddefines.h include went away, or +1 where a <set>/<vector> include was
added. Nothing else in .text, .rdata or .data moves, no object file's section
sizes change, and symbolize_crash and Ja2Export stay bit-identical.

The one non-immediate difference is that the 24 Editor translation units of the
non-editor apps stop emitting __Avx2WmemEnabledWeakValue, a 4-byte weak COMDAT
they only ever instantiated through profiler.h's <vector>. It is a UCRT weak
default that other translation units still provide.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-22 01:07:26 -03:00

186 lines
4.7 KiB
C

#ifdef JA2EDITOR
#ifndef _SELECTION_WIN_H_
#define _SELECTION_WIN_H_
#include "types.h"
#include "vobject.h"
#include "mousesystem.h"
#include "Button System.h"
#define SEL_WIN_CANCEL_ICON 0
#define SEL_WIN_UP_ICON 1
#define SEL_WIN_DOWN_ICON 2
#define SEL_WIN_OK_ICON 3
extern INT32 iButtonIcons[4];
extern INT32 iSelectWin,iCancelWin,iScrollUp,iScrollDown;
extern BOOLEAN fAllDone;
extern void CreateJA2SelectionWindow( INT16 sWhat );
extern void InitJA2SelectionWindow( void );
extern void ShutdownJA2SelectionWindow( void );
extern void RemoveJA2SelectionWindow( void );
extern void RenderSelectionWindow( void );
extern void DrawSelections( void );
extern void SelWinClkCallback( GUI_BUTTON *button, INT32 reason );
extern void CnclClkCallback( GUI_BUTTON *button, INT32 reason );
extern void UpClkCallback( GUI_BUTTON *button, INT32 reason );
extern void DwnClkCallback( GUI_BUTTON *button, INT32 reason );
extern void OkClkCallback( GUI_BUTTON *button, INT32 reason );
extern void ScrollSelWinUp(void);
extern void ScrollSelWinDown(void);
// defines for DisplaySpec.ubType
#define DISPLAY_TEXT 1
#define DISPLAY_GRAPHIC 2
#define ONE_COLUMN 0x0001
#define ONE_ROW 0x0002
#define CLEAR_BACKGROUND 0x0004
#define DISPLAY_ALL_OBJECTS 0xffff
#define MAX_SELECTIONS 120
enum
{
SELWIN_SINGLEWALL,
SELWIN_SINGLEDOOR,
SELWIN_SINGLEWINDOW,
SELWIN_SINGLEROOF,
SELWIN_SINGLENEWROOF,
SELWIN_SINGLEBROKENWALL,
SELWIN_SINGLEDECOR,
SELWIN_SINGLEDECAL,
SELWIN_SINGLEFLOOR,
SELWIN_SINGLETOILET,
SELWIN_ROOM,
SELWIN_BANKS,
SELWIN_ROADS,
SELWIN_DEBRIS,
SELWIN_OSTRUCTS,
SELWIN_OSTRUCTS1,
SELWIN_OSTRUCTS2
};
typedef struct
{
UINT8 ubType;
union
{
struct
{
HVOBJECT hVObject;
UINT16 usStart;
UINT16 usEnd;
UINT32 uiObjIndx;
};
struct
{
STR16 pString;
};
};
}
DisplaySpec;
typedef struct _DisplayList
{
HVOBJECT hObj;
UINT16 uiIndex;
INT16 iX;
INT16 iY;
INT16 iWidth;
INT16 iHeight;
UINT32 uiObjIndx;
BOOLEAN fChosen;
struct _DisplayList *pNext;
} DisplayList;
typedef struct _Selections
{
UINT32 uiObject;
UINT16 usIndex;
INT16 sCount;
} Selections;
INT32 FindInSelectionList( DisplayList *pNode );
BOOLEAN IsInSelectionList( DisplayList *pNode );
INT32 GetRandomSelection( void );
BOOLEAN RemoveFromSelectionList( DisplayList *pNode );
void AddToSelectionList( DisplayList *pNode );
void RestoreSelectionList( void );
void SaveSelectionList( void );
BOOLEAN ClearSelectionList( void );
void DisplaySelectionWindowGraphicalInformation();
extern INT32 iCurBank;
extern Selections *pSelList;
extern INT32 *pNumSelList;
extern Selections SelOStructs[ MAX_SELECTIONS ];
extern Selections SelOStructs1[ MAX_SELECTIONS ];
extern Selections SelOStructs2[ MAX_SELECTIONS ];
extern Selections SelBanks[ MAX_SELECTIONS ];
extern Selections SelRoads[ MAX_SELECTIONS ];
extern Selections SelDebris[ MAX_SELECTIONS ];
extern Selections SelSingleWall[ MAX_SELECTIONS ];
extern Selections SelSingleDoor[ MAX_SELECTIONS ];
extern Selections SelSingleWindow[ MAX_SELECTIONS ];
extern Selections SelSingleRoof[ MAX_SELECTIONS ];
extern Selections SelSingleNewRoof[ MAX_SELECTIONS ];
extern Selections SelSingleBrokenWall[ MAX_SELECTIONS ];
extern Selections SelSingleDecor[ MAX_SELECTIONS ];
extern Selections SelSingleDecal[ MAX_SELECTIONS ];
extern Selections SelSingleFloor[ MAX_SELECTIONS ];
extern Selections SelSingleToilet[ MAX_SELECTIONS ];
extern Selections SelRoom[ MAX_SELECTIONS ];
extern INT32 iNumOStructsSelected;
extern INT32 iNumOStructs1Selected;
extern INT32 iNumOStructs2Selected;
extern INT32 iNumBanksSelected;
extern INT32 iNumRoadsSelected;
extern INT32 iNumDebrisSelected;
extern INT32 iNumWallsSelected;
extern INT32 iNumDoorsSelected;
extern INT32 iNumWindowsSelected;
extern INT32 iNumDecorSelected;
extern INT32 iNumDecalsSelected;
extern INT32 iNumBrokenWallsSelected;
extern INT32 iNumFloorsSelected;
extern INT32 iNumToiletsSelected;
extern INT32 iNumRoofsSelected;
extern INT32 iNumNewRoofsSelected;
extern INT32 iNumRoomsSelected;
extern INT32 iDrawMode;
extern DisplayList *TrashList( DisplayList *pNode );
extern BOOLEAN BuildDisplayWindow( DisplaySpec *pDisplaySpecs, UINT16 usNumSpecs, DisplayList **pDisplayList,
SGPPoint * pUpperLeft, SGPPoint * pBottomRight,
SGPPoint * pSpacing, UINT16 fFlags );
extern BOOLEAN DisplayWindowFunc( DisplayList *pNode, INT16 iTopCutOff, INT16 iBottomCutOff, SGPPoint *pUpperLeft, UINT16 fFlags);
#endif
#endif