Added some console functions (map_load, map_save, config_load, config_save, exec)

Added Bind method to the ControlSchemeClass
This commit is contained in:
2003-10-20 15:22:05 -04:00
parent 1685e64676
commit b512f5dd90
24 changed files with 894 additions and 645 deletions

Binary file not shown.

Binary file not shown.

View File

@@ -1,30 +1,30 @@
bind forward up
bind backward down
bind forward mouse1
bind backward mouse2
bind lookleft left
bind lookright right
bind lookup pageup
bind lookdown pagedown
bind moveleft s
bind moveright d
bind moveup space
bind movedown a
bind fireprimary f
bind firesecondary g
bind weapnext t
bind weapprev r
bind togglelights l
bind togglefps p
bind toggleconsole `
bind togglemouselook null
bind quickmouselook null
set turnspeed 1.0
//set movespeed 0.2
set fullscreen 0
set mousespeed 5
set mouselook 1
set screenwidth 1024
set screenheight 768
set colordepth 32
bind forward up
bind backward down
bind forward mouse1
bind backward mouse2
bind lookleft left
bind lookright right
bind lookup pageup
bind lookdown pagedown
bind moveleft s
bind moveright d
bind moveup space
bind movedown a
bind fireprimary f
bind firesecondary g
bind weapnext t
bind weapprev r
bind togglelights l
bind togglefps p
bind toggleconsole `
bind togglemouselook null
bind quickmouselook null
set turnspeed 1.0
//set movespeed 0.2
set fullscreen 0
set mousespeed 5
set mouselook 1
set screenwidth 1024
set screenheight 768
set colordepth 32
set maxfps 500

View File

@@ -1,36 +1,36 @@
bind forward up
bind backward down
bind forward mouse1
bind backward mouse2
bind lookleft left
bind lookright right
bind lookup pageup
bind lookdown pagedown
bind moveleft s
bind moveright d
bind moveup space
bind movedown a
bind fireprimary f
bind firesecondary g
bind weapnext t
bind weapprev r
bind togglelights l
bind togglefps p
bind toggleconsole ~
bind toggleconsole `
bind toggleconsole z
bind togglemouselook m
bind quickmouselook y
set turnspeed 0.02
set movespeed 0.2
set mousespeed 5
set mouselook 1
set screenwidth 800
set screenheight 600
set colordepth 16
set fullscreen 0
map intro.map
set maxfps 60
set rollleft w
set rollright e
set sound false
bind forward up
bind backward down
bind forward mouse1
bind backward mouse2
bind lookleft left
bind lookright right
bind lookup pageup
bind lookdown pagedown
bind moveleft s
bind moveright d
bind moveup space
bind movedown a
bind fireprimary f
bind firesecondary g
bind weapnext t
bind weapprev r
bind togglelights l
bind togglefps p
bind toggleconsole ~
bind toggleconsole `
bind toggleconsole z
bind togglemouselook m
bind quickmouselook y
set turnspeed 0.02
set movespeed 0.2
set mousespeed 5
set mouselook 1
set screenwidth 800
set screenheight 600
set colordepth 16
set fullscreen 0
map intro.map
set maxfps 60
set rollleft w
set rollright e
set sound false

View File

@@ -1,16 +1,16 @@
1
1
0
-10 -10 -5 0 0
-10 10 -5 0 1
10 -10 -5 1 0
0 0 1
3
groundc.tga
moonc.tga
nightSkyc.tga
bgm1.mp3
1
1
0
-10 -10 -5 0 0
-10 10 -5 0 1
10 -10 -5 1 0
0 0 1
3
groundc.tga
moonc.tga
nightSkyc.tga
bgm1.mp3

View File

@@ -1,14 +1,14 @@
1
1
0
-10 -10 -5 0 0
-10 10 -5 0 1
10 -10 -5 1 0
0 0 1
3
groundc.tga
moonc.tga
nightSkyc.tga
bgm1.mp3
1
1
0
-10 -10 -5 0 0
-10 10 -5 0 1
10 -10 -5 1 0
0 0 1
3
groundc.tga
moonc.tga
nightSkyc.tga
bgm1.mp3

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 48 KiB

After

Width:  |  Height:  |  Size: 22 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 48 KiB

After

Width:  |  Height:  |  Size: 22 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 192 KiB

After

Width:  |  Height:  |  Size: 6.8 KiB

BIN
bass.dll

Binary file not shown.

View File

