mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-12-25 11:50:50 +00:00
Remove legacy SRB2Launcher
This commit is contained in:
parent
fe4e9b31ce
commit
ebbe2ef817
19 changed files with 0 additions and 2559 deletions
|
@ -1,35 +0,0 @@
|
|||
========================================================================
|
||||
WIN32 APPLICATION : SRB2Launcher
|
||||
========================================================================
|
||||
|
||||
|
||||
AppWizard has created this SRB2Launcher application for you.
|
||||
|
||||
This file contains a summary of what you will find in each of the files that
|
||||
make up your SRB2Launcher application.
|
||||
|
||||
SRB2Launcher.cpp
|
||||
This is the main application source file.
|
||||
|
||||
SRB2Launcher.dsp
|
||||
This file (the project file) contains information at the project level and
|
||||
is used to build a single project or subproject. Other users can share the
|
||||
project (.dsp) file, but they should export the makefiles locally.
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
Other standard files:
|
||||
|
||||
StdAfx.h, StdAfx.cpp
|
||||
These files are used to build a precompiled header (PCH) file
|
||||
named SRB2Launcher.pch and a precompiled types file named StdAfx.obj.
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
Other notes:
|
||||
|
||||
AppWizard uses "TODO:" to indicate parts of the source code you
|
||||
should add to or customize.
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
File diff suppressed because it is too large
Load diff
|
@ -1,144 +0,0 @@
|
|||
# Microsoft Developer Studio Project File - Name="SRB2Launcher" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Application" 0x0101
|
||||
|
||||
CFG=SRB2Launcher - Win32 Debug
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "SRB2Launcher.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "SRB2Launcher.mak" CFG="SRB2Launcher - Win32 Debug"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "SRB2Launcher - Win32 Release" (based on "Win32 (x86) Application")
|
||||
!MESSAGE "SRB2Launcher - Win32 Debug" (based on "Win32 (x86) Application")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP AllowPerConfigDependencies 0
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=cl.exe
|
||||
MTL=midl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "SRB2Launcher - Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Release"
|
||||
# PROP BASE Intermediate_Dir "Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release"
|
||||
# PROP Intermediate_Dir "Release"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /c
|
||||
# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /c
|
||||
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386
|
||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib /nologo /subsystem:windows /machine:I386
|
||||
|
||||
!ELSEIF "$(CFG)" == "SRB2Launcher - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Debug"
|
||||
# PROP BASE Intermediate_Dir "Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Debug"
|
||||
# PROP Intermediate_Dir "Debug"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /GZ /c
|
||||
# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /GZ /c
|
||||
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
||||
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
|
||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "SRB2Launcher - Win32 Release"
|
||||
# Name "SRB2Launcher - Win32 Debug"
|
||||
# Begin Group "Source Files"
|
||||
|
||||
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\SRB2Launcher.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\StdAfx.cpp
|
||||
# ADD CPP /Yc"stdafx.h"
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Header Files"
|
||||
|
||||
# PROP Default_Filter "h;hpp;hxx;hm;inl"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\lilsocklib.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\resource.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\SRB2Launcher.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\StdAfx.h
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Resource Files"
|
||||
|
||||
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\bitmap1.bmp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\icon1.ico
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Script1.rc
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\ReadMe.txt
|
||||
# End Source File
|
||||
# End Target
|
||||
# End Project
|
|
@ -1,29 +0,0 @@
|
|||
Microsoft Developer Studio Workspace File, Format Version 6.00
|
||||
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "SRB2Launcher"=.\SRB2Launcher.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Global:
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<3>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
extern char TempString[256];
|
||||
extern char EXEName[1024];
|
||||
extern char Arguments[16384];
|
||||
|
||||
#define APPTITLE "Official Sonic Robo Blast 2 Launcher"
|
||||
#define APPVERSION "v0.1"
|
||||
#define APPAUTHOR "SSNTails"
|
||||
#define APPCOMPANY "Sonic Team Junior"
|
|
@ -1,355 +0,0 @@
|
|||
//Microsoft Developer Studio generated resource script.
|
||||
//
|
||||
#include "resource.h"
|
||||
|
||||
#define APSTUDIO_READONLY_SYMBOLS
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 2 resource.
|
||||
//
|
||||
#include "afxres.h"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#undef APSTUDIO_READONLY_SYMBOLS
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// English (U.S.) resources
|
||||
|
||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
|
||||
#ifdef _WIN32
|
||||
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
||||
#pragma code_page(1252)
|
||||
#endif //_WIN32
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Dialog
|
||||
//
|
||||
|
||||
IDD_MAIN DIALOG DISCARDABLE 0, 0, 272, 226
|
||||
STYLE DS_3DLOOK | WS_MINIMIZEBOX | WS_POPUP | WS_VISIBLE | WS_CAPTION |
|
||||
WS_SYSMENU
|
||||
CAPTION "Official Sonic Robo Blast 2 Launcher v0.1"
|
||||
FONT 8, "MS Sans Serif"
|
||||
BEGIN
|
||||
COMBOBOX IDC_LAUNCHCONFIG,125,15,135,155,CBS_DROPDOWNLIST |
|
||||
CBS_SORT | WS_VSCROLL | WS_TABSTOP
|
||||
GROUPBOX "Saved Launch Configuration",IDC_STATIC,120,5,145,45
|
||||
GROUPBOX "WAD/SOC Files",IDC_STATIC,120,55,145,45
|
||||
COMBOBOX IDC_EXTFILECOMBO,125,65,135,95,CBS_DROPDOWNLIST |
|
||||
WS_VSCROLL | WS_TABSTOP
|
||||
CONTROL 102,IDC_STATIC,"Static",SS_BITMAP,5,90,107,79
|
||||
PUSHBUTTON "&About",IDC_ABOUT,125,210,25,10
|
||||
DEFPUSHBUTTON "&Go!",IDC_GO,60,150,50,14
|
||||
PUSHBUTTON "Add",IDC_ADDFILE,225,80,35,15
|
||||
PUSHBUTTON "Remove",IDC_REMOVEFILE,185,80,35,15
|
||||
PUSHBUTTON "Save",IDC_SAVELAUNCHCFG,220,30,40,15
|
||||
GROUPBOX "Multiplayer",IDC_STATIC,5,5,105,50
|
||||
PUSHBUTTON "&Join A Game",IDC_JOINGAME,10,15,50,15
|
||||
PUSHBUTTON "&Host A Game",IDC_HOSTGAME,55,35,50,15
|
||||
EDITTEXT IDC_PARAMETERS,160,190,105,30,ES_MULTILINE |
|
||||
ES_AUTOVSCROLL | WS_VSCROLL
|
||||
RTEXT "Manual Parameters:",IDC_STATIC,115,190,40,15
|
||||
GROUPBOX "Executable Name",IDC_STATIC,120,105,145,50
|
||||
EDITTEXT IDC_EXENAME,125,115,95,12,ES_AUTOHSCROLL
|
||||
PUSHBUTTON "Choose...",IDC_FINDEXENAME,225,115,35,10
|
||||
PUSHBUTTON "General &Options",IDC_OPTIONS,55,60,50,20,BS_MULTILINE
|
||||
EDITTEXT IDC_CONFIGFILE,125,140,95,12,ES_AUTOHSCROLL
|
||||
LTEXT "Configuration File:",IDC_STATIC,125,130,60,10
|
||||
PUSHBUTTON "Choose...",IDC_FINDCONFIGNAME,225,140,35,10
|
||||
CONTROL "List1",IDC_LIST1,"SysListView32",WS_BORDER | WS_TABSTOP,
|
||||
20,180,85,40
|
||||
END
|
||||
|
||||
IDD_JOINGAME DIALOG DISCARDABLE 0, 0, 367, 166
|
||||
STYLE DS_MODALFRAME | DS_3DLOOK | WS_POPUP | WS_VISIBLE | WS_CAPTION |
|
||||
WS_SYSMENU
|
||||
CAPTION "Join Game"
|
||||
FONT 8, "MS Sans Serif"
|
||||
BEGIN
|
||||
PUSHBUTTON "&Refresh List",IDC_SEARCHGAMES,5,140,55,20,BS_MULTILINE
|
||||
CONTROL "List1",IDC_GAMELIST,"SysListView32",LVS_REPORT |
|
||||
LVS_SINGLESEL | WS_BORDER | WS_TABSTOP,5,15,240,120
|
||||
EDITTEXT IDC_NAME,295,10,65,12,ES_AUTOHSCROLL
|
||||
COMBOBOX IDC_COLOR,295,30,65,130,CBS_DROPDOWNLIST | CBS_SORT |
|
||||
WS_VSCROLL | WS_TABSTOP
|
||||
RTEXT "Name:",IDC_STATIC,265,10,25,10
|
||||
RTEXT "Color:",IDC_STATIC,265,30,25,10
|
||||
COMBOBOX IDC_SKIN,295,50,65,110,CBS_DROPDOWNLIST | CBS_SORT |
|
||||
WS_VSCROLL | WS_TABSTOP
|
||||
RTEXT "Character:",IDC_STATIC,255,50,35,10
|
||||
EDITTEXT IDC_ADDRESS,255,115,70,12,ES_AUTOHSCROLL
|
||||
LTEXT "Manual Address:",IDC_STATIC,255,105,60,10
|
||||
CONTROL "Don't check server for files.",IDC_NOFILE,"Button",
|
||||
BS_AUTOCHECKBOX | BS_MULTILINE | WS_TABSTOP,255,70,105,
|
||||
10
|
||||
DEFPUSHBUTTON "&Go!",IDC_JOINSTART,330,115,30,15
|
||||
LTEXT "Double-Click on a game to join:",IDC_STATIC,5,5,215,10
|
||||
CONTROL "Don't download files",IDC_NODOWNLOAD,"Button",
|
||||
BS_AUTOCHECKBOX | WS_TABSTOP,255,90,105,10
|
||||
END
|
||||
|
||||
IDD_HOSTGAME DIALOG DISCARDABLE 0, 0, 287, 156
|
||||
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Host Game"
|
||||
FONT 8, "MS Sans Serif"
|
||||
BEGIN
|
||||
GROUPBOX "Game Type",IDC_STATIC,5,5,110,65
|
||||
PUSHBUTTON "&Options...",IDC_OPTIONS,55,30,40,15
|
||||
COMBOBOX IDC_GAMETYPE,10,15,85,100,CBS_DROPDOWNLIST | WS_VSCROLL |
|
||||
WS_TABSTOP
|
||||
RTEXT "Max # of players:",IDC_STATIC,35,86,70,10
|
||||
EDITTEXT IDC_MAXPLAYERS,110,86,20,12,ES_AUTOHSCROLL
|
||||
GROUPBOX "General Options",IDC_STATIC,5,75,275,75
|
||||
COMBOBOX IDC_STARTMAP,40,50,70,95,CBS_DROPDOWN | CBS_SORT |
|
||||
WS_VSCROLL | WS_TABSTOP
|
||||
RTEXT "Start on map #:",IDC_STATIC,10,45,25,20
|
||||
CONTROL "Force players to use host's character",IDC_FORCESKIN,
|
||||
"Button",BS_AUTOCHECKBOX | BS_MULTILINE | WS_TABSTOP,140,
|
||||
85,135,10
|
||||
COMBOBOX IDC_ADVANCEMAP,45,105,85,50,CBS_DROPDOWNLIST |
|
||||
WS_VSCROLL | WS_TABSTOP
|
||||
RTEXT "Advance Stage:",IDC_STATIC,10,100,30,20
|
||||
CONTROL "Don't advertise server on Internet",IDC_INTERNETSERVER,
|
||||
"Button",BS_AUTOCHECKBOX | BS_MULTILINE | WS_TABSTOP,140,
|
||||
130,120,10
|
||||
RTEXT "Intermission Delay Between Levels (in seconds):",
|
||||
IDC_STATIC,10,125,90,15
|
||||
EDITTEXT IDC_INTTIME,105,130,20,12,ES_AUTOHSCROLL | ES_NUMBER
|
||||
CONTROL "Don't allow autoaim",IDC_DISABLEAUTOAIM,"Button",
|
||||
BS_AUTOCHECKBOX | WS_TABSTOP,140,100,75,10
|
||||
CONTROL "Disable WAD/SOC Downloading",IDC_NODOWNLOAD,"Button",
|
||||
BS_AUTOCHECKBOX | WS_TABSTOP,140,115,120,10
|
||||
PUSHBUTTON "Monitor &Toggles...",IDC_MONITORTOGGLES,125,45,40,20,
|
||||
BS_MULTILINE
|
||||
END
|
||||
|
||||
IDD_MATCHOPTIONS DIALOG DISCARDABLE 0, 0, 142, 141
|
||||
STYLE DS_MODALFRAME | DS_3DLOOK | WS_POPUP | WS_VISIBLE | WS_CAPTION |
|
||||
WS_SYSMENU
|
||||
CAPTION "Match Options"
|
||||
FONT 8, "MS Sans Serif"
|
||||
BEGIN
|
||||
CONTROL "Don't use special ring weapons.",IDC_SPECIALRINGS,
|
||||
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,5,115,10
|
||||
RTEXT "Item Box Behavior:",IDC_STATIC,5,50,60,10
|
||||
EDITTEXT IDC_RESPAWNITEMTIME,115,70,20,12,ES_AUTOHSCROLL |
|
||||
ES_NUMBER
|
||||
COMBOBOX IDC_MATCHBOXES,70,50,65,65,CBS_DROPDOWN | CBS_SORT |
|
||||
WS_VSCROLL | WS_TABSTOP
|
||||
RTEXT "Item Respawn Time (in seconds):",IDC_STATIC,5,70,105,10
|
||||
EDITTEXT IDC_TIMELIMIT,115,84,20,12,ES_AUTOHSCROLL | ES_NUMBER
|
||||
RTEXT "Time Limit (in minutes):",IDC_STATIC,35,84,75,10
|
||||
RTEXT "Point Limit:",IDC_STATIC,70,100,40,10
|
||||
EDITTEXT IDC_POINTLIMIT,115,100,20,12,ES_AUTOHSCROLL | ES_NUMBER
|
||||
CONTROL "Sudden Death Mode",IDC_SUDDENDEATH,"Button",
|
||||
BS_AUTOCHECKBOX | WS_TABSTOP,15,20,80,10
|
||||
COMBOBOX IDC_MATCH_SCORING,70,35,65,65,CBS_DROPDOWNLIST |
|
||||
CBS_SORT | WS_VSCROLL | WS_TABSTOP
|
||||
RTEXT "Scoring Type:",IDC_STATIC,15,35,50,10
|
||||
PUSHBUTTON "Cance&l",IDC_CANCEL,100,120,35,15
|
||||
DEFPUSHBUTTON "O&K",IDC_OK,60,120,35,15
|
||||
END
|
||||
|
||||
IDD_RACEOPTIONS DIALOG DISCARDABLE 0, 0, 142, 71
|
||||
STYLE DS_MODALFRAME | DS_3DLOOK | WS_POPUP | WS_VISIBLE | WS_CAPTION |
|
||||
WS_SYSMENU
|
||||
CAPTION "Race Options"
|
||||
FONT 8, "MS Sans Serif"
|
||||
BEGIN
|
||||
RTEXT "Item Box Behavior:",IDC_STATIC,5,10,60,10
|
||||
COMBOBOX IDC_RACEITEMBOXES,70,10,65,55,CBS_DROPDOWNLIST |
|
||||
CBS_SORT | WS_VSCROLL | WS_TABSTOP
|
||||
EDITTEXT IDC_NUMLAPS,115,30,20,12,ES_AUTOHSCROLL | ES_NUMBER
|
||||
RTEXT "Number of Laps:",IDC_STATIC,55,30,55,10
|
||||
PUSHBUTTON "Cance&l",IDC_CANCEL,100,50,35,15
|
||||
DEFPUSHBUTTON "O&K",IDC_OK,60,50,35,15
|
||||
END
|
||||
|
||||
IDD_CTFOPTIONS DIALOG DISCARDABLE 0, 0, 142, 126
|
||||
STYLE DS_MODALFRAME | DS_3DLOOK | WS_POPUP | WS_VISIBLE | WS_CAPTION |
|
||||
WS_SYSMENU
|
||||
CAPTION "CTF Options"
|
||||
FONT 8, "MS Sans Serif"
|
||||
BEGIN
|
||||
CONTROL "Don't use special ring weapons.",IDC_SPECIALRINGS,
|
||||
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,5,115,10
|
||||
RTEXT "Item Box Behavior:",IDC_STATIC,5,20,60,10
|
||||
COMBOBOX IDC_MATCHBOXES,70,20,65,60,CBS_DROPDOWNLIST | WS_VSCROLL |
|
||||
WS_TABSTOP
|
||||
RTEXT "Item Respawn Time (in seconds):",IDC_STATIC,5,40,105,10
|
||||
EDITTEXT IDC_RESPAWNITEMTIME,115,40,20,12,ES_AUTOHSCROLL |
|
||||
ES_NUMBER
|
||||
RTEXT "Time Limit (in minutes):",IDC_STATIC,35,70,75,10
|
||||
EDITTEXT IDC_TIMELIMIT,115,70,20,12,ES_AUTOHSCROLL | ES_NUMBER
|
||||
RTEXT "Point Limit:",IDC_STATIC,70,86,40,10
|
||||
EDITTEXT IDC_POINTLIMIT,115,86,20,12,ES_AUTOHSCROLL | ES_NUMBER
|
||||
RTEXT "Flag Respawn Time (in seconds):",IDC_STATIC,5,55,105,10
|
||||
EDITTEXT IDC_FLAGTIME,115,55,20,12,ES_AUTOHSCROLL | ES_NUMBER
|
||||
PUSHBUTTON "Cance&l",IDC_CANCEL,100,105,35,15
|
||||
DEFPUSHBUTTON "O&K",IDC_OK,60,105,35,15
|
||||
END
|
||||
|
||||
IDD_TAGOPTIONS DIALOG DISCARDABLE 0, 0, 142, 111
|
||||
STYLE DS_MODALFRAME | DS_3DLOOK | WS_POPUP | WS_VISIBLE | WS_CAPTION |
|
||||
WS_SYSMENU
|
||||
CAPTION "Tag Options"
|
||||
FONT 8, "MS Sans Serif"
|
||||
BEGIN
|
||||
CONTROL "Don't use special ring weapons.",IDC_SPECIALRINGS,
|
||||
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,5,115,10
|
||||
COMBOBOX IDC_MATCHBOXES,70,20,65,60,CBS_DROPDOWNLIST | WS_VSCROLL |
|
||||
WS_TABSTOP
|
||||
RTEXT "Item Box Behavior:",IDC_STATIC,5,20,60,10
|
||||
DEFPUSHBUTTON "O&K",IDC_OK,60,90,35,15
|
||||
PUSHBUTTON "Cance&l",IDC_CANCEL,100,90,35,15
|
||||
RTEXT "Item Respawn Time (in seconds):",IDC_STATIC,5,40,105,10
|
||||
EDITTEXT IDC_RESPAWNITEMTIME,115,40,20,12,ES_AUTOHSCROLL |
|
||||
ES_NUMBER
|
||||
RTEXT "Time Limit (in minutes):",IDC_STATIC,35,55,75,10
|
||||
EDITTEXT IDC_TIMELIMIT,115,55,20,12,ES_AUTOHSCROLL | ES_NUMBER
|
||||
RTEXT "Point Limit:",IDC_STATIC,70,70,40,10
|
||||
EDITTEXT IDC_POINTLIMIT,115,70,20,12,ES_AUTOHSCROLL | ES_NUMBER
|
||||
END
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// DESIGNINFO
|
||||
//
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
GUIDELINES DESIGNINFO DISCARDABLE
|
||||
BEGIN
|
||||
IDD_MAIN, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 7
|
||||
RIGHTMARGIN, 265
|
||||
TOPMARGIN, 7
|
||||
BOTTOMMARGIN, 219
|
||||
END
|
||||
|
||||
IDD_JOINGAME, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 7
|
||||
RIGHTMARGIN, 360
|
||||
TOPMARGIN, 7
|
||||
BOTTOMMARGIN, 159
|
||||
END
|
||||
|
||||
IDD_HOSTGAME, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 7
|
||||
RIGHTMARGIN, 280
|
||||
TOPMARGIN, 7
|
||||
BOTTOMMARGIN, 149
|
||||
END
|
||||
|
||||
IDD_MATCHOPTIONS, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 7
|
||||
RIGHTMARGIN, 135
|
||||
TOPMARGIN, 7
|
||||
BOTTOMMARGIN, 134
|
||||
END
|
||||
|
||||
IDD_RACEOPTIONS, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 7
|
||||
RIGHTMARGIN, 135
|
||||
TOPMARGIN, 7
|
||||
BOTTOMMARGIN, 64
|
||||
END
|
||||
|
||||
IDD_CTFOPTIONS, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 7
|
||||
RIGHTMARGIN, 135
|
||||
TOPMARGIN, 7
|
||||
BOTTOMMARGIN, 119
|
||||
END
|
||||
|
||||
IDD_TAGOPTIONS, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 7
|
||||
RIGHTMARGIN, 135
|
||||
TOPMARGIN, 7
|
||||
BOTTOMMARGIN, 104
|
||||
END
|
||||
END
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TEXTINCLUDE
|
||||
//
|
||||
|
||||
1 TEXTINCLUDE DISCARDABLE
|
||||
BEGIN
|
||||
"resource.h\0"
|
||||
END
|
||||
|
||||
2 TEXTINCLUDE DISCARDABLE
|
||||
BEGIN
|
||||
"#include ""afxres.h""\r\n"
|
||||
"\0"
|
||||
END
|
||||
|
||||
3 TEXTINCLUDE DISCARDABLE
|
||||
BEGIN
|
||||
"\r\n"
|
||||
"\0"
|
||||
END
|
||||
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Bitmap
|
||||
//
|
||||
|
||||
IDB_BITMAP1 BITMAP DISCARDABLE "bitmap1.bmp"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Icon
|
||||
//
|
||||
|
||||
// Icon with lowest ID value placed first to ensure application icon
|
||||
// remains consistent on all systems.
|
||||
IDI_ICON1 ICON DISCARDABLE "icon1.ico"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Dialog Info
|
||||
//
|
||||
|
||||
IDD_JOINGAME DLGINIT
|
||||
BEGIN
|
||||
IDC_SKIN, 0x403, 6, 0
|
||||
0x6f53, 0x696e, 0x0063,
|
||||
IDC_SKIN, 0x403, 6, 0
|
||||
0x6154, 0x6c69, 0x0073,
|
||||
IDC_SKIN, 0x403, 9, 0
|
||||
0x6e4b, 0x6375, 0x6c6b, 0x7365, "\000"
|
||||
0
|
||||
END
|
||||
|
||||
#endif // English (U.S.) resources
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
|
||||
#ifndef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 3 resource.
|
||||
//
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#endif // not APSTUDIO_INVOKED
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
// stdafx.cpp : source file that includes just the standard includes
|
||||
// SRB2Launcher.pch will be the pre-compiled header
|
||||
// stdafx.obj will contain the pre-compiled type information
|
||||
|
||||
#include "stdafx.h"
|
||||
|
||||
// TODO: reference any additional headers you need in STDAFX.H
|
||||
// and not in this file
|
|
@ -1,29 +0,0 @@
|
|||
// stdafx.h : include file for standard system include files,
|
||||
// or project specific include files that are used frequently, but
|
||||
// are changed infrequently
|
||||
//
|
||||
|
||||
#if !defined(AFX_STDAFX_H__A9DB83DB_A9FD_11D0_BFD1_444553540000__INCLUDED_)
|
||||
#define AFX_STDAFX_H__A9DB83DB_A9FD_11D0_BFD1_444553540000__INCLUDED_
|
||||
|
||||
#if _MSC_VER > 1000
|
||||
#pragma once
|
||||
#endif // _MSC_VER > 1000
|
||||
|
||||
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
|
||||
|
||||
#include <windows.h>
|
||||
#include <shellapi.h>
|
||||
#include <commdlg.h>
|
||||
#include <commctrl.h>
|
||||
#include <winsock.h>
|
||||
#include "lilsocklib.h"
|
||||
#include "resource.h"
|
||||
|
||||
|
||||
// TODO: reference additional headers your program requires here
|
||||
|
||||
//{{AFX_INSERT_LOCATION}}
|
||||
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
|
||||
|
||||
#endif // !defined(AFX_STDAFX_H__A9DB83DB_A9FD_11D0_BFD1_444553540000__INCLUDED_)
|
Binary file not shown.
Before Width: | Height: | Size: 21 KiB |
|
@ -1,57 +0,0 @@
|
|||
// Emacs style mode select -*- C++ -*-
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// MSERV SDK
|
||||
//
|
||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||
// Adapted by Oogaland.
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU General Public License
|
||||
// as published by the Free Software Foundation; either version 2
|
||||
// of the License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
//
|
||||
//
|
||||
// DESCRIPTION:
|
||||
// TCP/IP stuff.
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
|
||||
#include <winsock.h>
|
||||
#include <wsipx.h>
|
||||
|
||||
|
||||
#include "launcher.h"
|
||||
#include "mserv.h" //Hurdler: support master server
|
||||
|
||||
|
||||
|
||||
|
||||
static int init_tcp_driver = 0;
|
||||
|
||||
|
||||
void I_InitTcpDriver(void)
|
||||
{
|
||||
if (!init_tcp_driver)
|
||||
{
|
||||
#ifdef __WIN32__
|
||||
WSADATA winsockdata;
|
||||
if( WSAStartup(MAKEWORD(1,1),&winsockdata) )
|
||||
I_Error("No Tcp/Ip driver detected");
|
||||
#endif
|
||||
#ifdef __DJGPP_
|
||||
if( !__lsck_init() )
|
||||
I_Error("No Tcp/Ip driver detected");
|
||||
#endif
|
||||
init_tcp_driver = 1;
|
||||
}
|
||||
}
|
|
@ -1,34 +0,0 @@
|
|||
// Emacs style mode select -*- C++ -*-
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// MSERV SDK
|
||||
//
|
||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||
// Adapted by Oogaland.
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU General Public License
|
||||
// as published by the Free Software Foundation; either version 2
|
||||
// of the License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
//
|
||||
//
|
||||
// DESCRIPTION:
|
||||
// Header file for the TCP/IP routines
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
|
||||
#ifndef _I_TCP_H_
|
||||
#define _I_TCP_H_
|
||||
|
||||
extern int sock_port;
|
||||
|
||||
void I_InitTcpDriver(void);
|
||||
|
||||
#endif // !defined(_I_TCP_H_)
|
Binary file not shown.
Before Width: | Height: | Size: 2.9 KiB |
|
@ -1,19 +0,0 @@
|
|||
#include <windows.h>
|
||||
|
||||
#include "launcher.h"
|
||||
|
||||
int WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpvReserved)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
void CONS_Printf(char *fmt, ...)
|
||||
{
|
||||
MessageBox(NULL, fmt, "Master Server", 0);
|
||||
}
|
||||
|
||||
void I_Error (char *error, ...)
|
||||
{
|
||||
MessageBox(NULL, error, "Master Server", MB_ICONERROR);
|
||||
}
|
|
@ -1,34 +0,0 @@
|
|||
// Emacs style mode select -*- C++ -*-
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// MSERV SDK
|
||||
//
|
||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||
// Adapted by Oogaland.
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU General Public License
|
||||
// as published by the Free Software Foundation; either version 2
|
||||
// of the License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
//
|
||||
//
|
||||
// DESCRIPTION:
|
||||
// Header file for the launcher routines
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
|
||||
#ifndef _LAUNCHER_H_
|
||||
#define _LAUNCHER_H_
|
||||
|
||||
|
||||
void CONS_Printf(char *fmt, ...);
|
||||
void I_Error (char *error, ...);
|
||||
|
||||
#endif // !defined(_LAUNCHER_H_)
|
|
@ -1,52 +0,0 @@
|
|||
// Unlike lilsocklib.c, since this takes code from SRB2,
|
||||
// it is under the GPL, rather than public domain. =(
|
||||
//
|
||||
#ifndef __LILSOCKLIB_H__
|
||||
#define __LILSOCKLIB_H__
|
||||
|
||||
#define SD_BOTH 0x02
|
||||
|
||||
#define PACKET_SIZE 1024
|
||||
|
||||
#define MS_NO_ERROR 0
|
||||
#define MS_SOCKET_ERROR -201
|
||||
#define MS_CONNECT_ERROR -203
|
||||
#define MS_WRITE_ERROR -210
|
||||
#define MS_READ_ERROR -211
|
||||
#define MS_CLOSE_ERROR -212
|
||||
#define MS_GETHOSTBYNAME_ERROR -220
|
||||
#define MS_GETHOSTNAME_ERROR -221
|
||||
#define MS_TIMEOUT_ERROR -231
|
||||
|
||||
// see master server code for the values
|
||||
#define ADD_SERVER_MSG 101
|
||||
#define REMOVE_SERVER_MSG 103
|
||||
#ifdef MASTERSERVERS12
|
||||
#define ADD_SERVERv2_MSG 104
|
||||
#endif
|
||||
#define GET_SERVER_MSG 200
|
||||
#define GET_SHORT_SERVER_MSG 205
|
||||
#ifdef MASTERSERVERS12
|
||||
#define ASK_SERVER_MSG 206
|
||||
#define ANSWER_ASK_SERVER_MSG 207
|
||||
#endif
|
||||
|
||||
#define HEADER_SIZE ((long)sizeof (long)*3)
|
||||
|
||||
#define HEADER_MSG_POS 0
|
||||
#define IP_MSG_POS 16
|
||||
#define PORT_MSG_POS 32
|
||||
#define HOSTNAME_MSG_POS 40
|
||||
|
||||
/** A message to be exchanged with the master server.
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
long id; ///< Unused?
|
||||
long type; ///< Type of message.
|
||||
long length; ///< Length of the message.
|
||||
char buffer[PACKET_SIZE]; ///< Actual contents of the message.
|
||||
} msg_t;
|
||||
|
||||
SOCKET ConnectSocket(char* IPAddress);
|
||||
#endif
|
|
@ -1,400 +0,0 @@
|
|||
// Emacs style mode select -*- C++ -*-
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// MSERV SDK
|
||||
//
|
||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||
// Adapted by Oogaland.
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU General Public License
|
||||
// as published by the Free Software Foundation; either version 2
|
||||
// of the License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
//
|
||||
//
|
||||
// DESCRIPTION:
|
||||
// Commands used to communicate with the master server
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
|
||||
#ifdef WIN32
|
||||
#include <windows.h> // socket(),...
|
||||
#else
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
#include "launcher.h"
|
||||
|
||||
#include "mserv.h"
|
||||
#include "i_tcp.h"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// ================================ DEFINITIONS ===============================
|
||||
|
||||
#define PACKET_SIZE 1024
|
||||
|
||||
#define MS_NO_ERROR 0
|
||||
#define MS_SOCKET_ERROR -201
|
||||
#define MS_CONNECT_ERROR -203
|
||||
#define MS_WRITE_ERROR -210
|
||||
#define MS_READ_ERROR -211
|
||||
#define MS_CLOSE_ERROR -212
|
||||
#define MS_GETHOSTBYNAME_ERROR -220
|
||||
#define MS_GETHOSTNAME_ERROR -221
|
||||
#define MS_TIMEOUT_ERROR -231
|
||||
|
||||
// see master server code for the values
|
||||
#define GET_SERVER_MSG 200
|
||||
|
||||
|
||||
#define HEADER_SIZE ((long)sizeof(long)*3)
|
||||
|
||||
#define HEADER_MSG_POS 0
|
||||
#define IP_MSG_POS 16
|
||||
#define PORT_MSG_POS 32
|
||||
#define HOSTNAME_MSG_POS 40
|
||||
|
||||
#ifndef SOCKET
|
||||
#define SOCKET int
|
||||
#endif
|
||||
|
||||
typedef struct {
|
||||
long id;
|
||||
long type;
|
||||
long length;
|
||||
char buffer[PACKET_SIZE];
|
||||
} msg_t;
|
||||
|
||||
|
||||
// win32 or djgpp
|
||||
#if defined( WIN32) || defined( __DJGPP__ )
|
||||
#define ioctl ioctlsocket
|
||||
#define close closesocket
|
||||
#endif
|
||||
|
||||
#if defined( WIN32) || defined( __OS2__)
|
||||
// it seems windows doesn't define that... maybe some other OS? OS/2
|
||||
int inet_aton(char *hostname, struct in_addr *addr)
|
||||
{
|
||||
return ( (addr->s_addr=inet_addr(hostname)) != INADDR_NONE );
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
enum { MSCS_NONE, MSCS_WAITING, MSCS_REGISTERED, MSCS_FAILED } con_state = MSCS_NONE;
|
||||
|
||||
|
||||
static SOCKET socket_fd = -1; // TCP/IP socket
|
||||
static struct sockaddr_in addr;
|
||||
static struct timeval select_timeout;
|
||||
static fd_set wset;
|
||||
|
||||
int MS_Connect(char *ip_addr, char *str_port, int async);
|
||||
static int MS_Read(msg_t *msg);
|
||||
static int MS_Write(msg_t *msg);
|
||||
static int MS_GetIP(char *);
|
||||
|
||||
void ExtractServerInfo(char *serverout, struct SERVERLIST *serverlist);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
void CloseConnection(void)
|
||||
{
|
||||
if(socket_fd > 0) close(socket_fd);
|
||||
socket_fd = -1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
** MS_GetIP()
|
||||
*/
|
||||
static int MS_GetIP(char *hostname)
|
||||
{
|
||||
struct hostent *host_ent;
|
||||
|
||||
if (!inet_aton(hostname, &addr.sin_addr)) {
|
||||
//TODO: only when we are connected to Internet, or use a non bloking call
|
||||
host_ent = gethostbyname(hostname);
|
||||
if (host_ent==NULL)
|
||||
return MS_GETHOSTBYNAME_ERROR;
|
||||
memcpy(&addr.sin_addr, host_ent->h_addr_list[0], sizeof(struct in_addr));
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
** MS_Connect()
|
||||
*/
|
||||
int MS_Connect(char *ip_addr, char *str_port, int async)
|
||||
{
|
||||
memset(&addr, 0, sizeof(addr));
|
||||
addr.sin_family = AF_INET;
|
||||
I_InitTcpDriver(); // this is done only if not already done
|
||||
|
||||
if ((socket_fd = socket(AF_INET, SOCK_STREAM, 0)) < 0)
|
||||
return MS_SOCKET_ERROR;
|
||||
|
||||
if (MS_GetIP(ip_addr)==MS_GETHOSTBYNAME_ERROR)
|
||||
return MS_GETHOSTBYNAME_ERROR;
|
||||
addr.sin_port = htons((u_short)atoi(str_port));
|
||||
|
||||
if (async) // do asynchronous connection
|
||||
{
|
||||
int res = 1;
|
||||
|
||||
ioctl(socket_fd, FIONBIO, &res);
|
||||
res = connect(socket_fd, (struct sockaddr *) &addr, sizeof(addr));
|
||||
if (res < 0)
|
||||
{
|
||||
// humm, on win32 it doesn't work with EINPROGRESS (stupid windows)
|
||||
if (WSAGetLastError() != WSAEWOULDBLOCK)
|
||||
{
|
||||
con_state = MSCS_FAILED;
|
||||
CloseConnection();
|
||||
return MS_CONNECT_ERROR;
|
||||
}
|
||||
}
|
||||
con_state = MSCS_WAITING;
|
||||
FD_ZERO(&wset);
|
||||
FD_SET(socket_fd, &wset);
|
||||
select_timeout.tv_sec = 0, select_timeout.tv_usec = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (connect(socket_fd, (struct sockaddr *) &addr, sizeof(addr)) < 0)
|
||||
return MS_CONNECT_ERROR;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* MS_Write():
|
||||
*/
|
||||
static int MS_Write(msg_t *msg)
|
||||
{
|
||||
int len;
|
||||
|
||||
if (msg->length < 0)
|
||||
msg->length = strlen(msg->buffer);
|
||||
len = msg->length+HEADER_SIZE;
|
||||
|
||||
//msg->id = htonl(msg->id);
|
||||
msg->type = htonl(msg->type);
|
||||
msg->length = htonl(msg->length);
|
||||
|
||||
if (send(socket_fd, (char*)msg, len, 0) != len)
|
||||
return MS_WRITE_ERROR;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* MS_Read():
|
||||
*/
|
||||
static int MS_Read(msg_t *msg)
|
||||
{
|
||||
if (recv(socket_fd, (char*)msg, HEADER_SIZE, 0) != HEADER_SIZE)
|
||||
return MS_READ_ERROR;
|
||||
|
||||
msg->type = ntohl(msg->type);
|
||||
msg->length = ntohl(msg->length);
|
||||
|
||||
if (!msg->length) //Hurdler: fix a bug in Windows 2000
|
||||
return 0;
|
||||
|
||||
if (recv(socket_fd, (char*)msg->buffer, msg->length, 0) != msg->length)
|
||||
return MS_READ_ERROR;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/***************************************************************************/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* GetServerListEx */
|
||||
EXPORT int __stdcall GetServerListEx(char *host, char *str_port, struct SERVERLIST serverlist[], short max_servers)
|
||||
{
|
||||
msg_t msg;
|
||||
int count = 0;
|
||||
|
||||
|
||||
/* Attempt to connect to list server. */
|
||||
MS_Connect(host, str_port, 0);
|
||||
|
||||
/* Poll the list server. If it fails, depart with an error code of -1. */
|
||||
msg.type = GET_SERVER_MSG;
|
||||
msg.length = 0;
|
||||
if (MS_Write(&msg) < 0)
|
||||
return -1;
|
||||
|
||||
|
||||
|
||||
/* Get a description of each server in turn. */
|
||||
/* What we get is exactly the same as the output to the console when using LISTSERV. */
|
||||
while (MS_Read(&msg) >= 0)
|
||||
{
|
||||
if(msg.length == 0 || count >= max_servers)
|
||||
{
|
||||
CloseConnection();
|
||||
return count;
|
||||
}
|
||||
|
||||
ExtractServerInfo(msg.buffer, &serverlist[count]);
|
||||
|
||||
count++;
|
||||
}
|
||||
|
||||
|
||||
CloseConnection();
|
||||
return -2;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* GetServerList */
|
||||
/* Warning: Large kludge follows! This function is only included for backwards-compatibility. */
|
||||
/* Use GetServerListVB or GetServerListEx instead. */
|
||||
EXPORT int __stdcall GetServerList(char *host, char *str_port,
|
||||
|
||||
struct SERVERLIST *serverlist1,struct SERVERLIST *serverlist2,struct SERVERLIST *serverlist3,
|
||||
struct SERVERLIST *serverlist4,struct SERVERLIST *serverlist5,struct SERVERLIST *serverlist6,
|
||||
struct SERVERLIST *serverlist7,struct SERVERLIST *serverlist8,struct SERVERLIST *serverlist9,
|
||||
struct SERVERLIST *serverlist10,struct SERVERLIST *serverlist11,struct SERVERLIST *serverlist12,
|
||||
struct SERVERLIST *serverlist13,struct SERVERLIST *serverlist14,struct SERVERLIST *serverlist15,
|
||||
struct SERVERLIST *serverlist16)
|
||||
{
|
||||
msg_t msg;
|
||||
int count = 0;
|
||||
struct SERVERLIST *serverlist[16];
|
||||
|
||||
|
||||
/* Attempt to connect to list server. */
|
||||
MS_Connect(host, str_port, 0);
|
||||
|
||||
/* Poll the list server. If it fails, bomb with an error code of -1. */
|
||||
msg.type = GET_SERVER_MSG;
|
||||
msg.length = 0;
|
||||
if (MS_Write(&msg) < 0)
|
||||
return -1;
|
||||
|
||||
serverlist[0] = serverlist1;
|
||||
serverlist[1] = serverlist2;
|
||||
serverlist[2] = serverlist3;
|
||||
serverlist[3] = serverlist4;
|
||||
serverlist[4] = serverlist5;
|
||||
serverlist[5] = serverlist6;
|
||||
serverlist[6] = serverlist7;
|
||||
serverlist[7] = serverlist8;
|
||||
serverlist[8] = serverlist9;
|
||||
serverlist[9] = serverlist10;
|
||||
serverlist[10] = serverlist11;
|
||||
serverlist[11] = serverlist12;
|
||||
serverlist[12] = serverlist13;
|
||||
serverlist[13] = serverlist14;
|
||||
serverlist[14] = serverlist15;
|
||||
serverlist[15] = serverlist16;
|
||||
|
||||
|
||||
|
||||
|
||||
while (MS_Read(&msg) >= 0 && count < 16)
|
||||
{
|
||||
if(msg.length == 0 || count >= 16)
|
||||
{
|
||||
CloseConnection();
|
||||
return count;
|
||||
}
|
||||
|
||||
ExtractServerInfo(msg.buffer, serverlist[count]);
|
||||
|
||||
count++;
|
||||
}
|
||||
|
||||
|
||||
CloseConnection();
|
||||
|
||||
|
||||
return -2;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void ExtractServerInfo(char *serverout, struct SERVERLIST *serverlist)
|
||||
{
|
||||
char *lines[5];
|
||||
int i;
|
||||
|
||||
i=0;
|
||||
lines[0] = strtok(serverout, "\r\n");
|
||||
for(i=1; i<5; i++)
|
||||
{
|
||||
lines[i] = strtok(NULL, "\r\n");
|
||||
}
|
||||
|
||||
strcpy(serverlist->ip, strstr(lines[0], ": ")+2);
|
||||
strcpy(serverlist->port, strstr(lines[1], ": ")+2);
|
||||
strcpy(serverlist->name, strstr(lines[2], ": ")+2);
|
||||
strcpy(serverlist->version, strstr(lines[3], ": ")+2);
|
||||
strcpy(serverlist->perm, strstr(lines[4], ": ")+2);
|
||||
}
|
|
@ -1,64 +0,0 @@
|
|||
// Emacs style mode select -*- C++ -*-
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// MSERV SDK
|
||||
//
|
||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||
// Adapted by Oogaland.
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU General Public License
|
||||
// as published by the Free Software Foundation; either version 2
|
||||
// of the License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
//
|
||||
//
|
||||
// DESCRIPTION:
|
||||
// Header file for the master server routines
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#ifndef _MSERV_H_
|
||||
#define _MSERV_H_
|
||||
|
||||
|
||||
|
||||
#ifndef EXPORT
|
||||
#ifdef __cplusplus
|
||||
#define EXPORT extern "C" __declspec (dllexport)
|
||||
#else
|
||||
#define EXPORT __declspec (dllexport)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
struct SERVERLIST
|
||||
{
|
||||
char ip[16];
|
||||
char port[6];
|
||||
char name[32];
|
||||
char version[16];
|
||||
char perm[4];
|
||||
};
|
||||
|
||||
|
||||
|
||||
EXPORT int __stdcall GetServerListEx(char *ip_addr, char *str_port, struct SERVERLIST serverlist[], short max_servers);
|
||||
EXPORT int __stdcall GetServerList(char *ip_addr, char *str_port,
|
||||
struct SERVERLIST *serverlist1,struct SERVERLIST *serverlist2,struct SERVERLIST *serverlist3,
|
||||
struct SERVERLIST *serverlist4,struct SERVERLIST *serverlist5,struct SERVERLIST *serverlist6,
|
||||
struct SERVERLIST *serverlist7,struct SERVERLIST *serverlist8,struct SERVERLIST *serverlist9,
|
||||
struct SERVERLIST *serverlist10,struct SERVERLIST *serverlist11,struct SERVERLIST *serverlist12,
|
||||
struct SERVERLIST *serverlist13,struct SERVERLIST *serverlist14,struct SERVERLIST *serverlist15,
|
||||
struct SERVERLIST *serverlist16);
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // !defined(_MSERV_H_)
|
|
@ -1,65 +0,0 @@
|
|||
// Emacs style mode select -*- C++ -*-
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// MSERV SDK
|
||||
//
|
||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||
// Adapted by Oogaland.
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU General Public License
|
||||
// as published by the Free Software Foundation; either version 2
|
||||
// of the License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
//
|
||||
//
|
||||
// DESCRIPTION:
|
||||
// Header file for the master server SDK.
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#ifndef _MSERVSDK_H_
|
||||
#define _MSERVSDK_H_
|
||||
|
||||
|
||||
|
||||
#ifndef IMPORT
|
||||
#ifdef __cplusplus
|
||||
#define IMPORT extern "C" __declspec (dllimport)
|
||||
#else
|
||||
#define IMPORT __declspec (dllimport)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
struct SERVERLIST
|
||||
{
|
||||
char ip[16];
|
||||
char port[6];
|
||||
char name[32];
|
||||
char version[16];
|
||||
char perm[4];
|
||||
};
|
||||
|
||||
|
||||
|
||||
IMPORT int __stdcall GetServerListEx(char *host, char *str_port, struct SERVERLIST serverlist[], short max_servers);
|
||||
IMPORT int __stdcall GetServerList(char *host, char *str_port,
|
||||
struct SERVERLIST *serverlist1,struct SERVERLIST *serverlist2,struct SERVERLIST *serverlist3,
|
||||
struct SERVERLIST *serverlist4,struct SERVERLIST *serverlist5,struct SERVERLIST *serverlist6,
|
||||
struct SERVERLIST *serverlist7,struct SERVERLIST *serverlist8,struct SERVERLIST *serverlist9,
|
||||
struct SERVERLIST *serverlist10,struct SERVERLIST *serverlist11,struct SERVERLIST *serverlist12,
|
||||
struct SERVERLIST *serverlist13,struct SERVERLIST *serverlist14,struct SERVERLIST *serverlist15,
|
||||
struct SERVERLIST *serverlist16);
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // !defined(_MSERVSDK_H_)
|
|
@ -1,71 +0,0 @@
|
|||
//{{NO_DEPENDENCIES}}
|
||||
// Microsoft Developer Studio generated include file.
|
||||
// Used by Script1.rc
|
||||
//
|
||||
#define IDD_MAIN 101
|
||||
#define IDB_BITMAP1 102
|
||||
#define IDI_ICON1 103
|
||||
#define IDD_JOINGAME 104
|
||||
#define IDD_HOSTGAME 106
|
||||
#define IDD_MATCHOPTIONS 108
|
||||
#define IDD_RACEOPTIONS 109
|
||||
#define IDD_CTFOPTIONS 110
|
||||
#define IDD_TAGOPTIONS 111
|
||||
#define IDC_GO 1001
|
||||
#define IDC_LAUNCHCONFIG 1002
|
||||
#define IDC_EXTFILECOMBO 1003
|
||||
#define IDC_ABOUT 1005
|
||||
#define IDC_ADDFILE 1006
|
||||
#define IDC_REMOVEFILE 1007
|
||||
#define IDC_SAVELAUNCHCFG 1008
|
||||
#define IDC_JOINGAME 1010
|
||||
#define IDC_HOSTGAME 1011
|
||||
#define IDC_SOUNDOPTS 1012
|
||||
#define IDC_PARAMETERS 1013
|
||||
#define IDC_EXENAME 1014
|
||||
#define IDC_FINDEXENAME 1015
|
||||
#define IDC_SEARCHGAMES 1016
|
||||
#define IDC_GAMELIST 1018
|
||||
#define IDC_NAME 1020
|
||||
#define IDC_COLOR 1021
|
||||
#define IDC_SKIN 1022
|
||||
#define IDC_ADDRESS 1023
|
||||
#define IDC_NOFILE 1024
|
||||
#define IDC_JOINSTART 1026
|
||||
#define IDC_NODOWNLOAD 1027
|
||||
#define IDC_OPTIONS 1028
|
||||
#define IDC_GAMETYPE 1029
|
||||
#define IDC_MAXPLAYERS 1030
|
||||
#define IDC_STARTMAP 1031
|
||||
#define IDC_FORCESKIN 1032
|
||||
#define IDC_ADVANCEMAP 1033
|
||||
#define IDC_INTERNETSERVER 1034
|
||||
#define IDC_SPECIALRINGS 1036
|
||||
#define IDC_MATCHBOXES 1037
|
||||
#define IDC_OK 1038
|
||||
#define IDC_CANCEL 1039
|
||||
#define IDC_RESPAWNITEMTIME 1040
|
||||
#define IDC_TIMELIMIT 1041
|
||||
#define IDC_POINTLIMIT 1042
|
||||
#define IDC_FLAGTIME 1048
|
||||
#define IDC_RACEITEMBOXES 1051
|
||||
#define IDC_NUMLAPS 1052
|
||||
#define IDC_SUDDENDEATH 1060
|
||||
#define IDC_MATCH_SCORING 1061
|
||||
#define IDC_INTTIME 1064
|
||||
#define IDC_DISABLEAUTOAIM 1065
|
||||
#define IDC_MONITORTOGGLES 1067
|
||||
#define IDC_CONFIGFILE 1069
|
||||
#define IDC_FINDCONFIGNAME 1070
|
||||
#define IDC_LIST1 1071
|
||||
|
||||
// Next default values for new objects
|
||||
//
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
#define _APS_NEXT_RESOURCE_VALUE 117
|
||||
#define _APS_NEXT_COMMAND_VALUE 40001
|
||||
#define _APS_NEXT_CONTROL_VALUE 1072
|
||||
#define _APS_NEXT_SYMED_VALUE 101
|
||||
#endif
|
||||
#endif
|
Loading…
Reference in a new issue