All pastes #344948 Raw Edit

Unnamed

public text v1 · immutable
·published 2007-02-08 03:38 UTC
rendered paste body
#include "seth.h"

//void eth_CG_dllEntry(int (*syscallptr) (int arg,...))
void eth_CG_dllEntry(int (*syscallptr) (int command, int arg0, int arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7, int arg8, int arg9)) 
{
	orig_syscall = syscallptr;
	orig_CG_dllEntry(eth_CG_syscall);
}

void eth_UI_dllEntry(int (*syscallptr) (int command, int arg0, int arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7, int arg8, int arg9)) 
{
	orig_syscall = syscallptr;
	orig_UI_dllEntry(eth_UI_syscall);
}

int eth_CG_syscall(int command, int arg0, int arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7, int arg8, int arg9)
{
	switch( command ) {
		case CG_R_ADDREFENTITYTOSCENE: { eth_CG_R_AddRefEntityToScene(refEntity_t *refEnt); break; }
		case CG_R_REGISTERSHADER: {
			if (strstr((const char *)arg0, "entityOnFire1")) {
				qhShader = orig_syscall(command, arg0);
				return qhShader;
				}
			}
	
	}
	
	return orig_syscall(command, arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9);
}

int eth_UI_syscall(int command, int arg0, int arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7, int arg8, int arg9)
{
	return orig_syscall(command, arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9);
}

void eth_CG_R_AddRefEntityToScene(refEntity_t *refEnt)
{
	if( refEnt->entityNum < MAX_CLIENTS )
		refEnt->renderfx |= RF_DEPTHHACK | RF_NOSHADOW;
		refEnt->shaderRGBA[0] = 0xFF;
		refEnt->shaderRGBA[1] = 0xFF;
		refEnt->shaderRGBA[2] = 0xFF;
		refEnt->shaderRGBA[3] = 0xFF;
		refEnt->customShader  = qhShader;
}

void eth_CG_WeaponFireRecoil(int weapon){ return; }
void eth_CG_DamageFeedback(int yawByte, int pitchByte, int damage){ return; }