Re: Character floor effect
Re: Character floor effect
CustomMoveEffect.h
Quote:
#pragma once
#define WorldTime *(float*)0x005EF5A1C
#define EnableAlphaBlend ((void(__cdecl*)()) 0x636070)
#define DisableAlphaBlend ((void(__cdecl*)()) 0x00635F50)
#define RenderTerrainAlphaBitmap ((void(__cdecl*)(int Texture,float xf,float yf,float SizeX,float SizeY,vec3_t Light,float Rotation,float Alpha,float Height, char a10)) 0x005DAD80)
class CustomMoveEffect
{
public:
CustomMoveEffect(void);
~CustomMoveEffect(void);
void Init();
};
extern CustomMoveEffect gMoveEffect;
CustomMoveEffect.cpp
Quote:
#include "StdAfx.h"
#include "CustomMoveEffect.h"
#include "User.h"
#include "Util.h"
CustomMoveEffect gMoveEffect;
CustomMoveEffect::CustomMoveEffect(void)
{
}
CustomMoveEffect::~CustomMoveEffect(void)
{
}
void __cdecl RenderCharacter(ObjectPreview *a4, ObjectModel *a5, int Select)
{
vec3_t vLight;
Vector(1.0f, 1.0f, 1.f, vLight);
float fLumi = sinf(WorldTime * 0.0015f) * 0.3f + 0.5f;
Vector(fLumi * vLight[0], fLumi * vLight[1], fLumi * vLight[2], vLight);
EnableAlphaBlend();
RenderTerrainAlphaBitmap(32280, a4->m_Model.VecPos.X, a4->m_Model.VecPos.Y, 5.8f, 5.8f, vLight, WorldTime * 0.11f, 1.0, 5, 1);
RenderTerrainAlphaBitmap(32280, a4->m_Model.VecPos.X, a4->m_Model.VecPos.Y, 3.8f, 3.8f, vLight, -WorldTime * 0.01f, 1.0, 5, 1);
DisableAlphaBlend();
}
void CustomMoveEffect::Init()
{
SetCompleteHook(0xE8,0x404570+0x30D,&RenderCharacter);
SetCompleteHook(0xE8,0x48E120+0x44C,&RenderCharacter);
SetCompleteHook(0xE8,0x57D260+0x29F,&RenderCharacter);
SetCompleteHook(0xE8,0x57D260+0x2B3,&RenderCharacter);
}
Main.cpp
gMoveEffect.Init()
- - - Updated - - -
Bug:
https://i.im.ge/2022/06/30/uS26AW.jpg
https://i.im.ge/2022/06/30/uS2Np0.md.jpg