2019-12-06 17:01:10 -08:00
|
|
|
/*
|
|
|
|
Copyright (C) 1996-2001 Id Software, Inc.
|
|
|
|
Copyright (C) 2002-2009 John Fitzgibbons and others
|
|
|
|
Copyright (C) 2010-2014 QuakeSpasm developers
|
|
|
|
Copyright (C) 2019 Alison G. Watson
|
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or
|
|
|
|
modify it under the terms of the GNU General Public License
|
|
|
|
as published by the Free Software Foundation; either version 2
|
|
|
|
of the License, or (at your option) any later version.
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
|
|
|
|
See the GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with this program; if not, write to the Free Software
|
|
|
|
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef spingle__pr_global_h
|
|
|
|
#define spingle__pr_global_h
|
|
|
|
|
2019-12-08 12:35:56 -08:00
|
|
|
#define G_Float(o) (((float *)pr_global_data)[o])
|
|
|
|
#define G_Int(o) (((int32_t *)pr_global_data)[o])
|
|
|
|
#define G_Edict(o) ProgEdict(G_Int(o))
|
|
|
|
#define G_EdictNum(o) NumForEdict(G_Edict(o))
|
|
|
|
#define G_Vector(o) (&G_Float(o))
|
|
|
|
#define G_String(o) PR_GetString(G_RString(o))
|
|
|
|
#define G_RString(o) (*(string_t *)&G_Int(o))
|
|
|
|
#define G_Func(o) (*(func_t *)&G_Int(o))
|
|
|
|
#define G_PEdict(o) (*(pedict_t *)&G_Int(o))
|
|
|
|
#define G_PField(o) (*(pfield_t *)&G_Int(o))
|
|
|
|
#define G_Eval(o) ((eval_t *)&G_Int(o))
|
|
|
|
#define G_Void(o) ((void *)&G_Int(o))
|
2019-12-06 17:01:10 -08:00
|
|
|
|
|
|
|
enum
|
|
|
|
{
|
|
|
|
GBL_NULL,
|
|
|
|
GBL_RETURN,
|
|
|
|
GBL_PARM0 = GBL_RETURN + 3,
|
|
|
|
GBL_PARM1 = GBL_PARM0 + 3,
|
|
|
|
GBL_PARM2 = GBL_PARM1 + 3,
|
|
|
|
GBL_PARM3 = GBL_PARM2 + 3,
|
|
|
|
GBL_PARM4 = GBL_PARM3 + 3,
|
|
|
|
GBL_PARM5 = GBL_PARM4 + 3,
|
|
|
|
GBL_PARM6 = GBL_PARM5 + 3,
|
|
|
|
GBL_PARM7 = GBL_PARM6 + 3,
|
|
|
|
GBL_self = 28,
|
|
|
|
GBL_other,
|
|
|
|
GBL_world,
|
|
|
|
GBL_time,
|
|
|
|
GBL_frametime,
|
|
|
|
GBL_force_retouch,
|
|
|
|
GBL_mapname,
|
|
|
|
GBL_deathmatch,
|
|
|
|
GBL_coop,
|
|
|
|
GBL_teamplay,
|
|
|
|
GBL_serverflags,
|
|
|
|
GBL_total_secrets,
|
|
|
|
GBL_total_monsters,
|
|
|
|
GBL_found_secrets,
|
|
|
|
GBL_killed_monsters,
|
|
|
|
GBL_parm1,
|
|
|
|
GBL_parm2,
|
|
|
|
GBL_parm3,
|
|
|
|
GBL_parm4,
|
|
|
|
GBL_parm5,
|
|
|
|
GBL_parm6,
|
|
|
|
GBL_parm7,
|
|
|
|
GBL_parm8,
|
|
|
|
GBL_parm9,
|
|
|
|
GBL_parm10,
|
|
|
|
GBL_parm11,
|
|
|
|
GBL_parm12,
|
|
|
|
GBL_parm13,
|
|
|
|
GBL_parm14,
|
|
|
|
GBL_parm15,
|
|
|
|
GBL_parm16,
|
|
|
|
GBL_v_forward,
|
|
|
|
GBL_v_up = GBL_v_forward + 3,
|
|
|
|
GBL_v_right = GBL_v_up + 3,
|
|
|
|
GBL_trace_allsolid = GBL_v_right + 3,
|
|
|
|
GBL_trace_startsolid,
|
|
|
|
GBL_trace_fraction,
|
|
|
|
GBL_trace_endpos,
|
|
|
|
GBL_trace_plane_normal = GBL_trace_endpos + 3,
|
|
|
|
GBL_trace_plane_dist = GBL_trace_plane_normal + 3,
|
|
|
|
GBL_trace_ent,
|
|
|
|
GBL_trace_inopen,
|
|
|
|
GBL_trace_inwater,
|
|
|
|
GBL_msg_entity,
|
|
|
|
GBL_main,
|
|
|
|
GBL_StartFrame,
|
|
|
|
GBL_PlayerPreThink,
|
|
|
|
GBL_PlayerPostThink,
|
|
|
|
GBL_ClientKill,
|
|
|
|
GBL_ClientConnect,
|
|
|
|
GBL_PutClientInServer,
|
|
|
|
GBL_ClientDisconnect,
|
|
|
|
GBL_SetNewParms,
|
|
|
|
GBL_SetChangeParms,
|
|
|
|
GBL_SYSTEM_END,
|
|
|
|
};
|
|
|
|
|
|
|
|
extern byte *pr_global_data;
|
|
|
|
extern ddef_t *pr_globaldefs;
|
|
|
|
|
|
|
|
#endif
|