Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
# CPU: LPC2148
# ARH: ARM7TDMI-S
# Project name
PROJECT = air-1.0
# Compilation parameters
MCU = arm7tdmi-s
CPUARCH = armv4t
#THUMB = -mthumb
#THUMB += -mcallee-super-interworking
#THUMB_IW = -mthumb-interwork
#-fno-omit-frame-pointer
OPTLEVEL = s
DEBUG =
DEBUG_METHOD = hard
# Source files
SRC = src/main.c \
src/debug.c \
src/os/kernel/os_kernel.c \
src/os/kernel/os_fifo.c \
src/os/system.c \
src/os/sysdrv/io.c \
src/os/sysdrv/i2c.c \
src/os/sysdrv/scb.c \
src/os/sysdrv/spi.c \
src/os/sysdrv/vic.c \
src/os/usrdrv/mmc.c \
src/os/usrdrv/pcf8548.c \
src/os/usrdrv/kbd.c \
src/os/usrdrv/audio.c \
src/os/gfx/lcd_a2618.c \
src/os/gfx/fb_1bpp.c \
src/sys/mem_alloc.c \
src/sys/xlibc.c \
src/resources/bitmaps.c \
src/resources/fonts.c \
src/au.c \
src/adpcm.c \
src/audio/auprocessor.c \
src/os/fs/tff.c \
src/os/fs/diskio.c \
src/port.c \
src/cpptest.c
SRC32 =
INCLUDES = -Iinclude
#FLAGS = -finstrument-functions
#-finstrument-functions
#| Common block |
# +-----------------------------------------------+
ifeq ($(DEBUG_METHOD),hard)
else
endif
#LIBC = $(LIBDIR)/libc.a
#LIBC += $(LIBDIR)/libnosys.a
#ARCH=arm-elf
ARCH=arm-none-eabi
CC = $(ARCH)-gcc
LD = $(ARCH)-ld
AR = $(ARCH)-ar
AS = $(ARCH)-as
OBJCOPY = $(ARCH)-objcopy
OBJDUMP = $(ARCH)-objdump
OBJSIZE = $(ARCH)-size
OBJS = $(SRC:.c=.o)
OBJS32 = $(SRC32:.c=.o)
OBJSAS = $(SRCAS:.S=.o)
ELF = $(PROJECT).elf
HEX = $(PROJECT).hex
BIN = $(PROJECT).bin
ASM = $(PROJECT).asm
MAP = $(PROJECT).map
1. using namespace std;
2. #include <conio.h> // for kbhit
3. #include <windows.h>
4. #include <string> // for strings
5. #include <fstream> // file I/O
6. #include <iostream> // for cin >> and cout <<
7. #include <iomanip> // for fancy output
8. #include "TimeUtils.h" // for GetTime, GetDate, etc.
LPCISP = lpc21isp
#LPCISP = lpcflash
MSG_COMPILING32 = "CC32:"
MSG_SIZE = "Size:"
# Rules
@echo $(MSG_LINKING) $@
@echo $(MSG_SIZE)
$(OBJSIZE) $@
$(HEX) : $(ELF)
$(BIN) : $(ELF)
$(ASM) : $(ELF)
hex : $(HEX)
bin : $(BIN)
disasm: $(ASM)
flash: $(HEX)
$(LPCISP) $(LPCISP_PARAMS)
clean :
@echo $(MSG_CLEANING) $(TO_CLEAN)
rm -f $(OBJALL) $(TO_CLEAN)
#include <iostream>
#include "Types.hpp"
#include "Threading.cpp"
#include "FOV.cpp"
#include "Hack.cpp"
Hack hack;
vector<HANDLE> threads;
void WaitForGameThenStart();
void PrintDebugInfo()
cout << "hack.ClientDll: 0x" << hex << hack.ClientDll << endl;
cout << "hack.LocalPlayerPointer: 0x" << hex << hack.LocalPlayerPointer << endl;
cout << "hack.LocalPlayer(): 0x" << hex << hack.LocalPlayer() << endl;
dw BunnyhopThread(void*)
while (true)
{
if (hack.IsPlayerOnGround())
hack.Jump();
dw RapidFireThread(void*)
while (true)
hack.Attack();
Sleep(16);
dw ESPThread(void*)
while (true)
{
if (GetAsyncKeyState(Key::RapidFire) && hack.IsGameWindowActive() &&
hack.LocalPlayer() && (hack.GlowEspEnable || hack.RadarEspEnable))
dw GameStateControlThread(void*)
while (true)
if (hack.IsGameRunning())
Sleep(1000);
else
StopThreads(threads);
threads.clear();
break;
dw MiscellanousThread(void* pFOV)
if (GetAsyncKeyState(Key::DebugPrint))
PrintDebugInfo();
Sleep(200);
if (hack.IsGameWindowActive())
if (hack.LocalPlayer())
if (GetAsyncKeyState(Key::FovIncrement))
*fov++;
Sleep(200);
if (GetAsyncKeyState(Key::FovDecrement))
*fov--;
Sleep(200);
if (GetAsyncKeyState(Key::FovReset))
fov->Reset();
Sleep(200);
if (GetAsyncKeyState(Key::GlowEspToggle))
{
hack.GlowEspEnable = !hack.GlowEspEnable;
Sleep(200);
if (GetAsyncKeyState(Key::GlowEspBloomToggle))
hack.GlowEspBloomEnable = !hack.GlowEspBloomEnable;
Sleep(200);
if (GetAsyncKeyState(Key::RadarEspEnable))
hack.RadarEspEnable = !hack.RadarEspEnable;
Sleep(200);
hack.SetFlashMaxAlpha(0.0f);
void RunHackThreads()
hack.InitializeOffsets();
printf("\n");
PrintDebugInfo();
threads.push_back(miscThread);
WaitForSingleObject(gscThread, INFINITE);
CloseHandle(gscThread);
WaitForGameThenStart();
void WaitForGame()
while(true)
if (!state)
Sleep(500);
else
Sleep(7000);
break;
}
void WaitForGameThenStart()
WaitForGame();
RunHackThreads();
int main()
if (hack.DriversLoaded())
WaitForGameThenStart();
else
Sleep(5000);
exit(-1);