Merge restore-cut-vtvs: the cut vehicles, and the reference to go with them
Started as a question about eleven vehicles and seven maps missing from
our resource file. They were in a community 4.11 build; verifying that
file as a strict superset and promoting it brought them back, and most of
what follows came out of having to prove things about the file rather
than guess.
* The cut VTVs restored, and the content pipeline (RPL4TOOL -b) made to
work in this tree for the first time.
* The front end fits 800x600, uses dropdowns, and no longer paints
Windows grey over its own green.
* VTV-PRESETS.html: 38 vehicles, loadouts and six-preset tables decoded
by resource id, tabbed by hull.
* TRACKS.html: all 18 tracks. Nine now show the setup console's own
maps, recovered rather than reconstructed; the other nine are the
course traced through their gates.
* The airlock archive tracked whole, so those promotions stay
checkable, plus the console's track, vehicle and pod art.
Two corrections worth carrying: the vehicles were cut BY 4.11 rather than
never shipped - ALPHA_1/REL410 is a cockpit of the ALPHA wing and its
RPL4.RES is the retail file - and the top-down projection was mirrored,
which the console's picture of Brewer's Bane caught.
This commit is contained in:
+367
-76
@@ -33,6 +33,17 @@ namespace
|
||||
{ "brewers", "Brewer's Bane" },
|
||||
{ "pain", "Paingod's Passage" },
|
||||
{ "headoff", "Freezemoon's Freeway" },
|
||||
|
||||
// Maps that came with the promoted resource file. The console
|
||||
// config brackets their names in dashes, which is how it marks
|
||||
// the ones that are not original arcade tracks.
|
||||
{ "arena", "-- Arena (Small) --" },
|
||||
{ "demoderb", "-- Arena (Large) --" },
|
||||
{ "donut", "-- Donut --" },
|
||||
{ "tourdemars", "-- Tour De Mars --" },
|
||||
{ "trough", "-- Ares' Armpits --" },
|
||||
{ "wiserguys", "-- Wiserguy's --" },
|
||||
{ "rpweekend2014", "-- Zaxxis --" },
|
||||
};
|
||||
|
||||
// Football excludes pain/headoff and adds the football build of
|
||||
@@ -110,6 +121,23 @@ namespace
|
||||
{ "spitter", "Spitter" },
|
||||
{ "puck", "Armadillo" },
|
||||
{ "dragon", "Dragon" },
|
||||
|
||||
// Restored with the promoted resource file: cut from the .bld
|
||||
// after 4.10 shipped, back now that RPL4.RES carries them again.
|
||||
// Names from the console's own RPConfig.xml.
|
||||
{ "dark", "Blacker Puck" },
|
||||
{ "blktrn", "Black Tarantula" },
|
||||
{ "neut", "Neutrino" },
|
||||
|
||||
// Community variants that came with the same archive.
|
||||
{ "blkrpuck", "Blacker Armadillo" },
|
||||
{ "blkrbroc", "Blacker Broccoli" },
|
||||
{ "blkrdragon", "Blacker Dragon" },
|
||||
{ "blkrlepton", "Blacker Lepton" },
|
||||
{ "blkrquark", "Blacker Quark" },
|
||||
{ "blkrspk", "Blacker Speck" },
|
||||
{ "blkrtran", "Blacker Tarantula" },
|
||||
{ "blkrwasp", "Blacker Wasp" },
|
||||
};
|
||||
|
||||
const CatalogEntry kColors[] =
|
||||
@@ -214,6 +242,13 @@ namespace
|
||||
|
||||
HWND menuWindow;
|
||||
HWND nameEdit;
|
||||
|
||||
// Every list group is a drop-down. They are owner-drawn so they
|
||||
// keep the green-on-black panel look instead of arriving in
|
||||
// system colours, and their labels are painted by PaintMenu.
|
||||
HWND combo[GroupCount];
|
||||
RECT comboLabel[GroupCount];
|
||||
|
||||
HFONT textFont;
|
||||
HFONT titleFont;
|
||||
HBRUSH editBrush;
|
||||
@@ -223,6 +258,9 @@ namespace
|
||||
};
|
||||
|
||||
FEState *gFE = NULL;
|
||||
|
||||
// ItemName() reads this to answer with the right track list.
|
||||
const int *gItemNameSelection = NULL;
|
||||
int gLastMissionSeconds = 0;
|
||||
|
||||
// carried across races so cycling back to the menu keeps the
|
||||
@@ -584,69 +622,207 @@ namespace
|
||||
//---------------------------------------------------------------
|
||||
// Layout: three columns of lists + the launch button
|
||||
//---------------------------------------------------------------
|
||||
void AddGroupItems(
|
||||
FEState *fe, int group, int count,
|
||||
int x, int *y, int row_h, int width)
|
||||
|
||||
//---------------------------------------------------------------
|
||||
// The groups that became drop-downs, in the order they are laid
|
||||
// out. Scenario is deliberately NOT one of them: it decides what
|
||||
// the others contain, so it stays visible as a pair of buttons.
|
||||
//---------------------------------------------------------------
|
||||
int ComboGroups(const int *selection, int *groups)
|
||||
{
|
||||
for (int i = 0; i < count; ++i)
|
||||
int n = 0;
|
||||
groups[n++] = GroupMap;
|
||||
groups[n++] = GroupTime;
|
||||
groups[n++] = GroupWeather;
|
||||
groups[n++] = GroupLength;
|
||||
groups[n++] = GroupVehicle;
|
||||
if (IsFootball(selection))
|
||||
{
|
||||
FEItem *item = &fe->items[fe->itemCount++];
|
||||
item->group = group;
|
||||
item->index = i;
|
||||
item->rect.left = x;
|
||||
item->rect.top = *y;
|
||||
item->rect.right = x + width;
|
||||
item->rect.bottom = *y + row_h;
|
||||
*y += row_h;
|
||||
groups[n++] = GroupTeam;
|
||||
groups[n++] = GroupPosition;
|
||||
}
|
||||
*y += row_h; // gap below the group
|
||||
else
|
||||
{
|
||||
groups[n++] = GroupColor;
|
||||
groups[n++] = GroupBadge;
|
||||
}
|
||||
return n;
|
||||
}
|
||||
|
||||
// The combo id is its group, so CBN_SELCHANGE says which list moved.
|
||||
const int kComboIdBase = 100;
|
||||
|
||||
//---------------------------------------------------------------
|
||||
// CBS_OWNERDRAWFIXED only hands us the item area: the frame around
|
||||
// the closed box and its drop arrow are still drawn by the system,
|
||||
// which lands a white/grey Windows control in the middle of a black
|
||||
// panel. So the closed box is painted here instead - black field,
|
||||
// dim green border, bright green text and arrow - and the control
|
||||
// keeps doing everything else, including the list it drops.
|
||||
//---------------------------------------------------------------
|
||||
WNDPROC gComboProc = NULL;
|
||||
|
||||
LRESULT CALLBACK ComboSubclassProc(
|
||||
HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
if (message == WM_ERASEBKGND)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
if (message == WM_PAINT)
|
||||
{
|
||||
PAINTSTRUCT ps;
|
||||
HDC dc = BeginPaint(hwnd, &ps);
|
||||
|
||||
RECT rc;
|
||||
GetClientRect(hwnd, &rc);
|
||||
|
||||
HBRUSH field = CreateSolidBrush(kBlack);
|
||||
FillRect(dc, &rc, field);
|
||||
DeleteObject(field);
|
||||
|
||||
HBRUSH edge = CreateSolidBrush(kGreenDim);
|
||||
FrameRect(dc, &rc, edge);
|
||||
DeleteObject(edge);
|
||||
|
||||
int arrow_w = rc.bottom - rc.top;
|
||||
|
||||
char text[128];
|
||||
text[0] = '\0';
|
||||
int sel = (int) SendMessageA(hwnd, CB_GETCURSEL, 0, 0);
|
||||
if (sel >= 0)
|
||||
{
|
||||
SendMessageA(hwnd, CB_GETLBTEXT, sel, (LPARAM) text);
|
||||
}
|
||||
|
||||
HFONT font = (HFONT) SendMessageA(hwnd, WM_GETFONT, 0, 0);
|
||||
HGDIOBJ old_font = (font != NULL) ? SelectObject(dc, font) : NULL;
|
||||
SetBkMode(dc, TRANSPARENT);
|
||||
SetTextColor(dc, kGreenBright);
|
||||
|
||||
RECT label = rc;
|
||||
label.left += 6;
|
||||
label.right -= arrow_w;
|
||||
DrawTextA(dc, text, -1, &label,
|
||||
DT_LEFT | DT_VCENTER | DT_SINGLELINE | DT_END_ELLIPSIS);
|
||||
|
||||
// the arrow, a plain triangle rather than a themed button
|
||||
int cx = rc.right - arrow_w / 2;
|
||||
int cy = (rc.top + rc.bottom) / 2;
|
||||
int r = arrow_w / 6;
|
||||
POINT tri[3];
|
||||
tri[0].x = cx - r; tri[0].y = cy - r / 2;
|
||||
tri[1].x = cx + r; tri[1].y = cy - r / 2;
|
||||
tri[2].x = cx; tri[2].y = cy + r;
|
||||
HBRUSH tip = CreateSolidBrush(kGreenBright);
|
||||
HGDIOBJ old_brush = SelectObject(dc, tip);
|
||||
HGDIOBJ old_pen = SelectObject(dc, GetStockObject(NULL_PEN));
|
||||
Polygon(dc, tri, 3);
|
||||
SelectObject(dc, old_pen);
|
||||
SelectObject(dc, old_brush);
|
||||
DeleteObject(tip);
|
||||
|
||||
if (old_font != NULL) SelectObject(dc, old_font);
|
||||
EndPaint(hwnd, &ps);
|
||||
return 0;
|
||||
}
|
||||
return CallWindowProcA(gComboProc, hwnd, message, wParam, lParam);
|
||||
}
|
||||
|
||||
void DestroyCombos(FEState *fe)
|
||||
{
|
||||
for (int g = 0; g < GroupCount; ++g)
|
||||
{
|
||||
if (fe->combo[g] != NULL)
|
||||
{
|
||||
DestroyWindow(fe->combo[g]);
|
||||
fe->combo[g] = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// defined below, next to the catalogs it reads
|
||||
const char *ItemName(int group, int index);
|
||||
|
||||
void LayoutMenu(FEState *fe, int client_w, int client_h)
|
||||
{
|
||||
fe->itemCount = 0;
|
||||
gItemNameSelection = fe->selection;
|
||||
|
||||
int row_h = client_h / 36;
|
||||
if (row_h < 18) row_h = 18;
|
||||
if (row_h > 30) row_h = 30;
|
||||
|
||||
int col_w = client_w / 5;
|
||||
int col1 = client_w / 14;
|
||||
int col2 = col1 + col_w + client_w / 28;
|
||||
int col3 = col2 + col_w + client_w / 28;
|
||||
int top = client_h / 7;
|
||||
|
||||
//---------------------------------------------------------------
|
||||
// Every list is a drop-down, so the menu no longer grows with the
|
||||
// content: eight controls instead of ninety-odd rows. Two columns
|
||||
// of label-over-box, settings on the left and loadout on the right,
|
||||
// with the scenario left as visible buttons because it decides what
|
||||
// the other lists contain.
|
||||
//---------------------------------------------------------------
|
||||
int margin = client_w / 14;
|
||||
int gap = client_w / 20;
|
||||
int col_w = (client_w - 2 * margin - gap) / 2;
|
||||
if (col_w < 1) col_w = 1;
|
||||
int col2 = margin + col_w + gap;
|
||||
|
||||
int block_h = row_h * 5 / 2; // label, box, breathing room
|
||||
|
||||
// scenario: buttons, top of the left column
|
||||
int y = top;
|
||||
AddGroupItems(fe, GroupScenario, FE_COUNT(kScenarios), col1, &y, row_h, col_w);
|
||||
int map_count;
|
||||
ActiveMaps(fe->selection, &map_count);
|
||||
AddGroupItems(fe, GroupMap, map_count, col1, &y, row_h, col_w);
|
||||
AddGroupItems(fe, GroupTime, FE_COUNT(kTimes), col1, &y, row_h, col_w);
|
||||
AddGroupItems(fe, GroupWeather, FE_COUNT(kWeather), col1, &y, row_h, col_w);
|
||||
AddGroupItems(fe, GroupLength, FE_COUNT(kLengths), col1, &y, row_h, col_w);
|
||||
|
||||
y = top;
|
||||
AddGroupItems(fe, GroupVehicle, FE_COUNT(kVehicles), col2, &y, row_h, col_w);
|
||||
|
||||
y = top + 2 * row_h; // leave room for the name edit + header
|
||||
if (IsFootball(fe->selection))
|
||||
fe->comboLabel[GroupScenario].left = margin;
|
||||
fe->comboLabel[GroupScenario].right = margin + col_w;
|
||||
fe->comboLabel[GroupScenario].top = y;
|
||||
fe->comboLabel[GroupScenario].bottom = y + row_h;
|
||||
y += row_h;
|
||||
for (int i = 0; i < FE_COUNT(kScenarios); ++i)
|
||||
{
|
||||
AddGroupItems(fe, GroupTeam, FE_COUNT(kTeams), col3, &y, row_h, col_w);
|
||||
AddGroupItems(fe, GroupPosition, FE_COUNT(kPositions), col3, &y, row_h, col_w);
|
||||
FEItem *item = &fe->items[fe->itemCount++];
|
||||
item->group = GroupScenario;
|
||||
item->index = i;
|
||||
item->rect.left = margin + i * (col_w / 2);
|
||||
item->rect.top = y;
|
||||
item->rect.right = item->rect.left + col_w / 2 - row_h / 3;
|
||||
item->rect.bottom = y + row_h;
|
||||
}
|
||||
else
|
||||
y += row_h + row_h / 2;
|
||||
|
||||
int groups[GroupCount];
|
||||
int group_count = ComboGroups(fe->selection, groups);
|
||||
|
||||
// left column takes the mission settings, right the loadout; the
|
||||
// split is where the vehicle list starts. The pilot name heads
|
||||
// the loadout column - it is who you are, so it reads before
|
||||
// what you are driving.
|
||||
int left_y = y;
|
||||
int right_y = top;
|
||||
int name_y = right_y;
|
||||
right_y += block_h;
|
||||
for (int g = 0; g < group_count; ++g)
|
||||
{
|
||||
AddGroupItems(fe, GroupColor, FE_COUNT(kColors), col3, &y, row_h, col_w);
|
||||
AddGroupItems(fe, GroupBadge, FE_COUNT(kBadges), col3, &y, row_h, col_w);
|
||||
int group = groups[g];
|
||||
Logical left = (group == GroupMap || group == GroupTime ||
|
||||
group == GroupWeather || group == GroupLength);
|
||||
int x = left ? margin : col2;
|
||||
int *slot = left ? &left_y : &right_y;
|
||||
|
||||
fe->comboLabel[group].left = x;
|
||||
fe->comboLabel[group].right = x + col_w;
|
||||
fe->comboLabel[group].top = *slot;
|
||||
fe->comboLabel[group].bottom = *slot + row_h;
|
||||
*slot += block_h;
|
||||
}
|
||||
|
||||
|
||||
// launch button
|
||||
FEItem *launch = &fe->items[fe->itemCount++];
|
||||
launch->group = GroupLaunch;
|
||||
launch->index = 0;
|
||||
launch->rect.left = col3;
|
||||
launch->rect.left = col2;
|
||||
launch->rect.top = client_h - 3 * row_h;
|
||||
launch->rect.right = col3 + col_w;
|
||||
launch->rect.right = col2 + col_w;
|
||||
launch->rect.bottom = client_h - row_h;
|
||||
|
||||
// Steam lobby buttons, offered whenever environ.ini asked for Steam.
|
||||
@@ -656,17 +832,17 @@ namespace
|
||||
FEItem *host = &fe->items[fe->itemCount++];
|
||||
host->group = GroupSteamHost;
|
||||
host->index = 0;
|
||||
host->rect.left = col3;
|
||||
host->rect.left = col2;
|
||||
host->rect.top = client_h - 6 * row_h;
|
||||
host->rect.right = col3 + col_w;
|
||||
host->rect.right = col2 + col_w;
|
||||
host->rect.bottom = client_h - 5 * row_h;
|
||||
|
||||
FEItem *join = &fe->items[fe->itemCount++];
|
||||
join->group = GroupSteamJoin;
|
||||
join->index = 0;
|
||||
join->rect.left = col3;
|
||||
join->rect.left = col2;
|
||||
join->rect.top = client_h - (9 * row_h) / 2;
|
||||
join->rect.right = col3 + col_w;
|
||||
join->rect.right = col2 + col_w;
|
||||
join->rect.bottom = client_h - (7 * row_h) / 2;
|
||||
}
|
||||
|
||||
@@ -682,16 +858,67 @@ namespace
|
||||
FEItem *quit = &fe->items[fe->itemCount++];
|
||||
quit->group = GroupExit;
|
||||
quit->index = 0;
|
||||
quit->rect.left = col1;
|
||||
quit->rect.left = margin;
|
||||
quit->rect.top = client_h - 2 * row_h;
|
||||
quit->rect.right = col1 + col_w / 2;
|
||||
quit->rect.right = margin + col_w / 2;
|
||||
quit->rect.bottom = client_h - row_h;
|
||||
|
||||
// pilot name edit sits at the top of column 3
|
||||
// pilot name, under the loadout column
|
||||
fe->comboLabel[GroupLaunch].left = col2; // reused: name label
|
||||
fe->comboLabel[GroupLaunch].right = col2 + col_w;
|
||||
fe->comboLabel[GroupLaunch].top = name_y;
|
||||
fe->comboLabel[GroupLaunch].bottom = name_y + row_h;
|
||||
if (fe->nameEdit != NULL)
|
||||
{
|
||||
MoveWindow(fe->nameEdit,
|
||||
col3, top - row_h / 4, col_w, row_h, TRUE);
|
||||
MoveWindow(fe->nameEdit, col2, name_y + row_h, col_w, row_h, TRUE);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------
|
||||
// The drop-downs themselves. Rebuilt rather than moved, because
|
||||
// the scenario swaps two of them outright (team/position for
|
||||
// colour/badge) and reshuffles the track list.
|
||||
//---------------------------------------------------------------
|
||||
DestroyCombos(fe);
|
||||
for (int g = 0; g < group_count; ++g)
|
||||
{
|
||||
int group = groups[g];
|
||||
const RECT &label = fe->comboLabel[group];
|
||||
int count = GroupSize(group, fe->selection);
|
||||
|
||||
// The height given at creation is the DROPPED height - what the
|
||||
// closed box shows is the item height - so ask for enough to
|
||||
// show a dozen rows without a scrollbar where the list is short.
|
||||
int drop_rows = (count < 12) ? count : 12;
|
||||
HWND box = CreateWindowExA(
|
||||
0, "COMBOBOX", "",
|
||||
WS_CHILD | WS_VISIBLE | WS_VSCROLL |
|
||||
CBS_DROPDOWNLIST | CBS_OWNERDRAWFIXED | CBS_HASSTRINGS,
|
||||
label.left, label.top + row_h,
|
||||
label.right - label.left, row_h + drop_rows * row_h,
|
||||
fe->menuWindow, (HMENU)(INT_PTR)(kComboIdBase + group),
|
||||
(HINSTANCE) GetWindowLongPtr(fe->menuWindow, GWLP_HINSTANCE), NULL);
|
||||
if (box == NULL)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
SendMessageA(box, WM_SETFONT, (WPARAM) fe->textFont, TRUE);
|
||||
SendMessageA(box, CB_SETITEMHEIGHT, (WPARAM) -1, row_h);
|
||||
SendMessageA(box, CB_SETITEMHEIGHT, 0, row_h);
|
||||
|
||||
// paint the closed box ourselves - see ComboSubclassProc
|
||||
WNDPROC previous = (WNDPROC) SetWindowLongPtrA(
|
||||
box, GWLP_WNDPROC, (LONG_PTR) ComboSubclassProc);
|
||||
if (gComboProc == NULL)
|
||||
{
|
||||
gComboProc = previous;
|
||||
}
|
||||
for (int i = 0; i < count; ++i)
|
||||
{
|
||||
SendMessageA(box, CB_ADDSTRING, 0, (LPARAM) ItemName(group, i));
|
||||
}
|
||||
if (fe->selection[group] >= count) fe->selection[group] = 0;
|
||||
SendMessageA(box, CB_SETCURSEL, fe->selection[group], 0);
|
||||
fe->combo[group] = box;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -714,7 +941,6 @@ namespace
|
||||
}
|
||||
|
||||
// the map rows need the active scenario's list
|
||||
const int *gItemNameSelection = NULL;
|
||||
|
||||
const char *ItemName(int group, int index)
|
||||
{
|
||||
@@ -776,21 +1002,31 @@ namespace
|
||||
|
||||
SelectObject(mem, fe->textFont);
|
||||
|
||||
// group headers (drawn above each group's first item)
|
||||
int previous_group = -1;
|
||||
// Labels: one above each drop-down, one above the scenario
|
||||
// buttons, one above the pilot name box. The drop-downs draw
|
||||
// themselves (WM_DRAWITEM), so all that is left here is their
|
||||
// captions.
|
||||
SetTextColor(mem, kGreenBright);
|
||||
for (int g = 0; g < GroupCount; ++g)
|
||||
{
|
||||
Logical labelled = (g == GroupScenario) || (fe->combo[g] != NULL);
|
||||
if (!labelled && g != GroupLaunch)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
RECT label = fe->comboLabel[g];
|
||||
if (label.right <= label.left)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
const char *caption = (g == GroupLaunch) ? "PILOT NAME" : GroupTitle(g);
|
||||
DrawTextA(mem, caption, -1, &label,
|
||||
DT_LEFT | DT_VCENTER | DT_SINGLELINE);
|
||||
}
|
||||
|
||||
for (int i = 0; i < fe->itemCount; ++i)
|
||||
{
|
||||
const FEItem *item = &fe->items[i];
|
||||
if (item->group != previous_group && item->group < GroupLaunch)
|
||||
{
|
||||
previous_group = item->group;
|
||||
RECT header = item->rect;
|
||||
header.top -= (item->rect.bottom - item->rect.top);
|
||||
header.bottom = item->rect.top;
|
||||
SetTextColor(mem, kGreenBright);
|
||||
DrawTextA(mem, GroupTitle(item->group), -1, &header,
|
||||
DT_LEFT | DT_VCENTER | DT_SINGLELINE);
|
||||
}
|
||||
|
||||
Logical selected =
|
||||
(item->group >= GroupLaunch) ||
|
||||
@@ -848,26 +1084,14 @@ namespace
|
||||
}
|
||||
RECT text = row;
|
||||
text.left += 6;
|
||||
// On a narrow window the longest names (Screaming Broccoli,
|
||||
// Blacker Tarantula) outrun their column. Ellipsis rather than
|
||||
// a glyph sliced down the middle.
|
||||
DrawTextA(mem, ItemName(item->group, item->index), -1, &text,
|
||||
DT_LEFT | DT_VCENTER | DT_SINGLELINE);
|
||||
DT_LEFT | DT_VCENTER | DT_SINGLELINE | DT_END_ELLIPSIS);
|
||||
}
|
||||
|
||||
// pilot-name header
|
||||
if (fe->nameEdit != NULL)
|
||||
{
|
||||
RECT edit_rect;
|
||||
GetWindowRect(fe->nameEdit, &edit_rect);
|
||||
POINT corner = { edit_rect.left, edit_rect.top };
|
||||
ScreenToClient(fe->menuWindow, &corner);
|
||||
RECT header;
|
||||
header.left = corner.x;
|
||||
header.right = corner.x + 300;
|
||||
header.bottom = corner.y;
|
||||
header.top = corner.y - 26;
|
||||
SetTextColor(mem, kGreenBright);
|
||||
DrawTextA(mem, "PILOT NAME", -1, &header,
|
||||
DT_LEFT | DT_VCENTER | DT_SINGLELINE);
|
||||
}
|
||||
// (the pilot-name caption is drawn with the other labels above)
|
||||
|
||||
BitBlt(hdc, 0, 0, client.right, client.bottom, mem, 0, 0, SRCCOPY);
|
||||
|
||||
@@ -954,6 +1178,65 @@ namespace
|
||||
}
|
||||
break;
|
||||
|
||||
case WM_COMMAND:
|
||||
if (fe != NULL && HIWORD(wParam) == CBN_SELCHANGE)
|
||||
{
|
||||
int group = LOWORD(wParam) - kComboIdBase;
|
||||
if (group >= 0 && group < GroupCount && fe->combo[group] != NULL)
|
||||
{
|
||||
int pick = (int) SendMessageA(fe->combo[group], CB_GETCURSEL, 0, 0);
|
||||
if (pick >= 0)
|
||||
{
|
||||
fe->selection[group] = pick;
|
||||
}
|
||||
// the closed box is ours to redraw now
|
||||
InvalidateRect(fe->combo[group], NULL, FALSE);
|
||||
InvalidateRect(fe->menuWindow, NULL, FALSE);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
//
|
||||
// The drop-downs are owner-drawn so they read as part of the
|
||||
// panel rather than as system widgets: green on black, and the
|
||||
// highlight inverted rather than tinted.
|
||||
//
|
||||
case WM_DRAWITEM:
|
||||
if (fe != NULL)
|
||||
{
|
||||
DRAWITEMSTRUCT *di = (DRAWITEMSTRUCT *) lParam;
|
||||
if (di->CtlType == ODT_COMBOBOX && (int) di->itemID >= 0)
|
||||
{
|
||||
Logical hot =
|
||||
((di->itemState & (ODS_SELECTED | ODS_COMBOBOXEDIT)) == ODS_SELECTED);
|
||||
HBRUSH back = CreateSolidBrush(hot ? kGreenDim : kBlack);
|
||||
FillRect(di->hDC, &di->rcItem, back);
|
||||
DeleteObject(back);
|
||||
|
||||
char text[128];
|
||||
text[0] = '\0';
|
||||
SendMessageA(di->hwndItem, CB_GETLBTEXT, di->itemID, (LPARAM) text);
|
||||
RECT label = di->rcItem;
|
||||
label.left += 6;
|
||||
SetBkMode(di->hDC, TRANSPARENT);
|
||||
SetTextColor(di->hDC, hot ? kBlack : kGreenBright);
|
||||
DrawTextA(di->hDC, text, -1, &label,
|
||||
DT_LEFT | DT_VCENTER | DT_SINGLELINE | DT_END_ELLIPSIS);
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case WM_CTLCOLORLISTBOX:
|
||||
if (fe != NULL)
|
||||
{
|
||||
SetTextColor((HDC) wParam, kGreenBright);
|
||||
SetBkColor((HDC) wParam, kBlack);
|
||||
return (LRESULT) fe->editBrush;
|
||||
}
|
||||
break;
|
||||
|
||||
case WM_CTLCOLOREDIT:
|
||||
if (fe != NULL)
|
||||
{
|
||||
@@ -1483,6 +1766,14 @@ Logical
|
||||
// LobbyRoomLeft: fall through to the setup menu
|
||||
}
|
||||
|
||||
// NOTE: the vehicle catalog below is hand-written while RPL4.RES is
|
||||
// built elsewhere, so the two can drift - this menu offered 'blkspk'
|
||||
// for a while before any vehicle resource backed it. Validating here
|
||||
// does NOT work: the front end runs before the resource file is
|
||||
// opened, so GetResourceFile() has nothing to search yet. If this is
|
||||
// worth guarding, do it offline against the built RPL4.RES (see
|
||||
// tools/resbuild) rather than at menu time.
|
||||
|
||||
for (;;)
|
||||
{
|
||||
FEState fe;
|
||||
|
||||
@@ -96,6 +96,7 @@ quarkInit
|
||||
dragonInit
|
||||
{
|
||||
uncommon_setup;
|
||||
twoBoosterInit;
|
||||
rivet1AInit;
|
||||
rivet2BInit;
|
||||
slaver3BInit;
|
||||
@@ -125,6 +126,7 @@ darkInit
|
||||
demopack2BInit;
|
||||
pa;
|
||||
}
|
||||
|
||||
##################################
|
||||
# discus
|
||||
##################################
|
||||
@@ -348,9 +350,9 @@ tarntulaInit
|
||||
}
|
||||
|
||||
##################################
|
||||
# black
|
||||
# blktrn
|
||||
##################################
|
||||
blackInit
|
||||
blktrnInit
|
||||
{
|
||||
common_setup;
|
||||
fourBoosterInit;
|
||||
@@ -411,6 +413,117 @@ roadblkInit
|
||||
demopack1CInit;
|
||||
ba;
|
||||
}
|
||||
|
||||
##################################
|
||||
# Neutrino
|
||||
##################################
|
||||
neutInit
|
||||
{
|
||||
common_setup;
|
||||
fourBoosterInit;
|
||||
offsetChuteInit;
|
||||
lu;
|
||||
}
|
||||
|
||||
|
||||
##################################
|
||||
##################################
|
||||
##### Blacker VTV Inits
|
||||
##################################
|
||||
##################################
|
||||
|
||||
##################################
|
||||
# Blacker Puck
|
||||
##################################
|
||||
blkrpuckInit
|
||||
{
|
||||
common_setup;
|
||||
oneBoosterInit;
|
||||
laserFunkyInit;
|
||||
pa;
|
||||
}
|
||||
|
||||
##################################
|
||||
# Blacker Black Speck
|
||||
##################################
|
||||
blkrspkInit
|
||||
{
|
||||
common_setup;
|
||||
threeBoosterInit;
|
||||
oneChuteInit;
|
||||
su;
|
||||
}
|
||||
|
||||
##################################
|
||||
# Blacker Quark
|
||||
##################################
|
||||
blkrquarkInit
|
||||
{
|
||||
common_setup;
|
||||
twoBoosterInit;
|
||||
lu;
|
||||
}
|
||||
|
||||
##################################
|
||||
# Blacker Broccoli
|
||||
##################################
|
||||
blkrbrocInit
|
||||
{
|
||||
common_setup;
|
||||
threeBoosterInit;
|
||||
oneChuteInit;
|
||||
mu;
|
||||
}
|
||||
|
||||
##################################
|
||||
# Blacker Black Tarantula
|
||||
##################################
|
||||
blkrtranInit
|
||||
{
|
||||
common_setup;
|
||||
fourBoosterInit;
|
||||
offsetChuteInit;
|
||||
bu;
|
||||
}
|
||||
|
||||
##################################
|
||||
# Blacker Lepton
|
||||
##################################
|
||||
blkrleptonInit
|
||||
{
|
||||
common_setup;
|
||||
twoBoosterInit;
|
||||
oneChuteInit;
|
||||
lu;
|
||||
}
|
||||
|
||||
###################################
|
||||
# Blacker Dragon
|
||||
###################################
|
||||
blkrdragonInit
|
||||
{
|
||||
common_setup;
|
||||
twoBoosterInit;
|
||||
rivet1AInit;
|
||||
rivet2BInit;
|
||||
slaver3BInit;
|
||||
po;
|
||||
}
|
||||
|
||||
##################################
|
||||
# wasp
|
||||
##################################
|
||||
blkrwaspInit
|
||||
{
|
||||
common_setup;
|
||||
twoBoosterInit;
|
||||
oneChuteInit;
|
||||
stinger1AInit;
|
||||
## stinger2BInit;
|
||||
sa;
|
||||
}
|
||||
|
||||
|
||||
####################################################################
|
||||
# PO (dragon,armored)-based VTV's
|
||||
####################################################################
|
||||
|
||||
Binary file not shown.
@@ -0,0 +1,60 @@
|
||||
[AudioRenderer]
|
||||
|
||||
#
|
||||
# Radius of clipping sphere
|
||||
#
|
||||
#clipping_radius=400.0
|
||||
#clipping_radius=350.0
|
||||
clipping_radius=550.0
|
||||
|
||||
#
|
||||
# Distance between ears -> average size of cockpit
|
||||
#
|
||||
distance_between_ears=12.0
|
||||
|
||||
#
|
||||
# Control amplitude rolloff
|
||||
#
|
||||
amplitude_rolloff=2.0
|
||||
amplitude_rolloff_knee=60.0
|
||||
#amplitude_rolloff_distance_scale=0.005
|
||||
amplitude_rolloff_distance_scale=0.003
|
||||
|
||||
#
|
||||
# Control high frequency rolloff
|
||||
#
|
||||
high_frequency_rolloff=2.0
|
||||
high_frequency_rolloff_knee=60.0
|
||||
#high_frequency_rolloff_distance_scale=0.01
|
||||
high_frequency_rolloff_distance_scale=0.005
|
||||
|
||||
#
|
||||
# Control doppler
|
||||
#
|
||||
doppler_range=600.0
|
||||
speed_of_sound=250.0
|
||||
|
||||
#
|
||||
# Control source compression
|
||||
#
|
||||
#compression_scale=0.95
|
||||
compression_scale=0.92
|
||||
#compression_exponent=4.0
|
||||
compression_exponent=8.5
|
||||
|
||||
#
|
||||
# ITD difference constant
|
||||
#
|
||||
itd_difference=0.0015
|
||||
|
||||
#
|
||||
# Global reverb scale
|
||||
#
|
||||
#global_reverb_scale=0.3
|
||||
global_reverb_scale=0.35
|
||||
|
||||
[AudioResources]
|
||||
front_audio_resource=audio\audio1.res
|
||||
front_audio_resource=audio\audio2.res
|
||||
rear_audio_resource=audio\audio1.res
|
||||
rear_audio_resource=audio\audio2.res
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
[AudioRenderer]
|
||||
|
||||
#
|
||||
# Radius of clipping sphere
|
||||
#
|
||||
#clipping_radius=400.0
|
||||
#clipping_radius=350.0
|
||||
clipping_radius=550.0
|
||||
|
||||
#
|
||||
# Distance between ears -> average size of cockpit
|
||||
#
|
||||
distance_between_ears=12.0
|
||||
|
||||
#
|
||||
# Control amplitude rolloff
|
||||
#
|
||||
amplitude_rolloff=2.0
|
||||
amplitude_rolloff_knee=60.0
|
||||
#amplitude_rolloff_distance_scale=0.005
|
||||
amplitude_rolloff_distance_scale=0.003
|
||||
|
||||
#
|
||||
# Control high frequency rolloff
|
||||
#
|
||||
high_frequency_rolloff=2.0
|
||||
high_frequency_rolloff_knee=60.0
|
||||
#high_frequency_rolloff_distance_scale=0.01
|
||||
high_frequency_rolloff_distance_scale=0.005
|
||||
|
||||
#
|
||||
# Control doppler
|
||||
#
|
||||
doppler_range=600.0
|
||||
speed_of_sound=250.0
|
||||
|
||||
#
|
||||
# Control source compression
|
||||
#
|
||||
#compression_scale=0.92
|
||||
#compression_exponent=8.5
|
||||
compression_scale=0.1
|
||||
compression_exponent=9.0
|
||||
|
||||
#
|
||||
# ITD difference constant
|
||||
#
|
||||
itd_difference=0.0015
|
||||
|
||||
#
|
||||
# Global reverb scale
|
||||
#
|
||||
#global_reverb_scale=0.3
|
||||
global_reverb_scale=0.35
|
||||
|
||||
[AudioResources]
|
||||
front_audio_resource=audio\audio1.res
|
||||
front_audio_resource=audio\audio2.res
|
||||
rear_audio_resource=audio\audio1.res
|
||||
rear_audio_resource=audio\audio2.res
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,15 @@
|
||||
/MA:229;0
|
||||
/VO:0;0
|
||||
/MI:229;0
|
||||
/CD:0;0
|
||||
/LI:0;0
|
||||
/MIC:0
|
||||
/SP:0
|
||||
/TR:114;0
|
||||
/BA:114;0
|
||||
/IPL:MIC- CDR- CDL- LIR- LIL- MIR- MIL-
|
||||
/IPR:MIC- CDR- CDL- LIR- LIL- MIR- MIL-
|
||||
/OPS:MIC- CDR- CDL- LIR- LIL-
|
||||
/AGC:-
|
||||
/IPG:1,1
|
||||
/OPG:1,1
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user