mirror of
https://github.com/r4sas/ExtraMirror
synced 2025-03-13 05:41:26 +00:00
Update ValveSDK
Update ValveSDK
This commit is contained in:
parent
b5844d82fb
commit
8f253142a7
41
MiniBase/ValveSDK/engine/usercmd.h
Normal file
41
MiniBase/ValveSDK/engine/usercmd.h
Normal file
@ -0,0 +1,41 @@
|
||||
/***
|
||||
*
|
||||
* Copyright (c) 1999, 2000 Valve LLC. All rights reserved.
|
||||
*
|
||||
* This product contains software technology licensed from Id
|
||||
* Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* Use, distribution, and modification of this source code and/or resulting
|
||||
* object code is restricted to non-commercial enhancements to products from
|
||||
* Valve LLC. All other use, distribution, or modification is prohibited
|
||||
* without written permission from Valve LLC.
|
||||
*
|
||||
****/
|
||||
#ifndef USERCMD_H
|
||||
#define USERCMD_H
|
||||
#ifdef _WIN32
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
typedef struct usercmd_s
|
||||
{
|
||||
short lerp_msec; // Interpolation time on client
|
||||
byte msec; // Duration in ms of command
|
||||
vec3_t viewangles; // Command view angles.
|
||||
|
||||
// intended velocities
|
||||
float forwardmove; // Forward velocity.
|
||||
float sidemove; // Sideways velocity.
|
||||
float upmove; // Upward velocity.
|
||||
byte lightlevel; // Light level at spot where we are standing.
|
||||
unsigned short buttons; // Attack buttons
|
||||
byte impulse; // Impulse command issued.
|
||||
byte weaponselect; // Current weapon id
|
||||
|
||||
// Experimental player impact stuff.
|
||||
int impact_index;
|
||||
vec3_t impact_position;
|
||||
} usercmd_t;
|
||||
|
||||
#endif // USERCMD_H
|
@ -24,6 +24,8 @@
|
||||
#include "STDLIB.H"
|
||||
#include "MATH.H"
|
||||
|
||||
#include "../../leis/_math.h"
|
||||
|
||||
// Header file containing definition of globalvars_t and entvars_t
|
||||
typedef int func_t; //
|
||||
typedef int string_t; // from engine's pr_comp.h;
|
||||
@ -43,7 +45,7 @@ public:
|
||||
inline Vector2D operator*(float fl) const { return Vector2D(x*fl, y*fl); }
|
||||
inline Vector2D operator/(float fl) const { return Vector2D(x/fl, y/fl); }
|
||||
|
||||
inline float Length(void) const { return (float)sqrt(x*x + y*y ); }
|
||||
inline float Length(void) const { return (float)mysqrt(x*x + y*y ); }
|
||||
|
||||
inline Vector2D Normalize ( void ) const
|
||||
{
|
||||
@ -92,7 +94,7 @@ public:
|
||||
|
||||
// Methods
|
||||
inline void CopyToArray(float* rgfl) const { rgfl[0] = x, rgfl[1] = y, rgfl[2] = z; }
|
||||
inline float Length(void) const { return (float)sqrt(x*x + y*y + z*z); }
|
||||
inline float Length(void) const { return (float)mysqrt(x*x + y*y + z*z); }
|
||||
operator float *() { return &x; } // Vectors will now automatically convert to float * when needed
|
||||
operator const float *() const { return &x; } // Vectors will now automatically convert to float * when needed
|
||||
inline Vector Normalize(void) const
|
||||
@ -112,18 +114,18 @@ public:
|
||||
|
||||
return Vec2;
|
||||
}
|
||||
inline float Length2D(void) const { return (float)sqrt(x*x + y*y); }
|
||||
inline float Length2D(void) const { return (float)mysqrt(x*x + y*y); }
|
||||
|
||||
// Members
|
||||
vec_t x, y, z;
|
||||
};
|
||||
|
||||
inline Vector operator*(float fl, const Vector& v) { return v * fl; }
|
||||
inline float DotProduct(const Vector& a, const Vector& b) { return(a.x*b.x+a.y*b.y+a.z*b.z); }
|
||||
inline Vector CrossProduct(const Vector& a, const Vector& b) { return Vector( a.y*b.z - a.z*b.y, a.z*b.x - a.x*b.z, a.x*b.y - a.y*b.x ); }
|
||||
|
||||
#define vec3_t Vector
|
||||
|
||||
|
||||
#define VectorAdd(a,b,c) {(c)[0]=(a)[0]+(b)[0];(c)[1]=(a)[1]+(b)[1];(c)[2]=(a)[2]+(b)[2];}
|
||||
#define VectorCopy(a,b) {(b)[0]=(a)[0];(b)[1]=(a)[1];(b)[2]=(a)[2];}
|
||||
#define VectorClear(a) { a[0]=0.0;a[1]=0.0;a[2]=0.0;}
|
||||
|
9
MiniBase/ValveSDK/engine/wrect.h
Normal file
9
MiniBase/ValveSDK/engine/wrect.h
Normal file
@ -0,0 +1,9 @@
|
||||
#if !defined( WRECTH )
|
||||
#define WRECTH
|
||||
|
||||
typedef struct rect_s
|
||||
{
|
||||
int left, right, top, bottom;
|
||||
} wrect_t;
|
||||
|
||||
#endif
|
Loading…
x
Reference in New Issue
Block a user