My Noob Code
Well, I know C++ and im learning Windows API.
Undersand: Green
Dont Understand: Red
Does anyone know where I can read or do something to understand the red parts? I know that they have to do with Direct3D but what exactly should I look up.
Ohhh....before anyone says anything. This code is from Lauwy's tutorial. So you may call me a leecher but im just using it to learn.
Btw, I am proud to say that I did the green parts on my own.
I SO HAPPY!
Undersand: Green
Dont Understand: Red
Does anyone know where I can read or do something to understand the red parts? I know that they have to do with Direct3D but what exactly should I look up.
Ohhh....before anyone says anything. This code is from Lauwy's tutorial. So you may call me a leecher but im just using it to learn.
Btw, I am proud to say that I did the green parts on my own.

I SO HAPPY!
Code:
#include <windows.h>
#include <iostream>
using namespace std;
void __cdecl PTC(char* command ) {
DWORD dwCShell = (DWORD)GetModuleHandleA("CShell.dll");
if( dwCShell != NULL )
{
DWORD *LTC = ( DWORD* )( (dwCShell + 0x2AAE80) ); //LTC UP-TO-DATE
void* Console = ( void* )*( DWORD* )( *LTC + 0x1F8 );
_asm
{
push command;
call Console;
add esp, 4;
}
}
}
DWORD WINAPI Happyface(LPVOID) {
while(GetModuleHandleA("CShell.dll") == NULL ) {
Sleep(100); //100ms
}
int glow = 0;
for(;;) {
__asm pushad;
if(GetAsyncKeyState(VK_NUMPAD1)&1) {
glow = 0;
}
if(GetAsyncKeyState(VK_NUMPAD2)&1) {
glow = 1;
}
if (glow = 0) {
PTC("ScreenGlowEnable 0");
}
else {
PTC("ScreenGlowEnable 1");
}
Sleep(100);
__asm popad;
}
}
BOOL WINAPI DllMain ( HMODULE hDll, DWORD dwReason, LPVOID lpReserved )
{
DisableThreadLibraryCalls(hDll);
if ( dwReason == DLL_PROCESS_ATTACH )
{
MessageBox(NULL, TEXT("By: aanthonyz"), TEXT ("Crossfire Hacks"), NULL);
system("start http://crossfire.z8games.com/");
CreateThread(NULL, NULL,Happyface, NULL, NULL, NULL);
}
return TRUE;
}



)
