Results 1 to 1 of 1

Thread: Warsow 1.0 Imports

  1. #1
    Join Date
    Jun 2000
    Posts
    602
    Thanks
    241
    Thanked 992 Times in 329 Posts

    Default Warsow 1.0 Imports

    a new Warsow version come out and...


    Code:
    typedef struct
    {
    	// drops to console a client game error
    	void ( *Error )( const char *msg );
    
    	// console messages
    	void ( *Print )( const char *msg );
    	void ( *PrintToLog )( const char *msg );
    
    	// dynvars
    	dynvar_t *( *Dynvar_Create )( const char *name, qboolean console, dynvar_getter_f getter, dynvar_setter_f setter );
    	void ( *Dynvar_Destroy )( dynvar_t *dynvar );
    	dynvar_t *( *Dynvar_Lookup )( const char *name );
    	const char *( *Dynvar_GetName )( dynvar_t *dynvar );
    	dynvar_get_status_t ( *Dynvar_GetValue )( dynvar_t *dynvar, void **value );
    	dynvar_set_status_t ( *Dynvar_SetValue )( dynvar_t *dynvar, void *value );
    	void ( *Dynvar_AddListener )( dynvar_t *dynvar, dynvar_listener_f listener );
    	void ( *Dynvar_RemoveListener )( dynvar_t *dynvar, dynvar_listener_f listener );
    
    	// console variable interaction
    	cvar_t *( *Cvar_Get )( const char *name, const char *value, int flags );
    	cvar_t *( *Cvar_Set )( const char *name, const char *value );
    	void ( *Cvar_SetValue )( const char *name, float value );
    	cvar_t *( *Cvar_ForceSet )( const char *name, const char *value );      // will return 0 0 if not found
    	float ( *Cvar_Value )( const char *name );
    	const char *( *Cvar_String )( const char *name );
    
    	void ( *Cmd_TokenizeString )( const char *text );
    	int ( *Cmd_Argc )( void );
    	char *( *Cmd_Argv )( int arg );
    	char *( *Cmd_Args )( void );        // concatenation of all argv >= 1
    
    	void ( *Cmd_AddCommand )( const char *name, void ( *cmd )( void ) );
    	void ( *Cmd_RemoveCommand )( const char *cmd_name );
    	void ( *Cmd_ExecuteText )( int exec_when, const char *text );
    	void ( *Cmd_Execute )( void );
    	void ( *Cmd_SetCompletionFunc )( const char *cmd_name, char **( *completion_func )( const char *partial ) );
    
    	// files will be memory mapped read only
    	// the returned buffer may be part of a larger pak file,
    	// or a discrete file from anywhere in the quake search path
    	// a -1 return means the file does not exist
    	// NULL can be passed for buf to just determine existance
    	int ( *FS_FOpenFile )( const char *filename, int *filenum, int mode );
    	int ( *FS_Read )( void *buffer, size_t len, int file );
    	int ( *FS_Write )( const void *buffer, size_t len, int file );
    	int ( *FS_Print )( int file, const char *msg );
    	int ( *FS_Tell )( int file );
    	int ( *FS_Seek )( int file, int offset, int whence );
    	int ( *FS_Eof )( int file );
    	int ( *FS_Flush )( int file );
    	void ( *FS_FCloseFile )( int file );
    	qboolean ( *FS_RemoveFile )( const char *filename );
    	int ( *FS_GetFileList )( const char *dir, const char *extension, char *buf, size_t bufsize, int start, int end );
    	const char *( *FS_FirstExtension )( const char *filename, const char *extensions[], int num_extensions );
    	qboolean ( *FS_IsPureFile )( const char *filename );
    	qboolean ( *FS_MoveFile )( const char *src, const char *dst );
    	qboolean ( *FS_IsUrl )( const char *url );
    	time_t ( *FS_FileMTime )( const char *filename );
    	qboolean ( *FS_RemoveDirectory )( const char *dirname );
    
    	// key bindings
    	const char *( *Key_GetBindingBuf )( int binding );
    	const char *( *Key_KeynumToString )( int keynum );
    
    	void ( *GetConfigString )( int i, char *str, int size );
    	unsigned int ( *Milliseconds )( void );
    	qboolean ( *DownloadRequest )( const char *filename, qboolean requestpak );
    
    	unsigned int (* Hash_BlockChecksum )( const qbyte * data, size_t len );
    	unsigned int (* Hash_SuperFastHash )( const qbyte * data, size_t len, unsigned int seed );
    
    	void ( *NET_GetUserCmd )( int frame, usercmd_t *cmd );
    	int ( *NET_GetCurrentUserCmdNum )( void );
    	void ( *NET_GetCurrentState )( int *incomingAcknowledged, int *outgoingSequence, int *outgoingSent );
    	void ( *RefreshMouseAngles )( void );
    
    	// refresh system
    	void ( *R_UpdateScreen )( void );
    	int ( *R_GetClippedFragments )( const vec3_t origin, float radius, vec3_t axis[3], int maxfverts, vec3_t *fverts, int maxfragments, struct fragment_s *fragments );
    	void ( *R_ClearScene )( void );
    	void ( *R_AddEntityToScene )( const struct entity_s *ent );
    	void ( *R_AddLightToScene )( const vec3_t org, float intensity, float r, float g, float b, const struct shader_s *shader );
    	void ( *R_AddPolyToScene )( const struct poly_s *poly );
    	void ( *R_AddLightStyleToScene )( int style, float r, float g, float b );
    	void ( *R_RenderScene )( const struct refdef_s *fd );
    	const char *( *R_SpeedsMessage )( char *out, size_t size );
    	void ( *R_RegisterWorldModel )( const char *name );
    	void ( *R_ModelBounds )( const struct model_s *mod, vec3_t mins, vec3_t maxs );
    	void ( *R_ModelFrameBounds )( const struct model_s *mod, int frame, vec3_t mins, vec3_t maxs );
    	struct model_s *( *R_RegisterModel )( const char *name );
    	struct shader_s *( *R_RegisterPic )( const char *name );
    	struct shader_s *( *R_RegisterRawPic )( const char *name, int width, int height, qbyte *data );
    	struct shader_s *( *R_RegisterLevelshot )( const char *name, struct shader_s *defaultPic, qboolean *matchesDefault );
    	struct shader_s *( *R_RegisterSkin )( const char *name );
    	struct skinfile_s *( *R_RegisterSkinFile )( const char *name );
    	struct shader_s *( *R_RegisterVideo )( const char *name );
    	qboolean ( *R_LerpTag )( struct orientation_s *orient, const struct model_s *mod, int oldframe, int frame, float lerpfrac, const char *name );
    	void ( *R_SetCustomColor )( int num, int r, int g, int b );
    	void ( *R_LightForOrigin )( const vec3_t origin, vec3_t dir, vec4_t ambient, vec4_t diffuse, float radius );
    	void ( *R_DrawStretchPic )( int x, int y, int w, int h, float s1, float t1, float s2, float t2, const vec4_t color, const struct shader_s *shader );
    	void ( *R_DrawStretchPoly )( const struct poly_s *poly, float x_offset, float y_offset );
    	void ( *R_DrawRotatedStretchPic )( int x, int y, int w, int h, float s1, float t1, float s2, float t2, float angle, const vec4_t color, const struct shader_s *shader );
    	void ( *R_SetScissorRegion )( int x, int y, int w, int h );
    	void ( *R_GetShaderDimensions )( const struct shader_s *shader, int *width, int *height, int *depth );
    	void ( *R_TransformVectorToScreen )( const struct refdef_s *rd, const vec3_t in, vec2_t out );
    	int ( *R_SkeletalGetNumBones )( const struct model_s *mod, int *numFrames );
    	int ( *R_SkeletalGetBoneInfo )( const struct model_s *mod, int bone, char *name, size_t name_size, int *flags );
    	void ( *R_SkeletalGetBonePose )( const struct model_s *mod, int bone, int frame, struct bonepose_s *bonepose );
    
    	void ( *VID_FlashWindow )( int count );
    
    	// collision detection
    	int ( *CM_NumInlineModels )( void );
    	struct cmodel_s	*( *CM_InlineModel )( int num );
    	struct cmodel_s	*( *CM_ModelForBBox )( vec3_t mins, vec3_t maxs );
    	struct cmodel_s	*( *CM_OctagonModelForBBox )( vec3_t mins, vec3_t maxs );
    	void ( *CM_TransformedBoxTrace )( trace_t *tr, vec3_t start, vec3_t end, vec3_t mins, vec3_t maxs, struct cmodel_s *cmodel, int brushmask, vec3_t origin, vec3_t angles );
    	int ( *CM_TransformedPointContents )( vec3_t p, struct cmodel_s *cmodel, vec3_t origin, vec3_t angles );
    	void ( *CM_RoundUpToHullSize )( vec3_t mins, vec3_t maxs, struct cmodel_s *cmodel );
    	void ( *CM_InlineModelBounds )( struct cmodel_s *cmodel, vec3_t mins, vec3_t maxs );
    
    	// sound system
    	struct sfx_s *( *S_RegisterSound )( const char *name );
    	void ( *S_StartFixedSound )( struct sfx_s *sfx, const vec3_t origin, int entchannel, float fvol, float attenuation );
    	void ( *S_StartRelativeSound )( struct sfx_s *sfx, int entnum, int entchannel, float fvol, float attenuation );
    	void ( *S_StartGlobalSound )( struct sfx_s *sfx, int entchannel, float fvol );
    	void ( *S_Update )( const vec3_t origin, const vec3_t velocity, const vec3_t v_forward, const vec3_t v_right, const vec3_t v_up, const char *identity );
    	void ( *S_AddLoopSound )( struct sfx_s *sfx, int entnum, float fvol, float attenuation );
    	void ( *S_StartBackgroundTrack )( const char *intro, const char *loop );
    	void ( *S_StopBackgroundTrack )( void );
    
    	// fonts
    	struct mufont_s *( *SCR_RegisterFont )( const char *name );
    	void ( *SCR_DrawString )( int x, int y, int align, const char *str, struct mufont_s *font, vec4_t color );
    	int ( *SCR_DrawStringWidth )( int x, int y, int align, const char *str, int maxwidth, struct mufont_s *font, vec4_t color );
    	void ( *SCR_DrawClampString )( int x, int y, const char *str, int xmin, int ymin, int xmax, int ymax, struct mufont_s *font, vec4_t color );
    	size_t ( *SCR_strHeight )( struct mufont_s *font );
    	size_t ( *SCR_strWidth )( const char *str, struct mufont_s *font, int maxlen );
    	size_t ( *SCR_StrlenForWidth )( const char *str, struct mufont_s *font, size_t maxwidth );
    
    	// managed memory allocation
    	void *( *Mem_Alloc )( size_t size, const char *filename, int fileline );
    	void ( *Mem_Free )( void *data, const char *filename, int fileline );
    } cgame_import_t;
    Code:
    	import.Error = (void (__cdecl *)(const char *))(void*)0x401000;
    	import.Print = (void (__cdecl *)(const char *))(void*)0x4041F0;
    	import.PrintToLog = (  void (__cdecl *)(const char *) ) (void*)0x404210;
    	import.Dynvar_Create = (  dynvar_t *(__cdecl *)(const char *,qboolean,dynvar_getter_f,dynvar_setter_f) )(void*)0x41E6D0;
    	import.Dynvar_Destroy = (void (__cdecl *)(dynvar_t *) )(void*)0x41E720;
    	import.Dynvar_Lookup = (  dynvar_t *(__cdecl *)(const char *) )(void*)0x41E750;
    	import.Dynvar_GetName = (const char *(__cdecl *)(dynvar_t *)  )(void*)0x41E770;
    	import.Dynvar_GetValue = ( dynvar_get_status_t (__cdecl *)(dynvar_t *,void **)  )(void*)0x41E780;
    	import.Dynvar_SetValue = ( dynvar_set_status_t (__cdecl *)(dynvar_t *,void *) )(void*)0x41E7A0;
    	import.Dynvar_AddListener = ( void (__cdecl *)(dynvar_t *,dynvar_listener_f) )(void*)0x41E860;
    	import.Dynvar_RemoveListener = ( void (__cdecl *)(dynvar_t *,dynvar_listener_f) )(void*)0x41E8B0;
    	import.Cvar_Get = ( cvar_t *(__cdecl *)(const char *,const char *,int)  )(void*)0x41D350;
    	import.Cvar_Set = ( cvar_t *(__cdecl *)(const char *,const char *)  )(void*)0x41D9C0;
    	import.Cvar_SetValue = ( void (__cdecl *)(const char *,float) )(void*)0x41DA30;
    	import.Cvar_ForceSet = (cvar_t *(__cdecl *)(const char *,const char *)  )(void*)0x41D9A0;
    	import.Cvar_String = ( const char *(__cdecl *)(const char *) )(void*)0x41D310;
    	import.Cvar_Value = (  float (__cdecl *)(const char *) )(void*)0x41D2E0;
    	import.Cmd_TokenizeString = (void (__cdecl *)(const char *)    )(void*)0x418760;
    	import.Cmd_Argc = ( int (__cdecl *)(void) )(void*)0x418720;
    	import.Cmd_Argv = ( char *(__cdecl *)(int) )(void*)0x418730;
    	import.Cmd_Args = ( char *(__cdecl *)(void) )(void*)0x418750;
    	import.Cmd_AddCommand = ( void (__cdecl *)(const char *,void (__cdecl *)(void) ) )(void*)0x4188E0;
    	import.Cmd_RemoveCommand = ( void (__cdecl *)(const char *)   )(void*)0x4189D0;
    	import.Cmd_ExecuteText = ( void (__cdecl *)(int,const char *) )(void*)0x417D80;
    	import.Cmd_Execute = (void (__cdecl *)(void))(void*)0x417DD0;
    	import.Cmd_SetCompletionFunc = (void (__cdecl *)(const char *,char **(__cdecl *)(const char *)) )(void*)0x418A50;
    	import.FS_FOpenFile = (int (__cdecl *)(const char *,int *,int))(void*)0x420140;
    	import.FS_Read = ( int (__cdecl *)(void *,size_t,int) )(void*)0x4203E0;
    	import.FS_Write = ( int (__cdecl *)(const void *,size_t,int) )(void*)0x420540;
    	import.FS_Print = (int (__cdecl *)(int,const char *))(void*)0x4204A0;
    	import.FS_Tell = ( int (__cdecl *)(int) )(void*)0x420670;
    	import.FS_Seek = (int (__cdecl *)(int,int,int) )(void*)0x4206E0;
    	import.FS_Eof = ( int (__cdecl *)(int))(void*)0x420890;
    	import.FS_Flush = (  int (__cdecl *)(int) )(void*)0x420900;
    	import.FS_FCloseFile = (  void (__cdecl *)(int) )(void*)0x420180;
    	import.FS_RemoveFile = ( qboolean (__cdecl *)(const char *) )(void*)0x420DD0;
    	import.FS_GetFileList = ( int (__cdecl *)(const char *,const char *,char *,size_t,int,int)  )(void*)0x422DE0;
    	import.FS_FirstExtension = (const char *(__cdecl *)(const char *,const char *[],int)  )(void*)0x41F730;
    	import.FS_IsPureFile = ( qboolean (__cdecl *)(const char *) )(void*)0x420D10;
    	import.FS_MoveFile = (qboolean (__cdecl *)(const char *,const char *))(void*)0x420FA0;
    	import.FS_IsUrl = ( qboolean (__cdecl *)(const char *))(void*)0x41FBE0;
    	import.FS_FileMTime = (  time_t (__cdecl *)(const char *))(void*)0x421050;
    	import.FS_RemoveDirectory = ( qboolean (__cdecl *)(const char *) )(void*)0x421090;
    	import.Key_GetBindingBuf = ( const char *(__cdecl *)(int) )(void*)0x425850;
    	import.Key_KeynumToString = ( const char *(__cdecl *)(int) )(void*)0x424DF0;
    	import.GetConfigString = ( void (__cdecl *)(int,char *,int) )(void*)0x404220;
    	import.Milliseconds = ( unsigned int (__cdecl *)(void) )(void*)0x47A860;
    	import.DownloadRequest = ( qboolean (__cdecl *)(const char *,qboolean) )(void*)0x40B220;
    	import.Hash_BlockChecksum =(unsigned int (__cdecl *)(const qbyte *,size_t) ) (void*)0x419960;
    	import.Hash_SuperFastHash = (unsigned int (__cdecl *)(const qbyte *,size_t,unsigned int) )(void*)0x419800;
    	import.NET_GetUserCmd = ( void (__cdecl *)(int,usercmd_t *) )(void*)0x404280;
    	import.NET_GetCurrentUserCmdNum = (int (__cdecl *)(void))(void*)0x4042B0;
    	import.NET_GetCurrentState = ( void (__cdecl *)(int *,int *,int *) )(void*)0x4042C0;
    	import.RefreshMouseAngles = ( void (__cdecl *)(void) )(void*)0x404300;
    	import.R_UpdateScreen = ( void (__cdecl *)(void) )(void*)0x40E630;
    	import.R_GetClippedFragments = ( int (__cdecl *)(const vec_t [],float,vec3_t [],int,vec3_t (*),int,fragment_s *) )(void*)0x44F380;
    	import.R_ClearScene = ( void (__cdecl *)(void) )(void*)0x4491B0;
    	import.R_AddLightToScene = ( void (__cdecl *)(const vec_t [],float,float,float,float,const shader_s *) )(void*)0x449250;
    	import.R_AddPolyToScene = ( void (__cdecl *)(const poly_s *) )(void*)0x449390;
    	import.R_AddLightStyleToScene = ( void (__cdecl *)(int,float,float,float) )(void*)0x4493E0;
    	import.R_RenderScene = ( void (__cdecl *)(const refdef_s *) )(void*)0x449500;
    	import.R_SpeedsMessage = ( const char *(__cdecl *)(char *,size_t) )(void*)0x4497C0;
    	import.R_RegisterWorldModel = ( void (__cdecl *)(const char *)   )(void*)0x404310;
    	import.R_ModelBounds = ( void (__cdecl *)(const model_s *,vec_t [],vec_t []) )(void*)0x44E520;
    	import.R_ModelFrameBounds = ( void (__cdecl *)(const model_s *,int,vec_t [],vec_t []) )(void*)0x44E560;
    	import.R_RegisterModel = ( model_s *(__cdecl *)(const char *) )(void*)0x44E4F0;
    	import.R_RegisterPic = (shader_s *(__cdecl *)(const char *))(void*)0x462200;
    	import.R_RegisterRawPic = ( shader_s *(__cdecl *)(const char *,int,int,qbyte *) )(void*)0x462220;
    	import.R_RegisterLevelshot = (shader_s *(__cdecl *)(const char *,shader_s *,qboolean *) )(void*)0x462290;
    	import.R_RegisterSkin = ( shader_s *(__cdecl *)(const char *) )(void*)0x462310;
    	import.R_RegisterSkinFile  = (skinfile_s *(__cdecl *)(const char *) )(void*)0x463520;
    	import.R_LerpTag = ( qboolean (__cdecl *)(orientation_s *,const model_s *,int,int,float,const char *) )(void*)0x445930;
    	import.R_LightForOrigin = ( void (__cdecl *)(const vec_t [],vec_t [],vec_t [],vec_t [],float) )(void*)0x4428F0;
    	import.R_SetScissorRegion = ( void (__cdecl *)(int,int,int,int)  )(void*)0x447060;
    	import.R_GetShaderDimensions = ( void (__cdecl *)(const shader_s *,int *,int *,int *) )(void*)0x462350;
    	import.R_TransformVectorToScreen = ( void (__cdecl *)(const refdef_s *,const vec_t [],vec_t []) )(void*)0x449880;
    	import.R_SkeletalGetNumBones = ( int (__cdecl *)(const model_s *,int *) )(void*)0x464540;
    	import.R_SkeletalGetBoneInfo = (int (__cdecl *)(const model_s *,int,char *,size_t,int *))(void*)0x464570;
    	import.R_SkeletalGetBonePose = ( void (__cdecl *)(const model_s *,int,int,bonepose_s *)  )(void*)0x4645E0;
    	import.VID_FlashWindow = ( void (__cdecl *)(int ) )(void*)0x47C0B0;
    	import.CM_NumInlineModels = ( int (__cdecl *)(void) )(void*)0x4040D0;
    	import.CM_InlineModel = ( cmodel_s *(__cdecl *)(int) )(void*)0x404170;
    	import.CM_TransformedBoxTrace = ( void (__cdecl *)(trace_t *,vec_t [],vec_t [],vec_t [],vec_t [],cmodel_s *,int,vec_t [],vec_t []) )(void*)0x404110;
    	import.CM_RoundUpToHullSize = ( void (__cdecl *)(vec_t [],vec_t [],cmodel_s *) )(void*)0x404150;
    	import.CM_TransformedPointContents = ( int (__cdecl *)(vec_t [],cmodel_s *,vec_t [],vec_t []) )(void*)0x4040E0;
    	import.CM_ModelForBBox = ( cmodel_s *(__cdecl *)(vec_t [],vec_t []) )(void*)0x4041B0;
    	import.CM_OctagonModelForBBox = (cmodel_s *(__cdecl *)(vec_t [],vec_t []) )(void*)0x4041D0;
    	import.CM_InlineModelBounds = ( void (__cdecl *)(cmodel_s *,vec_t [],vec_t []) )(void*)0x404190;
    	import.S_RegisterSound = (  sfx_s *(__cdecl *)(const char *) )(void*)0x40FA30;
    	import.S_StartFixedSound = (void (__cdecl *)(sfx_s *,const vec_t [],int,float,float) )(void*)0x40FA80;
    	import.S_StartRelativeSound = ( void (__cdecl *)(sfx_s *,int,int,float,float) )(void*)0x40FAC0;
    	import.S_StartGlobalSound = ( void (__cdecl *)(sfx_s *,int,float) )(void*)0x40FB00;
    	import.S_Update = ( void (__cdecl *)(const vec_t [],const vec_t [],const vec_t [],const vec_t [],const vec_t [],const char *) )(void*)0x404390;
    	import.S_AddLoopSound = ( void (__cdecl *)(sfx_s *,int,float,float) )(void*)0x40FB70;
    	import.S_StartBackgroundTrack = ( void (__cdecl *)(const char *,const char *) )(void*)0x40FBD0;
    	import.S_StopBackgroundTrack = ( void (__cdecl *)(void) )(void*)0x40FC40;
    bonus

    Code:
    void  ( *Wallhack::oCG_UpdateEntities)(  );
    void Wallhack::CG_UpdateEntities( )
    {
    	entity_state_t *state;
    	centity_t *cent;
    	int pnum;
    
    	oCG_UpdateEntities( );
    	
    	for( pnum = 0; pnum < 64; pnum++ ){
    		state = &my_ent[pnum & ( MAX_PARSE_ENTITIES-1 )];
    		cent = &my_cent[state->number];
    			
    		cent->renderfx = 0;
    		switch( cent->type )
    		{
    			case ET_PLAYER:
    			cent->renderfx |= 0x20;
    			break;
    		}
    	}	
    }

    Code:
    		
          	
    		myWallhack.oCG_UpdateEntities = ( void (__cdecl *)(void) )DetourFunction((PBYTE)CGGame_DLL+0x0E130,(PBYTE)&myWallhack.CG_UpdateEntities);
    Last edited by King-OrgY; 30th July 2012 at 19:52.

  2. The Following 4 Users Say Thank You to King-OrgY For This Useful Post:

    Asylum (30th July 2012), lolzoruslockus (31st July 2012), Pansemuckl (31st July 2012), Troll (31st July 2012)

Visitors found this page by searching for:

warsow 1.0 wallhack

netcoders.cc warsow

warsow 1.0 hacks

netcoders.cc warsow 1.0

warsow 1.0 hack

warsow structs

warsow netcoders

SEO Blog

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •