This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void PlayerCmd_IsMantling(int self) { | |
/* | |
mantling m8 a1=fff9d750, a2=fff9d500, *(int*)a1 = 8705480 | |
mantling m8 a1=fff9d750, a2=fff9d500, *(int*)a1 = 8705480 = unk_8705480 | |
*/ | |
#if COD_VERSION == COD2_1_2 | |
int idk = 0x8705480 + 10404 * self + 0xc; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#if COD2_VERSION == COD2_VERSION_1_2 | |
unsigned short (*GetVariableName)(unsigned short) = (unsigned short(*)(unsigned short))0x807CFF6; | |
unsigned short (*GetNextVariable)(unsigned short) = (unsigned short(*)(unsigned short))0x807CF52; //idk original funcname | |
#elif COD2_VERSION == COD2_VERSION_1_3 | |
unsigned short (*GetVariableName)(unsigned short) = (unsigned short(*)(unsigned short))0x807D0C2; | |
unsigned short (*GetNextVariable)(unsigned short) = (unsigned short(*)(unsigned short))0x807D01E; //idk original funcname | |
#else | |
unsigned short (*GetVariableName); | |
unsigned short (*GetNextVariable); | |
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//thanks and credits to | |
//https://github.com/CptAsgard/CoD2Unity/blob/master/Assets/Scripts/IWILoader.cs | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string> | |
#include <stdint.h> | |
//need to include DDS_header urself |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
typedef struct | |
{ | |
unsigned short sin_family; | |
unsigned short sin_port; | |
unsigned int sin_addr; //long on x64 | |
char sin_zero[8]; | |
} sockaddr_in; | |
#define AF_INET 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma comment(lib, "/lib/i386-linux-gnu/libc.so.6") | |
#define STDOUT_FILENO 1 | |
typedef struct | |
{ | |
int out; | |
int in; | |
} filedes_t; | |
main() | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma comment(lib, "msvcrt.dll") | |
#pragma comment(lib, "SDL2.dll") | |
#pragma comment(lib, "SDL2_image.dll") | |
#pragma comment(lib, "opengl32.dll") | |
typedef struct | |
{ | |
int type; | |
char rest[54]; | |
} SDL_Event; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dot(a,b) | |
{ | |
return (a.x*b.x+a.y*b.y+a.z*b.z); | |
} | |
_sqrt(a) | |
{ | |
prev = 0; | |
for(i=0.0;i<10000;i = i + 0.1) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<canvas> | |
</canvas> | |
<script> | |
(function() | |
{ | |
var canvas = document.getElementsByTagName("canvas")[0]; | |
var ctx = canvas.getContext("2d"); | |
canvas.width = window.innerWidth; | |
canvas.height = window.innerHeight; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <Windows.h> | |
int main(int argc, char** argv) | |
{ | |
if (argc < 2) | |
return 0; | |
HMODULE lib = LoadLibraryA("steam_api.dll"); | |
bool (*__cdecl SteamAPI_Init)() = (bool(__cdecl*)())GetProcAddress(lib, "SteamAPI_Init"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# usage: ./watermark.sh "your text" input_image_path.png | |
convert -background none -fill "rgba(128,128,128,0.25)" -font Arial -rotate -30 -pointsize 14 label:"$1" /tmp/wm.png | |
convert $2 -alpha on \( +clone -tile /tmp/wm.png -draw "color 0,0 reset" \) -composite result.png | |
#rm /tmp/wm.png |
OlderNewer