Skip to content

Commit

Permalink
Darklight Arena is now standalone. Need to do a full asset check, som…
Browse files Browse the repository at this point in the history
…e assets brought over from idTech 4 CDK. Moved portions of the menu toolbar and radiant menu to C# XY window.
  • Loading branch information
jmarshall23 committed Apr 6, 2020
1 parent c015b6f commit c470c88
Show file tree
Hide file tree
Showing 128 changed files with 4,753 additions and 179 deletions.
7 changes: 0 additions & 7 deletions base/sound/convert.bat

This file was deleted.

Empty file.
1 change: 1 addition & 0 deletions code/exports.def
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@ EXPORTS
RadiantAPI_GameMouseFocus @16
RadiantAPI_GameWindowMouseKey @17
RadiantAPI_GameWindowKeyboard @18
RadiantAPI_ProcessMenuCommands @19
2 changes: 1 addition & 1 deletion code/framework/Licensee.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ If you have questions concerning this license or the applicable additional terms
#ifdef ID_DEMO_BUILD
#define BASE_GAMEDIR "demo"
#else
#define BASE_GAMEDIR "base"
#define BASE_GAMEDIR "dkbase"
#endif

// filenames
Expand Down
64 changes: 33 additions & 31 deletions code/game/MultiplayerGame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2198,37 +2198,39 @@ idMultiplayerGame::DrawChat
*/
void idMultiplayerGame::DrawChat() {
int i, j;
if ( guiChat ) {
if ( gameLocal.time - lastChatLineTime > CHAT_FADE_TIME ) {
if ( chatHistorySize > 0 ) {
for ( i = chatHistoryIndex - chatHistorySize; i < chatHistoryIndex; i++ ) {
chatHistory[ i % NUM_CHAT_NOTIFY ].fade--;
if ( chatHistory[ i % NUM_CHAT_NOTIFY ].fade < 0 ) {
chatHistorySize--; // this assumes the removals are always at the beginning
}
}
chatDataUpdated = true;
}
lastChatLineTime = gameLocal.time;
}
if ( chatDataUpdated ) {
j = 0;
i = chatHistoryIndex - chatHistorySize;
while ( i < chatHistoryIndex ) {
guiChat->SetStateString( va( "chat%i", j ), chatHistory[ i % NUM_CHAT_NOTIFY ].line );
// don't set alpha above 4, the gui only knows that
guiChat->SetStateInt( va( "alpha%i", j ), Min( 4, (int)chatHistory[ i % NUM_CHAT_NOTIFY ].fade ) );
j++; i++;
}
while ( j < NUM_CHAT_NOTIFY ) {
guiChat->SetStateString( va( "chat%i", j ), "" );
j++;
}
guiChat->Activate( true, gameLocal.time );
chatDataUpdated = false;
}
guiChat->Redraw( gameLocal.time );
}
// jmarshall
//if ( guiChat ) {
// if ( gameLocal.time - lastChatLineTime > CHAT_FADE_TIME ) {
// if ( chatHistorySize > 0 ) {
// for ( i = chatHistoryIndex - chatHistorySize; i < chatHistoryIndex; i++ ) {
// chatHistory[ i % NUM_CHAT_NOTIFY ].fade--;
// if ( chatHistory[ i % NUM_CHAT_NOTIFY ].fade < 0 ) {
// chatHistorySize--; // this assumes the removals are always at the beginning
// }
// }
// chatDataUpdated = true;
// }
// lastChatLineTime = gameLocal.time;
// }
// if ( chatDataUpdated ) {
// j = 0;
// i = chatHistoryIndex - chatHistorySize;
// while ( i < chatHistoryIndex ) {
// guiChat->SetStateString( va( "chat%i", j ), chatHistory[ i % NUM_CHAT_NOTIFY ].line );
// // don't set alpha above 4, the gui only knows that
// guiChat->SetStateInt( va( "alpha%i", j ), Min( 4, (int)chatHistory[ i % NUM_CHAT_NOTIFY ].fade ) );
// j++; i++;
// }
// while ( j < NUM_CHAT_NOTIFY ) {
// guiChat->SetStateString( va( "chat%i", j ), "" );
// j++;
// }
// guiChat->Activate( true, gameLocal.time );
// chatDataUpdated = false;
// }
// guiChat->Redraw( gameLocal.time );
//}
// jmarshall end
}