@@ -3,12 +3,19 @@
#include "list.h"
#include <windows.h>
enum {CTRLS_FORWARD, CTRLS_BACKWARD, CTRLS_LOOKLEFT, CTRLS_LOOKRIGHT, CTRLS_LOOKUP,
CTRLS_LOOKDOWN, CTRLS_MOVELEFT, CTRLS_MOVERIGHT, CTRLS_MOVEUP, CTRLS_MOVEDOWN,
CTRLS_ROLLLEFT, CTRLS_ROLLRIGHT, CTRLS_FIREPRIMARY, CTRLS_FIRESECONDARY,
CTRLS_WEAPONNEXT, CTRLS_WEAPONPREV, CTRLS_TOGGLE_LIGHTS, CTRLS_TOGGLE_FPS,
CTRLS_TOGGLE_CONSOLE, CTRLS_TOGGLE_MOUSELOOK, CTRLS_QUICKMOUSELOOK};
class ControlSchemeClass
{
public:
void LoadDefaultControlScheme();
void ClearControlScheme();
void Unbind(uint8);
bool Bind(uint32, uint8);
list<uint8> forward;
list<uint8> backward;

Binary file not shown.

BIN
oa.ncb

Binary file not shown.

316
oa.nsi
View File

@@ -1,159 +1,159 @@
; example2.nsi
;
; This script is based on example1.nsi, but it remember the directory,
; has uninstall support and (optionally) installs start menu shortcuts.
;
; It will install makensisw.exe into a directory that the user selects,
;--------------------------------
; The name of the installer
Name "OpenArena"
; The installer icon
Icon "${NSISDIR}\contrib\Icons\setup.ico"
; The file to write
OutFile "OpenArena-0.1.0-alpha.exe"
; The default installation directory
InstallDir "$PROGRAMFILES\HHPS\OpenArena-0.1.0-alpha"
; Registry key to check for directory (so if you install again, it will
; overwrite the old one automatically)
InstallDirRegKey HKLM SOFTWARE\HHPS\OpenArena-0.1.0-alpha "Install_Dir"
; The text to prompt the user to enter a directory
ComponentText "This will install OpenArena on your computer. Select which options you want installed."
; The text to prompt the user to enter a directory
DirText "Choose a directory to install in to:"
;--------------------------------
; The stuff to install
Section "Base (required)"
SectionIn RO
; Set output path to the installation directory.
SetOutPath $INSTDIR
; Put file there
File ".\bass.dll"
File ".\license.txt"
File ".\OpenArena User's Manual.doc"
File ".\OpenArena User's Manual.html"
SetOutPath $INSTDIR\OpenArena
File ".\bass.dll"
; Write the installation path into the registry
WriteRegStr HKLM SOFTWARE\HHPS\OpenArena-0.1.0-alpha "Install_Dir" "$INSTDIR"
; Write the uninstall keys for Windows
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenArena v0.1.0-alpha" "DisplayName" "OpenArena v0.1.0-alpha (remove only)"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenArena v0.1.0-alpha" "UninstallString" '"$INSTDIR\uninstall.exe"'
WriteUninstaller "uninstall.exe"
CreateDirectory "$SMPROGRAMS\HHPS\OpenArena"
SetOutPath $INSTDIR\OpenArena
CreateShortCut "$SMPROGRAMS\HHPS\OpenArena\Readme v0.1.0-alpha.lnk" "$INSTDIR\OpenArena User's Manual.html"
SectionEnd
; optional section (can be disabled by the user)
Section "SDK"
SetOutPath $INSTDIR
File ".\oa.sln"
File ".\oa.vcproj"
File ".\oa.ncb"
File ".\oa.suo"
File ".\heading.txt"
SetOutPath $INSTDIR\include
File ".\include\*.h"
SetOutPath $INSTDIR\lib
File ".\lib\*.lib"
SetOutPath $INSTDIR\src
File ".\src\*.cpp"
SetOutPath $INSTDIR\OpenArena\oa\config
File ".\OpenArena\oa\config\my.cfg"
CreateDirectory $INSTDIR\OpenArena\oa\maps
CreateDirectory $INSTDIR\OpenArena\oa\music\bgm
CreateDirectory $INSTDIR\OpenArena\oa\textures\menu
SetOutPath $INSTDIR\OpenArena
CreateShortCut "$SMPROGRAMS\HHPS\OpenArena\OpenArena SDK v0.1.0-alpha.lnk" "$INSTDIR\oa.sln"
SectionEnd
Section "Media"
SetOutPath $INSTDIR\OpenArena
File ".\OpenArena\oa.exe"
SetOutPath $INSTDIR\OpenArena\oa\config
File ".\OpenArena\oa\config\my.cfg"
SetOutPath $INSTDIR\OpenArena\oa\maps
File ".\OpenArena\oa\maps\intro.map"
File ".\OpenArena\oa\maps\oamap1.map"
SetOutPath $INSTDIR\OpenArena\oa\music\bgm
File ".\OpenArena\oa\music\bgm\*.mp3"
SetOutPath $INSTDIR\OpenArena\oa\textures
File ".\OpenArena\oa\textures\*.tga"
File ".\OpenArena\oa\textures\*.bmp"
SetOutPath $INSTDIR\OpenArena\oa\textures\menu
File ".\OpenArena\oa\textures\menu\*.bmp"
File ".\OpenArena\oa\textures\menu\*.tga"
SetOutPath $INSTDIR\OpenArena
CreateShortCut "$SMPROGRAMS\HHPS\OpenArena\OpenArena v0.1.0-alpha.lnk" "$INSTDIR\OpenArena\oa.exe"
SectionEnd
;--------------------------------
; Uninstaller
UninstallText "This will uninstall example2. Hit next to continue."
; Uninstall section
Section "Uninstall"
; remove registry keys
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenArena v0.1.0-alpha"
DeleteRegKey HKLM SOFTWARE\HHPS\OpenArena-0.1.0-alpha
; remove files and uninstaller
Delete /REBOOTOK $INSTDIR\OpenArena\*.*
Delete /REBOOTOK $INSTDIR\include\*.*
Delete /REBOOTOK $INSTDIR\lib\*.*
Delete /REBOOTOK $INSTDIR\src\*.*
Delete /REBOOTOK $INSTDIR\bass.dll
Delete /REBOOTOK $INSTDIR\heading.txt
Delete /REBOOTOK $INSTDIR\license.txt
Delete /REBOOTOK $INSTDIR\oa.ncb
Delete /REBOOTOK $INSTDIR\oa.sln
Delete /REBOOTOK $INSTDIR\oa.sou
Delete /REBOOTOK $INSTDIR\oa.vcproj
Delete /REBOOTOK "$INSTDIR\OpenArena User's Manual.doc"
Delete /REBOOTOK "$INSTDIR\OpenArena User's Manual.html"
Delete /REBOOTOK $INSTDIR\uninstall.exe
; remove shortcuts, if any
Delete /REBOOTOK "$SMPROGRAMS\HHPS\OpenArena\Readme v0.1.0-alpha.lnk"
Delete /REBOOTOK "$SMPROGRAMS\HHPS\OpenArena\OpenArena SDK v0.1.0-alpha.lnk"
Delete /REBOOTOK "$SMPROGRAMS\HHPS\OpenArena\OpenArena v0.1.0-alpha.lnk"
; remove directories used
RMDIR /r $INSTDIR\include
RMDIR /r $INSTDIR\lib
RMDIR /r $INSTDIR\OpenArena
RMDIR /r $INSTDIR\src
RMDIR /r "$INSTDIR"
; example2.nsi
;
; This script is based on example1.nsi, but it remember the directory,
; has uninstall support and (optionally) installs start menu shortcuts.
;
; It will install makensisw.exe into a directory that the user selects,
;--------------------------------
; The name of the installer
Name "OpenArena"
; The installer icon
Icon "${NSISDIR}\contrib\Icons\setup.ico"
; The file to write
OutFile "OpenArena-0.1.0-alpha.exe"
; The default installation directory
InstallDir "$PROGRAMFILES\HHPS\OpenArena-0.1.0-alpha"
; Registry key to check for directory (so if you install again, it will
; overwrite the old one automatically)
InstallDirRegKey HKLM SOFTWARE\HHPS\OpenArena-0.1.0-alpha "Install_Dir"
; The text to prompt the user to enter a directory
ComponentText "This will install OpenArena on your computer. Select which options you want installed."
; The text to prompt the user to enter a directory
DirText "Choose a directory to install in to:"
;--------------------------------
; The stuff to install
Section "Base (required)"
SectionIn RO
; Set output path to the installation directory.
SetOutPath $INSTDIR
; Put file there
File ".\bass.dll"
File ".\license.txt"
File ".\OpenArena User's Manual.doc"
File ".\OpenArena User's Manual.html"
SetOutPath $INSTDIR\OpenArena
File ".\bass.dll"
; Write the installation path into the registry
WriteRegStr HKLM SOFTWARE\HHPS\OpenArena-0.1.0-alpha "Install_Dir" "$INSTDIR"
; Write the uninstall keys for Windows
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenArena v0.1.0-alpha" "DisplayName" "OpenArena v0.1.0-alpha (remove only)"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenArena v0.1.0-alpha" "UninstallString" '"$INSTDIR\uninstall.exe"'
WriteUninstaller "uninstall.exe"
CreateDirectory "$SMPROGRAMS\HHPS\OpenArena"
SetOutPath $INSTDIR\OpenArena
CreateShortCut "$SMPROGRAMS\HHPS\OpenArena\Readme v0.1.0-alpha.lnk" "$INSTDIR\OpenArena User's Manual.html"
SectionEnd
; optional section (can be disabled by the user)
Section "SDK"
SetOutPath $INSTDIR
File ".\oa.sln"
File ".\oa.vcproj"
File ".\oa.ncb"
File ".\oa.suo"
File ".\heading.txt"
SetOutPath $INSTDIR\include
File ".\include\*.h"
SetOutPath $INSTDIR\lib
File ".\lib\*.lib"
SetOutPath $INSTDIR\src
File ".\src\*.cpp"
SetOutPath $INSTDIR\OpenArena\oa\config
File ".\OpenArena\oa\config\my.cfg"
CreateDirectory $INSTDIR\OpenArena\oa\maps
CreateDirectory $INSTDIR\OpenArena\oa\music\bgm
CreateDirectory $INSTDIR\OpenArena\oa\textures\menu
SetOutPath $INSTDIR\OpenArena
CreateShortCut "$SMPROGRAMS\HHPS\OpenArena\OpenArena SDK v0.1.0-alpha.lnk" "$INSTDIR\oa.sln"
SectionEnd
Section "Media"
SetOutPath $INSTDIR\OpenArena
File ".\OpenArena\oa.exe"
SetOutPath $INSTDIR\OpenArena\oa\config
File ".\OpenArena\oa\config\my.cfg"
SetOutPath $INSTDIR\OpenArena\oa\maps
File ".\OpenArena\oa\maps\intro.map"
File ".\OpenArena\oa\maps\oamap1.map"
SetOutPath $INSTDIR\OpenArena\oa\music\bgm
File ".\OpenArena\oa\music\bgm\*.mp3"
SetOutPath $INSTDIR\OpenArena\oa\textures
File ".\OpenArena\oa\textures\*.tga"
File ".\OpenArena\oa\textures\*.bmp"
SetOutPath $INSTDIR\OpenArena\oa\textures\menu
File ".\OpenArena\oa\textures\menu\*.bmp"
File ".\OpenArena\oa\textures\menu\*.tga"
SetOutPath $INSTDIR\OpenArena
CreateShortCut "$SMPROGRAMS\HHPS\OpenArena\OpenArena v0.1.0-alpha.lnk" "$INSTDIR\OpenArena\oa.exe"
SectionEnd
;--------------------------------
; Uninstaller
UninstallText "This will uninstall example2. Hit next to continue."
; Uninstall section
Section "Uninstall"
; remove registry keys
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenArena v0.1.0-alpha"
DeleteRegKey HKLM SOFTWARE\HHPS\OpenArena-0.1.0-alpha
; remove files and uninstaller
Delete /REBOOTOK $INSTDIR\OpenArena\*.*
Delete /REBOOTOK $INSTDIR\include\*.*
Delete /REBOOTOK $INSTDIR\lib\*.*
Delete /REBOOTOK $INSTDIR\src\*.*
Delete /REBOOTOK $INSTDIR\bass.dll
Delete /REBOOTOK $INSTDIR\heading.txt
Delete /REBOOTOK $INSTDIR\license.txt
Delete /REBOOTOK $INSTDIR\oa.ncb
Delete /REBOOTOK $INSTDIR\oa.sln
Delete /REBOOTOK $INSTDIR\oa.sou
Delete /REBOOTOK $INSTDIR\oa.vcproj
Delete /REBOOTOK "$INSTDIR\OpenArena User's Manual.doc"
Delete /REBOOTOK "$INSTDIR\OpenArena User's Manual.html"
Delete /REBOOTOK $INSTDIR\uninstall.exe
; remove shortcuts, if any
Delete /REBOOTOK "$SMPROGRAMS\HHPS\OpenArena\Readme v0.1.0-alpha.lnk"
Delete /REBOOTOK "$SMPROGRAMS\HHPS\OpenArena\OpenArena SDK v0.1.0-alpha.lnk"
Delete /REBOOTOK "$SMPROGRAMS\HHPS\OpenArena\OpenArena v0.1.0-alpha.lnk"
; remove directories used
RMDIR /r $INSTDIR\include
RMDIR /r $INSTDIR\lib
RMDIR /r $INSTDIR\OpenArena
RMDIR /r $INSTDIR\src
RMDIR /r "$INSTDIR"
SectionEnd

42
oa.sln
View File

@@ -1,21 +1,21 @@
Microsoft Visual Studio Solution File, Format Version 7.00
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "oa", "oa.vcproj", "{6F5D0FF6-A032-4356-932E-865B601E0DD4}"
ProjectSection(ProjectDependencies) = postProject
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfiguration) = preSolution
Debug = Debug
Release = Release
EndGlobalSection
GlobalSection(ProjectConfiguration) = postSolution
{6F5D0FF6-A032-4356-932E-865B601E0DD4}.Debug.ActiveCfg = Debug|Win32
{6F5D0FF6-A032-4356-932E-865B601E0DD4}.Debug.Build.0 = Debug|Win32
{6F5D0FF6-A032-4356-932E-865B601E0DD4}.Release.ActiveCfg = Release|Win32
{6F5D0FF6-A032-4356-932E-865B601E0DD4}.Release.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
EndGlobalSection
GlobalSection(ExtensibilityAddIns) = postSolution
EndGlobalSection
EndGlobal
Microsoft Visual Studio Solution File, Format Version 8.00
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "oa", "oa.vcproj", "{6F5D0FF6-A032-4356-932E-865B601E0DD4}"
ProjectSection(ProjectDependencies) = postProject
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfiguration) = preSolution
Debug = Debug
Release = Release
EndGlobalSection
GlobalSection(ProjectConfiguration) = postSolution
{6F5D0FF6-A032-4356-932E-865B601E0DD4}.Debug.ActiveCfg = Debug|Win32
{6F5D0FF6-A032-4356-932E-865B601E0DD4}.Debug.Build.0 = Debug|Win32
{6F5D0FF6-A032-4356-932E-865B601E0DD4}.Release.ActiveCfg = Release|Win32
{6F5D0FF6-A032-4356-932E-865B601E0DD4}.Release.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
EndGlobalSection
GlobalSection(ExtensibilityAddIns) = postSolution
EndGlobalSection
EndGlobal

