That can a lot better. for example:
Code:
//Call this
ChangeAddress(0xEEC,0.0f);
ChangeAddress(0x1054,0.0f);
ChangeAddress(0x11BC,0.0f);
ChangeAddress(0x3514,0.0f);
ChangeAddress(0x36FC,0.0f);
ChangeAddress(0x39F8,0.0f);
ChangeAddress(0x3B74,0.0f);
ChangeAddress(0x3514,0x3540,0.0f);
ChangeAddress(0x36F4,0x3710,0.0f);
ChangeAddress(0x39F8,0x3A04,0.0f);
ChangeAddress(0x3A64,0x3A7C,0.0f);
//Functions that you need
void ChangeAddress(DWORD Offset,DWORD HandleToDLL,float Value)
{
*((float*)HandleToDLL + Offset) = Value;
}
void ChangeAddress(DWORD FromOffset, DWORD ToOffset,DWORD HandleToDLL,float Value)
{
for(DWORD i = 0; i <= ToOffset - FromOffset; i++)
NullAddress(FromOffset + i,HandleToDLL,Value);
}
Did't test the code, I wrote this in notepad. Btw Its better that you use Templates, then you can use this in more situation.
You need to add the y loop, i don't know what y is... I only know it's a bad name... so you need to add it your self, there is a big chance that you can do this cleaner..
Btw, why do you use C style casting? Its better to use C++0x/C++11 casting... So, do you have a reason to use C style casting?
Nvm, I stop updating this post.. Your code is to bad... soz.