This repository has been archived on 2022-06-27. You can view files and clone it, but cannot push or open issues or pull requests.
Xash3DArchive/common/ref_params.h

105 lines
2.7 KiB
C
Raw Normal View History

2010-11-15 22:00:00 +01:00
/***
*
* Copyright (c) 1996-2002, 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.
*
****/
2009-01-11 22:00:00 +01:00
#ifndef REF_PARAMS_H
#define REF_PARAMS_H
typedef struct ref_params_s
{
// output
vec3_t vieworg;
vec3_t viewangles;
vec3_t forward;
vec3_t right;
vec3_t up;
2010-11-15 22:00:00 +01:00
// Client frametime;
float frametime;
// Client time
float time;
2009-01-11 22:00:00 +01:00
2010-11-15 22:00:00 +01:00
// Misc
2009-09-18 22:00:00 +02:00
int intermission;
int paused;
int spectator;
2010-11-15 22:00:00 +01:00
int onground;
2009-01-11 22:00:00 +01:00
int waterlevel;
2010-11-15 22:00:00 +01:00
vec3_t simvel;
vec3_t simorg;
2009-07-12 22:00:00 +02:00
2009-01-11 22:00:00 +01:00
vec3_t viewheight;
2009-09-13 22:00:00 +02:00
float idealpitch;
2009-09-18 22:00:00 +02:00
2010-11-15 22:00:00 +01:00
vec3_t cl_viewangles;
2009-01-11 22:00:00 +01:00
int health;
2010-11-15 22:00:00 +01:00
vec3_t crosshairangle;
2009-09-18 22:00:00 +02:00
float viewsize;
2010-11-15 22:00:00 +01:00
vec3_t punchangle;
2009-09-18 22:00:00 +02:00
int maxclients;
2010-11-15 22:00:00 +01:00
int viewentity;
int playernum;
2009-01-11 22:00:00 +01:00
int max_entities;
2009-09-18 22:00:00 +02:00
int demoplayback;
2010-11-15 22:00:00 +01:00
int hardware;
int smoothing;
2009-09-18 22:00:00 +02:00
2010-11-15 22:00:00 +01:00
// Last issued usercmd
struct usercmd_s *cmd;
2009-09-18 22:00:00 +02:00
2010-11-15 22:00:00 +01:00
// Movevars
struct movevars_s *movevars;
int viewport[4]; // the viewport coordinates x, y, width, height
2009-09-18 22:00:00 +02:00
int nextView; // the renderer calls ClientDLL_CalcRefdef() and Renderview
// so long in cycles until this value is 0 (multiple views)
2010-11-15 22:00:00 +01:00
int onlyClientDraw; // if !=0 nothing is drawn by the engine except clientDraw functions
2009-01-11 22:00:00 +01:00
} ref_params_t;
2013-09-14 22:00:00 +02:00
// same as ref_params but for overview mode
typedef struct ref_overview_s
{
vec3_t origin;
qboolean rotated;
float xLeft;
float xRight;
2017-03-13 22:00:00 +01:00
float yTop;
float yBottom;
2013-09-14 22:00:00 +02:00
float zFar;
float zNear;
float flZoom;
} ref_overview_t;
2017-02-21 22:00:00 +01:00
// ref_viewpass_t->flags
#define RF_DRAW_WORLD (1<<0) // pass should draw the world (otherwise it's player menu model)
#define RF_DRAW_CUBEMAP (1<<1) // special 6x pass to render cubemap\skybox sides
#define RF_DRAW_OVERVIEW (1<<2) // overview mode is active
#define RF_ONLY_CLIENTDRAW (1<<3) // nothing is drawn by the engine except clientDraw functions
// intermediate struct for viewpass (or just a single frame)
typedef struct ref_viewpass_s
{
int viewport[4]; // size of new viewport
vec3_t vieworigin; // view origin
vec3_t viewangles; // view angles
int viewentity; // entitynum (P2: Savior uses this)
float fov_x, fov_y; // vertical & horizontal FOV
int flags; // if !=0 nothing is drawn by the engine except clientDraw functions
} ref_viewpass_t;
2009-01-11 22:00:00 +01:00
#endif//REF_PARAMS_H