const int ASYNC_PLAYER_FRAG_BITS = -idMath::BitsForInteger( MP_PLAYER_MAXFRAGS - MP_PLAYER_MINFRAGS ); // player can have negative frags
Expand Down
790 changes: 754 additions & 36 deletions code/tools/radiant.net/Forms/XYWndDialog.Designer.cs

Large diffs are not rendered by default.

66 changes: 66 additions & 0 deletions code/tools/radiant.net/Forms/XYWndDialog.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
using System.Windows.Forms;
using radiant.net;
using System.Windows.Input;
using radiant.net.Shared;

namespace radiant.net.forms
{
Expand Down Expand Up @@ -327,5 +328,70 @@ private void gotoEntityButton_Click(object sender, EventArgs e)
NativeAPI.RadiantAPI_GotoEntity(selected_entity);
NativeAPI.RadiantAPI_SelectObject(selected_entity);
}

private void toolStripButton1_Click(object sender, EventArgs e)
{
NativeAPI.RadiantAPI_ProcessMenuCommands((int)MenuCommands.RadiantNetMenuCommands_t.RADIANT_NET_COMMAND_OPEN);
}

private void undotCtrlZToolStripMenuItem_Click(object sender, EventArgs e)
{

}

private void toolSaveStripButton_Click(object sender, EventArgs e)
{
NativeAPI.RadiantAPI_ProcessMenuCommands((int)MenuCommands.RadiantNetMenuCommands_t.RADIANT_NET_COMMAND_SAVE);
}

private void openToolStripMenuItem_Click(object sender, EventArgs e)
{
NativeAPI.RadiantAPI_ProcessMenuCommands((int)MenuCommands.RadiantNetMenuCommands_t.RADIANT_NET_COMMAND_OPEN);
}

private void saveToolStripMenuItem_Click(object sender, EventArgs e)
{
NativeAPI.RadiantAPI_ProcessMenuCommands((int)MenuCommands.RadiantNetMenuCommands_t.RADIANT_NET_COMMAND_SAVEAS);
}

private void topToolStripMenuItem_Click(object sender, EventArgs e)
{
NativeAPI.RadiantAPI_ProcessMenuCommands((int)MenuCommands.RadiantNetMenuCommands_t.RADIANT_NET_COMMAND_NEW);
}

private void saveSelectedToolStripMenuItem_Click(object sender, EventArgs e)
{
NativeAPI.RadiantAPI_ProcessMenuCommands((int)MenuCommands.RadiantNetMenuCommands_t.RADIANT_NET_COMMAND_SAVESELECTION);
}

private void saveRegionToolStripMenuItem_Click(object sender, EventArgs e)
{
NativeAPI.RadiantAPI_ProcessMenuCommands((int)MenuCommands.RadiantNetMenuCommands_t.RADIANT_NET_COMMAND_SAVEREGION);
}

private void newProjectToolStripMenuItem_Click(object sender, EventArgs e)
{
NativeAPI.RadiantAPI_ProcessMenuCommands((int)MenuCommands.RadiantNetMenuCommands_t.RADIANT_NET_COMMAND_NEWPROJECT);
}

private void loadprojectToolStripMenuItem_Click(object sender, EventArgs e)
{
NativeAPI.RadiantAPI_ProcessMenuCommands((int)MenuCommands.RadiantNetMenuCommands_t.RADIANT_NET_COMMAND_LOADPROJECT);
}

private void projectSettingsToolStripMenuItem_Click(object sender, EventArgs e)
{
NativeAPI.RadiantAPI_ProcessMenuCommands((int)MenuCommands.RadiantNetMenuCommands_t.RADIANT_NET_COMMAND_PROJECTSETTINGS);
}

private void pointfileToolStripMenuItem_Click(object sender, EventArgs e)
{
NativeAPI.RadiantAPI_ProcessMenuCommands((int)MenuCommands.RadiantNetMenuCommands_t.RADIANT_NET_COMMAND_POINTFILE);
}

