add .jpg's
6
makefile
@ -8,12 +8,14 @@ LIB_DIR=lib
|
||||
LDFLAGS=-m32 -fno-gnu-unique -D_GLIBCXX_USE_CXX11_ABI=0 -shared -L$(realpath $(LIB_DIR))
|
||||
LDLIBS=-static -lc -lstdc++ -ltier0 -lvstdlib
|
||||
SRC_DIR = src
|
||||
RES_DIR = res
|
||||
OUT_NAME = libcathook.so
|
||||
TARGET_DIR = bin
|
||||
TARGET = $(TARGET_DIR)/$(OUT_NAME)
|
||||
SOURCES = $(shell find $(SRC_DIR) -name "*.cpp" -print)
|
||||
SOURCES += $(shell find $(SIMPLE_IPC_DIR) -name "*.cpp" -print)
|
||||
OBJECTS = $(SOURCES:.cpp=.o)
|
||||
OBJECTS += $(shell find $(RES_DIR) -name "*.o" -print)
|
||||
DEPENDS = $(SOURCES:.cpp=.d)
|
||||
SRC_SUBDIRS=$(shell find $(SRC_DIR) -type d -print)
|
||||
|
||||
@ -38,8 +40,8 @@ $(TARGET): $(OBJECTS)
|
||||
$(CXX) $(CXXFLAGS) $(LDFLAGS) $(OBJECTS) $(LDLIBS) -o $(TARGET)
|
||||
|
||||
clean:
|
||||
find . -type f -name '*.o' -delete
|
||||
find . -type f -name '*.d' -delete
|
||||
find src -type f -name '*.o' -delete
|
||||
find src -type f -name '*.d' -delete
|
||||
rm -rf ./bin
|
||||
|
||||
ifneq ($(MAKECMDGOALS), clean)
|
||||
|
BIN
res/demoman.jpg
Normal file
After Width: | Height: | Size: 3.4 KiB |
BIN
res/demoman_blue.jpg
Normal file
After Width: | Height: | Size: 3.6 KiB |
BIN
res/engineer.jpg
Normal file
After Width: | Height: | Size: 3.8 KiB |
BIN
res/engineer_blue.jpg
Normal file
After Width: | Height: | Size: 3.9 KiB |
BIN
res/heavy.jpg
Normal file
After Width: | Height: | Size: 3.9 KiB |
BIN
res/heavy_blue.jpg
Normal file
After Width: | Height: | Size: 4.1 KiB |
BIN
res/medic.jpg
Normal file
After Width: | Height: | Size: 3.7 KiB |
BIN
res/medic_blue.jpg
Normal file
After Width: | Height: | Size: 3.7 KiB |
BIN
res/pyro.jpg
Normal file
After Width: | Height: | Size: 3.7 KiB |
BIN
res/pyro_blue.jpg
Normal file
After Width: | Height: | Size: 3.9 KiB |
BIN
res/scout.jpg
Normal file
After Width: | Height: | Size: 3.8 KiB |
BIN
res/scout_blue.jpg
Normal file
After Width: | Height: | Size: 3.8 KiB |
BIN
res/sniper.jpg
Normal file
After Width: | Height: | Size: 3.4 KiB |
BIN
res/sniper_blue.jpg
Normal file
After Width: | Height: | Size: 3.5 KiB |
BIN
res/soldier.jpg
Normal file
After Width: | Height: | Size: 3.4 KiB |
BIN
res/soldier_blue.jpg
Normal file
After Width: | Height: | Size: 3.8 KiB |
BIN
res/spy.jpg
Normal file
After Width: | Height: | Size: 3.4 KiB |
BIN
res/spy_blue.jpg
Normal file
After Width: | Height: | Size: 3.4 KiB |
@ -18,6 +18,8 @@ CatVar disable_visuals(CV_SWITCH, "no_visuals", "0", "Disable ALL drawing", "Com
|
||||
CatVar no_zoom(CV_SWITCH, "no_zoom", "1", "Disable scope", "Disables black scope overlay");
|
||||
CatVar logo(CV_SWITCH, "logo", "1", "Show logo", "Show cathook text in top left corner");
|
||||
|
||||
extern unsigned char _binary_spy_blue_start;
|
||||
|
||||
void PaintTraverse_hook(void* p, unsigned int vp, bool fr, bool ar) {
|
||||
#if DEBUG_SEGV == true
|
||||
if (!segvcatch::handler_fpe || !segvcatch::handler_segv) {
|
||||
@ -67,10 +69,15 @@ void PaintTraverse_hook(void* p, unsigned int vp, bool fr, bool ar) {
|
||||
|
||||
ResetStrings();
|
||||
|
||||
static Texture text(&_binary_spy_blue_start, 128, 128);
|
||||
if (!text.id) text.Load();
|
||||
|
||||
if (vp != panel_focus) return;
|
||||
if (!draw_flag) return;
|
||||
draw_flag = false;
|
||||
|
||||
text.Draw(0, 0, 64, 64);
|
||||
|
||||
{
|
||||
std::lock_guard<std::mutex> guard(hack::command_stack_mutex);
|
||||
while (!hack::command_stack().empty()) {
|
||||
|
@ -19,6 +19,7 @@ Texture::~Texture() {
|
||||
|
||||
void Texture::Load() {
|
||||
id = g_ISurface->CreateNewTextureID(true);
|
||||
logging::Info("Loading texture: got id %i", id);
|
||||
g_ISurface->DrawSetTextureRGBA(id, start_addr, w, h, 0, 0);
|
||||
}
|
||||
|
||||
@ -26,5 +27,5 @@ void Texture::Draw(int x, int y, int sw, int sh) {
|
||||
if (!g_ISurface->IsTextureIDValid(id)) throw std::runtime_error("Invalid texture ID!");
|
||||
g_ISurface->DrawSetColor(255, 255, 255, 255);
|
||||
g_ISurface->DrawSetTexture(id);
|
||||
g_ISurface->DrawTexturedRect(x, y, sw, sh);
|
||||
g_ISurface->DrawTexturedRect(x, y, x + sw, y + sh);
|
||||
}
|
||||
|