Skip to content

Instantly share code, notes, and snippets.

View warmist's full-sized avatar
🫥
.

Warmist warmist

🫥
.
View GitHub Profile
local fname="mp_forwardbase_kodai.ain"
local print_stuff=true
local save_nodes=true
local save_links=true
--[[ current struct layouts ]]
local MAX_HULLS=5
local ain_file={
{"u32","magic"},
{"u32","mapver"},
{"u32","crc"},
# McSimps Titanfall Map Exporter Tool
# Website: https://will.io/
# Modded(butchered) to output ply by Warmist
# disclaimer: i don't know python...
import struct
from enum import Enum
import os
import math
@warmist
warmist / hull_list.txt
Last active January 9, 2022 08:25
ImHex pattern and lua file for reading titanfall2 navmesh file format
Hulls extracted from the game:
180b4be60 hulldef[6]
hulldef[0]
name=HULL_HUMAN
field1_0x8=0x1
bbox_min={-16,-16,0}
bbox_max={16,16,72}
walk_height=18.0 //not 100% sure...
field5_0x28=0.5
field6_0x2c={60.0f,250.0f,400.0f}
@warmist
warmist / ain_file.hexpat
Last active December 27, 2021 20:35
Titanfall2 .ain file partial layout
struct header {
u32 version;
u32 map_version;
u32 unk0; //crc or hash or sth
};
header head @ 0x00;
struct node_t {
float px,py,pz,yaw;
function find_race(name)
name = name:lower()
for i,v in ipairs(df.global.world.raws.creatures.all) do
if v.creature_id:lower() == name:lower() then
return i
end
end
end
--NOTE(warmist): named_civ changed to player_civ but does not make sense?
//from Hash Functions for GPU Rendering (Jarzynski et al.)
//http://www.jcgt.org/published/0009/03/02/
uint3 pcg3d(uint3 v)
{
v = v * 1664525u + 1013904223u;
v.x += v.y*v.z; v.y += v.z*v.x; v.z += v.x*v.y;
v ˆ= v >> 16u;
v.x += v.y*v.z; v.y += v.z*v.x; v.z += v.x*v.y;
return v;
}
@warmist
warmist / thign.hpp
Created August 7, 2018 10:11
threading experiment
#include <mutex>
template<typename T,typename M=std::mutex>
struct protected_variable
{
T data;
M data_mutex;
template <typename F>
void with(F f){
std::lock_guard<M> lock(data_mutex);
@warmist
warmist / find_twbt.lua
Last active October 12, 2018 10:54
Find render_map offset for twbt
local ms=require('memscan')
local cs=ms.get_code_segment()
function get_ptr_size( )
local v=df.new('uintptr_t')
local ret=df.sizeof(v)
df.delete(v)
return ret
end
@warmist
warmist / lt_markdeep.js
Last active April 25, 2018 11:28
Lt language for markdeep
var LITHUANIAN = {
keyword: {
table: 'lentelė',
figure: 'paveikslėlis',
listing: 'sąrašas',
diagram: 'diagrama',
contents: 'Turinys',
sec: 'sk',
section: 'skyrius',
Log file created at: 2017/09/01 16:47:21
Running on machine: DESKTOP-P4285VI
Log line format: [IWEF]mmdd hh:mm:ss.uuuuuu threadid file:line] msg
@ 00007FFCFEC97799 principia__RenderedVesselTrajectory [0x00007FFCFEC97798+218356]
@ 00007FFCFEC0735F principia__FlightPlanRemoveLast [0x00007FFCFEC0735E+571018]
@ 00007FFCFEC254EB principia__FlightPlanRemoveLast [0x00007FFCFEC254EA+694294]
@ 00007FFCFEB0AEE8 principia__IteratorAtEnd [0x00007FFCFEB0AEE7+20463]
@ 00007FFCFEB2C620 principia__FreeVesselsAndPartsAndCollectPileUps [0x00007FFCFEB2C61F+107]
@ 000000002CFA1A4C (No symbol) [0x000000002CFA1A4B]
F0901 16:47:21.103809 6832 vessel.cpp:127] Check failed: !parts_.empty()