Skip to content

Commit

Permalink
Move procedurally generated surfaces to cgame
Browse files Browse the repository at this point in the history
Sprites are currently still generated in renderers.
Beam doesn't work quite the same (need a custom shader), but nothing uses it.
  • Loading branch information
zturtleman committed Jan 21, 2014
1 parent 37f96ba commit 61459eb
Show file tree
Hide file tree
Showing 17 changed files with 577 additions and 618 deletions.
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2295,6 +2295,7 @@ Q3CGOBJ = \
$(B)/$(BASEGAME)/cgame/cg_servercmds.o \
$(B)/$(BASEGAME)/cgame/cg_snapshot.o \
$(B)/$(BASEGAME)/cgame/cg_spawn.o \
$(B)/$(BASEGAME)/cgame/cg_surface.o \
$(B)/$(BASEGAME)/cgame/cg_syscalls.o \
$(B)/$(BASEGAME)/cgame/cg_view.o \
$(B)/$(BASEGAME)/cgame/cg_weapons.o \
Expand Down Expand Up @@ -2388,6 +2389,7 @@ MPCGOBJ = \
$(B)/$(MISSIONPACK)/cgame/cg_servercmds.o \
$(B)/$(MISSIONPACK)/cgame/cg_snapshot.o \
$(B)/$(MISSIONPACK)/cgame/cg_spawn.o \
$(B)/$(MISSIONPACK)/cgame/cg_surface.o \
$(B)/$(MISSIONPACK)/cgame/cg_syscalls.o \
$(B)/$(MISSIONPACK)/cgame/cg_view.o \
$(B)/$(MISSIONPACK)/cgame/cg_weapons.o \
Expand Down
10 changes: 10 additions & 0 deletions code/cgame/cg_local.h
Original file line number Diff line number Diff line change
Expand Up @@ -1663,6 +1663,16 @@ void CG_RestoreSnapshot( void );
playerState_t *CG_LocalClientPlayerStateForClientNum( int clientNum );


//
// cg_surface.c
//
qboolean CG_AddCustomSurface( const refEntity_t *re );
void CG_SurfaceSprite( const refEntity_t *re );
void CG_SurfaceRailRings( const refEntity_t *re );
void CG_SurfaceRailCore( const refEntity_t *re );
void CG_SurfaceLightningBolt( const refEntity_t *re );
void CG_SurfaceBeam( const refEntity_t *re );

//
// cg_spawn.c
//
Expand Down
3 changes: 2 additions & 1 deletion code/cgame/cg_public.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Suite 120, Rockville, Maryland 20850 USA.
// major 0 means each minor is an API break.
// major > 0 means each major is an API break and each minor extends API.
#define CG_API_MAJOR_VERSION 0
#define CG_API_MINOR_VERSION 3
#define CG_API_MINOR_VERSION 4


#define CMD_BACKUP 64
Expand Down Expand Up @@ -271,6 +271,7 @@ typedef enum {
CG_R_ADDPOLYBUFFERTOSCENE,
CG_R_ALLOCSKINSURFACE,
CG_R_ADDSKINTOFRAME,
CG_R_ADDPOLYREFENTITYTOSCENE,

// note: these were not originally available in ui
CG_R_LOADWORLDMAP = 350,
Expand Down
Loading

0 comments on commit 61459eb

Please sign in to comment.