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
/* Support for executing system calls in the context of the game process. */ | |
static const int injection_size = 4; | |
static const char nop_code_bytes[injection_size] = { | |
/* This is the byte pattern used to pad function | |
addresses to multiples of 16 bytes. It consists | |
of RET and a sequence of NOPs. The NOPs are not | |
supposed to be used, so they can be overwritten. */ | |
0xC3, 0x90, 0x90, 0x90 |
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
args: eax, edx, ecx, stack | |
args: creature, arg_temp, arg2#1, arg3/*10*/ | |
/* offsets: | |
creature: | |
0x308 vector* body_part_info_vec | |
0x654 vector body_part_temp_vec | |
inventory item: |
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
08117480 flagarrayst::has_flag{flag} | |
080e49d0 world::?getMapBlock{x,y,z} | |
089d53b0 world::?getMaterial{subidx,index} | |
088c9d00 ??computeClothingInsulation | |
088c9830 ??computeClothingInsulation2 | |
0813a840 ??computeClothingInsulation3 | |
08a3fe70 world::?handleFlows | |
080801f0 world::?handleBlockTemps | |
0895d540 ??computeCreatureTemp | |
08946b70 ??computeBodyPartTemp |
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
my %lines; | |
my %switches; | |
my %jumps; | |
while (<>) { | |
$jumps{hex $1}{hex $2}++ if (/^n([0-9a-f]+)\s+->\s+n([0-9a-f]+)/); | |
if (/^n([0-9a-f]+)\s+->\s+n([0-9a-f]+)\s+\[label=\"([0-9,-]+)\"/) { | |
$switches{hex $1}{$3} = hex $2; | |
} elsif (/^n([0-9a-f]+)\s+\[label=\".*?\\l'(.*)'\\l/) { |
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
(require 'asdf) | |
(asdf:load-system :hu.dwim.walker) | |
;;;; Walker interface implementation | |
(defpackage :swank-macro-context | |
(:use :cl :hu.dwim.walker :hu.dwim.def :contextl :metabang-bind) | |
(:export #:apply-expander)) | |
(in-package :swank-macro-context) |
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
#ifndef DF_GENERAL_REF_UNIT_H | |
#define DF_GENERAL_REF_UNIT_H | |
#ifndef DF_GENERAL_REF_H | |
#include "general_ref.h" | |
#endif | |
namespace df { | |
struct general_ref_unit : general_ref { | |
int32_t unit_id; | |
static virtual_identity<general_ref_unit> _identity; | |
protected: |
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 __cdecl sub_89289C0(int unit) | |
{ | |
int unit; // esi@1 | |
int unf_vec_end; // eax@3 | |
int v3; // edx@3 | |
int v4; // edx@4 | |
int unf_vec_start; // ecx@4 | |
int item_id; // edi@5 | |
signed int v7; // edx@7 | |
signed int v8; // eax@8 |
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
my %lines; | |
my %switches; | |
my %jumps; | |
while (<>) { | |
$jumps{hex $1}{hex $2}++ if (/^n([0-9a-f]+)\s+->\s+n([0-9a-f]+)/); | |
if (/^n([0-9a-f]+)\s+->\s+n([0-9a-f]+)\s+\[label=\"([0-9,-]+)\"/) { | |
$switches{hex $1}{$3} = hex $2; | |
} elsif (/^n([0-9a-f]+)\s+\[label=\".*?\\nmov\s+eax,0x([0-9a-fA-F]+)\\l/) { |
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
-- Lists and/or compares two tiletype material groups. | |
-- Usage: lua cmptiles.lua material1 [material2] | |
local nmat1,nmat2=... | |
local mat1 = df.tiletype_material[nmat1] | |
local mat2 = df.tiletype_material[nmat2] | |
local tmat1 = {} | |
local tmat2 = {} |
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
-- This scripts verifies that: | |
-- | |
-- 1) Item has flags.on_ground <=> it is in the correct block item list | |
-- 2) A tile has items in block item list <=> it has occupancy.item | |
function check_block_items() | |
local cnt = 0 | |
local icnt = 0 | |
local found = {} |
OlderNewer