private void exitToolStripMenuItem_Click(object sender, EventArgs e)
{
NativeAPI.RadiantAPI_ProcessMenuCommands((int)MenuCommands.RadiantNetMenuCommands_t.RADIANT_NET_COMMAND_EXIT);
}
}
}
84 changes: 82 additions & 2 deletions code/tools/radiant.net/Forms/XYWndDialog.resx
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,90 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="menuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
<metadata name="toolStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>132, 17</value>
</metadata>
<metadata name="menuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="toolOpenStripButton.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAHCSURBVDhP1ZDNK0RRFMBfjcOC7BULFqb5WNmNWcxCSkZW
StnY20ikfGSwELFQ8haImBDle3wMaWbCTIMwPvLNEGP8Fcec+96894bHPGXj1K9z7une3733cH8Zdrsd
xVJbuFwuVCK2WZDsV0IS2Gw2NJvNDKPRmCDV6/VotVq1CekgSeiAEoPBwKT0MrpAk5AOWCwW1c3Ui7/Y
ZDJpE/I8/+3GH4XvkXKMRsow+lrKstjmYhvbxZJFfPgkoW8SJEv48ttLMZ4HUxkXB2lI60SKYheVSGvf
JLDDajDh63MhnvpB4iwgZ2VNObQL6JkA1RFI8RIuwGMvyHgUdYyjbaF34hPYGkoifLrLx4MNkDjcjOGW
16ynWG8MJhE+XGWjfx5wbw4wsAisJp7vDYzwbR6Gb3Lx/jJL4uo4g0GvjyPqOO46lMkG7XUK0Iwer3Nw
vgtwoRu+ZDWGaxXC0A6gm5ehC6bbAGccgLMdQlai7FE9WPNpBMFVwKVewOU+wMujdHQ2gSqTzYlMtQL2
VKd8nSd9k160vwY43qgdVRnF+gBgcAVwpA5wtF6dsQY5E51VOnUZxWo/YEuFLimOShnx6L8LjvsAVUv5
ezJ2AOYAAAAASUVORK5CYII=
</value>
</data>
<data name="toolSaveStripButton.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAGeSURBVDhP1c/dK4NxFAfwM7V5a0OpufBywYXy0i4QxSgX
M3HBlgsXZN7y9g9Ikpm4dKO2oRQuN9vyroYbVy4QEv/Lcc5vv2d+2jx5u/GtT8+z85zzrcH/iNN+garO
tq9xtr6TVYlwSXvDq1CQPYJfSZl1Rr4hWi3TXLiQaKN0tMTRXvMimI0euaafvMxhtJg8WJgzJVDN7wu1
m5RCR3Mc64ufhCwYkCf6yYZBbCx/FvJNaQor4UEwQL880U8G7dUaH4Vcw+THwvamMyyCWwGgT57oh/dK
4V4wwURqIcCN1CNP9APQS+6kcaIU2uuOaHBJrqQuRfcnrhVjJKUwpjggh9KxxDvshPA/OiXn0ihRCuuq
QzT488I9svMNfKMZIUphVcUuDdaTopEI7ofDGA6FMExP/s1cLhe63W6MRaO0t60YJkphSdEaDVbIqrAR
DGIwEMCA3y+eGofDIWxtbtIe32g8RCnMN8/TYJbMCcs+Hy55vehli4tJNptN8NF3AK9iiCiFifDwvTAd
rZDftd2EtIU84A8/lVrI4eEvALwBCgasJQT/L9oAAAAASUVORK5CYII=
</value>
</data>
<data name="toolStripButton3.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAACLSURBVDhPxZGBCcAgDARdQly323SsYhexGqwmMaKWUA8E
8z4HqtmCt/bIWx28c0FVelu7VXjGYlp95oTFA5vQSkuBCWtegQw7eEBnQdjtIvABLbRX7ncZckF+w6Es
8ZMwyr4IcYEWr/U35Ad0XvzlJshADpkglLqvQypQ5E/hjD2FOeEC6kJV2RrGPKaMsRJE90B1AAAAAElF
TkSuQmCC
</value>
</data>
<data name="toolStripButton4.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAACoSURBVDhPtZHLEYMwDAXdBBf6oCi6oJucUlFuNCL8hEWE
kQgYZWc8tp5HO/6kP/Ka1qGxsstwM30Fdd2Elhxlc9fRZxhoHse8dxn/ZO++pxwS5htSXyhAipOW8gwt
86UQ4vql9Kgl+xoSvmoW6XHypiwoMmGf1dKGDzoi0hCZAGmYLBDrjYGX/4Qbt19fsbJbaMFjmbCJQmWY
1boJS/BIys1Go5eHkNICek6cnEmmpm0AAAAASUVORK5CYII=
</value>
</data>
<data name="toolStripButton5.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAB+SURBVDhP5ZEBCoAgEAT9xOF3+03PCvuIqRjenqeUCUEN
HLTsNhCZV3BES36cg7PWT5XuRN8TrmF8Xp11IW4EqfClxNwRsncAWWIeEEb4AIeDwog+qoV815XqgyBj
QpCd15Lq5dYUahlIZb4CfrLcyHwB/ac84IfCqbJ7GHMAtUKXNbiHy4EAAAAASUVORK5CYII=
</value>
</data>
<data name="toolStripButton6.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAACfSURBVDhP1ZHBDYAgDEW7BBf3cCi3cBtPTuTNRSqfIFRE
C4oHX9KYT+LLh9JfmMY4uVyN+5mjIM1EqzG89D2vw2DPVXTh3HVsA+P7QHqUSSBFUx817mUAQlzfR428
EBJ3VSuSU/Cm1w1TaeGCnNDPmV1asW0dSJvJPub+eSpxIiwvu8ACZJsgE7maIHnTSiLbBLnIrwnSFm13
mja8gmgDV+6ZUGHDEE8AAAAASUVORK5CYII=
</value>
</data>
<data name="toolStripButton7.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAB5SURBVDhP7ZALCoAgEET3EovX7TYdK+wiJovZpLv9FILo
wYDkY7ChV/DMQzr2wTsXupbOzN8rHKNspSzUnDUZ+RCUiKQUmm5CJMxOqH8ZHUwFihv2hrULYBnmdEOt
NF+UETGWNW8IIZqOXwi5iL3hQ/7CdrqW3YNoAYK+q08uolk2AAAAAElFTkSuQmCC
</value>
</data>
<data name="toolStripButton8.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAACeSURBVDhPtZHBDYAgDEVZwot7MJRbuI0nJ/LmIrVUKqWW
RLG+5AcK4YVC+JFlbqcLOgxGPgllbrJ9GGCLEfZpwr3H2LLEOo6Ai5DGh1Ipk6nBBbppLltcMh1TmNrP
ZQt5I51TQq2iSKbjTQta+knGsNRFxiSpm8yZ8kkn9cd1QIexVRbo+jWXIEv8hMbYRSXiuZfQql9DghxG
166EcADdcK+4xX2fdQAAAABJRU5ErkJggg==
</value>
</data>
</root>
3 changes: 3 additions & 0 deletions code/tools/radiant.net/NativeAPI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ namespace radiant.net
{
public unsafe static class NativeAPI
{
[DllImport("DoomDLL.dll", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.Cdecl)]
public static extern void RadiantAPI_ProcessMenuCommands(int command);

[DllImport("DoomDLL.dll", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.Cdecl)]
public static extern void RadiantAPI_GameWindowKeyboard(byte ch, bool down);

Expand Down
14 changes: 12 additions & 2 deletions code/tools/radiant.net/Radiant.Net.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>..\..\..\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DefineConstants>DEBUG;RADIANT_NET</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
Expand All @@ -43,7 +43,7 @@
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<OutputPath>..\..\..\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<DefineConstants>TRACE;RADIANT_NET</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
Expand Down Expand Up @@ -110,13 +110,19 @@
<DependentUpon>ProgressDialog.cs</DependentUpon>
</Compile>
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Include="RadiantHelpers.cs" />
<Compile Include="Forms\XYWndDialog.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\XYWndDialog.Designer.cs">
<DependentUpon>XYWndDialog.cs</DependentUpon>
</Compile>
<Compile Include="Shared\MenuCommands.cs" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Forms\CamWndDialog.resx">
Expand All @@ -131,6 +137,10 @@
<EmbeddedResource Include="Forms\XYWndDialog.resx">
<DependentUpon>XYWndDialog.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
Expand Down
Binary file not shown.
Binary file not shown.
Loading

0 comments on commit c470c88

Please sign in to comment.