|
Wing Commander II
Reconstructed Win32 source (1996)
|
Text input and modal text panels. More...
#include "game.h"Go to the source code of this file.
Functions | |
| void | EraseLastTextInputCharacter (void) |
| void | EraseTextContextBackground (TextContext *context) |
| void | DrawTextInputCursor (char character) |
| void | EraseCharacterAfterTextCursor (char character) |
| void | ClearTextInputCharacter (char character) |
| short | InitializeModalTextPanel (ModalTextPanel *panel, short fontIndex, ModalPanelBounds bounds, short clearColour, short backgroundColour, short borderColour) |
| void | DrawModalTextPanel (ModalTextPanel *panel, short x, short y, unsigned char alignment, const char *format,...) |
| void | RestoreModalTextPanel (ModalTextPanel *panel) |
| short | ShowModalTextPanel (short fontIndex, const char *format,...) |
| void | ReleaseModalTextPanel (void) |
| short | ReadTextInput (char *destination, short maximumLength, volatile short mode, volatile short allowPathSeparators) |
| short | ReadPersonnelTextField (unsigned int x, unsigned int y, int font, const char *prompt, char *destination, int maximumLength, int mode, int required) |
| short | PollCampaignChalkboardMenu (unsigned char *scene) |
| short | RunCampaignChalkboardMenu (short campaignSlot) |
Variables | |
| unsigned char | g_abTaggedAllocationPrefix [8] |
| ShortRect | g_stModalBounds = {0x18, 0x28, 0x128, 0x3c} |
| ModalTextPanel * | g_pModalTextPanel = 0 |
| unsigned char * | g_pCampaignChalkboardShape = 0 |
| short | g_bDisableChalkboardReplay = 0 |
Text input and modal text panels.
Definition in file optmenu.c.
| void ClearTextInputCharacter | ( | char | character | ) |
Definition at line 84 of file optmenu.c.
References TextContext::backgroundColour, Viewport::bottom, ClearTextInputCharacter(), ClearViewport(), TextContext::cursorX, TextContext::cursorY, TextContext::font, g_29_pCurrentTextContext, GetFontCharWidth(), Viewport::left, ReadWord(), Viewport::right, Viewport::top, and TextContext::viewport.
Referenced by ClearTextInputCharacter(), close_behind(), and EraseCharacterAfterTextCursor().
| void DrawModalTextPanel | ( | ModalTextPanel * | panel, |
| short | x, | ||
| short | y, | ||
| unsigned char | alignment, | ||
| const char * | format, | ||
| ... ) |
Definition at line 133 of file optmenu.c.
References TextContext::alignment, ModalTextPanel::context, DIBslamReal(), DrawModalTextPanel(), FormatTextBufferFromStart(), ModalTextPanel::left, MarkDibDirty(), SetTextCursor(), and ModalTextPanel::top.
Referenced by DrawModalTextPanel(), and ShowModalTextPanel().
| void DrawTextInputCursor | ( | char | character | ) |
Definition at line 56 of file optmenu.c.
References TextContext::backgroundColour, TextContext::colour, TextContext::cursorX, DrawFormattedText(), DrawTextInputCursor(), and g_29_pCurrentTextContext.
Referenced by close_behind(), DrawTextInputCursor(), and ReadTextInput().
| void EraseCharacterAfterTextCursor | ( | char | character | ) |
Definition at line 73 of file optmenu.c.
References ClearTextInputCharacter(), TextContext::cursorX, EraseCharacterAfterTextCursor(), and g_29_pCurrentTextContext.
Referenced by close_behind(), EraseCharacterAfterTextCursor(), and ReadTextInput().
Definition at line 17 of file optmenu.c.
References TextContext::backgroundColour, Viewport::bottom, ClearViewport(), TextContext::cursorX, TextContext::cursorY, DosStrlen(), EraseLastTextInputCharacter(), TextContext::font, g_29_pCurrentTextContext, GetFontCharWidth(), Viewport::left, MeasureTextPixelWidthClamped(), ReadWord(), Viewport::right, TextContext::text, Viewport::top, and TextContext::viewport.
Referenced by close_behind(), EraseLastTextInputCharacter(), and ReadTextInput().
| void EraseTextContextBackground | ( | TextContext * | context | ) |
Definition at line 45 of file optmenu.c.
References TextContext::backgroundColour, ClearViewport(), EraseTextContextBackground(), g_cSecondaryViewBufferColour, and TextContext::viewport.
Referenced by close_behind(), EraseTextContextBackground(), and InitializeModalTextPanel().
| short InitializeModalTextPanel | ( | ModalTextPanel * | panel, |
| short | fontIndex, | ||
| ModalPanelBounds | bounds, | ||
| short | clearColour, | ||
| short | backgroundColour, | ||
| short | borderColour ) |
Definition at line 101 of file optmenu.c.
References AllocateViewport(), ModalTextPanel::bottom, ModalTextPanel::context, CopyViewportContents(), DrawViewportBorder(), EraseTextContextBackground(), g_16_szTextBufferBuffer, g_29_pCurrentTextContext, g_2_stModalSourceWindow, g_3_stDefaultStringContext, InitializeModalTextPanel(), InitializeTextContextFromFont(), ModalTextPanel::left, Viewport::left, ModalTextPanel::previousContext, ResetStringBuilder(), ModalTextPanel::right, ModalTextPanel::savedBackground, TextContext::text, ModalTextPanel::top, ModalTextPanel::viewport, and TextContext::viewport.
Referenced by InitializeModalTextPanel(), and ShowModalTextPanel().
| short PollCampaignChalkboardMenu | ( | unsigned char * | scene | ) |
Definition at line 362 of file optmenu.c.
References DisableMouseCursorDrawing(), DrawFormattedText(), DrawSpriteDefault(), EnableMouseCursorDrawing(), FlushInputEvents(), g_101_stScrViewInfo, g_3_stDefaultStringContext, g_bPrimaryViewBufferColour, g_pCampaignChalkboardShape, g_pszPersonnelFooter, g_stSecondaryViewBufferBlock, InitializeTextContextFromFont(), MeasureTextPixelWidthClamped(), PollCampaignChalkboardMenu(), PollSceneHotspotInput(), RefreshMemoryStatusOverlay(), SetMenuInputPump(), SetTextCursor(), and TextContext::viewport.
Referenced by CollectRasterClipColours(), PollCampaignChalkboardMenu(), and RunCampaignChalkboardMenu().
| short ReadPersonnelTextField | ( | unsigned int | x, |
| unsigned int | y, | ||
| int | font, | ||
| const char * | prompt, | ||
| char * | destination, | ||
| int | maximumLength, | ||
| int | mode, | ||
| int | required ) |
Definition at line 337 of file optmenu.c.
References DIBslamReal(), DrawFormattedText(), g_101_stScrViewInfo, g_3_stDefaultStringContext, g_stSecondaryViewBufferBlock, MarkDibDirty(), ReadPersonnelTextField(), ReadTextInput(), SetTextCursor(), and TextContext::viewport.
Referenced by close_behind(), LocateLegacySaveGame(), ReadPersonnelTextField(), RunPilotDatabaseMenu(), and RunPilotSaveLoadMenu().
| short ReadTextInput | ( | char * | destination, |
| short | maximumLength, | ||
| volatile short | mode, | ||
| volatile short | allowPathSeparators ) |
Definition at line 223 of file optmenu.c.
References TextContext::backgroundColour, Viewport::bottom, ClearViewport(), TextContext::cursorX, TextContext::cursorY, DIBslamReal(), DosStrcpy(), DosStrlen(), DrawFormattedText(), DrawTextInputCursor(), EraseCharacterAfterTextCursor(), EraseLastTextInputCharacter(), TextContext::font, g_29_pCurrentTextContext, g_bRewritePacketExtensions, Viewport::left, MarkDibDirty(), MeasureTextPixelWidthClamped(), ReadTextInput(), ReadWord(), Viewport::right, ServiceSoundSystem(), SetTextCursor(), TextContext::text, Viewport::top, TextContext::viewport, and WaitForQueuedInputPress().
Referenced by close_behind(), ReadPersonnelTextField(), and ReadTextInput().
Definition at line 208 of file optmenu.c.
References DIBslamReal(), g_pModalTextPanel, MarkDibDirty(), ReleaseModalTextPanel(), ReleasePacketHandle(), and RestoreModalTextPanel().
Referenced by CalibrateJoystickInteractive(), ReleaseModalTextPanel(), ShowModalMessage(), and ShowOnScreenMessage().
| void RestoreModalTextPanel | ( | ModalTextPanel * | panel | ) |
Definition at line 153 of file optmenu.c.
References CopyViewportContents(), DIBslamReal(), free_viewport(), g_29_pCurrentTextContext, MarkDibDirty(), ModalTextPanel::previousContext, RestoreModalTextPanel(), ModalTextPanel::savedBackground, and ModalTextPanel::viewport.
Referenced by ReleaseModalTextPanel(), RestoreModalTextPanel(), and ShowModalTextPanel().
| short RunCampaignChalkboardMenu | ( | short | campaignSlot | ) |
Definition at line 405 of file optmenu.c.
References PilotProfile::callsign, ClearViewport(), DisableMouseCursorDrawing(), exit_squadron(), CampaignGlobals::field_08, CampaignGlobals::field_0a, CampaignGlobals::field_0e, CampaignGlobals::field_16, free_viewport(), FreePacketAndClear(), g_2_stModalSourceWindow, g_bDisableChalkboardReplay, g_nOriginDevUnlock, g_pCampaignChalkboardShape, g_pCampaignGlobals, g_stCurrentPilotProfile, g_stSecondaryViewBufferBlock, InitializeCampaignChalkboardScreen(), PollCampaignChalkboardMenu(), PreloadMusicTrack(), RefreshCampaignChalkboardScreen(), ReleaseMusicTrack(), RunCampaignChalkboardMenu(), RunCampaignScript(), RunPilotSaveLoadMenu(), SetInputViewport(), spacetrack(), and StopMusicUnlessSuppressed().
Referenced by RunCampaignChalkboardMenu(), and RunCampaignGameLoop().
| short ShowModalTextPanel | ( | short | fontIndex, |
| const char * | format, | ||
| ... ) |
Definition at line 163 of file optmenu.c.
References AllocateTaggedMemory(), DIBslamReal(), DrawModalTextPanel(), g_bPrimaryViewBufferColour, g_cBlueColour, g_cRedColour, g_cSecondaryViewBufferColour, g_pModalTextPanel, g_stModalBounds, InitializeModalTextPanel(), ShortRect::left, MarkDibDirty(), MeasureTextPixelWidthClamped(), ReleasePacketHandle(), RestoreModalTextPanel(), ShortRect::right, and ShowModalTextPanel().
Referenced by CalibrateJoystickInteractive(), ShowModalMessage(), ShowModalTextPanel(), and ShowOnScreenMessage().
| unsigned char g_abTaggedAllocationPrefix[8] |
Definition at line 8 of file optmenu.c.
Referenced by AllocateTaggedMemory().
| short g_bDisableChalkboardReplay = 0 |
Definition at line 14 of file optmenu.c.
Referenced by PollSceneHotspotInput(), and RunCampaignChalkboardMenu().
| unsigned char* g_pCampaignChalkboardShape = 0 |
Definition at line 13 of file optmenu.c.
Referenced by DrawCampaignChalkboardFrame(), InitializeCampaignChalkboardScreen(), PollCampaignChalkboardMenu(), and RunCampaignChalkboardMenu().
| ModalTextPanel* g_pModalTextPanel = 0 |
Definition at line 12 of file optmenu.c.
Referenced by ReleaseModalTextPanel(), and ShowModalTextPanel().
| ShortRect g_stModalBounds = {0x18, 0x28, 0x128, 0x3c} |
Definition at line 11 of file optmenu.c.
Referenced by ShowModalTextPanel().