BIN
oa.suo

Binary file not shown.

656
oa.vcproj
View File

@@ -1,328 +1,328 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="7.0"
Name="oa"
ProjectGUID="{6F5D0FF6-A032-4356-932E-865B601E0DD4}"
SccProjectName=""
SccLocalPath="">
<Platforms>
<Platform
Name="Win32"/>
</Platforms>
<Configurations>
<Configuration
Name="Release|Win32"
OutputDirectory=".\OpenArena"
IntermediateDirectory=".\Release"
ConfigurationType="1"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="FALSE"
CharacterSet="2">
<Tool
Name="VCCLCompilerTool"
InlineFunctionExpansion="1"
AdditionalIncludeDirectories="..\include"
PreprocessorDefinitions="WIN32,NDEBUG,_WINDOWS"
StringPooling="TRUE"
RuntimeLibrary="4"
EnableFunctionLevelLinking="TRUE"
UsePrecompiledHeader="2"
PrecompiledHeaderFile=".\Release/oa.pch"
AssemblerListingLocation=".\"
ObjectFile=".\"
ProgramDataBaseFileName=".\"
WarningLevel="3"
SuppressStartupBanner="TRUE"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
AdditionalOptions="/MACHINE:I386"
AdditionalDependencies="odbc32.lib odbccp32.lib"
OutputFile=".\OpenArena\oa.exe"
Version="0.1.0-alpha"
LinkIncremental="1"
SuppressStartupBanner="TRUE"
AdditionalLibraryDirectories=".\lib"
ProgramDatabaseFile=".\Release/oa.pdb"
SubSystem="2"/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="NDEBUG"
MkTypLibCompatible="TRUE"
SuppressStartupBanner="TRUE"
TargetEnvironment="1"
TypeLibraryName=".\Release/oa.tlb"/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="NDEBUG"
Culture="1033"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCXMLDataGeneratorTool"/>
<Tool
Name="VCWebDeploymentTool"/>
<Tool
Name="VCManagedWrapperGeneratorTool"/>
<Tool
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
</Configuration>
<Configuration
Name="Debug|Win32"
OutputDirectory=".\Debug"
IntermediateDirectory=".\Debug"
ConfigurationType="1"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="FALSE"
CharacterSet="2">
<Tool
Name="VCCLCompilerTool"
Optimization="0"
PreprocessorDefinitions="WIN32,_DEBUG,_WINDOWS"
BasicRuntimeChecks="3"
RuntimeLibrary="5"
UsePrecompiledHeader="2"
PrecompiledHeaderFile=".\Debug/oa.pch"
AssemblerListingLocation=".\Debug/"
ObjectFile=".\Debug/"
ProgramDataBaseFileName=".\Debug/"
WarningLevel="3"
SuppressStartupBanner="TRUE"
DebugInformationFormat="4"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
AdditionalOptions="/MACHINE:I386"
OutputFile=".\Debug\oa.exe"
LinkIncremental="2"
SuppressStartupBanner="TRUE"
AdditionalLibraryDirectories=".\lib"
GenerateDebugInformation="TRUE"
ProgramDatabaseFile=".\Debug/oa.pdb"
SubSystem="2"/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="_DEBUG"
MkTypLibCompatible="TRUE"
SuppressStartupBanner="TRUE"
TargetEnvironment="1"
TypeLibraryName=".\Debug/oa.tlb"/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="_DEBUG"
Culture="1033"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCXMLDataGeneratorTool"/>
<Tool
Name="VCWebDeploymentTool"/>
<Tool
Name="VCManagedWrapperGeneratorTool"/>
<Tool
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Source Files"
Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
<File
RelativePath=".\src\bmp.cpp">
</File>
<File
RelativePath="src\camera.cpp">
</File>
<File
RelativePath=".\src\ctrls.cpp">
</File>
<File
RelativePath=".\src\Level.cpp">
</File>
<File
RelativePath=".\src\Main.cpp">
</File>
<File
RelativePath=".\src\mygl.cpp">
</File>
<File
RelativePath=".\src\myglFont.cpp">
</File>
<File
RelativePath=".\src\myglTexture.cpp">
</File>
<File
RelativePath=".\src\Player.cpp">
</File>
<File
RelativePath=".\src\strmanip.cpp">
</File>
<File
RelativePath=".\src\tga.cpp">
</File>
<File
RelativePath=".\src\vector.cpp">
</File>
</Filter>
<Filter
Name="Header Files"
Filter="h;hpp;hxx;hm;inl">
<File
RelativePath=".\Include\bass.h">
</File>
<File
RelativePath=".\Include\bmp.h">
</File>
<File
RelativePath=".\Include\camera.h">
</File>
<File
RelativePath=".\Include\critter.h">
</File>
<File
RelativePath=".\Include\ctrls.h">
</File>
<File
RelativePath=".\Include\datatypes.h">
</File>
<File
RelativePath=".\Include\entities.h">
</File>
<File
RelativePath=".\Include\entity.h">
</File>
<File
RelativePath=".\Include\geometry.h">
</File>
<File
RelativePath=".\Include\Level.h">
</File>
<File
RelativePath=".\Include\list.h">
</File>
<File
RelativePath=".\Include\Main.h">
</File>
<File
RelativePath=".\Include\mydefs.h">
</File>
<File
RelativePath=".\Include\mygl.h">
</File>
<File
RelativePath=".\Include\myglTexture.h">
</File>
<File
RelativePath=".\Include\opengl.h">
</File>
<File
RelativePath=".\Include\Player.h">
</File>
<File
RelativePath=".\Include\screen.h">
</File>
<File
RelativePath=".\Include\strmanip.h">
</File>
<File
RelativePath=".\Include\texture.h">
</File>
<File
RelativePath=".\Include\tga.h">
</File>
<File
RelativePath=".\Include\vector.h">
</File>
<File
RelativePath=".\Include\WorldDefs.h">
</File>
</Filter>
<Filter
Name="oa"
Filter="">
<Filter
Name="maps"
Filter=".map, .lit">
<File
RelativePath=".\OpenArena\oa\maps\intro.map">
</File>
<File
RelativePath=".\OpenArena\oa\maps\oamap1.map">
</File>
</Filter>
<Filter
Name="textures"
Filter=".bmp, .jpg, .tga, .png">
<File
RelativePath="OpenArena\oa\textures\groundc.tga">
</File>
<File
RelativePath="OpenArena\oa\textures\moonc.tga">
</File>
<File
RelativePath="OpenArena\oa\textures\nightSkyc.tga">
</File>
<File
RelativePath=".\OpenArena\oa\textures\test.bmp">
</File>
<Filter
Name="menu"
Filter="">
<File
RelativePath="OpenArena\oa\textures\menu\font.bmp">
</File>
</Filter>
</Filter>
<Filter
Name="config"
Filter=".cfg">
<File
RelativePath="OpenArena\oa\config\G2k.cfg">
</File>
<File
RelativePath="OpenArena\oa\config\My.cfg">
</File>
</Filter>
<Filter
Name="music"
Filter="">
<Filter
Name="bgm"
Filter="">
<File
RelativePath="OpenArena\oa\music\bgm\bgm1.mp3">
</File>
<File
RelativePath="OpenArena\oa\music\bgm\bgm2.mp3">
</File>
</Filter>
</Filter>
</Filter>
<Filter
Name="Resource Files"
Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe">
</Filter>
<File
RelativePath=".\heading.txt">
</File>
</Files>
<Globals>
</Globals>
</VisualStudioProject>
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="7.10"
Name="oa"
ProjectGUID="{6F5D0FF6-A032-4356-932E-865B601E0DD4}"
SccProjectName=""
SccLocalPath="">
<Platforms>
<Platform
Name="Win32"/>
</Platforms>
<Configurations>
<Configuration
Name="Release|Win32"
OutputDirectory=".\OpenArena"
IntermediateDirectory=".\Release"
ConfigurationType="1"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="FALSE"
CharacterSet="2">
<Tool
Name="VCCLCompilerTool"
InlineFunctionExpansion="1"
AdditionalIncludeDirectories="..\include"
PreprocessorDefinitions="WIN32,NDEBUG,_WINDOWS"
StringPooling="TRUE"
RuntimeLibrary="4"
EnableFunctionLevelLinking="TRUE"
UsePrecompiledHeader="2"
PrecompiledHeaderFile=".\Release/oa.pch"
AssemblerListingLocation=".\"
ObjectFile=".\"
ProgramDataBaseFileName=".\"
WarningLevel="3"
SuppressStartupBanner="TRUE"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
AdditionalOptions="/MACHINE:I386"
AdditionalDependencies="odbc32.lib odbccp32.lib"
OutputFile=".\OpenArena\oa.exe"
Version="0.1.0-alpha"
LinkIncremental="1"
SuppressStartupBanner="TRUE"
AdditionalLibraryDirectories=".\lib"
ProgramDatabaseFile=".\Release/oa.pdb"
SubSystem="2"/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="NDEBUG"
MkTypLibCompatible="TRUE"
SuppressStartupBanner="TRUE"
TargetEnvironment="1"
TypeLibraryName=".\Release/oa.tlb"/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="NDEBUG"
Culture="1033"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCXMLDataGeneratorTool"/>
<Tool
Name="VCWebDeploymentTool"/>
<Tool
Name="VCManagedWrapperGeneratorTool"/>
<Tool
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
</Configuration>
<Configuration
Name="Debug|Win32"
OutputDirectory=".\Debug"
IntermediateDirectory=".\Debug"
ConfigurationType="1"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="FALSE"
CharacterSet="2">
<Tool
Name="VCCLCompilerTool"
Optimization="0"
PreprocessorDefinitions="WIN32,_DEBUG,_WINDOWS"
BasicRuntimeChecks="3"
RuntimeLibrary="5"
UsePrecompiledHeader="2"
PrecompiledHeaderFile=".\Debug/oa.pch"
AssemblerListingLocation=".\Debug/"
ObjectFile=".\Debug/"
ProgramDataBaseFileName=".\Debug/"
WarningLevel="3"
SuppressStartupBanner="TRUE"
DebugInformationFormat="4"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
AdditionalOptions="/MACHINE:I386"
OutputFile=".\Debug\oa.exe"
LinkIncremental="2"
SuppressStartupBanner="TRUE"
AdditionalLibraryDirectories=".\lib"
GenerateDebugInformation="TRUE"
ProgramDatabaseFile=".\Debug/oa.pdb"
SubSystem="2"/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="_DEBUG"
MkTypLibCompatible="TRUE"
SuppressStartupBanner="TRUE"
TargetEnvironment="1"
TypeLibraryName=".\Debug/oa.tlb"/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="_DEBUG"
Culture="1033"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCXMLDataGeneratorTool"/>
<Tool
Name="VCWebDeploymentTool"/>
<Tool
Name="VCManagedWrapperGeneratorTool"/>
<Tool
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Source Files"
Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
<File
RelativePath=".\src\bmp.cpp">
</File>
<File
RelativePath="src\camera.cpp">
</File>
<File
RelativePath=".\src\ctrls.cpp">
</File>
<File
RelativePath=".\src\Level.cpp">
</File>
<File
RelativePath=".\src\Main.cpp">
</File>
<File
RelativePath=".\src\mygl.cpp">
</File>
<File
RelativePath=".\src\myglFont.cpp">
</File>
<File
RelativePath=".\src\myglTexture.cpp">
</File>
<File
RelativePath=".\src\Player.cpp">
</File>
<File
RelativePath=".\src\strmanip.cpp">
</File>
<File
RelativePath=".\src\tga.cpp">
</File>
<File
RelativePath=".\src\vector.cpp">
</File>
</Filter>
<Filter
Name="Header Files"
Filter="h;hpp;hxx;hm;inl">
<File
RelativePath=".\Include\bass.h">
</File>
<File
RelativePath=".\Include\bmp.h">
</File>
<File
RelativePath=".\Include\camera.h">
</File>
<File
RelativePath=".\Include\critter.h">
</File>
<File
RelativePath=".\Include\ctrls.h">
</File>
<File
RelativePath=".\Include\datatypes.h">
</File>
<File
RelativePath=".\Include\entities.h">
</File>
<File
RelativePath=".\Include\entity.h">
</File>
<File
RelativePath=".\Include\geometry.h">
</File>
<File
RelativePath=".\Include\Level.h">
</File>
<File
RelativePath=".\Include\list.h">
</File>
<File
RelativePath=".\Include\Main.h">
</File>
<File
RelativePath=".\Include\mydefs.h">
</File>
<File
RelativePath=".\Include\mygl.h">
</File>
<File
RelativePath=".\Include\myglTexture.h">
</File>
<File
RelativePath=".\Include\opengl.h">
</File>
<File
RelativePath=".\Include\Player.h">
</File>
<File
RelativePath=".\Include\screen.h">
</File>
<File
RelativePath=".\Include\strmanip.h">
</File>
<File
RelativePath=".\Include\texture.h">
</File>
<File
RelativePath=".\Include\tga.h">
</File>
<File
RelativePath=".\Include\vector.h">
</File>
<File
RelativePath=".\Include\WorldDefs.h">
</File>
</Filter>
<Filter
Name="oa"
Filter="">
<Filter
Name="maps"
Filter=".map, .lit">
<File
RelativePath=".\OpenArena\oa\maps\intro.map">
</File>
<File
RelativePath=".\OpenArena\oa\maps\oamap1.map">
</File>
</Filter>
<Filter
Name="textures"
Filter=".bmp, .jpg, .tga, .png">
<File
RelativePath="OpenArena\oa\textures\groundc.tga">
</File>
<File
RelativePath="OpenArena\oa\textures\moonc.tga">
</File>
<File
RelativePath="OpenArena\oa\textures\nightSkyc.tga">
</File>
<File
RelativePath=".\OpenArena\oa\textures\test.bmp">
</File>
<Filter
Name="menu"
Filter="">
<File
RelativePath="OpenArena\oa\textures\menu\font.bmp">
</File>
</Filter>
</Filter>
<Filter
Name="config"
Filter=".cfg">
<File
RelativePath="OpenArena\oa\config\G2k.cfg">
</File>
<File
RelativePath="OpenArena\oa\config\My.cfg">
</File>
</Filter>
<Filter
Name="music"
Filter="">
<Filter
Name="bgm"
Filter="">
<File
RelativePath="OpenArena\oa\music\bgm\bgm1.mp3">
</File>
<File
RelativePath="OpenArena\oa\music\bgm\bgm2.mp3">
</File>
</Filter>
</Filter>
</Filter>
<Filter
Name="Resource Files"
Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe">
</Filter>
<File
RelativePath=".\heading.txt">
</File>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

