Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/engine/null/null_renderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ void RE_EndRegistration() { }
void RE_ClearScene() { }
void RE_AddRefEntityToScene( const refEntity_t * ) { }
void RE_SyncRefEntities( const std::vector<EntityUpdate>& ) {}
std::vector<LerpTagSync> RE_SyncLerpTags( const std::vector<LerpTagUpdate>& ) {
return {};
std::vector<LerpTagSync> RE_SyncLerpTags( const std::vector<LerpTagUpdate>& in ) {
return std::vector<LerpTagSync>(in.size());
}
void RE_AddPolyToScene( qhandle_t, int, const polyVert_t* ) { }
void RE_AddPolysToScene( qhandle_t, int, const polyVert_t*, int ) { }
Expand Down
4 changes: 2 additions & 2 deletions src/engine/renderer/EntityCache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ void ClearEntityCache() {
}
}

std::vector<LerpTagSync> SyncEntityCacheToCGame( const std::vector<LerpTagUpdate>& lerpTags ) {
std::vector<LerpTagSync> RE_SyncLerpTags( const std::vector<LerpTagUpdate>& lerpTags ) {
std::vector<LerpTagSync> entityOrientations;
entityOrientations.reserve( lerpTags.size() );

Expand All @@ -284,7 +284,7 @@ std::vector<LerpTagSync> SyncEntityCacheToCGame( const std::vector<LerpTagUpdate
return entityOrientations;
}

void SyncEntityCacheFromCGame( const std::vector<EntityUpdate>& ents ) {
void RE_SyncRefEntities( const std::vector<EntityUpdate>& ents ) {
for ( const EntityUpdate& ent : ents ) {
bool flip = entities[ent.id].e.active != ent.ent.active;

Expand Down
4 changes: 2 additions & 2 deletions src/engine/renderer/EntityCache.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ void TransformEntity( trRefEntity_t* ent );

void ClearEntityCache();

std::vector<LerpTagSync> SyncEntityCacheToCGame( const std::vector<LerpTagUpdate>& lerpTags );
void SyncEntityCacheFromCGame( const std::vector<EntityUpdate>& ents );
std::vector<LerpTagSync> RE_SyncLerpTags( const std::vector<LerpTagUpdate>& lerpTags );
void RE_SyncRefEntities( const std::vector<EntityUpdate>& ents );

#endif // ENTITY_CACHE_H
4 changes: 2 additions & 2 deletions src/engine/renderer/tr_init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1693,8 +1693,8 @@ ScreenshotCmd screenshotPNGRegistration("screenshotPNG", ssFormat_t::SSF_PNG, "p

re.ClearScene = RE_ClearScene;
re.AddRefEntityToScene = RE_AddRefEntityToScene;
re.SyncRefEntities = SyncEntityCacheFromCGame;
re.SyncLerpTags = SyncEntityCacheToCGame;
re.SyncRefEntities = RE_SyncRefEntities;
re.SyncLerpTags = RE_SyncLerpTags;

re.AddPolyToScene = RE_AddPolyToSceneET;
re.AddPolysToScene = RE_AddPolysToScene;
Expand Down
20 changes: 10 additions & 10 deletions src/engine/renderer/tr_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,11 @@ using bool8_t = uint8_t;

// renderfx flags
enum RenderFx : uint8_t {
RF_THIRD_PERSON = 0x000001, // don't draw through eyes, only mirrors (player bodies, chat sprites)
RF_FIRST_PERSON = 0x000002, // only draw through eyes (view weapon, damage blood blob)
RF_DEPTHHACK = 0x000004, // for view weapon Z crunching
RF_NOSHADOW = 0x000008, // don't add stencil shadows
RF_SWAPCULL = 0x000010 // swap CT_FRONT_SIDED and CT_BACK_SIDED
RF_THIRD_PERSON = 0x01, // don't draw through eyes, only mirrors (player bodies, chat sprites)
RF_FIRST_PERSON = 0x02, // only draw through eyes (view weapon, damage blood blob)
RF_DEPTHHACK = 0x04, // for view weapon Z crunching
RF_NOSHADOW = 0x08, // don't add stencil shadows
RF_SWAPCULL = 0x10 // swap CT_FRONT_SIDED and CT_BACK_SIDED
};

// refdef flags
Expand Down Expand Up @@ -230,14 +230,14 @@ struct refEntity_t

EntityTag positionOnTag;

int8_t clearOrigin;
int8_t clearOrigin2;
bool8_t clearOrigin;
bool8_t clearOrigin2;

int8_t boundsAdd;
bool8_t boundsAdd;

int8_t nonNormalizedAxes; // axis are not normalized, i.e. they have scale
bool8_t nonNormalizedAxes; // axis are not normalized, i.e. they have scale

int8_t active;
bool8_t active;

uint16_t attachmentEntity;

Expand Down
1 change: 0 additions & 1 deletion src/shared/client/cg_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ void trap_R_ResetClipRegion();
void trap_R_DrawStretchPic( float x, float y, float w, float h, float s1, float t1, float s2, float t2, qhandle_t hShader );
void trap_R_DrawRotatedPic( float x, float y, float w, float h, float s1, float t1, float s2, float t2, qhandle_t hShader, float angle );
void trap_R_ModelBounds( clipHandle_t model, vec3_t mins, vec3_t maxs );
int trap_R_LerpTag( orientation_t *tag, const refEntity_t* refent, const char *tagName, int startIndex );
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we care about compat with other games? this is a regular q3 trap call right?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be nice to provide an API matching the ioq3 one. But this function (recently deleted) does not have the same signature as the original anyway. See #1964

void trap_R_GetTextureSize( qhandle_t handle, int *x, int *y );
qhandle_t trap_R_GenerateTexture( const byte *data, int x, int y );
void trap_GetCurrentSnapshotNumber( int *snapshotNumber, int *serverTime );
Expand Down
Loading