Skip to content

Commit

Permalink
common: render_api: use movie_state_s in AVI functions for easier typ…
Browse files Browse the repository at this point in the history
…e checking
  • Loading branch information
a1batross committed Dec 9, 2024
1 parent 168f3bf commit 531d87b
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 15 deletions.
14 changes: 7 additions & 7 deletions common/render_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -208,14 +208,14 @@ typedef struct render_api_s
void (*R_EntityRemoveDecals)( struct model_s *mod ); // remove all the decals from specified entity (BSP only)

// AVIkit support
void *(*AVI_LoadVideo)( const char *filename, qboolean load_audio );
int (*AVI_GetVideoInfo)( void *Avi, int *xres, int *yres, float *duration ); // a1ba: changed longs to int
int (*AVI_GetVideoFrameNumber)( void *Avi, float time );
byte *(*AVI_GetVideoFrame)( void *Avi, int frame );
struct movie_state_s *(*AVI_LoadVideo)( const char *filename, qboolean load_audio );
qboolean (*AVI_GetVideoInfo)( struct movie_state_s *Avi, int *xres, int *yres, float *duration ); // a1ba: changed longs to int
int (*AVI_GetVideoFrameNumber)( struct movie_state_s *Avi, float time );
byte *(*AVI_GetVideoFrame)( struct movie_state_s *Avi, int frame );
void (*AVI_UploadRawFrame)( int texture, int cols, int rows, int width, int height, const byte *data );
void (*AVI_FreeVideo)( void *Avi );
int (*AVI_IsActive)( void *Avi );
void (*AVI_StreamSound)( void *Avi, int entnum, float fvol, float attn, float synctime );
void (*AVI_FreeVideo)( struct movie_state_s *Avi );
qboolean (*AVI_IsActive)( struct movie_state_s *Avi );
void (*AVI_StreamSound)( struct movie_state_s *Avi, int entnum, float fvol, float attn, float synctime );
qboolean (*AVI_Think)( struct movie_state_s *Avi );
qboolean (*AVI_SetParm)( struct movie_state_s *Avi, enum movie_parms_e parm, ... );

Expand Down
12 changes: 6 additions & 6 deletions engine/client/cl_render.c
Original file line number Diff line number Diff line change
Expand Up @@ -261,13 +261,13 @@ static render_api_t gRenderAPI =
NULL, // DrawSingleDecal,
NULL, // R_DecalSetupVerts,
NULL, // R_EntityRemoveDecals,
(void*)AVI_LoadVideo,
(void*)AVI_GetVideoInfo,
(void*)AVI_GetVideoFrameNumber,
(void*)AVI_GetVideoFrame,
AVI_LoadVideo,
AVI_GetVideoInfo,
AVI_GetVideoFrameNumber,
AVI_GetVideoFrame,
NULL, // R_UploadStretchRaw,
(void*)AVI_FreeVideo,
(void*)AVI_IsActive,
AVI_FreeVideo,
AVI_IsActive,
S_StreamAviSamples,
AVI_Think,
AVI_SetParm,
Expand Down
2 changes: 1 addition & 1 deletion engine/client/client.h
Original file line number Diff line number Diff line change
Expand Up @@ -1115,7 +1115,7 @@ void Con_PageUp( int lines );
//
// s_main.c
//
void S_StreamAviSamples( void *Avi, int entnum, float fvol, float attn, float synctime );
void S_StreamAviSamples( movie_state_t *Avi, int entnum, float fvol, float attn, float synctime );
void S_StartBackgroundTrack( const char *intro, const char *loop, int position, qboolean fullpath );
void S_StopBackgroundTrack( void );
void S_StreamSetPause( int pause );
Expand Down
2 changes: 1 addition & 1 deletion engine/client/s_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1210,7 +1210,7 @@ void S_RawSamples( uint samples, uint rate, word width, word channels, const byt
S_PositionedRawSamples
===================
*/
void S_StreamAviSamples( void *Avi, int entnum, float fvol, float attn, float synctime )
void S_StreamAviSamples( movie_state_t *Avi, int entnum, float fvol, float attn, float synctime )
{
return; // stub, use AVI_SetParm and AVI_Think to stream AVI sound
}
Expand Down

0 comments on commit 531d87b

Please sign in to comment.