View File

@@ -134,4 +134,139 @@ void ControlSchemeClass::Unbind(uint8 key)
toggleMouseLook.Remove(key);
weaponNext.Remove(key);
weaponPrev.Remove(key);
}
bool ControlSchemeClass::Bind(uint32 action, uint8 key)
{
switch(action)
{
case CTRLS_FORWARD:
{
Unbind(key);
forward.Insert(key);
return true;
}
case CTRLS_BACKWARD:
{
Unbind(key);
backward.Insert(key);
return true;
}
case CTRLS_LOOKLEFT:
{
Unbind(key);
lookLeft.Insert(key);
return true;
}
case CTRLS_LOOKRIGHT:
{
Unbind(key);
lookRight.Insert(key);
return true;
}
case CTRLS_LOOKUP:
{
Unbind(key);
lookUp.Insert(key);
return true;
}
case CTRLS_LOOKDOWN:
{
Unbind(key);
lookDown.Insert(key);
return true;
}
case CTRLS_MOVELEFT:
{
Unbind(key);
moveLeft.Insert(key);
return true;
}
case CTRLS_MOVERIGHT:
{
Unbind(key);
moveRight.Insert(key);
return true;
}
case CTRLS_MOVEUP:
{
Unbind(key);
moveUp.Insert(key);
return true;
}
case CTRLS_MOVEDOWN:
{
Unbind(key);
moveDown.Insert(key);
return true;
}
case CTRLS_ROLLLEFT:
{
Unbind(key);
rollLeft.Insert(key);
return true;
}
case CTRLS_ROLLRIGHT:
{
Unbind(key);
rollRight.Insert(key);
return true;
}
case CTRLS_FIREPRIMARY:
{
Unbind(key);
firePrimary.Insert(key);
return true;
}
case CTRLS_FIRESECONDARY:
{
Unbind(key);
fireSecondary.Insert(key);
return true;
}
case CTRLS_WEAPONNEXT:
{
Unbind(key);
weaponNext.Insert(key);
return true;
}
case CTRLS_WEAPONPREV:
{
Unbind(key);
weaponPrev.Insert(key);
return true;
}
case CTRLS_TOGGLE_LIGHTS:
{
Unbind(key);
toggleLights.Insert(key);
return true;
}
case CTRLS_TOGGLE_FPS:
{
Unbind(key);
toggleFPS.Insert(key);
return true;
}
case CTRLS_TOGGLE_CONSOLE:
{
Unbind(key);
toggleConsole.Insert(key);
return true;
}
case CTRLS_TOGGLE_MOUSELOOK:
{
Unbind(key);
toggleMouseLook.Insert(key);
return true;
}
case CTRLS_QUICKMOUSELOOK:
{
Unbind(key);
quickMouseLook.Insert(key);
return true;
}
default:
return false;
}
}

