Add and remove excess empty lines between functions,

Make code better.
This commit is contained in:
zcaliptium 2016-03-29 23:49:32 +03:00
parent c0a1b7bdf7
commit 31d597856d
20 changed files with 44 additions and 38 deletions

View File

@ -18,7 +18,6 @@ CMGEdit::CMGEdit(void)
Clear(); Clear();
} }
void CMGEdit::Clear(void) void CMGEdit::Clear(void)
{ {
mg_iCursorPos = 0; mg_iCursorPos = 0;
@ -26,7 +25,6 @@ void CMGEdit::Clear(void)
_bEditingString = FALSE; _bEditingString = FALSE;
} }
void CMGEdit::OnActivate(void) void CMGEdit::OnActivate(void)
{ {
if (!mg_bEnabled) { if (!mg_bEnabled) {
@ -112,7 +110,6 @@ BOOL CMGEdit::OnKeyDown(int iVKey)
return TRUE; return TRUE;
} }
// char typed // char typed
BOOL CMGEdit::OnChar(MSG msg) BOOL CMGEdit::OnChar(MSG msg)
{ {
@ -134,7 +131,6 @@ BOOL CMGEdit::OnChar(MSG msg)
return TRUE; return TRUE;
} }
void CMGEdit::Render(CDrawPort *pdp) void CMGEdit::Render(CDrawPort *pdp)
{ {
if (mg_bEditing) { if (mg_bEditing) {
@ -160,9 +156,11 @@ void CMGEdit::Render(CDrawPort *pdp)
CMGButton::Render(pdp); CMGButton::Render(pdp);
} }
} }
void CMGEdit::OnStringChanged(void) void CMGEdit::OnStringChanged(void)
{ {
} }
void CMGEdit::OnStringCanceled(void) void CMGEdit::OnStringCanceled(void)
{ {
} }

View File

@ -120,6 +120,7 @@ void CMGFileButton::OnActivate(void)
mg_iState = FBS_SAVENAME; mg_iState = FBS_SAVENAME;
} }
} }
BOOL CMGFileButton::OnKeyDown(int iVKey) BOOL CMGFileButton::OnKeyDown(int iVKey)
{ {
if (mg_iState == FBS_NORMAL) { if (mg_iState == FBS_NORMAL) {

View File

@ -17,7 +17,6 @@ CMGKeyDefinition::CMGKeyDefinition(void)
mg_iState = DOING_NOTHING; mg_iState = DOING_NOTHING;
} }
void CMGKeyDefinition::OnActivate(void) void CMGKeyDefinition::OnActivate(void)
{ {
PlayMenuSound(_psdPress); PlayMenuSound(_psdPress);
@ -26,7 +25,6 @@ void CMGKeyDefinition::OnActivate(void)
mg_iState = RELEASE_RETURN_WAITING; mg_iState = RELEASE_RETURN_WAITING;
} }
BOOL CMGKeyDefinition::OnKeyDown(int iVKey) BOOL CMGKeyDefinition::OnKeyDown(int iVKey)
{ {
// if waiting for a key definition // if waiting for a key definition

View File

@ -18,7 +18,6 @@ void CMGLevelButton::OnActivate(void)
_pAfterLevelChosen(); _pAfterLevelChosen();
} }
void CMGLevelButton::OnSetFocus(void) void CMGLevelButton::OnSetFocus(void)
{ {
SetThumbnail(mg_fnmLevel); SetThumbnail(mg_fnmLevel);

View File

@ -31,7 +31,6 @@ void PrintInBox(CDrawPort *pdp, PIX pixI, PIX pixJ, PIX pixSizeI, CTString str,
pdp->PutText(str, pixI, pixJ, col); pdp->PutText(str, pixI, pixJ, col);
} }
CMGServerList::CMGServerList() CMGServerList::CMGServerList()
{ {
mg_iSelected = 0; mg_iSelected = 0;
@ -285,7 +284,6 @@ static INDEX SliderPixToIndex(PIX pixOffset, INDEX iVisible, INDEX iTotal, PIXaa
return (iTotal*pixOffset) / pixFull; return (iTotal*pixOffset) / pixFull;
} }
static PIXaabbox2D GetSliderBox(INDEX iFirst, INDEX iVisible, INDEX iTotal, static PIXaabbox2D GetSliderBox(INDEX iFirst, INDEX iVisible, INDEX iTotal,
PIXaabbox2D boxFull) PIXaabbox2D boxFull)
{ {
@ -306,6 +304,7 @@ PIXaabbox2D CMGServerList::GetScrollBarFullBox(void)
{ {
return PIXaabbox2D(PIX2D(mg_pixSBMinI, mg_pixSBMinJ), PIX2D(mg_pixSBMaxI, mg_pixSBMaxJ)); return PIXaabbox2D(PIX2D(mg_pixSBMinI, mg_pixSBMinJ), PIX2D(mg_pixSBMaxI, mg_pixSBMaxJ));
} }
PIXaabbox2D CMGServerList::GetScrollBarHandleBox(void) PIXaabbox2D CMGServerList::GetScrollBarHandleBox(void)
{ {
return GetSliderBox(mg_iFirstOnScreen, mg_ctOnScreen, _lhServers.Count(), GetScrollBarFullBox()); return GetSliderBox(mg_iFirstOnScreen, mg_ctOnScreen, _lhServers.Count(), GetScrollBarFullBox());
@ -438,6 +437,7 @@ void CMGServerList::OnSetFocus(void)
{ {
mg_bFocused = TRUE; mg_bFocused = TRUE;
} }
void CMGServerList::OnKillFocus(void) void CMGServerList::OnKillFocus(void)
{ {
mg_bFocused = FALSE; mg_bFocused = FALSE;

View File

@ -72,7 +72,6 @@ BOOL CMGSlider::OnKeyDown(int iVKey)
return CMenuGadget::OnKeyDown(iVKey); return CMenuGadget::OnKeyDown(iVKey);
} }
PIXaabbox2D CMGSlider::GetSliderBox(void) PIXaabbox2D CMGSlider::GetSliderBox(void)
{ {
extern CDrawPort *pdp; extern CDrawPort *pdp;
@ -85,7 +84,6 @@ PIXaabbox2D CMGSlider::GetSliderBox(void)
return PIXaabbox2D(PIX2D(pixIR + 1, pixJ + 1), PIX2D(pixIR + pixISizeR - 2, pixJ + pixJSize - 2)); return PIXaabbox2D(PIX2D(pixIR + 1, pixJ + 1), PIX2D(pixIR + pixISizeR - 2, pixJ + pixJSize - 2));
} }
void CMGSlider::Render(CDrawPort *pdp) void CMGSlider::Render(CDrawPort *pdp)
{ {
SetFontMedium(pdp); SetFontMedium(pdp);

View File

@ -37,7 +37,6 @@ void CMGTrigger::ApplyCurrentSelection(void)
mg_strValue = mg_astrTexts[mg_iSelected]; mg_strValue = mg_astrTexts[mg_iSelected];
} }
void CMGTrigger::OnSetNextInList(int iVKey) void CMGTrigger::OnSetNextInList(int iVKey)
{ {
if (mg_pPreTriggerChange != NULL) { if (mg_pPreTriggerChange != NULL) {
@ -52,7 +51,6 @@ void CMGTrigger::OnSetNextInList(int iVKey)
} }
} }
BOOL CMGTrigger::OnKeyDown(int iVKey) BOOL CMGTrigger::OnKeyDown(int iVKey)
{ {
if ((iVKey == VK_RETURN || iVKey == VK_LBUTTON) || if ((iVKey == VK_RETURN || iVKey == VK_LBUTTON) ||
@ -68,7 +66,6 @@ BOOL CMGTrigger::OnKeyDown(int iVKey)
return FALSE; return FALSE;
} }
void CMGTrigger::Render(CDrawPort *pdp) void CMGTrigger::Render(CDrawPort *pdp)
{ {
SetFontMedium(pdp); SetFontMedium(pdp);

View File

@ -17,7 +17,6 @@ BOOL CMGVarButton::IsSeparator(void)
return mg_pvsVar->vs_bSeparator; return mg_pvsVar->vs_bSeparator;
} }
BOOL CMGVarButton::IsEnabled(void) BOOL CMGVarButton::IsEnabled(void)
{ {
return(_gmRunningGameMode == GM_NONE return(_gmRunningGameMode == GM_NONE
@ -25,7 +24,6 @@ BOOL CMGVarButton::IsEnabled(void)
|| mg_pvsVar->vs_bCanChangeInGame); || mg_pvsVar->vs_bCanChangeInGame);
} }
// return slider position on scren // return slider position on scren
PIXaabbox2D CMGVarButton::GetSliderBox(void) PIXaabbox2D CMGVarButton::GetSliderBox(void)
{ {
@ -111,7 +109,6 @@ BOOL CMGVarButton::OnKeyDown(int iVKey)
return CMenuGadget::OnKeyDown(iVKey); return CMenuGadget::OnKeyDown(iVKey);
} }
void CMGVarButton::Render(CDrawPort *pdp) void CMGVarButton::Render(CDrawPort *pdp)
{ {
if (mg_pvsVar == NULL) { if (mg_pvsVar == NULL) {

View File

@ -85,6 +85,7 @@ void CMenuGadget::Disappear(void)
void CMenuGadget::Think(void) void CMenuGadget::Think(void)
{ {
} }
void CMenuGadget::OnMouseOver(PIX pixI, PIX pixJ) void CMenuGadget::OnMouseOver(PIX pixI, PIX pixJ)
{ {
} }

View File

@ -93,6 +93,7 @@ void CCustomizeKeyboardMenu::StartMenu(void)
gm_iListWantedItem = 0; gm_iListWantedItem = 0;
CGameMenu::StartMenu(); CGameMenu::StartMenu();
} }
void CCustomizeKeyboardMenu::EndMenu(void) void CCustomizeKeyboardMenu::EndMenu(void)
{ {
ControlsMenuOff(); ControlsMenuOff();

View File

@ -126,8 +126,7 @@ void CInGameMenu::StartMenu(void)
gm_mgLabel1.mg_strText.PrintF(TRANS("Player: %s"), pc.GetNameForPrinting()); gm_mgLabel1.mg_strText.PrintF(TRANS("Player: %s"), pc.GetNameForPrinting());
gm_mgLabel2.mg_strText = ""; gm_mgLabel2.mg_strText = "";
} } else {
else {
if (_pNetwork->IsServer()) { if (_pNetwork->IsServer()) {
CTString strHost, strAddress; CTString strHost, strAddress;
@ -142,8 +141,8 @@ void CInGameMenu::StartMenu(void)
gm_mgLabel1.mg_strText = TRANS("Address: ") + strHostName; gm_mgLabel1.mg_strText = TRANS("Address: ") + strHostName;
gm_mgLabel2.mg_strText = ""; gm_mgLabel2.mg_strText = "";
}
else { } else {
CTString strConfig; CTString strConfig;
strConfig = TRANS("<not adjusted>"); strConfig = TRANS("<not adjusted>");

View File

@ -77,8 +77,6 @@ void CLevelsMenu::FillListItems(void)
gm_mgArrowDn.mg_bEnabled = !bHasLast && ctLabels>0; gm_mgArrowDn.mg_bEnabled = !bHasLast && ctLabels>0;
} }
void CLevelsMenu::StartMenu(void) void CLevelsMenu::StartMenu(void)
{ {
// set default parameters for the list // set default parameters for the list

View File

@ -130,6 +130,7 @@ void CLoadSaveMenu::StartMenu(void)
CGameMenu::StartMenu(); CGameMenu::StartMenu();
} }
void CLoadSaveMenu::EndMenu(void) void CLoadSaveMenu::EndMenu(void)
{ {
// delete all file infos // delete all file infos
@ -196,11 +197,11 @@ BOOL CLoadSaveMenu::ParseFile(const CTFileName &fnm, CTString &strName)
if (fnm.FileExt() != gm_fnmExt) { if (fnm.FileExt() != gm_fnmExt) {
return FALSE; return FALSE;
} }
CTFileName fnSaveGameDescription = fnm.NoExt() + ".des"; CTFileName fnSaveGameDescription = fnm.NoExt() + ".des";
try { try {
strName.Load_t(fnSaveGameDescription); strName.Load_t(fnSaveGameDescription);
} } catch (char *strError) {
catch (char *strError) {
(void)strError; (void)strError;
strName = fnm.FileName(); strName = fnm.FileName();

View File

@ -106,6 +106,7 @@ void CMainMenu::Initialize_t(void)
gm_mgQuit.mg_pmgDown = &gm_mgSingle; gm_mgQuit.mg_pmgDown = &gm_mgSingle;
gm_mgQuit.mg_pActivatedFunction = NULL; gm_mgQuit.mg_pActivatedFunction = NULL;
} }
void CMainMenu::StartMenu(void) void CMainMenu::StartMenu(void)
{ {
gm_mgSingle.mg_bEnabled = IsMenuEnabled("Single Player"); gm_mgSingle.mg_bEnabled = IsMenuEnabled("Single Player");

View File

@ -88,9 +88,6 @@ void CNetworkStartMenu::Initialize_t(void)
gm_mgStart.mg_strText = TRANS("START"); gm_mgStart.mg_strText = TRANS("START");
gm_lhGadgets.AddTail(gm_mgStart.mg_lnNode); gm_lhGadgets.AddTail(gm_mgStart.mg_lnNode);
gm_mgStart.mg_pActivatedFunction = NULL; gm_mgStart.mg_pActivatedFunction = NULL;
} }
void CNetworkStartMenu::StartMenu(void) void CNetworkStartMenu::StartMenu(void)

View File

@ -178,8 +178,7 @@ void CPlayerProfileMenu::SelectPlayer(INDEX iPlayer)
if (_iLocalPlayer >= 0 && _iLocalPlayer<4) { if (_iLocalPlayer >= 0 && _iLocalPlayer<4) {
_pGame->gm_aiMenuLocalPlayers[_iLocalPlayer] = iPlayer; _pGame->gm_aiMenuLocalPlayers[_iLocalPlayer] = iPlayer;
} } else {
else {
_pGame->gm_iSinglePlayer = iPlayer; _pGame->gm_iSinglePlayer = iPlayer;
} }
gm_mgNameField.mg_pstrToChange = &pc.pc_strName; gm_mgNameField.mg_pstrToChange = &pc.pc_strName;
@ -215,8 +214,7 @@ void CPlayerProfileMenu::SelectPlayer(INDEX iPlayer)
// no model // no model
gm_mgModel.mg_moModel.SetData(NULL); gm_mgModel.mg_moModel.SetData(NULL);
// if there is some // if there is some
} } else {
else {
// set the model // set the model
BOOL(*pFunc)(CModelObject *, CPlayerCharacter *, CTString &, BOOL) = BOOL(*pFunc)(CModelObject *, CPlayerCharacter *, CTString &, BOOL) =
(BOOL(*)(CModelObject *, CPlayerCharacter *, CTString &, BOOL))pss->ss_pvValue; (BOOL(*)(CModelObject *, CPlayerCharacter *, CTString &, BOOL))pss->ss_pvValue;
@ -258,8 +256,7 @@ void CPlayerProfileMenu::StartMenu(void)
for (INDEX i = 0; i<8; i++) { for (INDEX i = 0; i<8; i++) {
gm_mgNumber[i].mg_bEnabled = TRUE; gm_mgNumber[i].mg_bEnabled = TRUE;
} }
} } else {
else {
for (INDEX i = 0; i<8; i++) { for (INDEX i = 0; i<8; i++) {
gm_mgNumber[i].mg_bEnabled = FALSE; gm_mgNumber[i].mg_bEnabled = FALSE;
} }
@ -281,7 +278,6 @@ void CPlayerProfileMenu::StartMenu(void)
CGameMenu::StartMenu(); CGameMenu::StartMenu();
} }
void CPlayerProfileMenu::EndMenu(void) void CPlayerProfileMenu::EndMenu(void)
{ {
_pGame->SavePlayersAndControls(); _pGame->SavePlayersAndControls();

View File

@ -119,8 +119,7 @@ void CSinglePlayerMenu::StartMenu(void)
gm_mgPlayersAndControls.mg_boxOnScreen = BoxBigRow(6.0f); gm_mgPlayersAndControls.mg_boxOnScreen = BoxBigRow(6.0f);
gm_mgOptions.mg_boxOnScreen = BoxBigRow(7.0f); gm_mgOptions.mg_boxOnScreen = BoxBigRow(7.0f);
} } else {
else {
if (gm_mgTraining.mg_lnNode.IsLinked()) { if (gm_mgTraining.mg_lnNode.IsLinked()) {
gm_mgTraining.mg_lnNode.Remove(); gm_mgTraining.mg_lnNode.Remove();
} }

View File

@ -62,7 +62,6 @@ void CVideoOptionsMenu::Initialize_t(void)
gm_mgApply.mg_pActivatedFunction = NULL; gm_mgApply.mg_pActivatedFunction = NULL;
} }
void CVideoOptionsMenu::StartMenu(void) void CVideoOptionsMenu::StartMenu(void)
{ {
InitVideoOptionsButtons(); InitVideoOptionsButtons();

View File

@ -22,18 +22,21 @@ FLOATaabbox2D BoxTitle(void)
FLOAT2D(0, _fBigSizeJ), FLOAT2D(0, _fBigSizeJ),
FLOAT2D(1, _fBigSizeJ)); FLOAT2D(1, _fBigSizeJ));
} }
FLOATaabbox2D BoxNoUp(FLOAT fRow) FLOATaabbox2D BoxNoUp(FLOAT fRow)
{ {
return FLOATaabbox2D( return FLOATaabbox2D(
FLOAT2D(_fNoStartI+fRow*(_fNoSizeI+_fNoSpaceI), _fNoUpStartJ), FLOAT2D(_fNoStartI+fRow*(_fNoSizeI+_fNoSpaceI), _fNoUpStartJ),
FLOAT2D(_fNoStartI+fRow*(_fNoSizeI+_fNoSpaceI)+_fNoSizeI, _fNoUpStartJ+_fNoSizeJ)); FLOAT2D(_fNoStartI+fRow*(_fNoSizeI+_fNoSpaceI)+_fNoSizeI, _fNoUpStartJ+_fNoSizeJ));
} }
FLOATaabbox2D BoxNoDown(FLOAT fRow) FLOATaabbox2D BoxNoDown(FLOAT fRow)
{ {
return FLOATaabbox2D( return FLOATaabbox2D(
FLOAT2D(_fNoStartI+fRow*(_fNoSizeI+_fNoSpaceI), _fNoDownStartJ), FLOAT2D(_fNoStartI+fRow*(_fNoSizeI+_fNoSpaceI), _fNoDownStartJ),
FLOAT2D(_fNoStartI+fRow*(_fNoSizeI+_fNoSpaceI)+_fNoSizeI, _fNoDownStartJ+_fNoSizeJ)); FLOAT2D(_fNoStartI+fRow*(_fNoSizeI+_fNoSpaceI)+_fNoSizeI, _fNoDownStartJ+_fNoSizeJ));
} }
FLOATaabbox2D BoxBigRow(FLOAT fRow) FLOATaabbox2D BoxBigRow(FLOAT fRow)
{ {
return FLOATaabbox2D( return FLOATaabbox2D(
@ -46,6 +49,7 @@ FLOATaabbox2D BoxBigLeft(FLOAT fRow)
FLOAT2D(0.1f, _fBigStartJ+fRow*_fBigSizeJ), FLOAT2D(0.1f, _fBigStartJ+fRow*_fBigSizeJ),
FLOAT2D(0.45f, _fBigStartJ+(fRow+1)*_fBigSizeJ)); FLOAT2D(0.45f, _fBigStartJ+(fRow+1)*_fBigSizeJ));
} }
FLOATaabbox2D BoxBigRight(FLOAT fRow) FLOATaabbox2D BoxBigRight(FLOAT fRow)
{ {
return FLOATaabbox2D( return FLOATaabbox2D(
@ -66,48 +70,56 @@ FLOATaabbox2D BoxVersion(void)
FLOAT2D(0.05f, _fBigStartJ+-5.5f*_fMediumSizeJ), FLOAT2D(0.05f, _fBigStartJ+-5.5f*_fMediumSizeJ),
FLOAT2D(0.97f, _fBigStartJ+(-5.5f+1)*_fMediumSizeJ)); FLOAT2D(0.97f, _fBigStartJ+(-5.5f+1)*_fMediumSizeJ));
} }
FLOATaabbox2D BoxMediumRow(FLOAT fRow) FLOATaabbox2D BoxMediumRow(FLOAT fRow)
{ {
return FLOATaabbox2D( return FLOATaabbox2D(
FLOAT2D(0.05f, _fBigStartJ+fRow*_fMediumSizeJ), FLOAT2D(0.05f, _fBigStartJ+fRow*_fMediumSizeJ),
FLOAT2D(0.95f, _fBigStartJ+(fRow+1)*_fMediumSizeJ)); FLOAT2D(0.95f, _fBigStartJ+(fRow+1)*_fMediumSizeJ));
} }
FLOATaabbox2D BoxKeyRow(FLOAT fRow) FLOATaabbox2D BoxKeyRow(FLOAT fRow)
{ {
return FLOATaabbox2D( return FLOATaabbox2D(
FLOAT2D(0.15f, _fBigStartJ+fRow*_fMediumSizeJ), FLOAT2D(0.15f, _fBigStartJ+fRow*_fMediumSizeJ),
FLOAT2D(0.85f, _fBigStartJ+(fRow+1)*_fMediumSizeJ)); FLOAT2D(0.85f, _fBigStartJ+(fRow+1)*_fMediumSizeJ));
} }
FLOATaabbox2D BoxMediumLeft(FLOAT fRow) FLOATaabbox2D BoxMediumLeft(FLOAT fRow)
{ {
return FLOATaabbox2D( return FLOATaabbox2D(
FLOAT2D(0.05f, _fBigStartJ+fRow*_fMediumSizeJ), FLOAT2D(0.05f, _fBigStartJ+fRow*_fMediumSizeJ),
FLOAT2D(0.45f, _fBigStartJ+(fRow+1)*_fMediumSizeJ)); FLOAT2D(0.45f, _fBigStartJ+(fRow+1)*_fMediumSizeJ));
} }
FLOATaabbox2D BoxPlayerSwitch(FLOAT fRow) FLOATaabbox2D BoxPlayerSwitch(FLOAT fRow)
{ {
return FLOATaabbox2D( return FLOATaabbox2D(
FLOAT2D(0.05f, _fBigStartJ+fRow*_fMediumSizeJ), FLOAT2D(0.05f, _fBigStartJ+fRow*_fMediumSizeJ),
FLOAT2D(0.65f, _fBigStartJ+(fRow+1)*_fMediumSizeJ)); FLOAT2D(0.65f, _fBigStartJ+(fRow+1)*_fMediumSizeJ));
} }
FLOATaabbox2D BoxMediumMiddle(FLOAT fRow) FLOATaabbox2D BoxMediumMiddle(FLOAT fRow)
{ {
return FLOATaabbox2D( return FLOATaabbox2D(
FLOAT2D(_fNoStartI, _fBigStartJ+fRow*_fMediumSizeJ), FLOAT2D(_fNoStartI, _fBigStartJ+fRow*_fMediumSizeJ),
FLOAT2D(0.95f, _fBigStartJ+(fRow+1)*_fMediumSizeJ)); FLOAT2D(0.95f, _fBigStartJ+(fRow+1)*_fMediumSizeJ));
} }
FLOATaabbox2D BoxPlayerEdit(FLOAT fRow) FLOATaabbox2D BoxPlayerEdit(FLOAT fRow)
{ {
return FLOATaabbox2D( return FLOATaabbox2D(
FLOAT2D(_fNoStartI, _fBigStartJ+fRow*_fMediumSizeJ), FLOAT2D(_fNoStartI, _fBigStartJ+fRow*_fMediumSizeJ),
FLOAT2D(0.65f, _fBigStartJ+(fRow+1)*_fMediumSizeJ)); FLOAT2D(0.65f, _fBigStartJ+(fRow+1)*_fMediumSizeJ));
} }
FLOATaabbox2D BoxMediumRight(FLOAT fRow) FLOATaabbox2D BoxMediumRight(FLOAT fRow)
{ {
return FLOATaabbox2D( return FLOATaabbox2D(
FLOAT2D(0.55f, _fBigStartJ+fRow*_fMediumSizeJ), FLOAT2D(0.55f, _fBigStartJ+fRow*_fMediumSizeJ),
FLOAT2D(0.95f, _fBigStartJ+(fRow+1)*_fMediumSizeJ)); FLOAT2D(0.95f, _fBigStartJ+(fRow+1)*_fMediumSizeJ));
} }
FLOATaabbox2D BoxPopup(void) FLOATaabbox2D BoxPopup(void)
{ {
return FLOATaabbox2D(FLOAT2D(0.2f, 0.4f), FLOAT2D(0.8f, 0.6f)); return FLOATaabbox2D(FLOAT2D(0.2f, 0.4f), FLOAT2D(0.8f, 0.6f));
@ -119,30 +131,35 @@ FLOATaabbox2D BoxPopupLabel(void)
FLOAT2D(0.22f, 0.43f), FLOAT2D(0.22f, 0.43f),
FLOAT2D(0.78f, 0.49f)); FLOAT2D(0.78f, 0.49f));
} }
FLOATaabbox2D BoxPopupYesLarge(void) FLOATaabbox2D BoxPopupYesLarge(void)
{ {
return FLOATaabbox2D( return FLOATaabbox2D(
FLOAT2D(0.30f, 0.51f), FLOAT2D(0.30f, 0.51f),
FLOAT2D(0.48f, 0.57f)); FLOAT2D(0.48f, 0.57f));
} }
FLOATaabbox2D BoxPopupNoLarge(void) FLOATaabbox2D BoxPopupNoLarge(void)
{ {
return FLOATaabbox2D( return FLOATaabbox2D(
FLOAT2D(0.52f, 0.51f), FLOAT2D(0.52f, 0.51f),
FLOAT2D(0.70f, 0.57f)); FLOAT2D(0.70f, 0.57f));
} }
FLOATaabbox2D BoxPopupYesSmall(void) FLOATaabbox2D BoxPopupYesSmall(void)
{ {
return FLOATaabbox2D( return FLOATaabbox2D(
FLOAT2D(0.30f, 0.54f), FLOAT2D(0.30f, 0.54f),
FLOAT2D(0.48f, 0.59f)); FLOAT2D(0.48f, 0.59f));
} }
FLOATaabbox2D BoxPopupNoSmall(void) FLOATaabbox2D BoxPopupNoSmall(void)
{ {
return FLOATaabbox2D( return FLOATaabbox2D(
FLOAT2D(0.52f, 0.54f), FLOAT2D(0.52f, 0.54f),
FLOAT2D(0.70f, 0.59f)); FLOAT2D(0.70f, 0.59f));
} }
FLOATaabbox2D BoxChangePlayer(INDEX iTable, INDEX iButton) FLOATaabbox2D BoxChangePlayer(INDEX iTable, INDEX iButton)
{ {
return FLOATaabbox2D( return FLOATaabbox2D(
@ -205,6 +222,7 @@ FLOATaabbox2D BoxLeftColumn(FLOAT fRow)
FLOAT2D(0.02f, _fBigStartJ+fRow*_fMediumSizeJ), FLOAT2D(0.02f, _fBigStartJ+fRow*_fMediumSizeJ),
FLOAT2D(0.15f, _fBigStartJ+(fRow+1)*_fMediumSizeJ)); FLOAT2D(0.15f, _fBigStartJ+(fRow+1)*_fMediumSizeJ));
} }
FLOATaabbox2D BoxPlayerModel(void) FLOATaabbox2D BoxPlayerModel(void)
{ {
extern INDEX sam_bWideScreen; extern INDEX sam_bWideScreen;
@ -214,10 +232,12 @@ FLOATaabbox2D BoxPlayerModel(void)
return FLOATaabbox2D(FLOAT2D(0.68f, 0.235f), FLOAT2D(0.68f+(0.965f-0.68f)*9.0f/12.0f, 0.78f)); return FLOATaabbox2D(FLOAT2D(0.68f, 0.235f), FLOAT2D(0.68f+(0.965f-0.68f)*9.0f/12.0f, 0.78f));
} }
} }
FLOATaabbox2D BoxPlayerModelName(void) FLOATaabbox2D BoxPlayerModelName(void)
{ {
return FLOATaabbox2D(FLOAT2D(0.68f, 0.78f), FLOAT2D(0.965f, 0.82f)); return FLOATaabbox2D(FLOAT2D(0.68f, 0.78f), FLOAT2D(0.965f, 0.82f));
} }
PIXaabbox2D FloatBoxToPixBox(const CDrawPort *pdp, const FLOATaabbox2D &boxF) PIXaabbox2D FloatBoxToPixBox(const CDrawPort *pdp, const FLOATaabbox2D &boxF)
{ {
PIX pixW = pdp->GetWidth(); PIX pixW = pdp->GetWidth();
@ -243,6 +263,7 @@ void SetFontTitle(CDrawPort *pdp)
pdp->SetTextScaling( 1.25f * pdp->GetWidth() /640 *pdp->dp_fWideAdjustment); pdp->SetTextScaling( 1.25f * pdp->GetWidth() /640 *pdp->dp_fWideAdjustment);
pdp->SetTextAspect(1.0f); pdp->SetTextAspect(1.0f);
} }
extern CFontData _fdBig; extern CFontData _fdBig;
void SetFontBig(CDrawPort *pdp) void SetFontBig(CDrawPort *pdp)
{ {
@ -250,6 +271,7 @@ void SetFontBig(CDrawPort *pdp)
pdp->SetTextScaling( 1.0f * pdp->GetWidth() /640 *pdp->dp_fWideAdjustment); pdp->SetTextScaling( 1.0f * pdp->GetWidth() /640 *pdp->dp_fWideAdjustment);
pdp->SetTextAspect(1.0f); pdp->SetTextAspect(1.0f);
} }
extern CFontData _fdMedium; extern CFontData _fdMedium;
void SetFontMedium(CDrawPort *pdp) void SetFontMedium(CDrawPort *pdp)
{ {
@ -257,6 +279,7 @@ void SetFontMedium(CDrawPort *pdp)
pdp->SetTextScaling( 1.0f * pdp->GetWidth() /640 *pdp->dp_fWideAdjustment); pdp->SetTextScaling( 1.0f * pdp->GetWidth() /640 *pdp->dp_fWideAdjustment);
pdp->SetTextAspect(0.75f); pdp->SetTextAspect(0.75f);
} }
void SetFontSmall(CDrawPort *pdp) void SetFontSmall(CDrawPort *pdp)
{ {
pdp->SetFont( _pfdConsoleFont); pdp->SetFont( _pfdConsoleFont);

View File

@ -176,18 +176,21 @@ int qsort_CompareFileInfos_NameUp(const void *elem1, const void *elem2)
const CFileInfo &fi2 = **(CFileInfo **)elem2; const CFileInfo &fi2 = **(CFileInfo **)elem2;
return strcmp(fi1.fi_strName, fi2.fi_strName); return strcmp(fi1.fi_strName, fi2.fi_strName);
} }
int qsort_CompareFileInfos_NameDn(const void *elem1, const void *elem2) int qsort_CompareFileInfos_NameDn(const void *elem1, const void *elem2)
{ {
const CFileInfo &fi1 = **(CFileInfo **)elem1; const CFileInfo &fi1 = **(CFileInfo **)elem1;
const CFileInfo &fi2 = **(CFileInfo **)elem2; const CFileInfo &fi2 = **(CFileInfo **)elem2;
return -strcmp(fi1.fi_strName, fi2.fi_strName); return -strcmp(fi1.fi_strName, fi2.fi_strName);
} }
int qsort_CompareFileInfos_FileUp(const void *elem1, const void *elem2) int qsort_CompareFileInfos_FileUp(const void *elem1, const void *elem2)
{ {
const CFileInfo &fi1 = **(CFileInfo **)elem1; const CFileInfo &fi1 = **(CFileInfo **)elem1;
const CFileInfo &fi2 = **(CFileInfo **)elem2; const CFileInfo &fi2 = **(CFileInfo **)elem2;
return strcmp(fi1.fi_fnFile, fi2.fi_fnFile); return strcmp(fi1.fi_fnFile, fi2.fi_fnFile);
} }
int qsort_CompareFileInfos_FileDn(const void *elem1, const void *elem2) int qsort_CompareFileInfos_FileDn(const void *elem1, const void *elem2)
{ {
const CFileInfo &fi1 = **(CFileInfo **)elem1; const CFileInfo &fi1 = **(CFileInfo **)elem1;