Compare commits

...
33 Commits
Author SHA1 Message Date
OM 79ce5261a5 Bumped version number 2023-06-27 00:28:58 +02:00
OM 9fdda882e5 Execute known commands in a separate function called CL_ProcessServerCommand
Also fixed crash with server quitting: Com_Error was called immediately with the cgame module in stack - Com_Error would call CL_Disconnect which would unload cgame module, invalidating stack frames and rendering longjmp impossible
2023-06-27 00:23:11 +02:00
OM 55e07205e3 Fixed sval_func1 not having a sourcepos (leading to invalid memory access) 2023-06-27 00:01:30 +02:00
OM 3ff4a7b8e4 Removed Quake III arena's boring call to Hunk_ClearTempMemory from FS_FreeFile 2023-06-27 00:01:12 +02:00
OM f6c25921dc Fixed linux compilation errors 2023-06-25 22:07:17 +02:00
OM f38645d19f Removed static variables from extern 2023-06-25 21:34:53 +02:00
OM 6134b150c1 ioq3 files backport 2023-06-25 20:26:47 +02:00
OM e275c4692e Fixed linked doors assertion failure 2023-06-25 20:04:11 +02:00
OM fdd4968ba9 Set homePath to an empty string 2023-06-25 19:35:53 +02:00
OM 02993eaa9b Backported ioq3 features 2023-06-25 19:35:41 +02:00
OM 7e44b955d7 newline 2023-06-25 19:35:13 +02:00
OM 1855bf1bd4 Removed cl_curl.cpp as there is cl_curl.c 2023-06-25 19:34:42 +02:00
pryon adc6a6579f Implement R_TerrainHeightForPoly (#45)
* Implement R_TerrainHeightForPoly

* Add back the original assert messages using the && va trick
2023-06-25 00:09:35 +02:00
OM 92f4667dcf Incremented version number 2023-06-24 00:18:21 +02:00
OM cf61b9e300 Compile for both AA and BT 2023-06-24 00:04:48 +02:00
OM 1ee8463ff5 Arithmetic operations fixes 2023-06-22 18:32:15 +02:00
OM 3cc1e89b45 Tiny fixes related to bad printf formatting and sizes 2023-06-21 21:01:37 +02:00
smallmodel ae054364cc Merge branch 'openmoh:main' into main 2023-06-21 18:35:11 +02:00
smallmodel abe6b5ce31 Create codeql.yml 2023-06-21 18:17:56 +02:00
OM ba489a6412 Replaced %error-verbose with %define parse.error verbose 2023-06-20 21:17:18 +02:00
OM cdf8cc4ce4 Removed containers section, use existing package instead to gain more time 2023-06-20 20:50:39 +02:00
OM a3d76e11a1 Removed %z and use UTC instead 2023-06-20 19:37:04 +02:00
OM 3369296a02 Fixed git not being used for checking out
Added --log-level verbosity
2023-06-20 19:20:59 +02:00
OM dc5aeeb4b2 Using --parallel instead of specifying number of jobs 2023-06-20 19:08:52 +02:00
OM c0e34432bf Added more verbosity 2023-06-20 19:03:29 +02:00
OM 53bae86d6c Fixed version working directory 2023-06-20 18:56:50 +02:00
OM 3fb2efa344 Added comments 2023-06-20 18:49:21 +02:00
OM 85b4e03295 Added GIT_REVISION_BUILD_NUMBER 2023-06-20 18:43:04 +02:00
OM 0c13a22c60 Fixed product date 2023-06-20 18:42:53 +02:00
OM b1f3d9379b Updated version semantics 2023-06-20 18:33:29 +02:00
OM d82eb25487 Use q_version.h 2023-06-19 23:34:12 +02:00
OM c9577629d2 Added versioning system 2023-06-19 23:33:59 +02:00
OM 19b4ba5db0 Moved version stuff to q_version.h 2023-06-19 19:57:50 +02:00
46 changed files with 2526 additions and 1634 deletions

No files matched your search

+89 -45
View File
@@ -29,23 +29,34 @@ jobs:
name: "Building for platform linux-${{matrix.architecture.name}}"
runs-on: ubuntu-22.04
container:
image: ubuntu:22.04
volumes:
- ${{github.workspace}}:${{github.workspace}}
# container:
# image: ubuntu:22.04
# volumes:
# - ${{github.workspace}}:${{github.workspace}}
#
# steps:
# - name: Install required packages
# run: apt update && apt install -y clang-15 cmake ninja-build flex bison git
#
# - name: Install required cross-platform packages (${{ matrix.architecture.triple }})
# if: matrix.architecture.name != 'amd64'
# run: apt install -y gcc-12-${{ matrix.architecture.triple }} g++-12-${{ matrix.architecture.triple }}
steps:
- uses: actions/checkout@v3
with:
path: 'source'
- name: Settings
working-directory: ${{github.workspace}}
run: |
echo "CMAKE_BUILD_PARALLEL_LEVEL=$(($(nproc) * 16))" >> $GITHUB_ENV
# echo "CMAKE_GENERATOR=Ninja" >> $GITHUB_ENV
- name: Install required packages
run: apt update && apt install -y clang-15 cmake ninja-build flex bison git
run: |
sudo apt update && sudo apt install -y flex bison
- name: Install required cross-platform packages (${{ matrix.architecture.triple }})
if: matrix.architecture.name != 'amd64'
run: apt install -y gcc-12-${{ matrix.architecture.triple }} g++-12-${{ matrix.architecture.triple }}
run: sudo apt install -y gcc-12-${{ matrix.architecture.triple }} g++-12-${{ matrix.architecture.triple }}
- name: Install dependencies
working-directory: ${{github.workspace}}
run: |
@@ -53,8 +64,8 @@ jobs:
mkdir -p thirdparties && cd thirdparties
git clone --depth 1 --single-branch --branch SDL2 https://github.com/libsdl-org/SDL.git
cmake -B SDL-build \
-DCMAKE_C_COMPILER=clang-15 \
-DCMAKE_CXX_COMPILER=clang++-15 \
-DCMAKE_C_COMPILER=clang \
-DCMAKE_CXX_COMPILER=clang++ \
-DCMAKE_C_FLAGS=--target=${{ matrix.architecture.triple }} \
-DCMAKE_CXX_FLAGS=--target=${{ matrix.architecture.triple }} \
-DCMAKE_INSTALL_PREFIX='${{github.workspace}}/thirdparties/SDL-install' \
@@ -62,37 +73,51 @@ jobs:
cmake --build SDL-build --config Release
cmake --install SDL-build
- uses: actions/checkout@v3
with:
path: 'source'
- name: CMake Settings
run: |
echo "CMAKE_PARAM=--log-level=VERBOSE \
-DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} \
-DCMAKE_INSTALL_PREFIX='${{github.workspace}}/install' \
-DCMAKE_C_COMPILER=clang \
-DCMAKE_CXX_COMPILER=clang++ \
-DCMAKE_C_FLAGS=--target=${{ matrix.architecture.triple }} \
-DCMAKE_CXX_FLAGS=--target=${{ matrix.architecture.triple }} \
-DGIT_REVISION_BUILD_NUMBER=${{ github.run_number }} \
-DSDL2_DIR='${{github.workspace}}/thirdparties/SDL-install/lib/cmake/SDL2' \
-DWITH_CLIENT=1" >> $GITHUB_ENV
- name: Configure CMake
working-directory: ${{github.workspace}}
run: |
cmake -B ./build \
-DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} \
-DCMAKE_INSTALL_PREFIX='${{github.workspace}}/install' \
-DCMAKE_C_COMPILER=clang-15 \
-DCMAKE_CXX_COMPILER=clang++-15 \
-DCMAKE_C_FLAGS=--target=${{ matrix.architecture.triple }} \
-DCMAKE_CXX_FLAGS=--target=${{ matrix.architecture.triple }} \
-DSDL2_DIR='${{github.workspace}}/thirdparties/SDL-install/lib/cmake/SDL2' \
-DWITH_CLIENT=1 \
-G Ninja \
./source
cmake -B ./build ${{ env.CMAKE_PARAM }} -DTARGET_GAME_TYPE=0 ./source
cmake -B ./buildtt ${{ env.CMAKE_PARAM }} -DTARGET_GAME_TYPE=2 ./source
- name: Build
working-directory: ${{github.workspace}}
# Build your program with the given configuration
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} -j4
run: |
cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
cmake --build ${{github.workspace}}/buildtt --config ${{env.BUILD_TYPE}}
- name: Test
working-directory: ${{github.workspace}}/build
working-directory: ${{github.workspace}}
# Execute tests defined by the CMake configuration.
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
run: ctest -C ${{env.BUILD_TYPE}}
run: |
cd "${{github.workspace}}/build"
ctest -C ${{env.BUILD_TYPE}}
cd "${{github.workspace}}/buildtt"
ctest -C ${{env.BUILD_TYPE}}
- name: Install
working-directory: ${{github.workspace}}
# Install to the directory defined in CMAKE_INSTALL_PREFIX
run: |
cmake --install ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
cmake --install ${{github.workspace}}/buildtt --config ${{env.BUILD_TYPE}}
cp '${{github.workspace}}/thirdparties/SDL-install/lib/libSDL2.so' '${{github.workspace}}/install'
- uses: actions/upload-artifact@v3
@@ -115,9 +140,10 @@ jobs:
runs-on: windows-2022
steps:
- uses: actions/checkout@v3
with:
path: 'source'
- name: Settings
working-directory: ${{github.workspace}}
run: |
echo "CMAKE_BUILD_PARALLEL_LEVEL=$((Get-CimInstance Win32_ComputerSystem).NumberOfLogicalProcessors * 16)" >> $GITHUB_ENV
- name: Install required packages
working-directory: ${{github.workspace}}
@@ -125,41 +151,59 @@ jobs:
mkdir thirdparties && cd thirdparties
git clone --depth 1 --single-branch --branch SDL2 https://github.com/libsdl-org/SDL.git
cmake -B SDL-build -A ${{ matrix.architecture.config }} -DCMAKE_INSTALL_PREFIX='${{github.workspace}}/thirdparties/SDL-install' ./SDL
cmake --build SDL-build --config Release
cmake --build SDL-build --config Release --parallel
cmake --install SDL-build
git clone --depth 1 --single-branch --branch v2.5.25 https://github.com/lexxmark/winflexbison.git
cmake -B winflexbison-build -DCMAKE_INSTALL_PREFIX='${{github.workspace}}/thirdparties/winflexbison-install' ./winflexbison
cmake --build winflexbison-build --config Release
cmake --build winflexbison-build --config Release --parallel
cmake --install winflexbison-build
- uses: actions/checkout@v3
with:
path: 'source'
- name: CMake Settings
run: |
echo "CMAKE_PARAM=-A ${{ matrix.architecture.config }} `
--log-level=VERBOSE `
-DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} `
-DCMAKE_INSTALL_PREFIX='${{github.workspace}}/install' `
-DCMAKE_C_COMPILER=clang `
-DCMAKE_CXX_COMPILER=clang++ `
-DGIT_REVISION_BUILD_NUMBER=${{ github.run_number }} `
-DSDL2_DIR='${{github.workspace}}/thirdparties/SDL-install/cmake' `
-DBISON_EXECUTABLE='${{github.workspace}}/thirdparties/winflexbison-install/win_bison.exe' `
-DFLEX_EXECUTABLE='${{github.workspace}}/thirdparties/winflexbison-install/win_flex.exe' `
-DWITH_CLIENT=1".Replace("`r", "").Replace("`n", "") >> $env:GITHUB_ENV
- name: Configure CMake
working-directory: ${{github.workspace}}
run: |
cmake -B ${{github.workspace}}/build -A ${{ matrix.architecture.config }} `
-DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} `
-DCMAKE_INSTALL_PREFIX='${{github.workspace}}/install' `
-DSDL2_DIR='${{github.workspace}}/thirdparties/SDL-install/cmake' `
-DBISON_EXECUTABLE='${{github.workspace}}/thirdparties/winflexbison-install/win_bison.exe' `
-DFLEX_EXECUTABLE='${{github.workspace}}/thirdparties/winflexbison-install/win_flex.exe' `
-DWITH_CLIENT=1 `
./source
cmake -B ./build ${{ env.CMAKE_PARAM }} -DTARGET_GAME_TYPE=0 ./source
cmake -B ./buildtt ${{ env.CMAKE_PARAM }} -DTARGET_GAME_TYPE=2 ./source
- name: Build
working-directory: ${{github.workspace}}
# Build your program with the given configuration
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} -j4
run: |
cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
cmake --build ${{github.workspace}}/buildtt --config ${{env.BUILD_TYPE}}
- name: Test
working-directory: ${{github.workspace}}/build
working-directory: ${{github.workspace}}
# Execute tests defined by the CMake configuration.
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
run: ctest -C ${{env.BUILD_TYPE}}
run: |
cd "${{github.workspace}}/build"
ctest -C ${{env.BUILD_TYPE}}
cd "${{github.workspace}}/buildtt"
ctest -C ${{env.BUILD_TYPE}}
- name: Install
working-directory: ${{github.workspace}}
# Install to the directory defined in CMAKE_INSTALL_PREFIX
run: |
cmake --install ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
cmake --install ${{github.workspace}}/buildtt --config ${{env.BUILD_TYPE}}
Copy-Item "${{github.workspace}}/thirdparties/SDL-install/bin/*.dll" -Destination "${{github.workspace}}/install"
- uses: actions/upload-artifact@v3
+77
View File
@@ -0,0 +1,77 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"
on:
push:
branches: [ "main" ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ "main" ]
schedule:
- cron: '42 8 * * 1'
jobs:
analyze:
name: Analyze
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }}
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language: [ 'cpp' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby', 'swift' ]
# Use only 'java' to analyze code written in Java, Kotlin or both
# Use only 'javascript' to analyze code written in JavaScript, TypeScript or both
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
steps:
- name: Checkout repository
uses: actions/checkout@v3
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2
# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
# If the Autobuild fails above, remove it and uncomment the following three lines.
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
# - run: |
# echo "Run, Build Application using script"
# ./location_of_script_within_repo/buildscript.sh
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
with:
category: "/language:${{matrix.language}}"
+1 -1
View File
@@ -44,7 +44,7 @@ void CG_PlayerTeamIcon(refEntity_t* pModel, entityState_t* pPlayerState)
if (pPlayerState->number == cg.snap->ps.clientNum) {
return;
}
bInTeam = qfalse;
bSpecialIcon = qfalse;
if (cgs.gametype > GT_FFA
+55 -30
View File
@@ -290,19 +290,16 @@ void CL_CgameError( const char *string ) {
CL_ConfigstringModified
=====================
*/
void CL_ConfigstringModified( void ) {
char *old, *s;
int i, index;
void CL_ConfigstringModified(int index, char* s) {
char *old;
int i;
char *dup;
gameState_t oldGs;
size_t len;
index = atoi( Cmd_Argv(1) );
if ( index < 0 || index >= MAX_CONFIGSTRINGS ) {
Com_Error( ERR_DROP, "configstring > MAX_CONFIGSTRINGS" );
}
// get everything after "cs <num>"
s = Cmd_ArgsFrom(2);
old = cl.gameState.stringData + cl.gameState.stringOffsets[ index ];
if ( !strcmp( old, s ) ) {
@@ -346,6 +343,46 @@ void CL_ConfigstringModified( void ) {
}
/*
=====================
CL_ProcessServerCommand
=====================
*/
qboolean CL_ProcessServerCommand(const char* origString, const char* cmd, qboolean differentServer) {
if (!strcmp(cmd, "disconnect")) {
// Execute the disconnect command in the main loop
// Never call Com_Error there:
// because this function might be called from a module that would be unloaded
// inside Com_Error
UI_ForceMenuOff(1);
Cbuf_AddText("disconnect;pushmenu disconnected");
return qtrue;
}
if (!strcmp(cmd, "cs")) {
CL_ConfigstringModified(atoi(Cmd_Argv(1)), Cmd_ArgsFrom(2));
// reparse the string, because CL_ConfigstringModified may have done another Cmd_TokenizeString()
Cmd_TokenizeString(origString);
return qtrue;
}
if (!strcmp(cmd, "fadesound")) {
Com_Printf("CL_ProcessServerCommand: fadesound '%s'\n", Cmd_Argv(1));
if (differentServer) {
Com_Printf("^~^~^ fadesound from previous map ignored\n");
return qfalse;
}
S_FadeSound(atof(Cmd_Argv(1)));
return qfalse;
}
// we may want to put a "connect to other server" command here
// cgame can now act on the command
return qtrue;
}
/*
===================
@@ -358,7 +395,6 @@ qboolean CL_GetServerCommand( int serverCommandNumber, qboolean differentServer
char *s;
char *cmd;
static char bigConfigString[BIG_INFO_STRING];
int argc;
// if we have irretrievably lost a reliable command, drop the connection
if ( serverCommandNumber <= clc.serverCommandSequence - MAX_RELIABLE_COMMANDS ) {
@@ -382,31 +418,10 @@ qboolean CL_GetServerCommand( int serverCommandNumber, qboolean differentServer
Com_DPrintf( "serverCommand: %i : %s\n", serverCommandNumber, s );
}
rescan:
Cmd_TokenizeString( s );
cmd = Cmd_Argv(0);
argc = Cmd_Argc();
if ( !strcmp( cmd, "disconnect" ) ) {
// https://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=552
// allow server to indicate why they were disconnected
if ( argc >= 2 )
Com_Error( ERR_SERVERDISCONNECT, "Server disconnected - %s", Cmd_Argv( 1 ) );
else
Com_Error( ERR_SERVERDISCONNECT, "Server disconnected\n" );
}
if ( !strcmp( cmd, "cs" ) ) {
CL_ConfigstringModified();
// reparse the string, because CL_ConfigstringModified may have done another Cmd_TokenizeString()
Cmd_TokenizeString( s );
return qtrue;
}
// we may want to put a "connect to other server" command here
// cgame can now act on the command
return qtrue;
return CL_ProcessServerCommand(s, cmd, differentServer);
}
@@ -443,6 +458,16 @@ void CL_CG_Free( void *ptr )
Z_Free( ptr );
}
/*
====================
CL_CG_AddReliableCommand
====================
*/
void CL_CG_AddReliableCommand(const char* cmd)
{
CL_AddReliableCommand(cmd, qfalse);
}
/*
====================
CL_R_AddPolyToScene
@@ -572,7 +597,7 @@ void CL_InitCGameDLL( clientGameImport_t *cgi, clientGameExport_t **cge ) {
cgi->MSG_ReadCoord = CL_MSG_ReadCoord;
cgi->MSG_ReadDir = CL_MSG_ReadDir;
cgi->SendClientCommand = CL_AddReliableCommand;
cgi->SendClientCommand = CL_CG_AddReliableCommand;
cgi->CM_LoadMap = CL_CM_LoadMap;
cgi->CM_NumInlineModels = CM_NumInlineModels;
-330
View File
@@ -1,330 +0,0 @@
/*
===========================================================================
Copyright (C) 2006 Tony J. White (tjw@tjw.org)
This file is part of Quake III Arena source code.
Quake III Arena source code 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.
Quake III Arena source code 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.
You should have received a copy of the GNU General Public License
along with Quake III Arena source code; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
===========================================================================
*/
#ifdef USE_CURL
#include "client.h"
cvar_t *cl_cURLLib;
#ifdef USE_CURL_DLOPEN
#include "../sys/sys_loadlib.h"
char* (*qcurl_version)(void);
CURL* (*qcurl_easy_init)(void);
CURLcode (*qcurl_easy_setopt)(CURL *curl, CURLoption option, ...);
CURLcode (*qcurl_easy_perform)(CURL *curl);
void (*qcurl_easy_cleanup)(CURL *curl);
CURLcode (*qcurl_easy_getinfo)(CURL *curl, CURLINFO info, ...);
CURL* (*qcurl_easy_duphandle)(CURL *curl);
void (*qcurl_easy_reset)(CURL *curl);
const char *(*qcurl_easy_strerror)(CURLcode);
CURLM* (*qcurl_multi_init)(void);
CURLMcode (*qcurl_multi_add_handle)(CURLM *multi_handle,
CURL *curl_handle);
CURLMcode (*qcurl_multi_remove_handle)(CURLM *multi_handle,
CURL *curl_handle);
CURLMcode (*qcurl_multi_fdset)(CURLM *multi_handle,
fd_set *read_fd_set,
fd_set *write_fd_set,
fd_set *exc_fd_set,
int *max_fd);
CURLMcode (*qcurl_multi_perform)(CURLM *multi_handle,
int *running_handles);
CURLMcode (*qcurl_multi_cleanup)(CURLM *multi_handle);
CURLMsg *(*qcurl_multi_info_read)(CURLM *multi_handle,
int *msgs_in_queue);
const char *(*qcurl_multi_strerror)(CURLMcode);
static void *cURLLib = NULL;
/*
=================
GPA
=================
*/
static void *GPA(char *str)
{
void *rv;
rv = Sys_LoadFunction(cURLLib, str);
if(!rv)
{
Com_Printf("Can't load symbol %s\n", str);
clc.cURLEnabled = qfalse;
return NULL;
}
else
{
Com_DPrintf("Loaded symbol %s (0x%p)\n", str, rv);
return rv;
}
}
#endif /* USE_CURL_DLOPEN */
/*
=================
CL_cURL_Init
=================
*/
qboolean CL_cURL_Init()
{
#ifdef USE_CURL_DLOPEN
if(cURLLib)
return qtrue;
Com_Printf("Loading \"%s\"...", cl_cURLLib->string);
if( (cURLLib = Sys_LoadLibrary(cl_cURLLib->string)) == 0 )
{
#ifdef _WIN32
return qfalse;
#else
char fn[1024];
Q_strncpyz( fn, Sys_Cwd( ), sizeof( fn ) );
strncat(fn, "/", sizeof(fn)-strlen(fn)-1);
strncat(fn, cl_cURLLib->string, sizeof(fn)-strlen(fn)-1);
if( (cURLLib = Sys_LoadLibrary(fn)) == 0 )
{
return qfalse;
}
#endif /* _WIN32 */
}
clc.cURLEnabled = qtrue;
qcurl_version = GPA("curl_version");
qcurl_easy_init = GPA("curl_easy_init");
qcurl_easy_setopt = GPA("curl_easy_setopt");
qcurl_easy_perform = GPA("curl_easy_perform");
qcurl_easy_cleanup = GPA("curl_easy_cleanup");
qcurl_easy_getinfo = GPA("curl_easy_getinfo");
qcurl_easy_duphandle = GPA("curl_easy_duphandle");
qcurl_easy_reset = GPA("curl_easy_reset");
qcurl_easy_strerror = GPA("curl_easy_strerror");
qcurl_multi_init = GPA("curl_multi_init");
qcurl_multi_add_handle = GPA("curl_multi_add_handle");
qcurl_multi_remove_handle = GPA("curl_multi_remove_handle");
qcurl_multi_fdset = GPA("curl_multi_fdset");
qcurl_multi_perform = GPA("curl_multi_perform");
qcurl_multi_cleanup = GPA("curl_multi_cleanup");
qcurl_multi_info_read = GPA("curl_multi_info_read");
qcurl_multi_strerror = GPA("curl_multi_strerror");
if(!clc.cURLEnabled)
{
CL_cURL_Shutdown();
Com_Printf("FAIL One or more symbols not found\n");
return qfalse;
}
Com_Printf("OK\n");
return qtrue;
#else
clc.cURLEnabled = qtrue;
return qtrue;
#endif /* USE_CURL_DLOPEN */
}
/*
=================
CL_cURL_Shutdown
=================
*/
void CL_cURL_Shutdown( void )
{
CL_cURL_Cleanup();
#ifdef USE_CURL_DLOPEN
if(cURLLib)
{
Sys_UnloadLibrary(cURLLib);
cURLLib = NULL;
}
qcurl_easy_init = NULL;
qcurl_easy_setopt = NULL;
qcurl_easy_perform = NULL;
qcurl_easy_cleanup = NULL;
qcurl_easy_getinfo = NULL;
qcurl_easy_duphandle = NULL;
qcurl_easy_reset = NULL;
qcurl_multi_init = NULL;
qcurl_multi_add_handle = NULL;
qcurl_multi_remove_handle = NULL;
qcurl_multi_fdset = NULL;
qcurl_multi_perform = NULL;
qcurl_multi_cleanup = NULL;
qcurl_multi_info_read = NULL;
qcurl_multi_strerror = NULL;
#endif /* USE_CURL_DLOPEN */
}
void CL_cURL_Cleanup(void)
{
if(clc.downloadCURLM) {
if(clc.downloadCURL) {
qcurl_multi_remove_handle(clc.downloadCURLM,
clc.downloadCURL);
qcurl_easy_cleanup(clc.downloadCURL);
}
qcurl_multi_cleanup(clc.downloadCURLM);
clc.downloadCURLM = NULL;
clc.downloadCURL = NULL;
}
else if(clc.downloadCURL) {
qcurl_easy_cleanup(clc.downloadCURL);
clc.downloadCURL = NULL;
}
}
static int CL_cURL_CallbackProgress( void *dummy, double dltotal, double dlnow,
double ultotal, double ulnow )
{
clc.downloadSize = (int)dltotal;
Cvar_SetValue( "cl_downloadSize", clc.downloadSize );
clc.downloadCount = (int)dlnow;
Cvar_SetValue( "cl_downloadCount", clc.downloadCount );
return 0;
}
static int CL_cURL_CallbackWrite(void *buffer, size_t size, size_t nmemb,
void *stream)
{
FS_Write( buffer, size*nmemb, ((fileHandle_t*)stream)[0] );
return size*nmemb;
}
void CL_cURL_BeginDownload( const char *localName, const char *remoteURL )
{
clc.cURLUsed = qtrue;
Com_Printf("URL: %s\n", remoteURL);
Com_DPrintf("***** CL_cURL_BeginDownload *****\n"
"Localname: %s\n"
"RemoteURL: %s\n"
"****************************\n", localName, remoteURL);
CL_cURL_Cleanup();
Q_strncpyz(clc.downloadURL, remoteURL, sizeof(clc.downloadURL));
Q_strncpyz(clc.downloadName, localName, sizeof(clc.downloadName));
Com_sprintf(clc.downloadTempName, sizeof(clc.downloadTempName),
"%s.tmp", localName);
// Set so UI gets access to it
Cvar_Set("cl_downloadName", localName);
Cvar_Set("cl_downloadSize", "0");
Cvar_Set("cl_downloadCount", "0");
Cvar_SetValue("cl_downloadTime", cls.realtime);
clc.downloadBlock = 0; // Starting new file
clc.downloadCount = 0;
clc.downloadCURL = qcurl_easy_init();
if(!clc.downloadCURL) {
Com_Error(ERR_DROP, "CL_cURL_BeginDownload: qcurl_easy_init() "
"failed\n");
return;
}
clc.download = FS_SV_FOpenFileWrite(clc.downloadTempName);
if(!clc.download) {
Com_Error(ERR_DROP, "CL_cURL_BeginDownload: failed to open "
"%s for writing\n", clc.downloadTempName);
return;
}
qcurl_easy_setopt(clc.downloadCURL, CURLOPT_WRITEDATA, clc.download);
if(developer->integer)
qcurl_easy_setopt(clc.downloadCURL, CURLOPT_VERBOSE, 1);
qcurl_easy_setopt(clc.downloadCURL, CURLOPT_URL, clc.downloadURL);
qcurl_easy_setopt(clc.downloadCURL, CURLOPT_TRANSFERTEXT, 0);
qcurl_easy_setopt(clc.downloadCURL, CURLOPT_REFERER, va("ioQ3://%s",
NET_AdrToString(clc.serverAddress)));
qcurl_easy_setopt(clc.downloadCURL, CURLOPT_USERAGENT, va("%s %s",
Q3_VERSION, qcurl_version()));
qcurl_easy_setopt(clc.downloadCURL, CURLOPT_WRITEFUNCTION,
CL_cURL_CallbackWrite);
qcurl_easy_setopt(clc.downloadCURL, CURLOPT_WRITEDATA, &clc.download);
qcurl_easy_setopt(clc.downloadCURL, CURLOPT_NOPROGRESS, 0);
qcurl_easy_setopt(clc.downloadCURL, CURLOPT_PROGRESSFUNCTION,
CL_cURL_CallbackProgress);
qcurl_easy_setopt(clc.downloadCURL, CURLOPT_PROGRESSDATA, NULL);
qcurl_easy_setopt(clc.downloadCURL, CURLOPT_FAILONERROR, 1);
qcurl_easy_setopt(clc.downloadCURL, CURLOPT_FOLLOWLOCATION, 1);
qcurl_easy_setopt(clc.downloadCURL, CURLOPT_MAXREDIRS, 5);
clc.downloadCURLM = qcurl_multi_init();
if(!clc.downloadCURLM) {
qcurl_easy_cleanup(clc.downloadCURL);
clc.downloadCURL = NULL;
Com_Error(ERR_DROP, "CL_cURL_BeginDownload: qcurl_multi_init() "
"failed\n");
return;
}
qcurl_multi_add_handle(clc.downloadCURLM, clc.downloadCURL);
if(!(clc.sv_allowDownload & DLF_NO_DISCONNECT) &&
!clc.cURLDisconnected) {
CL_AddReliableCommand("disconnect");
CL_WritePacket();
CL_WritePacket();
CL_WritePacket();
clc.cURLDisconnected = qtrue;
}
}
void CL_cURL_PerformDownload(void)
{
CURLMcode res;
CURLMsg *msg;
int c;
int i = 0;
res = qcurl_multi_perform(clc.downloadCURLM, &c);
while(res == CURLM_CALL_MULTI_PERFORM && i < 100) {
res = qcurl_multi_perform(clc.downloadCURLM, &c);
i++;
}
if(res == CURLM_CALL_MULTI_PERFORM)
return;
msg = qcurl_multi_info_read(clc.downloadCURLM, &c);
if(msg == NULL) {
return;
}
FS_FCloseFile(clc.download);
if(msg->msg == CURLMSG_DONE && msg->data.result == CURLE_OK) {
FS_SV_Rename(clc.downloadTempName, clc.downloadName);
clc.downloadRestart = qtrue;
}
else {
long code;
qcurl_easy_getinfo(msg->easy_handle, CURLINFO_RESPONSE_CODE,
&code);
Com_Error(ERR_DROP, "Download Error: %s Code: %ld URL: %s",
qcurl_easy_strerror(msg->data.result),
code, clc.downloadURL);
}
*clc.downloadTempName = *clc.downloadName = 0;
Cvar_Set( "cl_downloadName", "" );
CL_NextDownload();
}
#endif /* USE_CURL */
+17 -17
View File
@@ -206,7 +206,7 @@ The given command will be transmitted to the server, and is gauranteed to
not have future usercmd_t executed before it is executed
======================
*/
void CL_AddReliableCommand( const char *cmd ) {
void CL_AddReliableCommand( const char *cmd, qboolean isDisconnectCmd ) {
int index;
// if we would be losing an old command that hasn't been acknowledged,
@@ -756,7 +756,7 @@ void CL_NextDemo( void ) {
CL_ShutdownAll
=====================
*/
void CL_ShutdownAll(void) {
void CL_ShutdownAll(qboolean shutdownRef) {
#ifdef USE_CURL
CL_cURL_Shutdown();
@@ -927,7 +927,7 @@ void CL_Disconnect( qboolean showMainMenu ) {
// send a disconnect message to the server
// send it a few times in case one is dropped
if ( clc.state >= CA_CONNECTED ) {
CL_AddReliableCommand( "disconnect" );
CL_AddReliableCommand( "disconnect", qtrue );
CL_WritePacket();
CL_WritePacket();
CL_WritePacket();
@@ -981,9 +981,9 @@ void CL_ForwardCommandToServer( const char *string ) {
}
if ( Cmd_Argc() > 1 ) {
CL_AddReliableCommand( string );
CL_AddReliableCommand( string, qfalse );
} else {
CL_AddReliableCommand( cmd );
CL_AddReliableCommand( cmd, qfalse );
}
}
@@ -1129,7 +1129,7 @@ void CL_ForwardToServer_f( void ) {
// don't forward the first argument
if ( Cmd_Argc() > 1 ) {
CL_AddReliableCommand( Cmd_Args() );
CL_AddReliableCommand( Cmd_Args(), qfalse );
}
}
@@ -1417,7 +1417,7 @@ void CL_SendPureChecksums( void ) {
for (i = 0; i < 2; i++) {
cMsg[i] += 10;
}
CL_AddReliableCommand( cMsg );
CL_AddReliableCommand( cMsg, qfalse );
}
/*
@@ -1426,7 +1426,7 @@ CL_ResetPureClientAtServer
=================
*/
void CL_ResetPureClientAtServer( void ) {
CL_AddReliableCommand( va("vdr") );
CL_AddReliableCommand( va("vdr"), qfalse );
}
qboolean CL_Allowed_Vid_Restart() {
@@ -1472,7 +1472,7 @@ void CL_Vid_Restart_f( void ) {
// unpause so the cgame definately gets a snapshot and renders a frame
Com_Unpause();
CL_StartHunkUsers();
CL_StartHunkUsers(qfalse);
SV_FinishSvsTimeFixups();
@@ -1602,7 +1602,7 @@ void CL_DownloadsComplete( void ) {
FS_Restart(clc.checksumFeed); // We possibly downloaded a pak, restart the file system to load it
// inform the server so we get new gamestate info
CL_AddReliableCommand( "donedl" );
CL_AddReliableCommand( "donedl", qfalse );
// by sending the donedl command we request a new gamestate
// so we don't want to load stuff yet
@@ -1612,11 +1612,11 @@ void CL_DownloadsComplete( void ) {
// let the client game init and load data
clc.state = CA_LOADING;
CL_StartHunkUsers();
CL_StartHunkUsers(qfalse);
// Pump the loop, this may change gamestate!
Com_EventLoop();
CL_StartHunkUsers();
CL_StartHunkUsers(qfalse);
}
/*
@@ -1646,7 +1646,7 @@ void CL_BeginDownload( const char *localName, const char *remoteName ) {
clc.downloadBlock = 0; // Starting new file
clc.downloadCount = 0;
CL_AddReliableCommand( va("download %s", remoteName) );
CL_AddReliableCommand( va("download %s", remoteName), qfalse );
}
/*
@@ -2345,7 +2345,7 @@ void CL_CheckUserinfo( void ) {
}
cvar_modifiedFlags &= ~CVAR_USERINFO;
CL_AddReliableCommand( va("userinfo \"%s\"", Cvar_InfoString( CVAR_USERINFO ) ) );
CL_AddReliableCommand( va("userinfo \"%s\"", Cvar_InfoString( CVAR_USERINFO ) ), qfalse );
}
}
@@ -2566,7 +2566,7 @@ After the server has cleared the hunk, these will need to be restarted
This is the only place that any of these functions are called from
============================
*/
void CL_StartHunkUsers( void ) {
void CL_StartHunkUsers( qboolean rendererOnly ) {
if( !com_cl_running ) {
return;
}
@@ -3278,7 +3278,7 @@ void CL_Init( void ) {
Cmd_AddCommand ("stopvideo", CL_StopVideo_f );
CL_InitConsoleCommands();
CL_InitRef();
CL_StartHunkUsers();
CL_StartHunkUsers(qfalse);
SCR_Init ();
@@ -3294,7 +3294,7 @@ void CL_Init( void ) {
Cvar_Get( "cl_guid", "", CVAR_USERINFO | CVAR_ROM );
CL_UpdateGUID( NULL, 0 );
CL_StartHunkUsers();
CL_StartHunkUsers(qfalse);
end = Sys_Milliseconds();
+5 -5
View File
@@ -546,7 +546,7 @@ void CL_ParseGamestate( msg_t *msg ) {
CL_StopRecord_f();
// reinitialize the filesystem if the game directory has changed
FS_ConditionalRestart( clc.checksumFeed );
FS_ConditionalRestart( clc.checksumFeed, qfalse );
clc.state = CA_LOADING;
if (!com_sv_running->integer)
@@ -651,7 +651,7 @@ void CL_ParseDownload ( msg_t *msg ) {
if (!*clc.downloadTempName) {
Com_Printf("Server sending download, but no download was requested\n");
CL_AddReliableCommand( "stopdl" );
CL_AddReliableCommand( "stopdl", qfalse );
return;
}
@@ -693,7 +693,7 @@ void CL_ParseDownload ( msg_t *msg ) {
if (!clc.download) {
Com_Printf( "Could not create %s\n", clc.downloadTempName );
CL_AddReliableCommand( "stopdl" );
CL_AddReliableCommand( "stopdl", qfalse );
CL_NextDownload();
return;
}
@@ -702,7 +702,7 @@ void CL_ParseDownload ( msg_t *msg ) {
if (size)
FS_Write( data, size, clc.download );
CL_AddReliableCommand( va("nextdl %d", clc.downloadBlock) );
CL_AddReliableCommand( va("nextdl %d", clc.downloadBlock), qfalse );
clc.downloadBlock++;
clc.downloadCount += size;
@@ -716,7 +716,7 @@ void CL_ParseDownload ( msg_t *msg ) {
clc.download = 0;
// rename the file
FS_SV_Rename ( clc.downloadTempName, clc.downloadName );
FS_SV_Rename ( clc.downloadTempName, clc.downloadName, qfalse );
}
*clc.downloadTempName = *clc.downloadName = 0;
Cvar_Set( "cl_downloadName", "" );
+1 -1
View File
@@ -531,7 +531,7 @@ void SCR_UpdateScreen( void ) {
}
recursive = 1;
CL_StartHunkUsers();
CL_StartHunkUsers(qfalse);
SCR_SimpleUpdateScreen();
// set the fps value
+6 -5
View File
@@ -26,6 +26,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#include "../renderercommon/tr_public.h"
#include "../qcommon/tiki.h"
#include "../qcommon/localization.h"
#include "../qcommon/q_version.h"
#include "cl_ui.h"
@@ -1113,7 +1114,7 @@ static void DMConsoleCommandHandler( const char *txt ) {
}
Com_sprintf(szStringOut, sizeof(szStringOut), "dmmessage %i %s\n", iMode, txt);
CL_AddReliableCommand(szStringOut);
CL_AddReliableCommand(szStringOut, qfalse);
}
/*
@@ -1122,10 +1123,10 @@ getNewConsole
====================
*/
UIFloatingConsole* getNewConsole() {
static constexpr char CONSOLE_NAME[] = PRODUCT_NAME " console version " PRODUCT_VERSION;
const char* consoleName = va("%s console version %s", PRODUCT_NAME, PRODUCT_VERSION);
UIFloatingConsole* console = new UIFloatingConsole;
console->Create(NULL, getDefaultConsoleRectangle(), CONSOLE_NAME, UWindowColor, UHudColor);
console->Create(NULL, getDefaultConsoleRectangle(), consoleName, UWindowColor, UHudColor);
console->setConsoleHandler(ConsoleCommandHandler);
console->setConsoleBackground(UBlack, 0.8f);
console->setShow(false);
@@ -4398,7 +4399,7 @@ void StatsUpdater::UpdateStats( Event *ev )
}
if( paused && !paused->integer ) {
CL_AddReliableCommand( "stats" );
CL_AddReliableCommand( "stats", qfalse );
}
Event *event = new Event( EV_StatsUpdater_UpdateStats );
@@ -5018,7 +5019,7 @@ void UI_ShowStatistics_f() {
if( paused && !paused->integer )
{
statsRequestTime = cls.realtime;
CL_AddReliableCommand( "stats" );
CL_AddReliableCommand( "stats", qfalse );
Event *event = new Event( EV_StatsUpdater_UpdateStats );
statsUpdater.PostEvent( event, 2.0 );
}
+3 -6
View File
@@ -463,13 +463,10 @@ extern cvar_t* j_up_axis;
//
void CL_Init (void);
void CL_InitClientSavedData( void );
void CL_InitRef( void );
void CL_FlushMemory(void);
void CL_ShutdownAll(void);
void CL_AddReliableCommand( const char *cmd );
void CL_InitClientSavedData(void);
void CL_AddReliableCommand(const char *cmd, qboolean isDisconnectCmd);
void CL_StartHunkUsers( void );
void CL_StartHunkUsers( qboolean rendererOnly );
void CL_Connect( const char *server );
+159 -160
View File
@@ -4805,7 +4805,7 @@ Vector Actor::CalcThrowVelocity
Vector ret;
Vector vDelta;
float v10; // ST0C_4
long double v11; // fst3
float v11; // fst3
//////
float fGravity;
float fVelHorz;
@@ -7331,7 +7331,7 @@ void Actor::ShowInfo
Vector a = origin;
a.z += maxs.z + 74;
G_DebugString(a, 1.0, 1.0, 1.0, 1065353216, "DISABLED");
G_DebugString(a, 1.0, 1.0, 1.0, 1.0, "DISABLED");
}
{
@@ -7344,7 +7344,7 @@ void Actor::ShowInfo
1.0,
1.0,
1.0,
1065353216,
1.0,
"%i:%i:%s:%.1f",
entnum,
radnum,
@@ -7363,12 +7363,11 @@ void Actor::ShowInfo
1.0,
1.0,
1.0,
1065353216,
1.0,
"%i:%s:%.1f:%i",
m_Enemy->entnum,
m_Enemy->radnum,
m_Enemy->targetname.c_str(),
m_Enemy->health,
m_Enemy->entnum,
m_Enemy->targetname.c_str(),
m_Enemy->health,
m_PotentialEnemies.GetCurrentThreat());
}
@@ -7384,7 +7383,7 @@ void Actor::ShowInfo
1.0,
1.0,
1.0,
1065353216,
1.0,
"%s:%%%.1f",
Director.GetString(m_csThinkStateNames[THINKSTATE_CURIOUS]).c_str(),
m_PotentialEnemies.GetCurrentVisibility() * 100);
@@ -7401,7 +7400,7 @@ void Actor::ShowInfo
1.0,
1.0,
1.0,
1065353216,
1.0,
"%s",
ThinkStateName().c_str());
}
@@ -7420,7 +7419,7 @@ void Actor::ShowInfo
1.0,
1.0,
1.0,
1065353216,
1.0,
"%s:%s:%i - %s",
ThinkName().c_str(),
m_pszDebugState,
@@ -10298,173 +10297,173 @@ void Actor::UpdateBoneControllers
{
int v1; // eax
long double v2; // fst7
float v2; // fst7
float v3; // ebx
long double v4; // fst7
long double error; // fst5
long double v6; // fst3
float v4; // fst7
float error; // fst5
float v6; // fst3
float v7; // ST34_4
float torsoYawError; // edx
long double fErr1; // fst7
long double v10; // tt
long double v11; // fst5
long double v12; // fst7
long double v13; // fst5
long double fErr2; // fst3
long double fAng1; // fst4
long double fAng2; // fst5
long double v17; // fst1
long double fAng3; // fst4
long double v19; // fst3
long double fAng3_; // fst5
long double fFrameTorsoDist; // fst4
long double fAng4; // fst5
long double v23; // fst4
long double fAng5; // fst6
float fErr1; // fst7
float v10; // tt
float v11; // fst5
float v12; // fst7
float v13; // fst5
float fErr2; // fst3
float fAng1; // fst4
float fAng2; // fst5
float v17; // fst1
float fAng3; // fst4
float v19; // fst3
float fAng3_; // fst5
float fFrameTorsoDist; // fst4
float fAng4; // fst5
float v23; // fst4
float fAng5; // fst6
float v25; // ST48_4
float v26; // ST38_4
long double fAng6; // fst6
long double v28; // fst5
long double v29; // fst4
long double fAng7; // fst5
long double fAng8; // fst2
long double v32; // fst1
long double fAng9; // fst6
long double v34; // fst6
long double v35; // fst3
long double v36; // fst1
long double fAng10; // fst5
long double v38; // fst3
long double v39; // fst6
long double v40; // fst3
long double v41; // fst5
long double v42; // fst5
long double v43; // t1
long double v44; // fst4
long double v45; // t2
long double v46; // fst5
long double v47; // fst7
long double v48; // fst5
long double fAng11; // fst5
long double v50; // fst5
long double fAng12; // fst5
long double v52; // t0
long double v53; // fst5
long double v54; // fst7
long double v55; // fst6
long double fAng13; // fst7
long double v57; // fst6
long double v58; // fst7
long double v59; // fst6
long double v60; // fst7
long double v61; // fst6
long double fAng15; // fst7
long double v63; // tt
long double v64; // fst6
long double v65; // t0
long double v66; // fst6
long double v67; // fst2
long double v68; // tt
long double v69; // fst4
long double v70; // t1
long double v71; // fst4
long double v72; // t2
long double v73; // fst4
long double v74; // tt
long double v75; // fst4
float fAng6; // fst6
float v28; // fst5
float v29; // fst4
float fAng7; // fst5
float fAng8; // fst2
float v32; // fst1
float fAng9; // fst6
float v34; // fst6
float v35; // fst3
float v36; // fst1
float fAng10; // fst5
float v38; // fst3
float v39; // fst6
float v40; // fst3
float v41; // fst5
float v42; // fst5
float v43; // t1
float v44; // fst4
float v45; // t2
float v46; // fst5
float v47; // fst7
float v48; // fst5
float fAng11; // fst5
float v50; // fst5
float fAng12; // fst5
float v52; // t0
float v53; // fst5
float v54; // fst7
float v55; // fst6
float fAng13; // fst7
float v57; // fst6
float v58; // fst7
float v59; // fst6
float v60; // fst7
float v61; // fst6
float fAng15; // fst7
float v63; // tt
float v64; // fst6
float v65; // t0
float v66; // fst6
float v67; // fst2
float v68; // tt
float v69; // fst4
float v70; // t1
float v71; // fst4
float v72; // t2
float v73; // fst4
float v74; // tt
float v75; // fst4
int16_t tagnum; // ax
signed int v77; // ebx
long double v78; // fst7
long double v79; // fst6
long double v80; // fst5
float v78; // fst7
float v79; // fst6
float v80; // fst5
int *v81; // eax
long double v82; // fst4
long double v83; // fst3
long double v84; // fst4
long double v85; // t2
long double v86; // tt
long double v87; // fst4
long double v88; // fst5
long double v89; // fst6
long double v90; // t0
float v82; // fst4
float v83; // fst3
float v84; // fst4
float v85; // t2
float v86; // tt
float v87; // fst4
float v88; // fst5
float v89; // fst6
float v90; // t0
float v91; // eax
signed int v92; // edx
float *v93; // eax
long double v94; // fst7
long double v95; // fst5
long double v96; // t0
long double v97; // fst5
long double v98; // t1
long double v99; // fst5
long double v100; // fst6
float v94; // fst7
float v95; // fst5
float v96; // t0
float v97; // fst5
float v98; // t1
float v99; // fst5
float v100; // fst6
signed int fAlpha; // ebx
float fAlpha2; // ST34_4 MAPDST
int *v104; // eax
signed int v105; // edx
long double v106; // fst6
long double v107; // fst5
long double v108; // fst4
long double v109; // fst3
long double v110; // fst7
long double v111; // fst2
long double v112; // fst0
long double v113; // fst1
long double v114; // fst2
long double v115; // t1
long double v116; // fst1
long double v117; // fst3
long double v118; // tt
long double v119; // fst2
long double v120; // fst5
long double v121; // t0
long double v122; // fst2
long double v123; // fst7
long double v124; // fst6
long double v125; // t1
long double v126; // fst3
long double v127; // t2
long double v128; // fst3
long double v129; // tt
float v106; // fst6
float v107; // fst5
float v108; // fst4
float v109; // fst3
float v110; // fst7
float v111; // fst2
float v112; // fst0
float v113; // fst1
float v114; // fst2
float v115; // t1
float v116; // fst1
float v117; // fst3
float v118; // tt
float v119; // fst2
float v120; // fst5
float v121; // t0
float v122; // fst2
float v123; // fst7
float v124; // fst6
float v125; // t1
float v126; // fst3
float v127; // t2
float v128; // fst3
float v129; // tt
int *v130; // eax
signed int v131; // edx
long double v132; // fst6
long double v133; // fst5
long double v134; // fst4
long double v135; // fst3
long double v136; // fst7
long double v137; // fst2
long double v138; // fst0
long double v139; // fst1
long double v140; // fst2
long double v141; // tt
long double v142; // fst1
long double v143; // fst3
long double v144; // t1
long double v145; // fst2
long double v146; // fst5
long double v147; // t2
long double v148; // fst2
long double v149; // fst7
long double v150; // fst6
long double v151; // tt
long double v152; // fst3
long double v153; // t0
long double v154; // fst3
long double v155; // t1
float v132; // fst6
float v133; // fst5
float v134; // fst4
float v135; // fst3
float v136; // fst7
float v137; // fst2
float v138; // fst0
float v139; // fst1
float v140; // fst2
float v141; // tt
float v142; // fst1
float v143; // fst3
float v144; // t1
float v145; // fst2
float v146; // fst5
float v147; // t2
float v148; // fst2
float v149; // fst7
float v150; // fst6
float v151; // tt
float v152; // fst3
float v153; // t0
float v154; // fst3
float v155; // t1
signed int v156; // ebx
long double v157; // fst7
long double v158; // fst6
long double v159; // fst5
float v157; // fst7
float v158; // fst6
float v159; // fst5
int *v160; // eax
long double v161; // fst4
long double v162; // fst3
long double v163; // fst4
long double v164; // t1
long double v165; // t2
long double v166; // fst4
long double v167; // fst5
long double v168; // fst6
long double v169; // tt
float v161; // fst4
float v162; // fst3
float v163; // fst4
float v164; // t1
float v165; // t2
float v166; // fst4
float v167; // fst5
float v168; // fst6
float v169; // tt
SimpleEntityPtr v170; // ecx
struct gentity_s *v171; // esi
float v172; // [esp+2Ch] [ebp-20Ch]
@@ -11862,7 +11861,7 @@ void Actor::SetPatrolCurrentNode
if (!l->inheritsFrom(&SimpleEntity::ClassInfo))
{
ScriptError("Bad patrol path with classname '%s' specified for '%s' at (%f %f %f) %i\n",
ScriptError("Bad patrol path with classname '%s' specified for '%s' at (%f %f %f)\n",
l->getClassname(),
targetname.c_str(),
origin.x,
+1 -1
View File
@@ -437,7 +437,7 @@ qboolean harderror
if( version > ArchiveVersion )
{
readfile.Close();
FileError( "Archive is from version %.2f. Check http://www.x-null.net for an update.", version );
FileError( "Archive is from version %u. Check http://www.x-null.net for an update.", version );
return false;
}
+6 -6
View File
@@ -1149,7 +1149,7 @@ void Door::LinkDoors
}
}
if (iNumTouching == 0)
if (!iNumTouching)
{
for (ent = (Door *)G_FindClass(NULL, getClassID()); ent; ent = (Door *)G_FindClass(ent, getClassID()))
{
@@ -1157,12 +1157,12 @@ void Door::LinkDoors
{
iNumTouching++;
}
}
}
}
if (iNumTouching != 0)
{
return;
if (iNumTouching != 0)
{
return;
}
}
cmins = absmin;
+1 -1
View File
@@ -621,7 +621,7 @@ void G_RunFrame( int levelTime, int frameTime )
end = clock();
gi.DebugPrintf( "\n%i total: %d (%.1f)\n-----------------------\n",
level.framenum, end - start, ( float )( end - start ) * g_fMsecPerClock );
level.framenum, end - start, static_cast<float>(end - start) * g_fMsecPerClock );
}
g_iInThinks--;
+1 -1
View File
@@ -1497,7 +1497,7 @@ void G_Physics_Step
{
if( !( ( ent->flags & FL_SWIM ) && ( ent->waterlevel > 2 ) ) )
{
if ( ent->velocity[ 2 ] < sv_gravity->value * ent->gravity * -0.1 )
if ( ent->velocity[ 2 ] < sv_gravity->value * ent->gravity * -0.1f )
{
hitsound = true;
}
+1 -1
View File
@@ -416,7 +416,7 @@ typedef struct gameImport_s {
int ( *Argc )( void );
char *( *Argv )( int n );
const char *( *Args )();
int ( *FS_FOpenFile )( const char *qpath, fileHandle_t *f, fsMode_t mode );
long ( *FS_FOpenFile )( const char *qpath, fileHandle_t *f, fsMode_t mode );
void ( *FS_Read )( void *buffer, int len, fileHandle_t f );
int ( *FS_Write )( const void *buffer, int len, fileHandle_t f );
void ( *FS_FCloseFile )( fileHandle_t f );
+1 -1
View File
@@ -59,7 +59,7 @@ void gs_encode(uchar* ins, int size, uchar* result)
void gs_encrypt(uchar* key, int key_len, uchar* buffer_ptr, int buffer_len)
{
short counter;
int counter;
uchar x, y, xorIndex;
uchar state[256];
+1 -1
View File
@@ -733,7 +733,7 @@ static void gs_encode ( uchar *ins, int size, uchar *result )
static void gs_encrypt ( uchar *key, int key_len, uchar *buffer_ptr, int buffer_len )
{
short counter;
int counter;
uchar x, y, xorIndex;
uchar state[256];
+3 -2
View File
@@ -94,10 +94,11 @@ void CL_CDDialog( void ) {
void CL_FlushMemory( void ) {
}
void CL_StartHunkUsers( void ) {
void CL_StartHunkUsers( qboolean rendererOnly ) {
}
void CL_ShutdownAll(void) {}
void CL_ShutdownAll(qboolean shutdownRef) {
}
qboolean CL_CDKeyValidate( const char *key, const char *checksum ) { return qtrue; }
+3 -3
View File
@@ -38,7 +38,7 @@ extern yyparsedata parsedata;
%}
%error-verbose
%define parse.error verbose
%expect 306
@@ -153,8 +153,8 @@ statement:
| nonident_prim_expr TOKEN_OR_EQUALS expr { $$ = node3( sval_assignment, $1, node4( sval_operation, node1b( OP_BIN_BITWISE_OR ), $1, $3, YYLLOC ), YYLLOC ); }
| nonident_prim_expr TOKEN_SHIFT_LEFT_EQUALS expr { $$ = node3( sval_assignment, $1, node4( sval_operation, node1b( OP_BIN_SHIFT_LEFT ), $1, $3, YYLLOC ), YYLLOC ); }
| nonident_prim_expr TOKEN_SHIFT_RIGHT_EQUALS expr { $$ = node3( sval_assignment, $1, node4( sval_operation, node1b( OP_BIN_SHIFT_RIGHT ), $1, $3, YYLLOC ), YYLLOC ); }
| nonident_prim_expr TOKEN_INCREMENT { $$ = node3( sval_assignment, $1, node2( sval_func1, node1b( OP_UN_INC ), $1 ), YYLLOC ); }
| nonident_prim_expr TOKEN_DECREMENT { $$ = node3( sval_assignment, $1, node2( sval_func1, node1b( OP_UN_DEC ), $1 ), YYLLOC ); }
| nonident_prim_expr TOKEN_INCREMENT { $$ = node3( sval_assignment, $1, node3( sval_func1, node1b( OP_UN_INC ), $1, YYLLOC ), YYLLOC ); }
| nonident_prim_expr TOKEN_DECREMENT { $$ = node3( sval_assignment, $1, node3( sval_func1, node1b( OP_UN_DEC ), $1, YYLLOC ), YYLLOC ); }
| statement TOKEN_SEMICOLON
;
+102 -102
View File
@@ -1,6 +1,6 @@
#line 1 "Z:/openmohaa/code/parser/generated/yyLexer.cpp"
#line 1 "E:/Src/openmohaa/code/parser/generated/yyLexer.cpp"
#line 3 "Z:/openmohaa/code/parser/generated/yyLexer.cpp"
#line 3 "E:/Src/openmohaa/code/parser/generated/yyLexer.cpp"
#define YY_INT_ALIGNED short int
@@ -776,8 +776,8 @@ goto find_rule; \
#define YY_MORE_ADJ 0
#define YY_RESTORE_YY_MORE_OFFSET
char *yytext;
#line 1 "Z:/openmohaa/code/parser/lex_source.txt"
#line 2 "Z:/openmohaa/code/parser/lex_source.txt"
#line 1 "E:/Src/openmohaa/code/parser/lex_source.txt"
#line 2 "E:/Src/openmohaa/code/parser/lex_source.txt"
/*
* ===========================================================================
* Copyright (C) 2015 the OpenMoHAA team
@@ -905,10 +905,10 @@ static bool UseField( void )
*yytext == '$' || *yytext == '-' || *yytext == '/' );
}
#line 908 "Z:/openmohaa/code/parser/generated/yyLexer.cpp"
#line 908 "E:/Src/openmohaa/code/parser/generated/yyLexer.cpp"
/*%option debug*/
#line 911 "Z:/openmohaa/code/parser/generated/yyLexer.cpp"
#line 911 "E:/Src/openmohaa/code/parser/generated/yyLexer.cpp"
#define INITIAL 0
#define C_COMMENT 1
@@ -1127,10 +1127,10 @@ YY_DECL
}
{
#line 148 "Z:/openmohaa/code/parser/lex_source.txt"
#line 148 "E:/Src/openmohaa/code/parser/lex_source.txt"
#line 1133 "Z:/openmohaa/code/parser/generated/yyLexer.cpp"
#line 1133 "E:/Src/openmohaa/code/parser/generated/yyLexer.cpp"
while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */
{
@@ -1204,71 +1204,71 @@ do_action: /* This label is used only to access EOF actions. */
{ /* beginning of action switch */
case 1:
YY_RULE_SETUP
#line 150 "Z:/openmohaa/code/parser/lex_source.txt"
#line 150 "E:/Src/openmohaa/code/parser/lex_source.txt"
{ BEGIN( C_COMMENT ); }
YY_BREAK
case 2:
YY_RULE_SETUP
#line 151 "Z:/openmohaa/code/parser/lex_source.txt"
#line 151 "E:/Src/openmohaa/code/parser/lex_source.txt"
{ BEGIN( INITIAL ); }
YY_BREAK
case 3:
/* rule 3 can match eol */
YY_RULE_SETUP
#line 152 "Z:/openmohaa/code/parser/lex_source.txt"
#line 152 "E:/Src/openmohaa/code/parser/lex_source.txt"
{ ; }
YY_BREAK
case 4:
YY_RULE_SETUP
#line 153 "Z:/openmohaa/code/parser/lex_source.txt"
#line 153 "E:/Src/openmohaa/code/parser/lex_source.txt"
{ ; }
YY_BREAK
case 5:
YY_RULE_SETUP
#line 154 "Z:/openmohaa/code/parser/lex_source.txt"
#line 154 "E:/Src/openmohaa/code/parser/lex_source.txt"
{ Compiler.CompileError( parsedata.pos - yyleng, "'*/' found outside of comment" ); }
YY_BREAK
case 6:
/* rule 6 can match eol */
YY_RULE_SETUP
#line 157 "Z:/openmohaa/code/parser/lex_source.txt"
#line 157 "E:/Src/openmohaa/code/parser/lex_source.txt"
{ ; }
YY_BREAK
case 7:
YY_RULE_SETUP
#line 158 "Z:/openmohaa/code/parser/lex_source.txt"
#line 158 "E:/Src/openmohaa/code/parser/lex_source.txt"
{ if( prev_yylex != TOKEN_EOL ) YYLEX( TOKEN_EOL ); }
YY_BREAK
case 8:
/* rule 8 can match eol */
YY_RULE_SETUP
#line 160 "Z:/openmohaa/code/parser/lex_source.txt"
#line 160 "E:/Src/openmohaa/code/parser/lex_source.txt"
{ BEGIN( INITIAL ); YYLEX( TOKEN_EOL ); }
YY_BREAK
case 9:
YY_RULE_SETUP
#line 161 "Z:/openmohaa/code/parser/lex_source.txt"
#line 161 "E:/Src/openmohaa/code/parser/lex_source.txt"
{ YYLEX( TOKEN_SIZE ); }
YY_BREAK
case 10:
YY_RULE_SETUP
#line 162 "Z:/openmohaa/code/parser/lex_source.txt"
#line 162 "E:/Src/openmohaa/code/parser/lex_source.txt"
{ YYLEX( TOKEN_PERIOD ); }
YY_BREAK
case 11:
/* rule 11 can match eol */
YY_RULE_SETUP
#line 163 "Z:/openmohaa/code/parser/lex_source.txt"
#line 163 "E:/Src/openmohaa/code/parser/lex_source.txt"
{ YYLLOCSET; TextEscapeValue( yytext + 1, strlen( yytext ) - 2 ); YYLEX( TOKEN_STRING ); }
YY_BREAK
case 12:
YY_RULE_SETUP
#line 164 "Z:/openmohaa/code/parser/lex_source.txt"
#line 164 "E:/Src/openmohaa/code/parser/lex_source.txt"
{ YYLLOCSET; TextValue( yytext, strlen( yytext ) ); YYLEX( TOKEN_IDENTIFIER ); }
YY_BREAK
case 13:
YY_RULE_SETUP
#line 165 "Z:/openmohaa/code/parser/lex_source.txt"
#line 165 "E:/Src/openmohaa/code/parser/lex_source.txt"
{
for ( int i = yyleng - 1; i >= 0; --i )
unput( yytext[ i ] );
@@ -1281,338 +1281,338 @@ YY_RULE_SETUP
case 14:
/* rule 14 can match eol */
YY_RULE_SETUP
#line 174 "Z:/openmohaa/code/parser/lex_source.txt"
#line 174 "E:/Src/openmohaa/code/parser/lex_source.txt"
{ if( prev_yylex != TOKEN_EOL ) YYLEX( TOKEN_EOL ); }
YY_BREAK
case 15:
YY_RULE_SETUP
#line 175 "Z:/openmohaa/code/parser/lex_source.txt"
#line 175 "E:/Src/openmohaa/code/parser/lex_source.txt"
{ ; }
YY_BREAK
case 16:
/* rule 16 can match eol */
YY_RULE_SETUP
#line 177 "Z:/openmohaa/code/parser/lex_source.txt"
#line 177 "E:/Src/openmohaa/code/parser/lex_source.txt"
{ YYLLOCSET; TextEscapeValue( yytext + 1, strlen( yytext ) - 2 ); YYLEX( TOKEN_STRING ); }
YY_BREAK
case 17:
YY_RULE_SETUP
#line 180 "Z:/openmohaa/code/parser/lex_source.txt"
#line 180 "E:/Src/openmohaa/code/parser/lex_source.txt"
{ YYLEX( TOKEN_TERNARY ); }
YY_BREAK
case 18:
YY_RULE_SETUP
#line 181 "Z:/openmohaa/code/parser/lex_source.txt"
#line 181 "E:/Src/openmohaa/code/parser/lex_source.txt"
{ YYLEX( TOKEN_IF ); }
YY_BREAK
case 19:
YY_RULE_SETUP
#line 182 "Z:/openmohaa/code/parser/lex_source.txt"
#line 182 "E:/Src/openmohaa/code/parser/lex_source.txt"
{ YYLEX( TOKEN_ELSE ); }
YY_BREAK
case 20:
YY_RULE_SETUP
#line 183 "Z:/openmohaa/code/parser/lex_source.txt"
#line 183 "E:/Src/openmohaa/code/parser/lex_source.txt"
{ YYLEX( TOKEN_WHILE ); }
YY_BREAK
case 21:
YY_RULE_SETUP
#line 184 "Z:/openmohaa/code/parser/lex_source.txt"
#line 184 "E:/Src/openmohaa/code/parser/lex_source.txt"
{ YYLEX( TOKEN_FOR ); }
YY_BREAK
case 22:
YY_RULE_SETUP
#line 185 "Z:/openmohaa/code/parser/lex_source.txt"
#line 185 "E:/Src/openmohaa/code/parser/lex_source.txt"
{ YYLEX( TOKEN_DO ); }
YY_BREAK
case 23:
YY_RULE_SETUP
#line 187 "Z:/openmohaa/code/parser/lex_source.txt"
#line 187 "E:/Src/openmohaa/code/parser/lex_source.txt"
{ BEGIN( VARIABLES ); yylval.s.val = node1_( method_game ); YYLEX( TOKEN_LISTENER ); }
YY_BREAK
case 24:
YY_RULE_SETUP
#line 188 "Z:/openmohaa/code/parser/lex_source.txt"
#line 188 "E:/Src/openmohaa/code/parser/lex_source.txt"
{ BEGIN( VARIABLES ); yylval.s.val = node1_( method_group ); YYLEX( TOKEN_LISTENER ); }
YY_BREAK
case 25:
YY_RULE_SETUP
#line 189 "Z:/openmohaa/code/parser/lex_source.txt"
#line 189 "E:/Src/openmohaa/code/parser/lex_source.txt"
{ BEGIN( VARIABLES ); yylval.s.val = node1_( method_level ); YYLEX( TOKEN_LISTENER ); }
YY_BREAK
case 26:
YY_RULE_SETUP
#line 190 "Z:/openmohaa/code/parser/lex_source.txt"
#line 190 "E:/Src/openmohaa/code/parser/lex_source.txt"
{ BEGIN( VARIABLES ); yylval.s.val = node1_( method_local ); YYLEX( TOKEN_LISTENER ); }
YY_BREAK
case 27:
YY_RULE_SETUP
#line 191 "Z:/openmohaa/code/parser/lex_source.txt"
#line 191 "E:/Src/openmohaa/code/parser/lex_source.txt"
{ BEGIN( VARIABLES ); yylval.s.val = node1_( method_parm ); YYLEX( TOKEN_LISTENER ); }
YY_BREAK
case 28:
YY_RULE_SETUP
#line 192 "Z:/openmohaa/code/parser/lex_source.txt"
#line 192 "E:/Src/openmohaa/code/parser/lex_source.txt"
{ BEGIN( VARIABLES ); yylval.s.val = node1_( method_owner ); YYLEX( TOKEN_LISTENER ); }
YY_BREAK
case 29:
YY_RULE_SETUP
#line 193 "Z:/openmohaa/code/parser/lex_source.txt"
#line 193 "E:/Src/openmohaa/code/parser/lex_source.txt"
{ BEGIN( VARIABLES ); yylval.s.val = node1_( method_self ); YYLEX( TOKEN_LISTENER ); }
YY_BREAK
case 30:
YY_RULE_SETUP
#line 195 "Z:/openmohaa/code/parser/lex_source.txt"
#line 195 "E:/Src/openmohaa/code/parser/lex_source.txt"
{ parsedata.braces_count++; YYLEX( TOKEN_LBRACKET ); }
YY_BREAK
case 31:
YY_RULE_SETUP
#line 196 "Z:/openmohaa/code/parser/lex_source.txt"
#line 196 "E:/Src/openmohaa/code/parser/lex_source.txt"
{ parsedata.braces_count--; YYLEX( TOKEN_RBRACKET ); }
YY_BREAK
case 32:
YY_RULE_SETUP
#line 197 "Z:/openmohaa/code/parser/lex_source.txt"
#line 197 "E:/Src/openmohaa/code/parser/lex_source.txt"
{ YYLLOCSET; YYLEX( TOKEN_LPAREN ); }
YY_BREAK
case 33:
YY_RULE_SETUP
#line 198 "Z:/openmohaa/code/parser/lex_source.txt"
#line 198 "E:/Src/openmohaa/code/parser/lex_source.txt"
{ BEGIN( VARIABLES ); YYLLOCSET; YYLEX( TOKEN_RPAREN ); }
YY_BREAK
case 34:
YY_RULE_SETUP
#line 199 "Z:/openmohaa/code/parser/lex_source.txt"
#line 199 "E:/Src/openmohaa/code/parser/lex_source.txt"
{ YYLEX( TOKEN_LSQUARE ); }
YY_BREAK
case 35:
YY_RULE_SETUP
#line 200 "Z:/openmohaa/code/parser/lex_source.txt"
#line 200 "E:/Src/openmohaa/code/parser/lex_source.txt"
{ BEGIN( VARIABLES ); YYLEX( TOKEN_RSQUARE ); }
YY_BREAK
case 36:
YY_RULE_SETUP
#line 202 "Z:/openmohaa/code/parser/lex_source.txt"
#line 202 "E:/Src/openmohaa/code/parser/lex_source.txt"
{ YYLEX( TOKEN_ASSIGNMENT ); }
YY_BREAK
case 37:
YY_RULE_SETUP
#line 203 "Z:/openmohaa/code/parser/lex_source.txt"
#line 203 "E:/Src/openmohaa/code/parser/lex_source.txt"
{ YYLEX( TOKEN_COLON ); }
YY_BREAK
case 38:
YY_RULE_SETUP
#line 204 "Z:/openmohaa/code/parser/lex_source.txt"
#line 204 "E:/Src/openmohaa/code/parser/lex_source.txt"
{ YYLEX( TOKEN_DOUBLE_COLON ); }
YY_BREAK
case 39:
YY_RULE_SETUP
#line 205 "Z:/openmohaa/code/parser/lex_source.txt"
#line 205 "E:/Src/openmohaa/code/parser/lex_source.txt"
{ YYLEX( TOKEN_SEMICOLON ); }
YY_BREAK
case 40:
YY_RULE_SETUP
#line 207 "Z:/openmohaa/code/parser/lex_source.txt"
#line 207 "E:/Src/openmohaa/code/parser/lex_source.txt"
{ YYLEX( TOKEN_EQUALITY ); }
YY_BREAK
case 41:
YY_RULE_SETUP
#line 208 "Z:/openmohaa/code/parser/lex_source.txt"
#line 208 "E:/Src/openmohaa/code/parser/lex_source.txt"
{ YYLEX( TOKEN_LOGICAL_OR ); }
YY_BREAK
case 42:
YY_RULE_SETUP
#line 209 "Z:/openmohaa/code/parser/lex_source.txt"
#line 209 "E:/Src/openmohaa/code/parser/lex_source.txt"
{ YYLEX( TOKEN_LOGICAL_AND ); }
YY_BREAK
case 43:
YY_RULE_SETUP
#line 211 "Z:/openmohaa/code/parser/lex_source.txt"
#line 211 "E:/Src/openmohaa/code/parser/lex_source.txt"
{ YYLEX( TOKEN_BITWISE_OR ); }
YY_BREAK
case 44:
YY_RULE_SETUP
#line 212 "Z:/openmohaa/code/parser/lex_source.txt"
#line 212 "E:/Src/openmohaa/code/parser/lex_source.txt"
{ YYLEX( TOKEN_BITWISE_EXCL_OR ); }
YY_BREAK
case 45:
YY_RULE_SETUP
#line 213 "Z:/openmohaa/code/parser/lex_source.txt"
#line 213 "E:/Src/openmohaa/code/parser/lex_source.txt"
{ YYLEX( TOKEN_BITWISE_AND ); }
YY_BREAK
case 46:
YY_RULE_SETUP
#line 214 "Z:/openmohaa/code/parser/lex_source.txt"
#line 214 "E:/Src/openmohaa/code/parser/lex_source.txt"
{ YYLEX( TOKEN_INEQUALITY ); }
YY_BREAK
case 47:
YY_RULE_SETUP
#line 215 "Z:/openmohaa/code/parser/lex_source.txt"
#line 215 "E:/Src/openmohaa/code/parser/lex_source.txt"
{ YYLEX( TOKEN_LESS_THAN ); }
YY_BREAK
case 48:
YY_RULE_SETUP
#line 216 "Z:/openmohaa/code/parser/lex_source.txt"
#line 216 "E:/Src/openmohaa/code/parser/lex_source.txt"
{ YYLEX( TOKEN_GREATER_THAN ); }
YY_BREAK
case 49:
YY_RULE_SETUP
#line 217 "Z:/openmohaa/code/parser/lex_source.txt"
#line 217 "E:/Src/openmohaa/code/parser/lex_source.txt"
{ YYLEX( TOKEN_LESS_THAN_OR_EQUAL ); }
YY_BREAK
case 50:
YY_RULE_SETUP
#line 218 "Z:/openmohaa/code/parser/lex_source.txt"
#line 218 "E:/Src/openmohaa/code/parser/lex_source.txt"
{ YYLEX( TOKEN_GREATER_THAN_OR_EQUAL ); }
YY_BREAK
case 51:
YY_RULE_SETUP
#line 219 "Z:/openmohaa/code/parser/lex_source.txt"
#line 219 "E:/Src/openmohaa/code/parser/lex_source.txt"
{ YYLEX( TOKEN_NEG ); }
YY_BREAK
case 52:
YY_RULE_SETUP
#line 221 "Z:/openmohaa/code/parser/lex_source.txt"
#line 221 "E:/Src/openmohaa/code/parser/lex_source.txt"
{ YYLEX( TOKEN_PLUS ); }
YY_BREAK
case 53:
YY_RULE_SETUP
#line 222 "Z:/openmohaa/code/parser/lex_source.txt"
#line 222 "E:/Src/openmohaa/code/parser/lex_source.txt"
{ YYLEX( TOKEN_PLUS_EQUALS ); }
YY_BREAK
case 54:
YY_RULE_SETUP
#line 223 "Z:/openmohaa/code/parser/lex_source.txt"
#line 223 "E:/Src/openmohaa/code/parser/lex_source.txt"
{ YYLEX( TOKEN_INCREMENT ); }
YY_BREAK
case 55:
YY_RULE_SETUP
#line 224 "Z:/openmohaa/code/parser/lex_source.txt"
#line 224 "E:/Src/openmohaa/code/parser/lex_source.txt"
{ YYLEX( TOKEN_MINUS ); }
YY_BREAK
case 56:
YY_RULE_SETUP
#line 225 "Z:/openmohaa/code/parser/lex_source.txt"
#line 225 "E:/Src/openmohaa/code/parser/lex_source.txt"
{ YYLEX( TOKEN_MINUS_EQUALS ); }
YY_BREAK
case 57:
YY_RULE_SETUP
#line 226 "Z:/openmohaa/code/parser/lex_source.txt"
#line 226 "E:/Src/openmohaa/code/parser/lex_source.txt"
{ YYLEX( TOKEN_MINUS_EQUALS ); }
YY_BREAK
case 58:
YY_RULE_SETUP
#line 227 "Z:/openmohaa/code/parser/lex_source.txt"
#line 227 "E:/Src/openmohaa/code/parser/lex_source.txt"
{ YYLEX( TOKEN_DECREMENT ); }
YY_BREAK
case 59:
YY_RULE_SETUP
#line 228 "Z:/openmohaa/code/parser/lex_source.txt"
#line 228 "E:/Src/openmohaa/code/parser/lex_source.txt"
{ YYLEX( TOKEN_MULTIPLY ); }
YY_BREAK
case 60:
YY_RULE_SETUP
#line 229 "Z:/openmohaa/code/parser/lex_source.txt"
#line 229 "E:/Src/openmohaa/code/parser/lex_source.txt"
{ YYLEX( TOKEN_MULTIPLY_EQUALS ); }
YY_BREAK
case 61:
YY_RULE_SETUP
#line 230 "Z:/openmohaa/code/parser/lex_source.txt"
#line 230 "E:/Src/openmohaa/code/parser/lex_source.txt"
{ YYLEX( TOKEN_DIVIDE ); }
YY_BREAK
case 62:
YY_RULE_SETUP
#line 231 "Z:/openmohaa/code/parser/lex_source.txt"
#line 231 "E:/Src/openmohaa/code/parser/lex_source.txt"
{ YYLEX( TOKEN_DIVIDE_EQUALS ); }
YY_BREAK
case 63:
YY_RULE_SETUP
#line 232 "Z:/openmohaa/code/parser/lex_source.txt"
#line 232 "E:/Src/openmohaa/code/parser/lex_source.txt"
{ YYLEX( TOKEN_MODULUS ); }
YY_BREAK
case 64:
YY_RULE_SETUP
#line 233 "Z:/openmohaa/code/parser/lex_source.txt"
#line 233 "E:/Src/openmohaa/code/parser/lex_source.txt"
{ YYLEX( TOKEN_MODULUS_EQUALS ); }
YY_BREAK
case 65:
YY_RULE_SETUP
#line 234 "Z:/openmohaa/code/parser/lex_source.txt"
#line 234 "E:/Src/openmohaa/code/parser/lex_source.txt"
{ YYLEX( TOKEN_SHIFT_LEFT ); }
YY_BREAK
case 66:
YY_RULE_SETUP
#line 235 "Z:/openmohaa/code/parser/lex_source.txt"
#line 235 "E:/Src/openmohaa/code/parser/lex_source.txt"
{ YYLEX( TOKEN_SHIFT_LEFT_EQUALS ); }
YY_BREAK
case 67:
YY_RULE_SETUP
#line 236 "Z:/openmohaa/code/parser/lex_source.txt"
#line 236 "E:/Src/openmohaa/code/parser/lex_source.txt"
{ YYLEX( TOKEN_SHIFT_RIGHT ); }
YY_BREAK
case 68:
YY_RULE_SETUP
#line 237 "Z:/openmohaa/code/parser/lex_source.txt"
#line 237 "E:/Src/openmohaa/code/parser/lex_source.txt"
{ YYLEX( TOKEN_SHIFT_RIGHT_EQUALS ); }
YY_BREAK
case 69:
YY_RULE_SETUP
#line 238 "Z:/openmohaa/code/parser/lex_source.txt"
#line 238 "E:/Src/openmohaa/code/parser/lex_source.txt"
{ YYLEX( TOKEN_AND_EQUALS ); }
YY_BREAK
case 70:
YY_RULE_SETUP
#line 239 "Z:/openmohaa/code/parser/lex_source.txt"
#line 239 "E:/Src/openmohaa/code/parser/lex_source.txt"
{ YYLEX( TOKEN_EXCL_OR_EQUALS ); }
YY_BREAK
case 71:
YY_RULE_SETUP
#line 240 "Z:/openmohaa/code/parser/lex_source.txt"
#line 240 "E:/Src/openmohaa/code/parser/lex_source.txt"
{ YYLEX( TOKEN_OR_EQUALS ); }
YY_BREAK
case 72:
YY_RULE_SETUP
#line 241 "Z:/openmohaa/code/parser/lex_source.txt"
#line 241 "E:/Src/openmohaa/code/parser/lex_source.txt"
{ BEGIN( VARIABLES ); YYLEX( TOKEN_DOLLAR ); }
YY_BREAK
case 73:
YY_RULE_SETUP
#line 242 "Z:/openmohaa/code/parser/lex_source.txt"
#line 242 "E:/Src/openmohaa/code/parser/lex_source.txt"
{ YYLEX( TOKEN_NOT ); }
YY_BREAK
case 74:
YY_RULE_SETUP
#line 243 "Z:/openmohaa/code/parser/lex_source.txt"
#line 243 "E:/Src/openmohaa/code/parser/lex_source.txt"
{ YYLEX( TOKEN_COMPLEMENT ); }
YY_BREAK
case 75:
YY_RULE_SETUP
#line 245 "Z:/openmohaa/code/parser/lex_source.txt"
#line 245 "E:/Src/openmohaa/code/parser/lex_source.txt"
{ YYLEX( TOKEN_PERIOD ); }
YY_BREAK
case 76:
YY_RULE_SETUP
#line 247 "Z:/openmohaa/code/parser/lex_source.txt"
#line 247 "E:/Src/openmohaa/code/parser/lex_source.txt"
{ YYLEX( TOKEN_COMMA ); }
YY_BREAK
case 77:
YY_RULE_SETUP
#line 248 "Z:/openmohaa/code/parser/lex_source.txt"
#line 248 "E:/Src/openmohaa/code/parser/lex_source.txt"
{ YYLEX( TOKEN_NUMBER ); }
YY_BREAK
case 78:
YY_RULE_SETUP
#line 250 "Z:/openmohaa/code/parser/lex_source.txt"
#line 250 "E:/Src/openmohaa/code/parser/lex_source.txt"
{ YYLEX( TOKEN_NULL ); }
YY_BREAK
case 79:
YY_RULE_SETUP
#line 251 "Z:/openmohaa/code/parser/lex_source.txt"
#line 251 "E:/Src/openmohaa/code/parser/lex_source.txt"
{ YYLEX( TOKEN_NIL ); }
YY_BREAK
case 80:
YY_RULE_SETUP
#line 253 "Z:/openmohaa/code/parser/lex_source.txt"
#line 253 "E:/Src/openmohaa/code/parser/lex_source.txt"
{
char* p = nullptr;
yylval.s.val.intValue = std::strtoll(yytext, &p, 10);
@@ -1621,7 +1621,7 @@ YY_RULE_SETUP
YY_BREAK
case 81:
YY_RULE_SETUP
#line 258 "Z:/openmohaa/code/parser/lex_source.txt"
#line 258 "E:/Src/openmohaa/code/parser/lex_source.txt"
{
char* p = nullptr;
yylval.s.val.floatValue = std::strtof(yytext, &p);
@@ -1630,47 +1630,47 @@ YY_RULE_SETUP
YY_BREAK
case 82:
YY_RULE_SETUP
#line 264 "Z:/openmohaa/code/parser/lex_source.txt"
#line 264 "E:/Src/openmohaa/code/parser/lex_source.txt"
{ YYLEX( TOKEN_TRY ); }
YY_BREAK
case 83:
YY_RULE_SETUP
#line 265 "Z:/openmohaa/code/parser/lex_source.txt"
#line 265 "E:/Src/openmohaa/code/parser/lex_source.txt"
{ YYLEX( TOKEN_CATCH ); }
YY_BREAK
case 84:
YY_RULE_SETUP
#line 266 "Z:/openmohaa/code/parser/lex_source.txt"
#line 266 "E:/Src/openmohaa/code/parser/lex_source.txt"
{ YYLEX( TOKEN_SWITCH ); }
YY_BREAK
case 85:
YY_RULE_SETUP
#line 268 "Z:/openmohaa/code/parser/lex_source.txt"
#line 268 "E:/Src/openmohaa/code/parser/lex_source.txt"
{ YYLEX( TOKEN_CASE ); }
YY_BREAK
case 86:
YY_RULE_SETUP
#line 269 "Z:/openmohaa/code/parser/lex_source.txt"
#line 269 "E:/Src/openmohaa/code/parser/lex_source.txt"
{ YYLEX( TOKEN_BREAK ); }
YY_BREAK
case 87:
YY_RULE_SETUP
#line 270 "Z:/openmohaa/code/parser/lex_source.txt"
#line 270 "E:/Src/openmohaa/code/parser/lex_source.txt"
{ YYLEX( TOKEN_CONTINUE ); }
YY_BREAK
case 88:
YY_RULE_SETUP
#line 272 "Z:/openmohaa/code/parser/lex_source.txt"
#line 272 "E:/Src/openmohaa/code/parser/lex_source.txt"
{ YYLEX( TOKEN_MAKEARRAY ); }
YY_BREAK
case 89:
YY_RULE_SETUP
#line 273 "Z:/openmohaa/code/parser/lex_source.txt"
#line 273 "E:/Src/openmohaa/code/parser/lex_source.txt"
{ YYLEX( TOKEN_ENDARRAY ); }
YY_BREAK
case 90:
YY_RULE_SETUP
#line 275 "Z:/openmohaa/code/parser/lex_source.txt"
#line 275 "E:/Src/openmohaa/code/parser/lex_source.txt"
{
if( UseField() )
{
@@ -1687,7 +1687,7 @@ YY_RULE_SETUP
YY_BREAK
case 91:
YY_RULE_SETUP
#line 289 "Z:/openmohaa/code/parser/lex_source.txt"
#line 289 "E:/Src/openmohaa/code/parser/lex_source.txt"
{ yylexerror( "bad token:\n" ); }
YY_BREAK
@@ -1697,10 +1697,10 @@ YY_RULE_SETUP
case 92:
YY_RULE_SETUP
#line 297 "Z:/openmohaa/code/parser/lex_source.txt"
#line 297 "E:/Src/openmohaa/code/parser/lex_source.txt"
YY_FATAL_ERROR( "flex scanner jammed" );
YY_BREAK
#line 1703 "Z:/openmohaa/code/parser/generated/yyLexer.cpp"
#line 1703 "E:/Src/openmohaa/code/parser/generated/yyLexer.cpp"
case YY_STATE_EOF(INITIAL):
case YY_STATE_EOF(C_COMMENT):
case YY_STATE_EOF(C_LINE_COMMENT):
@@ -2694,6 +2694,6 @@ void yyfree (void * ptr )
#define YYTABLES_NAME "yytables"
#line 297 "Z:/openmohaa/code/parser/lex_source.txt"
#line 297 "E:/Src/openmohaa/code/parser/lex_source.txt"
+4 -4
View File
@@ -2,9 +2,9 @@
#define yyHEADER_H 1
#define yyIN_HEADER 1
#line 5 "Z:/openmohaa/code/parser/generated/yyLexer.h"
#line 5 "E:/Src/openmohaa/code/parser/generated/yyLexer.h"
#line 7 "Z:/openmohaa/code/parser/generated/yyLexer.h"
#line 7 "E:/Src/openmohaa/code/parser/generated/yyLexer.h"
#define YY_INT_ALIGNED short int
@@ -465,9 +465,9 @@ extern int yylex (void);
#undef yyTABLES_NAME
#endif
#line 297 "Z:/openmohaa/code/parser/lex_source.txt"
#line 297 "E:/Src/openmohaa/code/parser/lex_source.txt"
#line 471 "Z:/openmohaa/code/parser/generated/yyLexer.h"
#line 471 "E:/Src/openmohaa/code/parser/generated/yyLexer.h"
#undef yyIN_HEADER
#endif /* yyHEADER_H */
+194 -194
View File
@@ -67,7 +67,7 @@
/* First part of user prologue. */
#line 1 "Z:/openmohaa/code/parser/bison_source.txt"
#line 1 "E:/Src/openmohaa/code/parser/bison_source.txt"
/*
* ===========================================================================
@@ -107,7 +107,7 @@ extern yyparsedata parsedata;
#define YYLLOC node_pos( parsedata.pos - yyleng )
#line 111 "Z:/openmohaa/code/parser/generated/yyParser.cpp"
#line 111 "E:/Src/openmohaa/code/parser/generated/yyParser.cpp"
# ifndef YY_CAST
# ifdef __cplusplus
@@ -1800,576 +1800,576 @@ yyreduce:
switch (yyn)
{
case 2: /* program: newline statement_list */
#line 108 "Z:/openmohaa/code/parser/bison_source.txt"
#line 108 "E:/Src/openmohaa/code/parser/bison_source.txt"
{ parsedata.val = node1( sval_statement_list, (yyvsp[0].s.val) ); }
#line 1806 "Z:/openmohaa/code/parser/generated/yyParser.cpp"
#line 1806 "E:/Src/openmohaa/code/parser/generated/yyParser.cpp"
break;
case 3: /* statement_list: statement_list statement newline */
#line 112 "Z:/openmohaa/code/parser/bison_source.txt"
#line 112 "E:/Src/openmohaa/code/parser/bison_source.txt"
{ (yyval.s.val) = append_node( (yyvsp[-2].s.val), (yyvsp[-1].s.val) ); }
#line 1812 "Z:/openmohaa/code/parser/generated/yyParser.cpp"
#line 1812 "E:/Src/openmohaa/code/parser/generated/yyParser.cpp"
break;
case 4: /* statement_list: statement newline */
#line 114 "Z:/openmohaa/code/parser/bison_source.txt"
#line 114 "E:/Src/openmohaa/code/parser/bison_source.txt"
{ (yyval.s.val) = linked_list_end( (yyvsp[-1].s.val) ); }
#line 1818 "Z:/openmohaa/code/parser/generated/yyParser.cpp"
#line 1818 "E:/Src/openmohaa/code/parser/generated/yyParser.cpp"
break;
case 5: /* statement_list: newline */
#line 115 "Z:/openmohaa/code/parser/bison_source.txt"
#line 115 "E:/Src/openmohaa/code/parser/bison_source.txt"
{ (yyval.s.val) = node0( sval_none ); }
#line 1824 "Z:/openmohaa/code/parser/generated/yyParser.cpp"
#line 1824 "E:/Src/openmohaa/code/parser/generated/yyParser.cpp"
break;
case 6: /* statement: TOKEN_IDENTIFIER event_parameter_list TOKEN_COLON */
#line 119 "Z:/openmohaa/code/parser/bison_source.txt"
#line 119 "E:/Src/openmohaa/code/parser/bison_source.txt"
{ (yyval.s.val) = node3( sval_label, (yyvsp[-2].s).val, (yyvsp[-1].s.val), YYLLOC ); }
#line 1830 "Z:/openmohaa/code/parser/generated/yyParser.cpp"
#line 1830 "E:/Src/openmohaa/code/parser/generated/yyParser.cpp"
break;
case 7: /* statement: TOKEN_PLUS TOKEN_IDENTIFIER event_parameter_list TOKEN_COLON */
#line 120 "Z:/openmohaa/code/parser/bison_source.txt"
#line 120 "E:/Src/openmohaa/code/parser/bison_source.txt"
{ (yyval.s.val) = node3( sval_label, (yyvsp[-2].s).val, (yyvsp[-1].s.val), YYLLOC ); }
#line 1836 "Z:/openmohaa/code/parser/generated/yyParser.cpp"
#line 1836 "E:/Src/openmohaa/code/parser/generated/yyParser.cpp"
break;
case 8: /* statement: TOKEN_MINUS TOKEN_IDENTIFIER event_parameter_list TOKEN_COLON */
#line 121 "Z:/openmohaa/code/parser/bison_source.txt"
#line 121 "E:/Src/openmohaa/code/parser/bison_source.txt"
{ (yyval.s.val) = node3( sval_privatelabel, (yyvsp[-2].s).val, (yyvsp[-1].s.val), YYLLOC ); }
#line 1842 "Z:/openmohaa/code/parser/generated/yyParser.cpp"
#line 1842 "E:/Src/openmohaa/code/parser/generated/yyParser.cpp"
break;
case 9: /* statement: TOKEN_CASE prim_expr event_parameter_list TOKEN_COLON */
#line 122 "Z:/openmohaa/code/parser/bison_source.txt"
#line 122 "E:/Src/openmohaa/code/parser/bison_source.txt"
{ (yyval.s.val) = node3( sval_case, (yyvsp[-2].s.val), (yyvsp[-1].s.val), YYLLOC ); }
#line 1848 "Z:/openmohaa/code/parser/generated/yyParser.cpp"
#line 1848 "E:/Src/openmohaa/code/parser/generated/yyParser.cpp"
break;
case 11: /* statement: TOKEN_IF prim_expr newline statement newline */
#line 124 "Z:/openmohaa/code/parser/bison_source.txt"
#line 124 "E:/Src/openmohaa/code/parser/bison_source.txt"
{ (yyval.s.val) = node3( sval_if, (yyvsp[-3].s.val), (yyvsp[-1].s.val), YYLLOC ); }
#line 1854 "Z:/openmohaa/code/parser/generated/yyParser.cpp"
#line 1854 "E:/Src/openmohaa/code/parser/generated/yyParser.cpp"
break;
case 12: /* statement: TOKEN_IF prim_expr newline statement newline TOKEN_ELSE newline statement */
#line 125 "Z:/openmohaa/code/parser/bison_source.txt"
#line 125 "E:/Src/openmohaa/code/parser/bison_source.txt"
{ (yyval.s.val) = node4( sval_ifelse, (yyvsp[-6].s.val), (yyvsp[-4].s.val), (yyvsp[0].s.val), YYLLOC ); }
#line 1860 "Z:/openmohaa/code/parser/generated/yyParser.cpp"
#line 1860 "E:/Src/openmohaa/code/parser/generated/yyParser.cpp"
break;
case 13: /* statement: TOKEN_WHILE prim_expr newline statement */
#line 126 "Z:/openmohaa/code/parser/bison_source.txt"
#line 126 "E:/Src/openmohaa/code/parser/bison_source.txt"
{ (yyval.s.val) = node4( sval_while, (yyvsp[-2].s.val), (yyvsp[0].s.val), node0( sval_none ), YYLLOC ); }
#line 1866 "Z:/openmohaa/code/parser/generated/yyParser.cpp"
#line 1866 "E:/Src/openmohaa/code/parser/generated/yyParser.cpp"
break;
case 14: /* statement: TOKEN_FOR TOKEN_LPAREN statement TOKEN_SEMICOLON expr TOKEN_SEMICOLON statement_list TOKEN_RPAREN newline statement */
#line 128 "Z:/openmohaa/code/parser/bison_source.txt"
#line 128 "E:/Src/openmohaa/code/parser/bison_source.txt"
{
sval_u while_stmt = node4( sval_while, (yyvsp[-5].s.val), (yyvsp[0].s.val), node1( sval_statement_list, (yyvsp[-3].s.val) ), YYLLOC );
(yyval.s.val) = node1( sval_statement_list, append_node( linked_list_end( (yyvsp[-7].s.val) ), while_stmt ) );
}
#line 1875 "Z:/openmohaa/code/parser/generated/yyParser.cpp"
#line 1875 "E:/Src/openmohaa/code/parser/generated/yyParser.cpp"
break;
case 15: /* statement: TOKEN_FOR TOKEN_LPAREN TOKEN_SEMICOLON expr TOKEN_SEMICOLON statement_list TOKEN_RPAREN newline statement */
#line 133 "Z:/openmohaa/code/parser/bison_source.txt"
#line 133 "E:/Src/openmohaa/code/parser/bison_source.txt"
{
(yyval.s.val) = node4( sval_while, (yyvsp[-5].s.val), (yyvsp[0].s.val), node1( sval_statement_list, (yyvsp[-3].s.val) ), YYLLOC );
}
#line 1883 "Z:/openmohaa/code/parser/generated/yyParser.cpp"
#line 1883 "E:/Src/openmohaa/code/parser/generated/yyParser.cpp"
break;
case 16: /* statement: TOKEN_DO newline statement newline TOKEN_WHILE prim_expr */
#line 136 "Z:/openmohaa/code/parser/bison_source.txt"
#line 136 "E:/Src/openmohaa/code/parser/bison_source.txt"
{ (yyval.s.val) = node3( sval_do, (yyvsp[-3].s.val), (yyvsp[0].s.val), YYLLOC ); }
#line 1889 "Z:/openmohaa/code/parser/generated/yyParser.cpp"
#line 1889 "E:/Src/openmohaa/code/parser/generated/yyParser.cpp"
break;
case 17: /* statement: TOKEN_TRY newline compound_statement newline TOKEN_CATCH newline compound_statement */
#line 137 "Z:/openmohaa/code/parser/bison_source.txt"
#line 137 "E:/Src/openmohaa/code/parser/bison_source.txt"
{ (yyval.s.val) = node3( sval_catch, (yyvsp[-4].s.val), (yyvsp[0].s.val), YYLLOC ); }
#line 1895 "Z:/openmohaa/code/parser/generated/yyParser.cpp"
#line 1895 "E:/Src/openmohaa/code/parser/generated/yyParser.cpp"
break;
case 18: /* statement: TOKEN_SWITCH prim_expr newline compound_statement */
#line 138 "Z:/openmohaa/code/parser/bison_source.txt"
#line 138 "E:/Src/openmohaa/code/parser/bison_source.txt"
{ (yyval.s.val) = node3( sval_switch, (yyvsp[-2].s.val), (yyvsp[0].s.val), YYLLOC ); }
#line 1901 "Z:/openmohaa/code/parser/generated/yyParser.cpp"
#line 1901 "E:/Src/openmohaa/code/parser/generated/yyParser.cpp"
break;
case 19: /* statement: TOKEN_BREAK */
#line 139 "Z:/openmohaa/code/parser/bison_source.txt"
#line 139 "E:/Src/openmohaa/code/parser/bison_source.txt"
{ (yyval.s.val) = node1( sval_break, YYLLOC ); }
#line 1907 "Z:/openmohaa/code/parser/generated/yyParser.cpp"
#line 1907 "E:/Src/openmohaa/code/parser/generated/yyParser.cpp"
break;
case 20: /* statement: TOKEN_CONTINUE */
#line 140 "Z:/openmohaa/code/parser/bison_source.txt"
#line 140 "E:/Src/openmohaa/code/parser/bison_source.txt"
{ (yyval.s.val) = node1( sval_continue, YYLLOC ); }
#line 1913 "Z:/openmohaa/code/parser/generated/yyParser.cpp"
#line 1913 "E:/Src/openmohaa/code/parser/generated/yyParser.cpp"
break;
case 21: /* statement: TOKEN_IDENTIFIER event_parameter_list */
#line 141 "Z:/openmohaa/code/parser/bison_source.txt"
#line 141 "E:/Src/openmohaa/code/parser/bison_source.txt"
{ (yyval.s.val) = node3( sval_cmd, (yyvsp[-1].s).val, node1( sval_none, (yyvsp[0].s.val) ), node_pos( (yyvsp[-1].s).sourcePos ) ); }
#line 1919 "Z:/openmohaa/code/parser/generated/yyParser.cpp"
#line 1919 "E:/Src/openmohaa/code/parser/generated/yyParser.cpp"
break;
case 22: /* statement: nonident_prim_expr TOKEN_IDENTIFIER event_parameter_list */
#line 143 "Z:/openmohaa/code/parser/bison_source.txt"
#line 143 "E:/Src/openmohaa/code/parser/bison_source.txt"
{ (yyval.s.val) = node4( sval_cmd_method, (yyvsp[-2].s.val), (yyvsp[-1].s).val, node1( sval_none, (yyvsp[0].s.val) ), node_pos( (yyvsp[-1].s).sourcePos ) ); }
#line 1925 "Z:/openmohaa/code/parser/generated/yyParser.cpp"
#line 1925 "E:/Src/openmohaa/code/parser/generated/yyParser.cpp"
break;
case 23: /* statement: nonident_prim_expr TOKEN_ASSIGNMENT expr */
#line 145 "Z:/openmohaa/code/parser/bison_source.txt"
#line 145 "E:/Src/openmohaa/code/parser/bison_source.txt"
{ (yyval.s.val) = node3( sval_assignment, (yyvsp[-2].s.val), (yyvsp[0].s.val), YYLLOC ); }
#line 1931 "Z:/openmohaa/code/parser/generated/yyParser.cpp"
#line 1931 "E:/Src/openmohaa/code/parser/generated/yyParser.cpp"
break;
case 24: /* statement: nonident_prim_expr TOKEN_PLUS_EQUALS expr */
#line 146 "Z:/openmohaa/code/parser/bison_source.txt"
#line 146 "E:/Src/openmohaa/code/parser/bison_source.txt"
{ (yyval.s.val) = node3( sval_assignment, (yyvsp[-2].s.val), node4( sval_operation, node1b( OP_BIN_PLUS ), (yyvsp[-2].s.val), (yyvsp[0].s.val), YYLLOC ), YYLLOC ); }
#line 1937 "Z:/openmohaa/code/parser/generated/yyParser.cpp"
#line 1937 "E:/Src/openmohaa/code/parser/generated/yyParser.cpp"
break;
case 25: /* statement: nonident_prim_expr TOKEN_MINUS_EQUALS expr */
#line 147 "Z:/openmohaa/code/parser/bison_source.txt"
#line 147 "E:/Src/openmohaa/code/parser/bison_source.txt"
{ (yyval.s.val) = node3( sval_assignment, (yyvsp[-2].s.val), node4( sval_operation, node1b( OP_BIN_MINUS ), (yyvsp[-2].s.val), (yyvsp[0].s.val), YYLLOC ), YYLLOC ); }
#line 1943 "Z:/openmohaa/code/parser/generated/yyParser.cpp"
#line 1943 "E:/Src/openmohaa/code/parser/generated/yyParser.cpp"
break;
case 26: /* statement: nonident_prim_expr TOKEN_MULTIPLY_EQUALS expr */
#line 148 "Z:/openmohaa/code/parser/bison_source.txt"
#line 148 "E:/Src/openmohaa/code/parser/bison_source.txt"
{ (yyval.s.val) = node3( sval_assignment, (yyvsp[-2].s.val), node4( sval_operation, node1b( OP_BIN_MULTIPLY ), (yyvsp[-2].s.val), (yyvsp[0].s.val), YYLLOC ), YYLLOC ); }
#line 1949 "Z:/openmohaa/code/parser/generated/yyParser.cpp"
#line 1949 "E:/Src/openmohaa/code/parser/generated/yyParser.cpp"
break;
case 27: /* statement: nonident_prim_expr TOKEN_DIVIDE_EQUALS expr */
#line 149 "Z:/openmohaa/code/parser/bison_source.txt"
#line 149 "E:/Src/openmohaa/code/parser/bison_source.txt"
{ (yyval.s.val) = node3( sval_assignment, (yyvsp[-2].s.val), node4( sval_operation, node1b( OP_BIN_DIVIDE ), (yyvsp[-2].s.val), (yyvsp[0].s.val), YYLLOC ), YYLLOC ); }
#line 1955 "Z:/openmohaa/code/parser/generated/yyParser.cpp"
#line 1955 "E:/Src/openmohaa/code/parser/generated/yyParser.cpp"
break;
case 28: /* statement: nonident_prim_expr TOKEN_MODULUS_EQUALS expr */
#line 150 "Z:/openmohaa/code/parser/bison_source.txt"
#line 150 "E:/Src/openmohaa/code/parser/bison_source.txt"
{ (yyval.s.val) = node3( sval_assignment, (yyvsp[-2].s.val), node4( sval_operation, node1b( OP_BIN_PERCENTAGE ), (yyvsp[-2].s.val), (yyvsp[0].s.val), YYLLOC ), YYLLOC ); }
#line 1961 "Z:/openmohaa/code/parser/generated/yyParser.cpp"
#line 1961 "E:/Src/openmohaa/code/parser/generated/yyParser.cpp"
break;
case 29: /* statement: nonident_prim_expr TOKEN_AND_EQUALS expr */
#line 151 "Z:/openmohaa/code/parser/bison_source.txt"
#line 151 "E:/Src/openmohaa/code/parser/bison_source.txt"
{ (yyval.s.val) = node3( sval_assignment, (yyvsp[-2].s.val), node4( sval_operation, node1b( OP_BIN_BITWISE_AND ), (yyvsp[-2].s.val), (yyvsp[0].s.val), YYLLOC ), YYLLOC ); }
#line 1967 "Z:/openmohaa/code/parser/generated/yyParser.cpp"
#line 1967 "E:/Src/openmohaa/code/parser/generated/yyParser.cpp"
break;
case 30: /* statement: nonident_prim_expr TOKEN_EXCL_OR_EQUALS expr */
#line 152 "Z:/openmohaa/code/parser/bison_source.txt"
#line 152 "E:/Src/openmohaa/code/parser/bison_source.txt"
{ (yyval.s.val) = node3( sval_assignment, (yyvsp[-2].s.val), node4( sval_operation, node1b( OP_BIN_BITWISE_EXCL_OR ), (yyvsp[-2].s.val), (yyvsp[0].s.val), YYLLOC ), YYLLOC ); }
#line 1973 "Z:/openmohaa/code/parser/generated/yyParser.cpp"
#line 1973 "E:/Src/openmohaa/code/parser/generated/yyParser.cpp"
break;
case 31: /* statement: nonident_prim_expr TOKEN_OR_EQUALS expr */
#line 153 "Z:/openmohaa/code/parser/bison_source.txt"
#line 153 "E:/Src/openmohaa/code/parser/bison_source.txt"
{ (yyval.s.val) = node3( sval_assignment, (yyvsp[-2].s.val), node4( sval_operation, node1b( OP_BIN_BITWISE_OR ), (yyvsp[-2].s.val), (yyvsp[0].s.val), YYLLOC ), YYLLOC ); }
#line 1979 "Z:/openmohaa/code/parser/generated/yyParser.cpp"
#line 1979 "E:/Src/openmohaa/code/parser/generated/yyParser.cpp"
break;
case 32: /* statement: nonident_prim_expr TOKEN_SHIFT_LEFT_EQUALS expr */
#line 154 "Z:/openmohaa/code/parser/bison_source.txt"
#line 154 "E:/Src/openmohaa/code/parser/bison_source.txt"
{ (yyval.s.val) = node3( sval_assignment, (yyvsp[-2].s.val), node4( sval_operation, node1b( OP_BIN_SHIFT_LEFT ), (yyvsp[-2].s.val), (yyvsp[0].s.val), YYLLOC ), YYLLOC ); }
#line 1985 "Z:/openmohaa/code/parser/generated/yyParser.cpp"
#line 1985 "E:/Src/openmohaa/code/parser/generated/yyParser.cpp"
break;
case 33: /* statement: nonident_prim_expr TOKEN_SHIFT_RIGHT_EQUALS expr */
#line 155 "Z:/openmohaa/code/parser/bison_source.txt"
#line 155 "E:/Src/openmohaa/code/parser/bison_source.txt"
{ (yyval.s.val) = node3( sval_assignment, (yyvsp[-2].s.val), node4( sval_operation, node1b( OP_BIN_SHIFT_RIGHT ), (yyvsp[-2].s.val), (yyvsp[0].s.val), YYLLOC ), YYLLOC ); }
#line 1991 "Z:/openmohaa/code/parser/generated/yyParser.cpp"
#line 1991 "E:/Src/openmohaa/code/parser/generated/yyParser.cpp"
break;
case 34: /* statement: nonident_prim_expr TOKEN_INCREMENT */
#line 156 "Z:/openmohaa/code/parser/bison_source.txt"
{ (yyval.s.val) = node3( sval_assignment, (yyvsp[-1].s.val), node2( sval_func1, node1b( OP_UN_INC ), (yyvsp[-1].s.val) ), YYLLOC ); }
#line 1997 "Z:/openmohaa/code/parser/generated/yyParser.cpp"
#line 156 "E:/Src/openmohaa/code/parser/bison_source.txt"
{ (yyval.s.val) = node3( sval_assignment, (yyvsp[-1].s.val), node3( sval_func1, node1b( OP_UN_INC ), (yyvsp[-1].s.val), YYLLOC ), YYLLOC ); }
#line 1997 "E:/Src/openmohaa/code/parser/generated/yyParser.cpp"
break;
case 35: /* statement: nonident_prim_expr TOKEN_DECREMENT */
#line 157 "Z:/openmohaa/code/parser/bison_source.txt"
{ (yyval.s.val) = node3( sval_assignment, (yyvsp[-1].s.val), node2( sval_func1, node1b( OP_UN_DEC ), (yyvsp[-1].s.val) ), YYLLOC ); }
#line 2003 "Z:/openmohaa/code/parser/generated/yyParser.cpp"
#line 157 "E:/Src/openmohaa/code/parser/bison_source.txt"
{ (yyval.s.val) = node3( sval_assignment, (yyvsp[-1].s.val), node3( sval_func1, node1b( OP_UN_DEC ), (yyvsp[-1].s.val), YYLLOC ), YYLLOC ); }
#line 2003 "E:/Src/openmohaa/code/parser/generated/yyParser.cpp"
break;
case 37: /* compound_statement: TOKEN_LBRACKET newline statement_list newline TOKEN_RBRACKET */
#line 162 "Z:/openmohaa/code/parser/bison_source.txt"
#line 162 "E:/Src/openmohaa/code/parser/bison_source.txt"
{ (yyval.s.val) = node1( sval_statement_list, (yyvsp[-2].s.val) ); }
#line 2009 "Z:/openmohaa/code/parser/generated/yyParser.cpp"
#line 2009 "E:/Src/openmohaa/code/parser/generated/yyParser.cpp"
break;
case 38: /* expr: expr TOKEN_LOGICAL_AND newline expr */
#line 166 "Z:/openmohaa/code/parser/bison_source.txt"
#line 166 "E:/Src/openmohaa/code/parser/bison_source.txt"
{ (yyval.s.val) = node3( sval_and, (yyvsp[-3].s.val), (yyvsp[0].s.val), YYLLOC ); }
#line 2015 "Z:/openmohaa/code/parser/generated/yyParser.cpp"
#line 2015 "E:/Src/openmohaa/code/parser/generated/yyParser.cpp"
break;
case 39: /* expr: expr TOKEN_LOGICAL_OR newline expr */
#line 167 "Z:/openmohaa/code/parser/bison_source.txt"
#line 167 "E:/Src/openmohaa/code/parser/bison_source.txt"
{ (yyval.s.val) = node3( sval_or, (yyvsp[-3].s.val), (yyvsp[0].s.val), YYLLOC ); }
#line 2021 "Z:/openmohaa/code/parser/generated/yyParser.cpp"
#line 2021 "E:/Src/openmohaa/code/parser/generated/yyParser.cpp"
break;
case 40: /* expr: expr TOKEN_BITWISE_AND newline expr */
#line 168 "Z:/openmohaa/code/parser/bison_source.txt"
#line 168 "E:/Src/openmohaa/code/parser/bison_source.txt"
{ (yyval.s.val) = node4( sval_operation, node1b( OP_BIN_BITWISE_AND ), (yyvsp[-3].s.val), (yyvsp[0].s.val), YYLLOC ); }
#line 2027 "Z:/openmohaa/code/parser/generated/yyParser.cpp"
#line 2027 "E:/Src/openmohaa/code/parser/generated/yyParser.cpp"
break;
case 41: /* expr: expr TOKEN_BITWISE_EXCL_OR newline expr */
#line 169 "Z:/openmohaa/code/parser/bison_source.txt"
#line 169 "E:/Src/openmohaa/code/parser/bison_source.txt"
{ (yyval.s.val) = node4( sval_operation, node1b( OP_BIN_BITWISE_EXCL_OR ), (yyvsp[-3].s.val), (yyvsp[0].s.val), YYLLOC ); }
#line 2033 "Z:/openmohaa/code/parser/generated/yyParser.cpp"
#line 2033 "E:/Src/openmohaa/code/parser/generated/yyParser.cpp"
break;
case 42: /* expr: expr TOKEN_BITWISE_OR newline expr */
#line 170 "Z:/openmohaa/code/parser/bison_source.txt"
#line 170 "E:/Src/openmohaa/code/parser/bison_source.txt"
{ (yyval.s.val) = node4( sval_operation, node1b( OP_BIN_BITWISE_OR ), (yyvsp[-3].s.val), (yyvsp[0].s.val), YYLLOC ); }
#line 2039 "Z:/openmohaa/code/parser/generated/yyParser.cpp"
#line 2039 "E:/Src/openmohaa/code/parser/generated/yyParser.cpp"
break;
case 43: /* expr: expr TOKEN_EQUALITY newline expr */
#line 171 "Z:/openmohaa/code/parser/bison_source.txt"
#line 171 "E:/Src/openmohaa/code/parser/bison_source.txt"
{ (yyval.s.val) = node4( sval_operation, node1b( OP_BIN_EQUALITY ), (yyvsp[-3].s.val), (yyvsp[0].s.val), YYLLOC ); }
#line 2045 "Z:/openmohaa/code/parser/generated/yyParser.cpp"
#line 2045 "E:/Src/openmohaa/code/parser/generated/yyParser.cpp"
break;
case 44: /* expr: expr TOKEN_INEQUALITY newline expr */
#line 172 "Z:/openmohaa/code/parser/bison_source.txt"
#line 172 "E:/Src/openmohaa/code/parser/bison_source.txt"
{ (yyval.s.val) = node4( sval_operation, node1b( OP_BIN_INEQUALITY ), (yyvsp[-3].s.val), (yyvsp[0].s.val), YYLLOC ); }
#line 2051 "Z:/openmohaa/code/parser/generated/yyParser.cpp"
#line 2051 "E:/Src/openmohaa/code/parser/generated/yyParser.cpp"
break;
case 45: /* expr: expr TOKEN_LESS_THAN newline expr */
#line 173 "Z:/openmohaa/code/parser/bison_source.txt"
#line 173 "E:/Src/openmohaa/code/parser/bison_source.txt"
{ (yyval.s.val) = node4( sval_operation, node1b( OP_BIN_LESS_THAN ), (yyvsp[-3].s.val), (yyvsp[0].s.val), YYLLOC ); }
#line 2057 "Z:/openmohaa/code/parser/generated/yyParser.cpp"
#line 2057 "E:/Src/openmohaa/code/parser/generated/yyParser.cpp"
break;
case 46: /* expr: expr TOKEN_GREATER_THAN newline expr */
#line 174 "Z:/openmohaa/code/parser/bison_source.txt"
#line 174 "E:/Src/openmohaa/code/parser/bison_source.txt"
{ (yyval.s.val) = node4( sval_operation, node1b( OP_BIN_GREATER_THAN ), (yyvsp[-3].s.val), (yyvsp[0].s.val), YYLLOC ); }
#line 2063 "Z:/openmohaa/code/parser/generated/yyParser.cpp"
#line 2063 "E:/Src/openmohaa/code/parser/generated/yyParser.cpp"
break;
case 47: /* expr: expr TOKEN_LESS_THAN_OR_EQUAL newline expr */
#line 175 "Z:/openmohaa/code/parser/bison_source.txt"
#line 175 "E:/Src/openmohaa/code/parser/bison_source.txt"
{ (yyval.s.val) = node4( sval_operation, node1b( OP_BIN_LESS_THAN_OR_EQUAL ), (yyvsp[-3].s.val), (yyvsp[0].s.val), YYLLOC ); }
#line 2069 "Z:/openmohaa/code/parser/generated/yyParser.cpp"
#line 2069 "E:/Src/openmohaa/code/parser/generated/yyParser.cpp"
break;
case 48: /* expr: expr TOKEN_GREATER_THAN_OR_EQUAL newline expr */
#line 176 "Z:/openmohaa/code/parser/bison_source.txt"
#line 176 "E:/Src/openmohaa/code/parser/bison_source.txt"
{ (yyval.s.val) = node4( sval_operation, node1b( OP_BIN_GREATER_THAN_OR_EQUAL ), (yyvsp[-3].s.val), (yyvsp[0].s.val), YYLLOC ); }
#line 2075 "Z:/openmohaa/code/parser/generated/yyParser.cpp"
#line 2075 "E:/Src/openmohaa/code/parser/generated/yyParser.cpp"
break;
case 49: /* expr: expr TOKEN_PLUS newline expr */
#line 177 "Z:/openmohaa/code/parser/bison_source.txt"
#line 177 "E:/Src/openmohaa/code/parser/bison_source.txt"
{ (yyval.s.val) = node4( sval_operation, node1b( OP_BIN_PLUS ), (yyvsp[-3].s.val), (yyvsp[0].s.val), YYLLOC ); }
#line 2081 "Z:/openmohaa/code/parser/generated/yyParser.cpp"
#line 2081 "E:/Src/openmohaa/code/parser/generated/yyParser.cpp"
break;
case 50: /* expr: expr TOKEN_MINUS newline expr */
#line 178 "Z:/openmohaa/code/parser/bison_source.txt"
#line 178 "E:/Src/openmohaa/code/parser/bison_source.txt"
{ (yyval.s.val) = node4( sval_operation, node1b( OP_BIN_MINUS ), (yyvsp[-3].s.val), (yyvsp[0].s.val), YYLLOC ); }
#line 2087 "Z:/openmohaa/code/parser/generated/yyParser.cpp"
#line 2087 "E:/Src/openmohaa/code/parser/generated/yyParser.cpp"
break;
case 51: /* expr: expr TOKEN_MULTIPLY newline expr */
#line 179 "Z:/openmohaa/code/parser/bison_source.txt"
#line 179 "E:/Src/openmohaa/code/parser/bison_source.txt"
{ (yyval.s.val) = node4( sval_operation, node1b( OP_BIN_MULTIPLY ), (yyvsp[-3].s.val), (yyvsp[0].s.val), YYLLOC ); }
#line 2093 "Z:/openmohaa/code/parser/generated/yyParser.cpp"
#line 2093 "E:/Src/openmohaa/code/parser/generated/yyParser.cpp"
break;
case 52: /* expr: expr TOKEN_DIVIDE newline expr */
#line 180 "Z:/openmohaa/code/parser/bison_source.txt"
#line 180 "E:/Src/openmohaa/code/parser/bison_source.txt"
{ (yyval.s.val) = node4( sval_operation, node1b( OP_BIN_DIVIDE ), (yyvsp[-3].s.val), (yyvsp[0].s.val), YYLLOC ); }
#line 2099 "Z:/openmohaa/code/parser/generated/yyParser.cpp"
#line 2099 "E:/Src/openmohaa/code/parser/generated/yyParser.cpp"
break;
case 53: /* expr: expr TOKEN_MODULUS newline expr */
#line 181 "Z:/openmohaa/code/parser/bison_source.txt"
#line 181 "E:/Src/openmohaa/code/parser/bison_source.txt"
{ (yyval.s.val) = node4( sval_operation, node1b( OP_BIN_PERCENTAGE ), (yyvsp[-3].s.val), (yyvsp[0].s.val), YYLLOC ); }
#line 2105 "Z:/openmohaa/code/parser/generated/yyParser.cpp"
#line 2105 "E:/Src/openmohaa/code/parser/generated/yyParser.cpp"
break;
case 54: /* expr: expr TOKEN_SHIFT_LEFT newline expr */
#line 182 "Z:/openmohaa/code/parser/bison_source.txt"
#line 182 "E:/Src/openmohaa/code/parser/bison_source.txt"
{ (yyval.s.val) = node4( sval_operation, node1b( OP_BIN_SHIFT_LEFT ), (yyvsp[-3].s.val), (yyvsp[0].s.val), YYLLOC ); }
#line 2111 "Z:/openmohaa/code/parser/generated/yyParser.cpp"
#line 2111 "E:/Src/openmohaa/code/parser/generated/yyParser.cpp"
break;
case 55: /* expr: expr TOKEN_SHIFT_RIGHT newline expr */
#line 183 "Z:/openmohaa/code/parser/bison_source.txt"
#line 183 "E:/Src/openmohaa/code/parser/bison_source.txt"
{ (yyval.s.val) = node4( sval_operation, node1b( OP_BIN_SHIFT_RIGHT ), (yyvsp[-3].s.val), (yyvsp[0].s.val), YYLLOC ); }
#line 2117 "Z:/openmohaa/code/parser/generated/yyParser.cpp"
#line 2117 "E:/Src/openmohaa/code/parser/generated/yyParser.cpp"
break;
case 56: /* expr: expr TOKEN_TERNARY expr TOKEN_COLON expr */
#line 184 "Z:/openmohaa/code/parser/bison_source.txt"
#line 184 "E:/Src/openmohaa/code/parser/bison_source.txt"
{ (yyval.s.val) = node4( sval_ifelse, (yyvsp[-4].s.val), (yyvsp[-2].s.val), (yyvsp[0].s.val), YYLLOC ); }
#line 2123 "Z:/openmohaa/code/parser/generated/yyParser.cpp"
#line 2123 "E:/Src/openmohaa/code/parser/generated/yyParser.cpp"
break;
case 59: /* expr: identifier_prim */
#line 187 "Z:/openmohaa/code/parser/bison_source.txt"
#line 187 "E:/Src/openmohaa/code/parser/bison_source.txt"
{ (yyval.s.val) = node1( sval_store_string, (yyvsp[0].s).val ); }
#line 2129 "Z:/openmohaa/code/parser/generated/yyParser.cpp"
#line 2129 "E:/Src/openmohaa/code/parser/generated/yyParser.cpp"
break;
case 60: /* func_prim_expr: TOKEN_IDENTIFIER event_parameter_list_need */
#line 191 "Z:/openmohaa/code/parser/bison_source.txt"
#line 191 "E:/Src/openmohaa/code/parser/bison_source.txt"
{ (yyval.s.val) = node3( sval_cmd_default_ret, (yyvsp[-1].s).val, node1( sval_none, (yyvsp[0].s.val) ), node_pos( (yyvsp[-1].s).sourcePos ) ); }
#line 2135 "Z:/openmohaa/code/parser/generated/yyParser.cpp"
#line 2135 "E:/Src/openmohaa/code/parser/generated/yyParser.cpp"
break;
case 61: /* func_prim_expr: nonident_prim_expr TOKEN_IDENTIFIER event_parameter_list */
#line 193 "Z:/openmohaa/code/parser/bison_source.txt"
#line 193 "E:/Src/openmohaa/code/parser/bison_source.txt"
{ (yyval.s.val) = node4( sval_cmd_method_ret, (yyvsp[-2].s.val), (yyvsp[-1].s).val, node1( sval_none, (yyvsp[0].s.val) ), node_pos( (yyvsp[-1].s).sourcePos ) ); }
#line 2141 "Z:/openmohaa/code/parser/generated/yyParser.cpp"
#line 2141 "E:/Src/openmohaa/code/parser/generated/yyParser.cpp"
break;
case 62: /* func_prim_expr: TOKEN_NEG func_prim_expr */
#line 195 "Z:/openmohaa/code/parser/bison_source.txt"
#line 195 "E:/Src/openmohaa/code/parser/bison_source.txt"
{ (yyval.s.val) = node3( sval_func1, node1b( OP_UN_MINUS ), (yyvsp[0].s.val), YYLLOC ); }
#line 2147 "Z:/openmohaa/code/parser/generated/yyParser.cpp"
#line 2147 "E:/Src/openmohaa/code/parser/generated/yyParser.cpp"
break;
case 63: /* func_prim_expr: TOKEN_COMPLEMENT func_prim_expr */
#line 196 "Z:/openmohaa/code/parser/bison_source.txt"
#line 196 "E:/Src/openmohaa/code/parser/bison_source.txt"
{ (yyval.s.val) = node3( sval_func1, node1b( OP_UN_COMPLEMENT ), (yyvsp[0].s.val), YYLLOC ); }
#line 2153 "Z:/openmohaa/code/parser/generated/yyParser.cpp"
#line 2153 "E:/Src/openmohaa/code/parser/generated/yyParser.cpp"
break;
case 64: /* func_prim_expr: TOKEN_NOT func_prim_expr */
#line 197 "Z:/openmohaa/code/parser/bison_source.txt"
#line 197 "E:/Src/openmohaa/code/parser/bison_source.txt"
{ (yyval.s.val) = node2( sval_not, (yyvsp[0].s.val), YYLLOC ); }
#line 2159 "Z:/openmohaa/code/parser/generated/yyParser.cpp"
#line 2159 "E:/Src/openmohaa/code/parser/generated/yyParser.cpp"
break;
case 65: /* func_prim_expr: TOKEN_IDENTIFIER TOKEN_DOUBLE_COLON prim_expr */
#line 198 "Z:/openmohaa/code/parser/bison_source.txt"
#line 198 "E:/Src/openmohaa/code/parser/bison_source.txt"
{ (yyval.s.val) = node3( sval_constarray, node2( sval_store_string, (yyvsp[-2].s).val, node_pos( (yyvsp[-2].s).sourcePos ) ), (yyvsp[0].s.val), YYLLOC ); }
#line 2165 "Z:/openmohaa/code/parser/generated/yyParser.cpp"
#line 2165 "E:/Src/openmohaa/code/parser/generated/yyParser.cpp"
break;
case 66: /* func_prim_expr: nonident_prim_expr TOKEN_DOUBLE_COLON prim_expr */
#line 199 "Z:/openmohaa/code/parser/bison_source.txt"
#line 199 "E:/Src/openmohaa/code/parser/bison_source.txt"
{ (yyval.s.val) = node3( sval_constarray, (yyvsp[-2].s.val), (yyvsp[0].s.val), YYLLOC ); }
#line 2171 "Z:/openmohaa/code/parser/generated/yyParser.cpp"
#line 2171 "E:/Src/openmohaa/code/parser/generated/yyParser.cpp"
break;
case 67: /* func_prim_expr: TOKEN_MAKEARRAY newline makearray_statement_list newline TOKEN_ENDARRAY */
#line 200 "Z:/openmohaa/code/parser/bison_source.txt"
#line 200 "E:/Src/openmohaa/code/parser/bison_source.txt"
{ (yyval.s.val) = node1( sval_makearray, (yyvsp[-2].s.val) ); }
#line 2177 "Z:/openmohaa/code/parser/generated/yyParser.cpp"
#line 2177 "E:/Src/openmohaa/code/parser/generated/yyParser.cpp"
break;
case 68: /* event_parameter_list: %empty */
#line 204 "Z:/openmohaa/code/parser/bison_source.txt"
#line 204 "E:/Src/openmohaa/code/parser/bison_source.txt"
{ (yyval.s.val) = node0( sval_none ); }
#line 2183 "Z:/openmohaa/code/parser/generated/yyParser.cpp"
#line 2183 "E:/Src/openmohaa/code/parser/generated/yyParser.cpp"
break;
case 69: /* event_parameter_list: event_parameter_list prim_expr */
#line 205 "Z:/openmohaa/code/parser/bison_source.txt"
#line 205 "E:/Src/openmohaa/code/parser/bison_source.txt"
{ (yyval.s.val) = append_node( (yyvsp[-1].s.val), (yyvsp[0].s.val) ); }
#line 2189 "Z:/openmohaa/code/parser/generated/yyParser.cpp"
#line 2189 "E:/Src/openmohaa/code/parser/generated/yyParser.cpp"
break;
case 70: /* event_parameter_list: prim_expr */
#line 206 "Z:/openmohaa/code/parser/bison_source.txt"
#line 206 "E:/Src/openmohaa/code/parser/bison_source.txt"
{ (yyval.s.val) = linked_list_end( (yyvsp[0].s.val) ); }
#line 2195 "Z:/openmohaa/code/parser/generated/yyParser.cpp"
#line 2195 "E:/Src/openmohaa/code/parser/generated/yyParser.cpp"
break;
case 71: /* event_parameter_list_need: event_parameter_list_need prim_expr */
#line 210 "Z:/openmohaa/code/parser/bison_source.txt"
#line 210 "E:/Src/openmohaa/code/parser/bison_source.txt"
{ (yyval.s.val) = append_node( (yyvsp[-1].s.val), (yyvsp[0].s.val) ); }
#line 2201 "Z:/openmohaa/code/parser/generated/yyParser.cpp"
#line 2201 "E:/Src/openmohaa/code/parser/generated/yyParser.cpp"
break;
case 72: /* event_parameter_list_need: prim_expr */
#line 211 "Z:/openmohaa/code/parser/bison_source.txt"
#line 211 "E:/Src/openmohaa/code/parser/bison_source.txt"
{ (yyval.s.val) = linked_list_end( (yyvsp[0].s.val) ); }
#line 2207 "Z:/openmohaa/code/parser/generated/yyParser.cpp"
#line 2207 "E:/Src/openmohaa/code/parser/generated/yyParser.cpp"
break;
case 74: /* prim_expr: identifier_prim */
#line 216 "Z:/openmohaa/code/parser/bison_source.txt"
#line 216 "E:/Src/openmohaa/code/parser/bison_source.txt"
{ (yyval.s.val) = node1( sval_store_string, (yyvsp[0].s).val ); }
#line 2213 "Z:/openmohaa/code/parser/generated/yyParser.cpp"
#line 2213 "E:/Src/openmohaa/code/parser/generated/yyParser.cpp"
break;
case 75: /* prim_expr: prim_expr TOKEN_DOUBLE_COLON prim_expr */
#line 217 "Z:/openmohaa/code/parser/bison_source.txt"
#line 217 "E:/Src/openmohaa/code/parser/bison_source.txt"
{ (yyval.s.val) = node3( sval_constarray, (yyvsp[-2].s.val), (yyvsp[0].s.val), YYLLOC ); }
#line 2219 "Z:/openmohaa/code/parser/generated/yyParser.cpp"
#line 2219 "E:/Src/openmohaa/code/parser/generated/yyParser.cpp"
break;
case 76: /* nonident_prim_expr: TOKEN_DOLLAR TOKEN_LPAREN expr TOKEN_RPAREN */
#line 221 "Z:/openmohaa/code/parser/bison_source.txt"
#line 221 "E:/Src/openmohaa/code/parser/bison_source.txt"
{ (yyval.s.val) = node3( sval_func1, node1b( OP_UN_TARGETNAME ), (yyvsp[-1].s.val), YYLLOC ); }
#line 2225 "Z:/openmohaa/code/parser/generated/yyParser.cpp"
#line 2225 "E:/Src/openmohaa/code/parser/generated/yyParser.cpp"
break;
case 77: /* nonident_prim_expr: TOKEN_DOLLAR TOKEN_IDENTIFIER */
#line 222 "Z:/openmohaa/code/parser/bison_source.txt"
#line 222 "E:/Src/openmohaa/code/parser/bison_source.txt"
{ (yyval.s.val) = node3( sval_func1, node1b( OP_UN_TARGETNAME ), node1( sval_store_string, (yyvsp[0].s).val ), YYLLOC ); }
#line 2231 "Z:/openmohaa/code/parser/generated/yyParser.cpp"
#line 2231 "E:/Src/openmohaa/code/parser/generated/yyParser.cpp"
break;
case 78: /* nonident_prim_expr: TOKEN_DOLLAR TOKEN_STRING */
#line 223 "Z:/openmohaa/code/parser/bison_source.txt"
#line 223 "E:/Src/openmohaa/code/parser/bison_source.txt"
{ (yyval.s.val) = node3( sval_func1, node1b( OP_UN_TARGETNAME ), node1( sval_store_string, (yyvsp[0].s).val ), YYLLOC ); }
#line 2237 "Z:/openmohaa/code/parser/generated/yyParser.cpp"
#line 2237 "E:/Src/openmohaa/code/parser/generated/yyParser.cpp"
break;
case 79: /* nonident_prim_expr: nonident_prim_expr TOKEN_PERIOD TOKEN_IDENTIFIER */
#line 224 "Z:/openmohaa/code/parser/bison_source.txt"
#line 224 "E:/Src/openmohaa/code/parser/bison_source.txt"
{ (yyval.s.val) = node3( sval_field, (yyvsp[-2].s.val), (yyvsp[0].s).val, node_pos( (yyvsp[0].s).sourcePos ) ); }
#line 2243 "Z:/openmohaa/code/parser/generated/yyParser.cpp"
#line 2243 "E:/Src/openmohaa/code/parser/generated/yyParser.cpp"
break;
case 80: /* nonident_prim_expr: nonident_prim_expr TOKEN_PERIOD TOKEN_STRING */
#line 225 "Z:/openmohaa/code/parser/bison_source.txt"
#line 225 "E:/Src/openmohaa/code/parser/bison_source.txt"
{ (yyval.s.val) = node3( sval_field, (yyvsp[-2].s.val), (yyvsp[0].s).val, node_pos( (yyvsp[0].s).sourcePos ) ); }
#line 2249 "Z:/openmohaa/code/parser/generated/yyParser.cpp"
#line 2249 "E:/Src/openmohaa/code/parser/generated/yyParser.cpp"
break;
case 81: /* nonident_prim_expr: nonident_prim_expr TOKEN_PERIOD TOKEN_SIZE */
#line 226 "Z:/openmohaa/code/parser/bison_source.txt"
#line 226 "E:/Src/openmohaa/code/parser/bison_source.txt"
{ (yyval.s.val) = node3( sval_func1, node1b( OP_UN_SIZE ), (yyvsp[-2].s.val), YYLLOC ); }
#line 2255 "Z:/openmohaa/code/parser/generated/yyParser.cpp"
#line 2255 "E:/Src/openmohaa/code/parser/generated/yyParser.cpp"
break;
case 82: /* nonident_prim_expr: nonident_prim_expr TOKEN_LSQUARE expr TOKEN_RSQUARE */
#line 227 "Z:/openmohaa/code/parser/bison_source.txt"
#line 227 "E:/Src/openmohaa/code/parser/bison_source.txt"
{ (yyval.s.val) = node3( sval_array, (yyvsp[-3].s.val), (yyvsp[-1].s.val), (yyvsp[-3].s.val) ); }
#line 2261 "Z:/openmohaa/code/parser/generated/yyParser.cpp"
#line 2261 "E:/Src/openmohaa/code/parser/generated/yyParser.cpp"
break;
case 83: /* nonident_prim_expr: TOKEN_STRING */
#line 228 "Z:/openmohaa/code/parser/bison_source.txt"
#line 228 "E:/Src/openmohaa/code/parser/bison_source.txt"
{ (yyval.s.val) = node1( sval_store_string, (yyvsp[0].s).val ); }
#line 2267 "Z:/openmohaa/code/parser/generated/yyParser.cpp"
#line 2267 "E:/Src/openmohaa/code/parser/generated/yyParser.cpp"
break;
case 85: /* nonident_prim_expr: TOKEN_LPAREN expr expr expr TOKEN_RPAREN */
#line 230 "Z:/openmohaa/code/parser/bison_source.txt"
#line 230 "E:/Src/openmohaa/code/parser/bison_source.txt"
{ (yyval.s.val) = node4( sval_calc_vector, (yyvsp[-3].s.val), (yyvsp[-2].s.val), (yyvsp[-1].s.val), YYLLOC ); }
#line 2273 "Z:/openmohaa/code/parser/generated/yyParser.cpp"
#line 2273 "E:/Src/openmohaa/code/parser/generated/yyParser.cpp"
break;
case 86: /* nonident_prim_expr: TOKEN_LISTENER */
#line 231 "Z:/openmohaa/code/parser/bison_source.txt"
#line 231 "E:/Src/openmohaa/code/parser/bison_source.txt"
{ (yyval.s.val) = node2( sval_store_method, (yyvsp[0].s).val, YYLLOC ); }
#line 2279 "Z:/openmohaa/code/parser/generated/yyParser.cpp"
#line 2279 "E:/Src/openmohaa/code/parser/generated/yyParser.cpp"
break;
case 87: /* nonident_prim_expr: TOKEN_LPAREN expr TOKEN_RPAREN */
#line 232 "Z:/openmohaa/code/parser/bison_source.txt"
#line 232 "E:/Src/openmohaa/code/parser/bison_source.txt"
{ (yyval.s.val) = (yyvsp[-1].s.val); }
#line 2285 "Z:/openmohaa/code/parser/generated/yyParser.cpp"
#line 2285 "E:/Src/openmohaa/code/parser/generated/yyParser.cpp"
break;
case 88: /* nonident_prim_expr: TOKEN_LPAREN TOKEN_RPAREN */
#line 233 "Z:/openmohaa/code/parser/bison_source.txt"
#line 233 "E:/Src/openmohaa/code/parser/bison_source.txt"
{ (yyval.s.val) = node0( sval_none ); }
#line 2291 "Z:/openmohaa/code/parser/generated/yyParser.cpp"
#line 2291 "E:/Src/openmohaa/code/parser/generated/yyParser.cpp"
break;
case 89: /* nonident_prim_expr: TOKEN_NEG nonident_prim_expr */
#line 234 "Z:/openmohaa/code/parser/bison_source.txt"
#line 234 "E:/Src/openmohaa/code/parser/bison_source.txt"
{ (yyval.s.val) = node3( sval_func1, node1b( OP_UN_MINUS ), (yyvsp[0].s.val), YYLLOC ); }
#line 2297 "Z:/openmohaa/code/parser/generated/yyParser.cpp"
#line 2297 "E:/Src/openmohaa/code/parser/generated/yyParser.cpp"
break;
case 90: /* nonident_prim_expr: TOKEN_COMPLEMENT nonident_prim_expr */
#line 235 "Z:/openmohaa/code/parser/bison_source.txt"
#line 235 "E:/Src/openmohaa/code/parser/bison_source.txt"
{ (yyval.s.val) = node3( sval_func1, node1b( OP_UN_COMPLEMENT ), (yyvsp[0].s.val), YYLLOC ); }
#line 2303 "Z:/openmohaa/code/parser/generated/yyParser.cpp"
#line 2303 "E:/Src/openmohaa/code/parser/generated/yyParser.cpp"
break;
case 91: /* nonident_prim_expr: TOKEN_NOT nonident_prim_expr */
#line 236 "Z:/openmohaa/code/parser/bison_source.txt"
#line 236 "E:/Src/openmohaa/code/parser/bison_source.txt"
{ (yyval.s.val) = node2( sval_not, (yyvsp[0].s.val), YYLLOC ); }
#line 2309 "Z:/openmohaa/code/parser/generated/yyParser.cpp"
#line 2309 "E:/Src/openmohaa/code/parser/generated/yyParser.cpp"
break;
case 92: /* nonident_prim_expr: TOKEN_NULL */
#line 237 "Z:/openmohaa/code/parser/bison_source.txt"
#line 237 "E:/Src/openmohaa/code/parser/bison_source.txt"
{ (yyval.s.val) = node1( sval_store_null, YYLLOC ); }
#line 2315 "Z:/openmohaa/code/parser/generated/yyParser.cpp"
#line 2315 "E:/Src/openmohaa/code/parser/generated/yyParser.cpp"
break;
case 93: /* nonident_prim_expr: TOKEN_NIL */
#line 238 "Z:/openmohaa/code/parser/bison_source.txt"
#line 238 "E:/Src/openmohaa/code/parser/bison_source.txt"
{ (yyval.s.val) = node1( sval_store_nil, YYLLOC ); }
#line 2321 "Z:/openmohaa/code/parser/generated/yyParser.cpp"
#line 2321 "E:/Src/openmohaa/code/parser/generated/yyParser.cpp"
break;
case 94: /* number: TOKEN_FLOAT */
#line 242 "Z:/openmohaa/code/parser/bison_source.txt"
#line 242 "E:/Src/openmohaa/code/parser/bison_source.txt"
{ (yyval.s.val) = node1( sval_store_float, (yyvsp[0].s).val ); }
#line 2327 "Z:/openmohaa/code/parser/generated/yyParser.cpp"
#line 2327 "E:/Src/openmohaa/code/parser/generated/yyParser.cpp"
break;
case 95: /* number: TOKEN_INTEGER */
#line 243 "Z:/openmohaa/code/parser/bison_source.txt"
#line 243 "E:/Src/openmohaa/code/parser/bison_source.txt"
{ (yyval.s.val) = node1( sval_store_integer, (yyvsp[0].s).val ); }
#line 2333 "Z:/openmohaa/code/parser/generated/yyParser.cpp"
#line 2333 "E:/Src/openmohaa/code/parser/generated/yyParser.cpp"
break;
case 97: /* makearray_statement_list: %empty */
#line 251 "Z:/openmohaa/code/parser/bison_source.txt"
#line 251 "E:/Src/openmohaa/code/parser/bison_source.txt"
{ (yyval.s.val) = node0( sval_none ); }
#line 2339 "Z:/openmohaa/code/parser/generated/yyParser.cpp"
#line 2339 "E:/Src/openmohaa/code/parser/generated/yyParser.cpp"
break;
case 98: /* makearray_statement_list: makearray_statement_list makearray_statement newline */
#line 252 "Z:/openmohaa/code/parser/bison_source.txt"
#line 252 "E:/Src/openmohaa/code/parser/bison_source.txt"
{ (yyval.s.val) = append_node( (yyvsp[-2].s.val), node1( sval_makearray, (yyvsp[-1].s.val) ) ); }
#line 2345 "Z:/openmohaa/code/parser/generated/yyParser.cpp"
#line 2345 "E:/Src/openmohaa/code/parser/generated/yyParser.cpp"
break;
case 99: /* makearray_statement_list: makearray_statement newline */
#line 253 "Z:/openmohaa/code/parser/bison_source.txt"
#line 253 "E:/Src/openmohaa/code/parser/bison_source.txt"
{ (yyval.s.val) = linked_list_end( node1( sval_makearray, (yyvsp[-1].s.val) ) ); }
#line 2351 "Z:/openmohaa/code/parser/generated/yyParser.cpp"
#line 2351 "E:/Src/openmohaa/code/parser/generated/yyParser.cpp"
break;
case 100: /* makearray_statement: prim_expr */
#line 257 "Z:/openmohaa/code/parser/bison_source.txt"
#line 257 "E:/Src/openmohaa/code/parser/bison_source.txt"
{ (yyval.s.val) = linked_list_end( (yyvsp[0].s.val) ); }
#line 2357 "Z:/openmohaa/code/parser/generated/yyParser.cpp"
#line 2357 "E:/Src/openmohaa/code/parser/generated/yyParser.cpp"
break;
case 101: /* makearray_statement: makearray_statement prim_expr */
#line 258 "Z:/openmohaa/code/parser/bison_source.txt"
#line 258 "E:/Src/openmohaa/code/parser/bison_source.txt"
{ (yyval.s.val) = append_node( (yyvsp[-1].s.val), (yyvsp[0].s.val) ); }
#line 2363 "Z:/openmohaa/code/parser/generated/yyParser.cpp"
#line 2363 "E:/Src/openmohaa/code/parser/generated/yyParser.cpp"
break;
case 102: /* newline: %empty */
#line 262 "Z:/openmohaa/code/parser/bison_source.txt"
#line 262 "E:/Src/openmohaa/code/parser/bison_source.txt"
{}
#line 2369 "Z:/openmohaa/code/parser/generated/yyParser.cpp"
#line 2369 "E:/Src/openmohaa/code/parser/generated/yyParser.cpp"
break;
#line 2373 "Z:/openmohaa/code/parser/generated/yyParser.cpp"
#line 2373 "E:/Src/openmohaa/code/parser/generated/yyParser.cpp"
default: break;
}
@@ -2593,5 +2593,5 @@ yyreturnlab:
return yyresult;
}
#line 266 "Z:/openmohaa/code/parser/bison_source.txt"
#line 266 "E:/Src/openmohaa/code/parser/bison_source.txt"
+5 -5
View File
@@ -35,8 +35,8 @@
especially those whose name start with YY_ or yy_. They are
private implementation details that can be changed or removed. */
#ifndef YY_YY_Z_OPENMOHAA_CODE_PARSER_GENERATED_YYPARSER_HPP_INCLUDED
# define YY_YY_Z_OPENMOHAA_CODE_PARSER_GENERATED_YYPARSER_HPP_INCLUDED
#ifndef YY_YY_E_SRC_OPENMOHAA_CODE_PARSER_GENERATED_YYPARSER_HPP_INCLUDED
# define YY_YY_E_SRC_OPENMOHAA_CODE_PARSER_GENERATED_YYPARSER_HPP_INCLUDED
/* Debug traces. */
#ifndef YYDEBUG
# define YYDEBUG 0
@@ -134,11 +134,11 @@ extern int yydebug;
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
union YYSTYPE
{
#line 50 "Z:/openmohaa/code/parser/bison_source.txt"
#line 50 "E:/Src/openmohaa/code/parser/bison_source.txt"
stype_t s;
#line 142 "Z:/openmohaa/code/parser/generated/yyParser.hpp"
#line 142 "E:/Src/openmohaa/code/parser/generated/yyParser.hpp"
};
typedef union YYSTYPE YYSTYPE;
@@ -153,4 +153,4 @@ extern YYSTYPE yylval;
int yyparse (void);
#endif /* !YY_YY_Z_OPENMOHAA_CODE_PARSER_GENERATED_YYPARSER_HPP_INCLUDED */
#endif /* !YY_YY_E_SRC_OPENMOHAA_CODE_PARSER_GENERATED_YYPARSER_HPP_INCLUDED */
+3
View File
@@ -5,6 +5,8 @@ if(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.13.0")
cmake_policy(SET CMP0076 NEW)
endif()
include("./q_version.cmake")
# Shared source files for modules
set(SOURCES_SHARED
"${CMAKE_SOURCE_DIR}/code/qcommon/class.cpp"
@@ -28,6 +30,7 @@ target_compile_definitions(qcommon INTERFACE TARGET_GAME_TYPE=${TARGET_GAME_TYPE
target_include_directories(qcommon INTERFACE "../qcommon" "../script")
target_compile_features(qcommon INTERFACE cxx_nullptr)
target_compile_features(qcommon INTERFACE c_variadic_macros)
target_link_libraries(qcommon INTERFACE qcommon_version)
# Source files for standalone executable
set(SOURCES_COMMON
+246 -9
View File
@@ -23,6 +23,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#include "q_shared.h"
#include "qcommon.h"
#include "q_version.h"
#include <setjmp.h>
#ifndef _WIN32
#include <netinet/in.h>
@@ -129,11 +130,13 @@ int time_frontend; // renderer frontend time
int time_backend; // renderer backend time
int com_frameTime;
int com_frameMsec;
int com_frameNumber;
int com_frameMsec;
qboolean com_errorEntered;
qboolean com_fullyInitialized;
qboolean com_errorEntered = qfalse;
qboolean com_fullyInitialized = qfalse;
qboolean com_gameRestarting = qfalse;
qboolean com_gameClientRestarting = qfalse;
char com_errorMessage[MAXPRINTMSG];
@@ -1272,6 +1275,128 @@ static void Com_Crash_f(void) {
*(int*)invalid_ptr = 0x12345678;
}
/*
==================
Com_Setenv_f
For controlling environment variables
==================
*/
void Com_Setenv_f(void)
{
int argc = Cmd_Argc();
char *arg1 = Cmd_Argv(1);
if(argc > 2)
{
char *arg2 = Cmd_ArgsFrom(2);
Sys_SetEnv(arg1, arg2);
}
else if(argc == 2)
{
char *env = getenv(arg1);
if(env)
Com_Printf("%s=%s\n", arg1, env);
else
Com_Printf("%s undefined\n", arg1);
}
}
/*
==================
Com_ExecuteCfg
For controlling environment variables
==================
*/
void Com_ExecuteCfg(void)
{
Cbuf_ExecuteText(EXEC_NOW, "exec default.cfg\n");
Cbuf_Execute(0); // Always execute after exec to prevent text buffer overflowing
if(!Com_SafeMode())
{
// skip the q3config.cfg and autoexec.cfg if "safe" is on the command line
Cbuf_ExecuteText(EXEC_NOW, "exec " Q3CONFIG_CFG "\n");
Cbuf_Execute(0);
Cbuf_ExecuteText(EXEC_NOW, "exec autoexec.cfg\n");
Cbuf_Execute(0);
}
}
/*
==================
Com_GameRestart
Change to a new mod properly with cleaning up cvars before switching.
==================
*/
void Com_GameRestart(int checksumFeed, qboolean disconnect)
{
// make sure no recursion can be triggered
if(!com_gameRestarting && com_fullyInitialized)
{
com_gameRestarting = qtrue;
com_gameClientRestarting = com_cl_running->integer;
// Kill server if we have one
if(com_sv_running->integer)
SV_Shutdown("Game directory changed");
if(com_gameClientRestarting)
{
if(disconnect)
CL_Disconnect(qfalse);
CL_Shutdown("Game directory changed", disconnect, qfalse);
}
FS_Restart(checksumFeed);
// Clean out any user and VM created cvars
Cvar_Restart(qtrue);
Com_ExecuteCfg();
if(disconnect)
{
// We don't want to change any network settings if gamedir
// change was triggered by a connect to server because the
// new network settings might make the connection fail.
NET_Restart_f();
}
if(com_gameClientRestarting)
{
CL_Init();
CL_StartHunkUsers(qfalse);
}
com_gameRestarting = qfalse;
com_gameClientRestarting = qfalse;
}
}
/*
==================
Com_GameRestart_f
Expose possibility to change current running mod to the user
==================
*/
void Com_GameRestart_f(void)
{
Cvar_Set("fs_game", Cmd_Argv(1));
Com_GameRestart(0, qtrue);
}
#ifndef STANDALONE
// TTimo: centralizing the cl_cdkey stuff after I discovered a buffer overflow problem with the dedicated server version
// not sure it's necessary to have different defaults for regular and dedicated, but I don't want to risk it
// https://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=470
@@ -1281,6 +1406,118 @@ char cl_cdkey[34] = " ";
char cl_cdkey[34] = "123456789";
#endif
/*
=================
Com_ReadCDKey
=================
*/
qboolean CL_CDKeyValidate( const char *key, const char *checksum );
void Com_ReadCDKey( const char *filename ) {
fileHandle_t f;
char buffer[33];
char fbuffer[MAX_OSPATH];
Com_sprintf(fbuffer, sizeof(fbuffer), "%s/q3key", filename);
FS_SV_FOpenFileRead( fbuffer, &f );
if ( !f ) {
Com_Memset( cl_cdkey, '\0', 17 );
return;
}
Com_Memset( buffer, 0, sizeof(buffer) );
FS_Read( buffer, 16, f );
FS_FCloseFile( f );
if (CL_CDKeyValidate(buffer, NULL)) {
Q_strncpyz( cl_cdkey, buffer, 17 );
} else {
Com_Memset( cl_cdkey, '\0', 17 );
}
}
/*
=================
Com_AppendCDKey
=================
*/
void Com_AppendCDKey( const char *filename ) {
fileHandle_t f;
char buffer[33];
char fbuffer[MAX_OSPATH];
Com_sprintf(fbuffer, sizeof(fbuffer), "%s/q3key", filename);
FS_SV_FOpenFileRead( fbuffer, &f );
if (!f) {
Com_Memset( &cl_cdkey[16], '\0', 17 );
return;
}
Com_Memset( buffer, 0, sizeof(buffer) );
FS_Read( buffer, 16, f );
FS_FCloseFile( f );
if (CL_CDKeyValidate(buffer, NULL)) {
strcat( &cl_cdkey[16], buffer );
} else {
Com_Memset( &cl_cdkey[16], '\0', 17 );
}
}
#ifndef DEDICATED
/*
=================
Com_WriteCDKey
=================
*/
static void Com_WriteCDKey( const char *filename, const char *ikey ) {
fileHandle_t f;
char fbuffer[MAX_OSPATH];
char key[17];
#ifndef _WIN32
mode_t savedumask;
#endif
Com_sprintf(fbuffer, sizeof(fbuffer), "%s/q3key", filename);
Q_strncpyz( key, ikey, 17 );
if(!CL_CDKeyValidate(key, NULL) ) {
return;
}
#ifndef _WIN32
savedumask = umask(0077);
#endif
f = FS_SV_FOpenFileWrite( fbuffer );
if ( !f ) {
Com_Printf ("Couldn't write CD key to %s.\n", fbuffer );
goto out;
}
FS_Write( key, 16, f );
FS_Printf( f, "\n// generated by quake, do not modify\r\n" );
FS_Printf( f, "// Do not give this file to ANYONE.\r\n" );
FS_Printf( f, "// id Software and Activision will NOT ask you to send this file to them.\r\n");
FS_FCloseFile( f );
out:
#ifndef _WIN32
umask(savedumask);
#else
;
#endif
}
#endif
#endif // STANDALONE
static void Com_DetectAltivec(void)
{
// Only detect if user hasn't forcibly disabled it.
@@ -1313,7 +1550,7 @@ void Com_Init( char *commandLine ) {
iStart = Sys_Milliseconds();
Com_Printf( "%s %s %s\n", PRODUCT_VERSION_FULL, PLATFORM_STRING, __DATE__ );
Com_Printf( "%s %s (extension %s) %s %s\n", PRODUCT_NAME, PRODUCT_VERSION_FULL, PRODUCT_EXTENSION, PLATFORM_STRING, PRODUCT_VERSION_DATE );
if ( setjmp (abortframe) ) {
Sys_Error("Error during initialization");
@@ -1341,7 +1578,9 @@ void Com_Init( char *commandLine ) {
// done early so bind command exists
CL_InitKeyCommands();
com_homepath = Cvar_Get("com_homepath", "", CVAR_INIT|CVAR_ROM);
com_standalone = Cvar_Get("com_standalone", "0", CVAR_ROM);
com_basegame = Cvar_Get("com_basegame", BASEGAME, CVAR_INIT);
com_homepath = Cvar_Get("com_homepath", "", CVAR_INIT|CVAR_PROTECTED);
FS_InitFilesystem ();
@@ -1465,9 +1704,9 @@ void Com_Init( char *commandLine ) {
}
}
s = va( "%s %s %s", PRODUCT_VERSION_FULL, PLATFORM_STRING, PRODUCT_DATE );
s = va( "%s %s %s", PRODUCT_VERSION_FULL, PLATFORM_STRING, PRODUCT_VERSION_DATE );
com_version = Cvar_Get( "version", s, CVAR_ROM | CVAR_SERVERINFO );
com_shortversion = Cvar_Get( "shortversion", TARGET_GAME_VERSION, CVAR_ROM );
com_shortversion = Cvar_Get( "shortversion", PRODUCT_VERSION, CVAR_ROM );
com_gamename = Cvar_Get("com_gamename", TARGET_GAME_NAME, CVAR_SERVERINFO | CVAR_INIT);
com_protocol = Cvar_Get("com_protocol", va("%i", PROTOCOL_VERSION), CVAR_SERVERINFO | CVAR_INIT);
#ifdef LEGACY_PROTOCOL
@@ -1516,8 +1755,6 @@ void Com_Init( char *commandLine ) {
com_fullyInitialized = qtrue;
SaveRegistryInfo( qtrue, "basepath", fs_basepath->string, 128 );
RecoverLostAutodialData();
iEnd = Sys_Milliseconds();
+1101 -566
View File
File diff suppressed because it is too large. Load diff
+1 -1
View File
@@ -158,7 +158,7 @@ void *Z_TagMalloc( int size, int tag )
if( size <= 0 )
{
//Z_Meminfo_f();
Com_DPrintf( "Z_TagMalloc, Negative or zero size %zu tag %i\n", size, tag );
Com_DPrintf( "Z_TagMalloc, Negative or zero size %d tag %i\n", size, tag );
return NULL;
}
+1 -1
View File
@@ -1069,7 +1069,7 @@ void NET_OpenSocks( int port ) {
struct hostent *h;
int len;
qboolean rfc1929;
unsigned char buf[64];
unsigned char buf[64] = { 0 };
usingSocks = qfalse;
+72 -72
View File
@@ -196,7 +196,7 @@ float grandom( void ) {
s = v1 * v1 + v2 * v2;
} while( s >= 1.0 || s == 0 );
s = sqrt( -2.0 * log( s ) / s );
s = sqrtf( -2.0 * log( s ) / s );
x1 = v1 * s;
x2 = v2 * s;
toggle = 1;
@@ -565,7 +565,7 @@ vec_t PlaneNormalize(vec4_t plane)
{
vec_t length, ilength;
length = sqrt(plane[0] * plane[0] + plane[1] * plane[1] + plane[2] * plane[2]);
length = sqrtf(plane[0] * plane[0] + plane[1] * plane[1] + plane[2] * plane[2]);
if(length == 0)
{
VectorClear(plane);
@@ -631,10 +631,10 @@ void RotatePointAroundVector( vec3_t dst, const vec3_t dir, const vec3_t point,
zrot[0][0] = zrot[1][1] = zrot[2][2] = 1.0F;
rad = DEG2RAD( degrees );
zrot[0][0] = cos( rad );
zrot[0][1] = sin( rad );
zrot[1][0] = -sin( rad );
zrot[1][1] = cos( rad );
zrot[0][0] = cosf( rad );
zrot[0][1] = sinf( rad );
zrot[1][0] = -sinf( rad );
zrot[1][1] = cosf( rad );
Matrix3x3Multiply( m, zrot, tmpmat );
Matrix3x3Multiply( tmpmat, im, rot );
@@ -726,7 +726,7 @@ void VectorToAngles( const vec3_t vec, vec3_t angles )
if( yaw < 0 ) {
yaw += 360;
}
forward = sqrt( 1.0f - vec[ 2 ] * vec[ 2 ] );
forward = sqrtf( 1.0f - vec[ 2 ] * vec[ 2 ] );
pitch = ( atan2( vec[ 2 ], forward ) * -( 180.0f / M_PI ) );
if( pitch < 0 ) {
pitch += 360;
@@ -749,14 +749,14 @@ void AnglesToAxis( const vec3_t angles, vec3_t axis[3] ) {
// static to help MS compiler fp bugs
angle = angles[ YAW ] * ( M_PI * 2 / 360 );
sy = sin( angle );
cy = cos( angle );
sy = sinf( angle );
cy = cosf( angle );
angle = angles[ PITCH ] * ( M_PI * 2 / 360 );
sp = sin( angle );
cp = cos( angle );
sp = sinf( angle );
cp = cosf( angle );
angle = angles[ ROLL ] * ( M_PI * 2 / 360 );
sr = sin( angle );
cr = cos( angle );
sr = sinf( angle );
cr = cosf( angle );
axis[ 0 ][ 0 ] = cp*cy;
axis[ 0 ][ 1 ] = cp*sy;
@@ -883,7 +883,7 @@ the msvc acos doesn't always return a value between -PI and PI:
int i;
i = 1065353246;
acos(*(float*) &i) == -1.#IND0
acosf(*(float*) &i) == -1.#IND0
This should go in q_math but it is too late to add new traps
to game and ui
@@ -892,7 +892,7 @@ acos(*(float*) &i) == -1.#IND0
float Q_acos(float c) {
float angle;
angle = acos(c);
angle = acosf(c);
if (angle > M_PI) {
return (float)M_PI;
@@ -1619,7 +1619,7 @@ void MatToQuat
if( trace > 0.0 )
{
s = sqrt( trace + 1.0 );
s = sqrtf( trace + 1.0 );
destQuat[ W ] = s * 0.5;
s = 0.5 / s;
@@ -1858,7 +1858,7 @@ vec_t VectorNormalize2D2( const vec2_t v, vec2_t out ) {
float length, ilength;
length = v[ 0 ] * v[ 0 ] + v[ 1 ] * v[ 1 ];
length = sqrt( length );
length = sqrtf( length );
if( length )
{
@@ -2039,14 +2039,14 @@ void AngleVectors( const vec3_t angles, vec3_t forward, vec3_t right, vec3_t up
// static to help MS compiler fp bugs
angle = angles[ YAW ] * ( M_PI * 2 / 360 );
sy = sin( angle );
cy = cos( angle );
sy = sinf( angle );
cy = cosf( angle );
angle = angles[ PITCH ] * ( M_PI * 2 / 360 );
sp = sin( angle );
cp = cos( angle );
sp = sinf( angle );
cp = cosf( angle );
angle = angles[ ROLL ] * ( M_PI * 2 / 360 );
sr = sin( angle );
cr = cos( angle );
sr = sinf( angle );
cr = cosf( angle );
if( forward )
{
@@ -2075,11 +2075,11 @@ void AngleVectorsLeft( const vec3_t angles, vec3_t forward, vec3_t left, vec3_t
// static to help MS compiler fp bugs
angle = angles[ YAW ] * ( M_PI * 2 / 360 );
sy = sin( angle );
cy = cos( angle );
sy = sinf( angle );
cy = cosf( angle );
angle = angles[ PITCH ] * ( M_PI * 2 / 360 );
sp = sin( angle );
cp = cos( angle );
sp = sinf( angle );
cp = cosf( angle );
if( forward )
{
@@ -2091,8 +2091,8 @@ void AngleVectorsLeft( const vec3_t angles, vec3_t forward, vec3_t left, vec3_t
if( left || up )
{
angle = angles[ ROLL ] * ( M_PI * 2 / 360 );
sr = sin( angle );
cr = cos( angle );
sr = sinf( angle );
cr = cosf( angle );
if( left )
{
@@ -2360,7 +2360,7 @@ Return the smallest distance between two line segments
*/
vec_t DistanceBetweenLineSegments(const vec3_t sP0, const vec3_t sP1, const vec3_t tP0, const vec3_t tP1, float *s, float *t)
{
return (vec_t) sqrt(DistanceBetweenLineSegmentsSquared(sP0, sP1, tP0, tP1, s, t));
return (vec_t) sqrtf(DistanceBetweenLineSegmentsSquared(sP0, sP1, tP0, tP1, s, t));
}
void VectorMatrixInverse( void* DstMatrix, const void* SrcMatrix )
@@ -2705,8 +2705,8 @@ void MatrixSetupXRotation(matrix_t m, vec_t degrees)
vec_t a = DEG2RAD(degrees);
m[ 0] = 1; m[ 4] = 0; m[ 8] = 0; m[12] = 0;
m[ 1] = 0; m[ 5] = cos(a); m[ 9] =-sin(a); m[13] = 0;
m[ 2] = 0; m[ 6] = sin(a); m[10] = cos(a); m[14] = 0;
m[ 1] = 0; m[ 5] = cosf(a); m[ 9] =-sinf(a); m[13] = 0;
m[ 2] = 0; m[ 6] = sinf(a); m[10] = cosf(a); m[14] = 0;
m[ 3] = 0; m[ 7] = 0; m[11] = 0; m[15] = 1;
}
@@ -2714,9 +2714,9 @@ void MatrixSetupYRotation(matrix_t m, vec_t degrees)
{
vec_t a = DEG2RAD(degrees);
m[ 0] = cos(a); m[ 4] = 0; m[ 8] = sin(a); m[12] = 0;
m[ 0] = cosf(a); m[ 4] = 0; m[ 8] = sinf(a); m[12] = 0;
m[ 1] = 0; m[ 5] = 1; m[ 9] = 0; m[13] = 0;
m[ 2] =-sin(a); m[ 6] = 0; m[10] = cos(a); m[14] = 0;
m[ 2] =-sinf(a); m[ 6] = 0; m[10] = cosf(a); m[14] = 0;
m[ 3] = 0; m[ 7] = 0; m[11] = 0; m[15] = 1;
}
@@ -2724,8 +2724,8 @@ void MatrixSetupZRotation(matrix_t m, vec_t degrees)
{
vec_t a = DEG2RAD(degrees);
m[ 0] = cos(a); m[ 4] =-sin(a); m[ 8] = 0; m[12] = 0;
m[ 1] = sin(a); m[ 5] = cos(a); m[ 9] = 0; m[13] = 0;
m[ 0] = cosf(a); m[ 4] =-sinf(a); m[ 8] = 0; m[12] = 0;
m[ 1] = sinf(a); m[ 5] = cosf(a); m[ 9] = 0; m[13] = 0;
m[ 2] = 0; m[ 6] = 0; m[10] = 1; m[14] = 0;
m[ 3] = 0; m[ 7] = 0; m[11] = 0; m[15] = 1;
}
@@ -2927,8 +2927,8 @@ void MatrixToAngles(const matrix_t m, vec3_t angles)
sp = -1.0;
}
theta = -asin(sp);
cp = cos(theta);
theta = -asinf(sp);
cp = cosf(theta);
if(cp > 8192 * FLT_EPSILON)
{
@@ -2946,8 +2946,8 @@ void MatrixToAngles(const matrix_t m, vec3_t angles)
double a;
double ca;
a = asin(-m[2]);
ca = cos(a);
a = asinf(-m[2]);
ca = cosf(a);
if(fabs(ca) > 0.005) // Gimbal lock?
{
@@ -2971,14 +2971,14 @@ void MatrixFromAngles(matrix_t m, vec_t pitch, vec_t yaw, vec_t roll)
static float sr, sp, sy, cr, cp, cy;
// static to help MS compiler fp bugs
sp = sin(DEG2RAD(pitch));
cp = cos(DEG2RAD(pitch));
sp = sinf(DEG2RAD(pitch));
cp = cosf(DEG2RAD(pitch));
sy = sin(DEG2RAD(yaw));
cy = cos(DEG2RAD(yaw));
sy = sinf(DEG2RAD(yaw));
cy = cosf(DEG2RAD(yaw));
sr = sin(DEG2RAD(roll));
cr = cos(DEG2RAD(roll));
sr = sinf(DEG2RAD(roll));
cr = cosf(DEG2RAD(roll));
m[ 0] = cp*cy; m[ 4] = (sr*sp*cy+cr*-sy); m[ 8] = (cr*sp*cy+-sr*-sy); m[12] = 0;
m[ 1] = cp*sy; m[ 5] = (sr*sp*sy+cr*cy); m[ 9] = (cr*sp*sy+-sr*cy); m[13] = 0;
@@ -3626,7 +3626,7 @@ vec_t QuatNormalize(quat_t q)
float length, ilength;
length = q[0] * q[0] + q[1] * q[1] + q[2] * q[2] + q[3] * q[3];
length = sqrt(length);
length = sqrtf(length);
if(length)
{
@@ -3651,14 +3651,14 @@ void QuatFromAngles(quat_t q, vec_t pitch, vec_t yaw, vec_t roll)
static float sr, sp, sy, cr, cp, cy;
// static to help MS compiler fp bugs
sp = sin(DEG2RAD(pitch));
cp = cos(DEG2RAD(pitch));
sp = sinf(DEG2RAD(pitch));
cp = cosf(DEG2RAD(pitch));
sy = sin(DEG2RAD(yaw));
cy = cos(DEG2RAD(yaw));
sy = sinf(DEG2RAD(yaw));
cy = cosf(DEG2RAD(yaw));
sr = sin(DEG2RAD(roll));
cr = cos(DEG2RAD(roll));
sr = sinf(DEG2RAD(roll));
cr = cosf(DEG2RAD(roll));
q[0] = sr * cp * cy - cr * sp * sy; // x
q[1] = cr * sp * cy + sr * cp * sy; // y
@@ -3729,7 +3729,7 @@ void QuatFromMatrix(quat_t q, const matrix_t m)
if(trace > 0.0f)
{
vec_t s = 0.5f / sqrt(trace);
vec_t s = 0.5f / sqrtf(trace);
q[0] = (m[6] - m[9]) * s;
q[1] = (m[8] - m[2]) * s;
@@ -3741,7 +3741,7 @@ void QuatFromMatrix(quat_t q, const matrix_t m)
if(m[0] > m[5] && m[0] > m[10])
{
// column 0
float s = sqrt(1.0f + m[0] - m[5] - m[10]) * 2.0f;
float s = sqrtf(1.0f + m[0] - m[5] - m[10]) * 2.0f;
q[0] = 0.25f * s;
q[1] = (m[4] + m[1]) / s;
@@ -3751,7 +3751,7 @@ void QuatFromMatrix(quat_t q, const matrix_t m)
else if(m[5] > m[10])
{
// column 1
float s = sqrt(1.0f + m[5] - m[0] - m[10]) * 2.0f;
float s = sqrtf(1.0f + m[5] - m[0] - m[10]) * 2.0f;
q[0] = (m[4] + m[1]) / s;
q[1] = 0.25f * s;
@@ -3761,7 +3761,7 @@ void QuatFromMatrix(quat_t q, const matrix_t m)
else
{
// column 2
float s = sqrt(1.0f + m[10] - m[0] - m[5]) * 2.0f;
float s = sqrtf(1.0f + m[10] - m[0] - m[5]) * 2.0f;
q[0] = (m[8] + m[2]) / s;
q[1] = (m[9] + m[6]) / s;
@@ -3806,19 +3806,19 @@ void QuatToRotAngle( const quat_t q, vec_t *angle ) {
void QuatToRotAngleAxis( const quat_t q, vec_t *angle, vec3_t axis ) {
*angle = atan( VectorLength(q)/q[3] );
axis[0] = q[0] / sin(*angle);
axis[1] = q[1] / sin(*angle);
axis[2] = q[2] / sin(*angle);
axis[0] = q[0] / sinf(*angle);
axis[1] = q[1] / sinf(*angle);
axis[2] = q[2] / sinf(*angle);
*angle *= 360.0f / M_PI;
}
void QuatFromRotAngleAxis( quat_t q, vec_t angle, const vec3_t axis ) {
q[0] = axis[0] * sin( angle*M_PI/360 );
q[1] = axis[1] * sin( angle*M_PI/360 );
q[2] = axis[2] * sin( angle*M_PI/360 );
q[3] = cos( angle*M_PI/360 );
q[0] = axis[0] * sinf( angle*M_PI/360 );
q[1] = axis[1] * sinf( angle*M_PI/360 );
q[2] = axis[2] * sinf( angle*M_PI/360 );
q[3] = cosf( angle*M_PI/360 );
}
void QuatToAngles( const quat_t q, vec3_t angles )
@@ -3830,7 +3830,7 @@ void QuatToAngles( const quat_t q, vec3_t angles )
q2[ 2 ] = q[ 2 ] * q[ 2 ];
q2[ 3 ] = q[ 3 ] * q[ 3 ];
angles[ PITCH ] = RAD2DEG( asin( -2 * ( q[ 2 ] * q[ 0 ] - q[ 3 ] * q[ 1 ] ) ) );
angles[ PITCH ] = RAD2DEG( asinf( -2 * ( q[ 2 ] * q[ 0 ] - q[ 3 ] * q[ 1 ] ) ) );
angles[ YAW ] = RAD2DEG( atan2( 2 * ( q[ 2 ] * q[ 3 ] + q[ 0 ] * q[ 1 ] ), ( q2[ 2 ] - q2[ 3 ] - q2[ 0 ] + q2[ 1 ] ) ) );
angles[ ROLL ] = RAD2DEG( atan2( 2 * ( q[ 3 ] * q[ 0 ] + q[ 2 ] * q[ 1 ] ), ( -q2[ 2 ] - q2[ 3 ] + q2[ 0 ] + q2[ 1 ] ) ) );
}
@@ -3857,7 +3857,7 @@ void QuatToAngles( const quat_t q, vec3_t angles )
}
else
{
angles[ PITCH ] = asin( 2.f*( SingularityTest ) ) * RAD_TO_DEG;
angles[ PITCH ] = asinf( 2.f*( SingularityTest ) ) * RAD_TO_DEG;
angles[ YAW ] = atan2( YawY, YawX ) * RAD_TO_DEG;
angles[ ROLL ] = atan2( -2.f*( q[W]*q[X] + q[Y]*q[Z] ), ( 1.f - 2.f*( Square( q[X] ) + Square( q[Y] ) ) ) ) * RAD_TO_DEG;
}
@@ -3991,11 +3991,11 @@ void QuatSlerp(const quat_t from, const quat_t to, float frac, quat_t out)
if((1.0f - absCosom) > 1e-6f)
{
sinSqr = 1.0f - absCosom * absCosom;
sinom = 1.0f / sqrt(sinSqr);
omega = atan2(sinSqr * sinom, absCosom);
sinom = 1.0f / sqrtf(sinSqr);
omega = atan2f(sinSqr * sinom, absCosom);
scale0 = sin((1.0f - frac) * omega) * sinom;
scale1 = sin(frac * omega) * sinom;
scale0 = sinf((1.0f - frac) * omega) * sinom;
scale1 = sinf(frac * omega) * sinom;
}
else
{
@@ -4043,8 +4043,8 @@ void MatrixToEulerAngles
sp = -1.0;
}
theta = -asin( sp );
cp = cos( theta );
theta = -asinf( sp );
cp = cosf( theta );
if( cp > 8192 * FLT_EPSILON )
{
+5 -22
View File
@@ -19,32 +19,17 @@ along with Quake III Arena source code; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
===========================================================================
*/
//
#pragma once
// q_shared.h -- included first by ALL program modules.
// A user mod should never modify this file
#pragma once
#if defined(__cplusplus)
extern "C" {
#endif
#define PRODUCT_NAME "OpenMoHAA"
//
// Version
//
// These values are the only one that must be set for the version
#define PRODUCT_VERSION_MAJOR 0
#define PRODUCT_VERSION_MINOR 55
#define PRODUCT_VERSION_PATCH 1
#define PRODUCT_VERSION_STAGE "alpha"
//
// Version display
//
#define PRODUCT_VERSION_NUMBER_STRING XSTRING(PRODUCT_VERSION_MAJOR) "." XSTRING(PRODUCT_VERSION_MINOR) "." XSTRING(PRODUCT_VERSION_PATCH)
#define PRODUCT_VERSION PRODUCT_VERSION_NUMBER_STRING "-" PRODUCT_VERSION_STAGE
#define PRODUCT_DATE __DATE__
#define BASEGAME "main"
@@ -102,15 +87,13 @@ extern "C" {
#define HOMEPATH_NAME_MACOSX HOMEPATH_NAME_WIN
#endif
#define PRODUCT_NAME_FULL PRODUCT_NAME " - v" PRODUCT_VERSION " - ext-" PRODUCT_EXTENSION
#define PRODUCT_VERSION_FULL PRODUCT_NAME_FULL
#define Q3_VERSION PRODUCT_VERSION_FULL
#define CLIENT_WINDOW_TITLE PRODUCT_NAME_FULL
#define CLIENT_WINDOW_TITLE PRODUCT_NAME
#define CLIENT_WINDOW_MIN_TITLE PRODUCT_NAME
#define MAX_TEAMNAME 32
#define DEMOEXT "dm_" // standard demo extension
#ifdef _MSC_VER
#pragma warning(disable : 4018) // signed/unsigned mismatch
+42
View File
@@ -0,0 +1,42 @@
add_library(qcommon_version INTERFACE)
# Current branch
execute_process(
COMMAND git branch --show-current
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
OUTPUT_VARIABLE GIT_BRANCH_NAME
OUTPUT_STRIP_TRAILING_WHITESPACE
)
# Revision
execute_process(
COMMAND git show -s --format=%H HEAD
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
OUTPUT_VARIABLE GIT_REVISION_HASH
OUTPUT_STRIP_TRAILING_WHITESPACE
)
# Commit date
execute_process(
COMMAND git show -s --format=%ct
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
OUTPUT_VARIABLE GIT_REVISION_DATE
OUTPUT_STRIP_TRAILING_WHITESPACE
)
string(TIMESTAMP GIT_REVISION_DATE_TIME UTC)
set(GIT_REVISION_DATE ${GIT_REVISION_DATE_TIME})
string(TIMESTAMP GIT_REVISION_DATE "%b %d %Y UTC" UTC)
if(NOT GIT_REVISION_BUILD_NUMBER)
set(GIT_REVISION_BUILD_NUMBER 0)
endif()
message(VERBOSE "Git branch: ${GIT_BRANCH_NAME}")
message(VERBOSE "Git revision hash: ${GIT_REVISION_HASH}")
message(VERBOSE "Git revision date: ${GIT_REVISION_DATE}")
message(VERBOSE "Git revision build: ${GIT_REVISION_BUILD_NUMBER}")
configure_file("q_version.generated.h.in" "generated/q_version.generated.h")
target_include_directories(qcommon_version INTERFACE "${CMAKE_CURRENT_BINARY_DIR}/generated")
+29
View File
@@ -0,0 +1,29 @@
/*
===========================================================================
Copyright (C) 2023 the OpenMoHAA team
This file is part of OpenMoHAA source code.
OpenMoHAA source code 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.
OpenMoHAA source code 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.
You should have received a copy of the GNU General Public License
along with OpenMoHAA source code; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
===========================================================================
*/
// q_version.generated.h -- file versioning
#define GIT_BRANCH_NAME "${GIT_BRANCH_NAME}"
#define GIT_REVISION_HASH "${GIT_REVISION_HASH}"
#define GIT_REVISION_DATE_TIME "${GIT_REVISION_DATE_TIME}"
#define GIT_REVISION_DATE "${GIT_REVISION_DATE}"
#define GIT_REVISION_BUILD_NUMBER ${GIT_REVISION_BUILD_NUMBER}
+102
View File
@@ -0,0 +1,102 @@
/*
===========================================================================
Copyright (C) 2023 the OpenMoHAA team
This file is part of OpenMoHAA source code.
OpenMoHAA source code 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.
OpenMoHAA source code 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.
You should have received a copy of the GNU General Public License
along with OpenMoHAA source code; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
===========================================================================
*/
// q_version.h -- file versioning
#pragma once
#include <q_version.generated.h>
//
// Version
//
// These values are the only one that must be set for the version
#define PRODUCT_VERSION_MAJOR 0
#define PRODUCT_VERSION_MINOR 55
#define PRODUCT_VERSION_PATCH 3
#define PRODUCT_VERSION_SUFFIX "alpha"
//
// Generated version info
//
#ifdef GIT_REVISION_BUILD_NUMBER
# define PRODUCT_VERSION_BUILD_NUMBER GIT_REVISION_BUILD_NUMBER
#else
# define PRODUCT_VERSION_BUILD_NUMBER 0
#endif
#ifdef GIT_BRANCH_NAME
# define PRODUCT_VERSION_BRANCH GIT_BRANCH_NAME
#endif
#ifdef GIT_REVISION_HASH
# define PRODUCT_VERSION_REVISION GIT_REVISION_HASH
#endif
#ifdef GIT_REVISION_DATE
# define PRODUCT_VERSION_DATE GIT_REVISION_DATE
#else
# define PRODUCT_VERSION_DATE __DATE__
#endif
#define Q3_VERSION PRODUCT_VERSION_FULL
//
// Version display
//
#define PRODUCT_VERSION_NUMBER_STRING XSTRING(PRODUCT_VERSION_MAJOR) "." XSTRING(PRODUCT_VERSION_MINOR) "." XSTRING(PRODUCT_VERSION_PATCH)
#define PRODUCT_VERSION PRODUCT_VERSION_NUMBER_STRING
#ifdef PRODUCT_VERSION_SUFFIX
# define PRODUCT_VERSION_1 PRODUCT_VERSION "-" PRODUCT_VERSION_SUFFIX
#else
# define PRODUCT_VERSION_1 PRODUCT_VERSION
#endif
# define PRODUCT_VERSION_2 PRODUCT_VERSION_1 "+" XSTRING(PRODUCT_VERSION_BUILD_NUMBER)
#ifdef PRODUCT_VERSION_REVISION
# define PRODUCT_VERSION_3 PRODUCT_VERSION_2 "." PRODUCT_VERSION_REVISION
#else
# define PRODUCT_VERSION_3 PRODUCT_VERSION_2
#endif
#define PRODUCT_VERSION_FULL PRODUCT_VERSION_3
#define PRODUCT_NAME_FULL PRODUCT_NAME " - v" PRODUCT_VERSION_1 " - ext-" PRODUCT_EXTENSION
/*
//
// Version
//
// These values are the only one that must be set for the version
extern const unsigned int PRODUCT_VERISON_MAJOR;
extern const unsigned int PRODUCT_VERISON_MINOR;
extern const unsigned int PRODUCT_VERISON_PATCH;
extern const char* PRODUCT_VERSION_STAGE;
extern const char* PRODUCT_VERSION_BRANCH;
extern const char* PRODUCT_VERSION_REVISION_HASH;
extern const char* PRODUCT_VERSION_REVISION_DATE;
*/
+44 -25
View File
@@ -629,9 +629,10 @@ char *Cvar_InfoString_Big( int bit );
// returns an info string containing all the cvars that have the given bit set
// in their flags ( CVAR_USERINFO, CVAR_SERVERINFO, CVAR_SYSTEMINFO, etc )
void Cvar_InfoStringBuffer( int bit, char *buff, int buffsize );
void Cvar_CheckRange( cvar_t *cv, float minVal, float maxVal, qboolean shouldBeIntegral );
void Cvar_SetDescription( cvar_t *var, const char *var_description );
void Cvar_CheckRange( cvar_t *cv, float minVal, float maxVal, qboolean shouldBeIntegral );
void Cvar_SetDescription( cvar_t *var, const char *var_description );
void Cvar_Restart(qboolean unsetVM);
void Cvar_Restart_f( void );
void Cvar_SaveGameRestart_f( void );
@@ -666,20 +667,25 @@ issues.
#define MAX_FILE_HANDLES 64
#ifdef DEDICATED
# define Q3CONFIG_CFG "q3config_server.cfg"
#else
# define Q3CONFIG_CFG "q3config.cfg"
#endif
qboolean FS_Initialized( void );
void FS_InitFilesystem( void );
void FS_InitFilesystem2( void );
void FS_Shutdown( qboolean closemfp );
qboolean FS_ConditionalRestart( int checksumFeed );
qboolean FS_ConditionalRestart( int checksumFeed, qboolean disconnect );
void FS_Restart( int checksumFeed );
// shutdown and restart the filesystem so changes to fs_gamedir can take effect
void FS_AddGameDirectory(const char *path, const char *dir);
void FS_AddGameDirectory2(const char *path, const char *dir, qboolean original_paks_priority);
char **FS_ListFilteredFiles( const char *path, const char *extension, const char *filter, qboolean wantSubs, int *numfiles );
char **FS_ListFilteredFiles( const char *path, const char *extension, const char *filter, qboolean wantSubs, int *numfiles, qboolean allowNonPureFilesOnDisk );
char **FS_ListFiles( const char *directory, const char *extension, qboolean wantSubs, int *numfiles );
// directory should not have either a leading or trailing /
// if extension is "/", only subdirectories will be returned
@@ -705,14 +711,12 @@ fileHandle_t FS_FOpenFileWrite( const char *qpath );
fileHandle_t FS_FOpenTextFileWrite( const char *qpath );
// will properly create any needed paths and deal with seperater character issues
int FS_filelength( fileHandle_t f );
void FS_ReplaceSeparators( char *path );
void FS_DeleteFile( const char *filename );
void FS_CanonicalFilename( char *filename );
fileHandle_t FS_SV_FOpenFileWrite( const char *filename );
int FS_SV_FOpenFileRead( const char *filename, fileHandle_t *fp );
void FS_SV_Rename( const char *from, const char *to );
int FS_FOpenFileRead( const char *qpath, fileHandle_t *file, qboolean uniqueFILE, qboolean quiet );
long FS_SV_FOpenFileRead( const char *filename, fileHandle_t *fp );
void FS_SV_Rename( const char *from, const char *to, qboolean safe );
long FS_FOpenFileRead(const char* filename, fileHandle_t* file, qboolean uniqueFILE, qboolean quiet);
// if uniqueFILE is true, then a new FILE will be fopened even if the file
// is found in an already open pak file. If uniqueFILE is false, you must call
// FS_FCloseFile instead of fclose, otherwise the pak FILE would be improperly closed
@@ -756,7 +760,7 @@ int FS_WriteFile( const char *qpath, const void *buffer, int size );
void FS_WriteTextFile( const char *qpath, const void *buffer, int size );
// writes a complete text file, creating any subdirectories needed
int FS_filelength( fileHandle_t f );
long FS_filelength(fileHandle_t f);
// doesn't work for files that are opened from a pack file
int FS_FTell( fileHandle_t f );
@@ -816,10 +820,8 @@ void FS_FilenameCompletion( const char *dir, const char *ext,
const char* FS_GetCurrentGameDir();
void FS_GetRelativeFilename( const char *currentDirectory, const char *absoluteFilename, char *out, size_t destlen );
extern char fs_gamedir[];
extern cvar_t *fs_debug;
extern cvar_t *fs_mapdir;
extern cvar_t *fs_basepath;
extern cvar_t* fs_debug;
extern cvar_t* fs_mapdir;
/*
==============================================================
@@ -915,7 +917,8 @@ void Com_EndRedirect( void );
void QDECL Com_Printf( const char *fmt, ... ) __attribute__ ((format (printf, 1, 2)));
void QDECL Com_DPrintf( const char *fmt, ... ) __attribute__ ((format (printf, 1, 2)));
void QDECL Com_Error( int code, const char *fmt, ... ) __attribute__ ((noreturn, format(printf, 2, 3)));
void Com_Quit_f( void );
void Com_Quit_f( void ) __attribute__ ((noreturn));
void Com_GameRestart(int checksumFeed, qboolean disconnect);
int Com_Milliseconds( void ); // will be journaled properly
unsigned Com_BlockChecksum( const void *buffer, int length );
@@ -953,7 +956,12 @@ extern cvar_t *com_journal;
extern cvar_t *com_cameraMode;
extern cvar_t *com_ansiColor;
extern cvar_t *com_unfocused;
extern cvar_t *com_maxfpsUnfocused;
extern cvar_t *com_minimized;
extern cvar_t *com_maxfpsMinimized;
extern cvar_t *com_altivec;
extern cvar_t *com_standalone;
extern cvar_t *com_basegame;
extern cvar_t *com_homepath;
extern cvar_t *com_altivec;
@@ -1124,15 +1132,21 @@ void CL_ForwardCommandToServer( const char *string );
void CL_CDDialog( void );
// bring up the "need a cd to play" dialog
void CL_ShutdownAll( void );
// shutdown all the client stuff
void CL_FlushMemory( void );
// dump all memory on an error
void CL_StartHunkUsers( void );
void CL_ShutdownAll(qboolean shutdownRef);
// shutdown client
void CL_InitRef(void);
// initialize renderer interface
void CL_StartHunkUsers( qboolean rendererOnly );
// start all the client stuff using the hunk
void CL_Snd_Shutdown(void);
// Restart sound subsystem
void Key_KeynameCompletion( void(*callback)(const char *s) );
// for keyname autocompletion
@@ -1269,12 +1283,17 @@ qboolean Sys_GetPacket( netadr_t *net_from, msg_t *net_message );
qboolean Sys_IsLANAddress (netadr_t adr);
void Sys_ShowIP(void);
qboolean Sys_Mkdir( const char *path );
char *Sys_Cwd( void );
void Sys_SetDefaultInstallPath(const char *path);
char *Sys_DefaultInstallPath( void );
FILE *Sys_FOpen( const char *ospath, const char *mode );
qboolean Sys_Mkdir( const char *path );
FILE *Sys_Mkfifo( const char *ospath );
char *Sys_Cwd( void );
void Sys_SetDefaultInstallPath(const char *path);
char *Sys_DefaultInstallPath(void);
char *Sys_SteamPath(void);
char *Sys_GogPath(void);
char *Sys_MicrosoftStorePath(void);
#ifdef MACOS_X
#ifdef __APPLE__
char *Sys_DefaultAppPath(void);
#endif
+1 -1
View File
@@ -444,7 +444,7 @@ qboolean TikiScript::ProcessCommand( qboolean crossline )
}
else
{
TIKI_Error( "^~^~^ Cannot find include file '%s' in %s on line %d\n", &argument1, Filename(), GetLineNumber() );
TIKI_Error( "^~^~^ Cannot find include file '%s' in %s on line %d\n", argument1, Filename(), GetLineNumber() );
Uninclude();
}
}
+129 -2
View File
@@ -1340,10 +1340,137 @@ void R_AddTerrainSurfaces()
}
}
/**
* Calculates the height of a terrain polygon by interpolating the heights of its vertices.
* The function finds the triangle containing the given point (x, y) within the terrain patch,
* and then computes the height at each vertex of the polygon using barycentric interpolation.
* Finally, it updates the z-coordinate of each vertex to store the calculated height.
* Returns qtrue if the triangle was found and the height could be calculated and saved into its vertices.
*
* ToDo: try to use the Vector*(?) macros for the math operations below from q_shared.h and q_math.h, not sure which ones would be a good fit
*/
qboolean R_TerrainHeightForPoly(cTerraPatchUnpacked_t* pPatch, polyVert_t* pVerts, int nVerts)
{
// FIXME: unimplemented
return qfalse;
float x0 = 0;
float y0 = 0;
float x1 = 0;
float y1 = 0;
float x2 = 0;
float y2 = 0;
float fKx[3] = { 0 }, fKy[3] = { 0 }, fKz[3] = { 0 }, fArea[3] = { 0 };
float fAreaTotal = 0;
float x = pVerts->xyz[0];
float y = pVerts->xyz[1];
// Calculate the average of the x and y coordinates of all vertices
if (nVerts > 1)
{
for (int i = 1; i < nVerts; i++)
{
x += pVerts[i].xyz[0];
y += pVerts[i].xyz[1];
}
// Use the averaged values from this point onwards
x = x / nVerts;
y = y / nVerts;
}
// Get the first valid triangle in the patch
terraInt iTri = pPatch->drawinfo.iTriHead;
if (!iTri)
{
assert(!pPatch->drawinfo.iTriHead &&
va("R_TerrainHeightForPoly: point(%f %f) not in patch(%f %f %f)\n",
x, y, pPatch->x0, pPatch->y0, pPatch->z0));
return qfalse;
}
// Find a triangle that contains the point (x, y)
while (qtrue)
{
if (g_pTris[iTri].byConstChecks & 4)
{
// Get all three x-y coordinates of the current triangle's vertices
x0 = g_pVert[g_pTris[iTri].iPt[0]].xyz[0];
y0 = g_pVert[g_pTris[iTri].iPt[0]].xyz[1];
x1 = g_pVert[g_pTris[iTri].iPt[1]].xyz[0];
y1 = g_pVert[g_pTris[iTri].iPt[1]].xyz[1];
x2 = g_pVert[g_pTris[iTri].iPt[2]].xyz[0];
y2 = g_pVert[g_pTris[iTri].iPt[2]].xyz[1];
// Calculate the signed areas of the three sub-triangles
fArea[0] = (x - x1) * (y2 - y1) - (y - y1) * (x2 - x1);
if (fArea[0] < -0.1)
{
// The point is outside the triangle
continue;
}
fArea[1] = (x - x2) * (y0 - y2) - (y - y2) * (x0 - x2);
if (fArea[1] < -0.1)
{
// The point is outside the triangle
continue;
}
fArea[2] = (x - x0) * (y1 - y0) - (y - y0) * (x1 - x0);
if (fArea[2] < -0.1)
{
// The point is outside the triangle
continue;
}
fAreaTotal = fArea[0] + fArea[1] + fArea[2];
if (fAreaTotal > 0.0)
{
// Found it - the point is inside the triangle
break;
}
}
iTri = g_pTris[iTri].iNext;
if (!iTri)
{
// There's no triangle that contains point (x, y) - bail out
assert(!g_pTris[iTri].iNext &&
va("R_TerrainHeightForPoly: point(%f %f) not in patch(%f %f %f)\n",
x, y, pPatch->x0, pPatch->y0, pPatch->z0));
return qfalse;
}
}
// Calculate the barycentric coordinates (fKx, fKy, fKz) of the triangle
float z0 = g_pVert[g_pTris[iTri].iPt[0]].xyz[2] / fAreaTotal;
float z1 = g_pVert[g_pTris[iTri].iPt[1]].xyz[2] / fAreaTotal;
float z2 = g_pVert[g_pTris[iTri].iPt[2]].xyz[2] / fAreaTotal;
fKy[0] = z0 * (x2 - x1);
fKy[1] = z1 * (x0 - x2);
fKy[2] = z2 * (x1 - x0);
fKx[0] = z0 * (y2 - y1);
fKx[1] = z1 * (y0 - y2);
fKx[2] = z2 * (y1 - y0);
// Note: this could be done with the CrossProduct macro if everything were in a vector
fKz[0] = fKx[0] * x1 - y1 * fKy[0];
fKz[1] = fKx[1] * x2 - y2 * fKy[1];
fKz[2] = fKx[2] * x0 - y0 * fKy[2];
// Calculate the height for each vertex
for (int i = 0; i < nVerts; i++)
{
float fScaleX = pVerts[i].xyz[0] * (fKx[0] + fKx[1] + fKx[2]);
float fScaleY = pVerts[i].xyz[1] * (fKy[0] + fKy[1] + fKy[2]);
float fConstZ = fKz[0] + fKz[1] + fKz[2];
// Write back the calculated height into the vertex
pVerts[i].xyz[2] = fScaleY - fScaleX - fConstZ;
}
return qtrue;
}
void R_TerrainRestart_f(void)
+1 -1
View File
@@ -259,7 +259,7 @@ typedef struct {
void (*Clear)();
void (*Cvar_SetDefault)(cvar_t* var, const char* varValue);
int (*FS_OpenFile)(const char* qpath, fileHandle_t *file, qboolean uniqueFILE, qboolean quiet);
long (*FS_OpenFile)(const char* qpath, fileHandle_t *file, qboolean uniqueFILE, qboolean quiet);
size_t (*FS_Read)(void* buffer, size_t len, fileHandle_t fileHandle);
void (*FS_CloseFile)(fileHandle_t fileHandle);
int (*FS_Seek)(fileHandle_t fileHandle, long offset, fsOrigin_t origin);
+1 -1
View File
@@ -1815,7 +1815,7 @@ void ScriptVariable::operator%=( const ScriptVariable& value )
default:
Clear();
throw ScriptException( "binary '%' applied to incompatible types '%s' and '%s'", typenames[ GetType() ], typenames[ value.GetType() ] );
throw ScriptException( "binary '%%' applied to incompatible types '%s' and '%s'", typenames[ GetType() ], typenames[ value.GetType() ] );
break;
+4 -5
View File
@@ -141,12 +141,11 @@ SkelVec3 skelAnimDataGameHeader_s::GetDeltaOverTime( float time1, float time2 )
return delta;
}
skelAnimDataGameHeader_t *skelAnimDataGameHeader_s::AllocAnimData( int numFrames, int numChannels )
skelAnimDataGameHeader_t *skelAnimDataGameHeader_s::AllocAnimData( size_t numFrames, size_t numChannels )
{
skelAnimDataGameHeader_t *data;
int animSize;
animSize = sizeof( skelAnimDataGameHeader_t ) + ( 16 * ( 3 * numFrames - 3 ) ) + 16 * numChannels * numFrames;
const size_t animSize = sizeof( skelAnimDataGameHeader_t ) + ( 16 * ( 3 * numFrames - 3 ) ) + 16 * numChannels * numFrames;
data = ( skelAnimDataGameHeader_t * )Skel_Alloc( animSize );
data->flags = 0;
@@ -157,7 +156,7 @@ skelAnimDataGameHeader_t *skelAnimDataGameHeader_s::AllocAnimData( int numFrames
}
skelAnimDataGameHeader_s *skelAnimDataGameHeader_s::AllocRLEChannelData( int numChannels )
skelAnimDataGameHeader_s *skelAnimDataGameHeader_s::AllocRLEChannelData(size_t numChannels)
{
int animSize;
skelAnimDataGameHeader_t *data;
@@ -97,10 +97,10 @@ typedef struct skelAnimDataGameHeader_s {
skelAnimDataGameHeader_s( const skelAnimDataGameHeader_t& );
skelAnimDataGameHeader_s();
static skelAnimDataGameHeader_t *AllocRLEChannelData( int );
static skelAnimDataGameHeader_t *AllocRLEChannelData(size_t numChannels);
int GetFrameNums( float timeSeconds, float timeTolerance, int *beforeFrame, int *afterFrame, float *beforeWeight, float *afterWeight );
SkelVec3 GetDeltaOverTime( float, float );
static skelAnimDataGameHeader_t *AllocAnimData( int numFrames, int numChannels );
static skelAnimDataGameHeader_t *AllocAnimData(size_t numFrames, size_t numChannels );
static void DeallocAnimData( skelAnimDataGameHeader_t *data );
} skelAnimDataGameHeader_t;
+2
View File
@@ -20,6 +20,8 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
===========================================================================
*/
#include "../qcommon/q_version.h"
// Setting DEFAULT_BASEDIR to an empty string will make
// Sys_DefaultInstallPath() return the current directory instead
// This was the usual behavior in Quake III Arena.
+1 -1
View File
@@ -70,7 +70,7 @@ cLocalization::cLocalization()
char szFilename[ MAX_QPATH ];
size_t iBasePos;
ppszFiles = FS_ListFilteredFiles( "global", "txt", "localization*.txt", qfalse, &iFileCount );
ppszFiles = FS_ListFilteredFiles( "global", "txt", "localization*.txt", qfalse, &iFileCount, qtrue );
strcpy( szFilename, "global/" );
memset( szFilename + 8, 0, sizeof( szFilename ) - 8 );
iBasePos = strlen( szFilename );
+1 -1
View File
@@ -391,7 +391,7 @@ dtiki_t* TIKI_LoadTikiModel(dtikianim_t* tikianim, const char* name, con_map<str
if (!found)
{
TIKI_Warning("TIKI_InitTiki: could not find surface '%s' in '%s' (check referenced skb/skd files).\n", loadsurf, tikianim->name);
TIKI_Warning("TIKI_InitTiki: could not find surface '%s' in '%s' (check referenced skb/skd files).\n", loadsurf->name, tikianim->name);
}
}
+1 -1
View File
@@ -133,7 +133,7 @@ qboolean TIKI_Frame_Commands_ClientTime( dtiki_t *pmdl, int animnum, float start
{
if( tiki_cmd->num_cmds >= TIKI_MAX_COMMANDS )
{
TIKI_Error( "TIKI_Frame_Commands_Client: Too many cmds for anim %d times %f %f for %s.\n", animnum, start );
TIKI_Error( "TIKI_Frame_Commands_Client: Too many cmds for anim %d times %f %f for %s.\n", animnum, start, end, pmdl->a->name );
return false;
}
+1 -1
View File
@@ -138,7 +138,7 @@ void TIKI_ParseFrameCommands( dloaddef_t *ld, dloadframecmd_t **cmdlist, int max
if( framenum < TIKI_FRAME_LAST )
{
TIKI_Error( "TIKI_ParseFrameCommands: illegal frame number %d on line %d in %s\n", framenum, ld->tikiFile.Filename(), ld->tikiFile.GetLineNumber() );
TIKI_Error( "TIKI_ParseFrameCommands: illegal frame number %d on line %d in %s\n", framenum, ld->tikiFile.GetLineNumber(), ld->tikiFile.Filename());
while( ld->tikiFile.TokenAvailable( false ) )
ld->tikiFile.GetToken( false );
( *numcmds )--;