View File

@@ -492,84 +492,86 @@ void LEVEL::Execute(string cmd)
if(command == "forward")
{
defaultPlayer->controls.forward.Insert(KeyName(word(cmd, ++i)));
defaultPlayer[0].controls.Bind(CTRLS_FORWARD, KeyName(word(cmd, ++i)));
}
else if(command == "backward")
{
defaultPlayer->controls.backward.Insert(KeyName(word(cmd, ++i)));
defaultPlayer[0].controls.Bind(CTRLS_BACKWARD, KeyName(word(cmd, ++i)));
}
else if(command == "lookleft")
{
defaultPlayer->controls.lookLeft.Insert(KeyName(word(cmd, ++i)));
defaultPlayer[0].controls.Bind(CTRLS_LOOKLEFT, KeyName(word(cmd, ++i)));
}
else if(command == "lookright")
{
defaultPlayer->controls.lookRight.Insert(KeyName(word(cmd, ++i)));
defaultPlayer[0].controls.Bind(CTRLS_LOOKRIGHT, KeyName(word(cmd, ++i)));
}
else if(command == "lookup")
{
defaultPlayer->controls.lookUp.Insert(KeyName(word(cmd, ++i)));
defaultPlayer[0].controls.Bind(CTRLS_LOOKUP, KeyName(word(cmd, ++i)));
}
else if(command == "lookdown")
{
defaultPlayer->controls.lookDown.Insert(KeyName(word(cmd, ++i)));
defaultPlayer[0].controls.Bind(CTRLS_LOOKDOWN, KeyName(word(cmd, ++i)));
}
else if(command == "moveup")
{
defaultPlayer->controls.moveUp.Insert(KeyName(word(cmd, ++i)));
defaultPlayer[0].controls.Bind(CTRLS_MOVEUP, KeyName(word(cmd, ++i)));
}
else if(command == "movedown")
{
defaultPlayer->controls.moveDown.Insert(KeyName(word(cmd, ++i)));
defaultPlayer[0].controls.Bind(CTRLS_MOVEDOWN, KeyName(word(cmd, ++i)));
}
else if(command == "moveleft")
{
defaultPlayer[0].controls.moveLeft.Insert(KeyName(word(cmd, ++i)));
defaultPlayer[0].controls.Bind(CTRLS_MOVELEFT, KeyName(word(cmd, ++i)));
}
else if(command == "moveright")
{
defaultPlayer[0].controls.moveRight.Insert(KeyName(word(cmd, ++i)));
defaultPlayer[0].controls.Bind(CTRLS_MOVERIGHT, KeyName(word(cmd, ++i)));
}
else if(command == "fireprimary")
{
defaultPlayer->controls.firePrimary.Insert(KeyName(word(cmd, ++i)));
defaultPlayer[0].controls.Bind(CTRLS_FIREPRIMARY, KeyName(word(cmd, ++i)));
}
else if(command == "firesecondary")
{
defaultPlayer->controls.fireSecondary.Insert(KeyName(word(cmd, ++i)));
defaultPlayer[0].controls.Bind(CTRLS_FIRESECONDARY, KeyName(word(cmd, ++i)));
}
else if(command == "weapnext")
{
defaultPlayer->controls.weaponNext.Insert(KeyName(word(cmd, ++i)));
defaultPlayer[0].controls.Bind(CTRLS_WEAPONNEXT, KeyName(word(cmd, ++i)));
}
else if(command == "weapprev")
{
defaultPlayer->controls.weaponPrev.Insert(KeyName(word(cmd, ++i)));
defaultPlayer[0].controls.Bind(CTRLS_WEAPONPREV, KeyName(word(cmd, ++i)));
}
else if(command == "togglelights" || command == "togglelighting")
{
defaultPlayer->controls.toggleLights.Insert(KeyName(word(cmd, ++i)));
defaultPlayer[0].controls.Bind(CTRLS_TOGGLE_LIGHTS, KeyName(word(cmd, ++i)));
}
else if(command == "togglefps")
{
defaultPlayer->controls.toggleFPS.Insert(KeyName(word(cmd, ++i)));
defaultPlayer[0].controls.Bind(CTRLS_TOGGLE_FPS, KeyName(word(cmd, ++i)));
}
else if(command == "toggleconsole")
{
defaultPlayer->controls.toggleConsole.Insert(KeyName(word(cmd, ++i)));
defaultPlayer[0].controls.Bind(CTRLS_TOGGLE_CONSOLE, KeyName(word(cmd, ++i)));
}
else if(command == "togglemouselook")
{
defaultPlayer->controls.toggleMouseLook.Insert(KeyName(word(cmd, ++i)));
defaultPlayer[0].controls.Bind(CTRLS_TOGGLE_MOUSELOOK, KeyName(word(cmd, ++i)));
}
else if(command == "quickmouselook")
{
defaultPlayer->controls.quickMouseLook.Insert(KeyName(word(cmd, ++i)));
defaultPlayer[0].controls.Bind(CTRLS_QUICKMOUSELOOK, KeyName(word(cmd, ++i)));
}
}
else if(command == "map")
else if(command == "map" || command == "map_load")
{
nextLevel = word(cmd, ++i);
UnloadMap();
LoadMap();
}
else if(command == "unbind")
{
@@ -584,6 +586,54 @@ void LEVEL::Execute(string cmd)
defaultPlayer[0].controls.Unbind(KeyName(command));
}
}
else if(command == "exec" || command == "config_load")
{
command = tolower(word(cmd, ++i));
LoadConfig(command);
}
else if(command == "map_save")
{
command = tolower(word(cmd, ++i));
SaveMap(command);
}
else if(command == "config_save")
{
command = tolower(word(cmd, ++i));
SaveConfig(command);
}
/*
else if(command == "map_add_triangle")
{
if(triangles != NULL)
{
TRIANGLE* temp = triangles;
triangles = new TRIANGLE[numTriangles + 1];
for(int i=0; i<numTriangles; i++)
{
triangles[i] = temp[i];
}
triangles[numTriangles].texID = 0;
for(int i=0; i<3; i++)
{
triangles[numTriangles].vertecies[i].x = 0;
triangles[numTriangles].vertecies[i].y = 0;
triangles[numTriangles].vertecies[i].z = 0;
triangles[numTriangles].texCoords[i].x = 0;
triangles[numTriangles].texCoords[i].y = 0;
}
numTriangles++;
}
else
{
}
}
*/
}
}
@@ -628,77 +678,116 @@ void LEVEL::ParseCmds(LPSTR lpCmdLine)
if(command == "forward")
{
defaultPlayer->controls.forward.Insert(KeyName(word(cmd, ++i)));
defaultPlayer[0].controls.Bind(CTRLS_FORWARD, KeyName(word(cmd, ++i)));
}
else if(command == "backward")
{
defaultPlayer->controls.backward.Insert(KeyName(word(cmd, ++i)));
defaultPlayer[0].controls.Bind(CTRLS_BACKWARD, KeyName(word(cmd, ++i)));
}
else if(command == "lookleft")
{
defaultPlayer->controls.lookLeft.Insert(KeyName(word(cmd, ++i)));
defaultPlayer[0].controls.Bind(CTRLS_LOOKLEFT, KeyName(word(cmd, ++i)));
}
else if(command == "lookright")
{
defaultPlayer->controls.lookRight.Insert(KeyName(word(cmd, ++i)));
defaultPlayer[0].controls.Bind(CTRLS_LOOKRIGHT, KeyName(word(cmd, ++i)));
}
else if(command == "lookup")
{
defaultPlayer->controls.lookUp.Insert(KeyName(word(cmd, ++i)));
defaultPlayer[0].controls.Bind(CTRLS_LOOKUP, KeyName(word(cmd, ++i)));
}
else if(command == "lookdown")
{
defaultPlayer->controls.lookDown.Insert(KeyName(word(cmd, ++i)));
defaultPlayer[0].controls.Bind(CTRLS_LOOKDOWN, KeyName(word(cmd, ++i)));
}
else if(command == "moveup")
{
defaultPlayer->controls.moveUp.Insert(KeyName(word(cmd, ++i)));
defaultPlayer[0].controls.Bind(CTRLS_MOVEUP, KeyName(word(cmd, ++i)));
}
else if(command == "movedown")
{
defaultPlayer->controls.moveDown.Insert(KeyName(word(cmd, ++i)));
defaultPlayer[0].controls.Bind(CTRLS_MOVEDOWN, KeyName(word(cmd, ++i)));
}
else if(command == "moveleft")
{
defaultPlayer[0].controls.Bind(CTRLS_MOVELEFT, KeyName(word(cmd, ++i)));
}
else if(command == "moveright")
{
defaultPlayer[0].controls.Bind(CTRLS_MOVERIGHT, KeyName(word(cmd, ++i)));
}
else if(command == "fireprimary")
{
defaultPlayer->controls.firePrimary.Insert(KeyName(word(cmd, ++i)));
defaultPlayer[0].controls.Bind(CTRLS_FIREPRIMARY, KeyName(word(cmd, ++i)));
}
else if(command == "firesecondary")
{
defaultPlayer->controls.fireSecondary.Insert(KeyName(word(cmd, ++i)));
defaultPlayer[0].controls.Bind(CTRLS_FIRESECONDARY, KeyName(word(cmd, ++i)));
}
else if(command == "weapnext")
{
defaultPlayer->controls.weaponNext.Insert(KeyName(word(cmd, ++i)));
defaultPlayer[0].controls.Bind(CTRLS_WEAPONNEXT, KeyName(word(cmd, ++i)));
}
else if(command == "weapprev")
{
defaultPlayer->controls.weaponPrev.Insert(KeyName(word(cmd, ++i)));
defaultPlayer[0].controls.Bind(CTRLS_WEAPONPREV, KeyName(word(cmd, ++i)));
}
else if(command == "togglelights" || command == "togglelighting")
{
defaultPlayer->controls.toggleLights.Insert(KeyName(word(cmd, ++i)));
defaultPlayer[0].controls.Bind(CTRLS_TOGGLE_LIGHTS, KeyName(word(cmd, ++i)));
}
else if(command == "togglefps")
{
defaultPlayer->controls.toggleFPS.Insert(KeyName(word(cmd, ++i)));
defaultPlayer[0].controls.Bind(CTRLS_TOGGLE_FPS, KeyName(word(cmd, ++i)));
}
else if(command == "toggleconsole")
{
defaultPlayer->controls.toggleConsole.Insert(KeyName(word(cmd, ++i)));
defaultPlayer[0].controls.Bind(CTRLS_TOGGLE_CONSOLE, KeyName(word(cmd, ++i)));
}
else if(command == "togglemouselook")
{
defaultPlayer->controls.toggleMouseLook.Insert(KeyName(word(cmd, ++i)));
defaultPlayer[0].controls.Bind(CTRLS_TOGGLE_MOUSELOOK, KeyName(word(cmd, ++i)));
}
else if(command == "quickmouselook")
{
defaultPlayer->controls.quickMouseLook.Insert(KeyName(word(cmd, ++i)));
defaultPlayer[0].controls.Bind(CTRLS_QUICKMOUSELOOK, KeyName(word(cmd, ++i)));
}
}
else if(command == "+map")
else if(command == "+map" || command == "+map_load")
{
nextLevel = word(cmd, ++i);
UnloadMap();
LoadMap();
}
else if(command == "+unbind")
{
command = tolower(word(cmd, ++i));
if(command == "all")
{
defaultPlayer[0].controls.ClearControlScheme();
}
else
{
defaultPlayer[0].controls.Unbind(KeyName(command));
}
}
else if(command == "+exec" || command == "+config_load")
{
command = tolower(word(cmd, ++i));
LoadConfig(command);
}
else if(command == "+map_save")
{
command = tolower(word(cmd, ++i));
SaveMap(command);
}
else if(command == "+config_save")
{
command = tolower(word(cmd, ++i));
SaveConfig(command);
}
}
}

View File

@@ -357,6 +357,10 @@ LRESULT CALLBACK WndProc(HWND hWnd,
{
level.UpdateConsole('\n');
}
if(wParam == VK_SHIFT)
{
keys[VK_SHIFT] = true;
}
else if(wParam == VK_SPACE)
{
level.UpdateConsole(' ');
@@ -366,15 +370,27 @@ LRESULT CALLBACK WndProc(HWND hWnd,
level.UpdateConsole(VK_BACK);
}
else if(isalpha(uint8(wParam)))
{
if(keys[VK_SHIFT])
{
level.UpdateConsole(wParam);
}
else
{
level.UpdateConsole(tolower(wParam));
}
}
else if(isdigit(uint8(wParam)))
{
level.UpdateConsole(wParam);
}
}
else
{
keys[wParam] = true;
return 0;
}
return 0;
}
case WM_KEYUP:
{
@@ -382,6 +398,8 @@ LRESULT CALLBACK WndProc(HWND hWnd,
keys2[wParam] = false;
return 0;
}
case WM_SYSKEYDOWN:
break;
case WM_SIZE:
{
ReSizeGLScene(LOWORD(lParam),HIWORD(lParam));
@@ -447,10 +465,10 @@ int WINAPI WinMain( HINSTANCE hInstance,
level.glFont.SetScreenDimensions(g_Screen.width*2, g_Screen.height*2);
//level.glFont.BuildFont("oa\\textures\\menu\\font.bmp");//(level.gamedir + "\\textures\\menu\\font.bmp").c_str());
if (level.nextLevel != "")
level.LoadMap();
else
if (level.nextLevel == "")
{
level.LoadMap("intro.map");
}
if (!CreateGLWindow(g_Screen.name, g_Screen.width, g_Screen.height, g_Screen.bpp, g_Screen.fullscreen))
{
@@ -781,7 +799,7 @@ int WINAPI WinMain( HINSTANCE hInstance,
}
//level.Render();
}
level.Render();
level.Render();
//
}
}

BIN
vc70.idb

Binary file not shown.