Skip to content

Instantly share code, notes, and snippets.

@Ed94
Ed94 / hello_files.rdi.list
Created June 22, 2025 17:35
hello_files.asm listing
# C:\projects\asm_dip\build\hello_files.rdi (RDI)
# DATA SECTIONS
data_section[ 0] = {00000000, 0, 0}, NULL
data_section[ 1] = {0x0004f8, 32, 32}, TopLevelInfo
data_section[ 2] = {0x000518, 1175, 1175}, StringData
data_section[ 3] = {0x0009b0, 468, 468}, StringTable
data_section[ 4] = {0x000b88, 908, 908}, IndexRuns
data_section[ 5] = {0x000f18, 200, 200}, BinarySections
#ifdef INTELLISENSE_DIRECTIVES
# pragma once
// NOTE(Ed): For C++ generation, this file will not be injected, any macros that are used will either be injected as transparent defines
// or have their usage removed during the library generation pass.
#endif
// ____ _ ______ _ _ ____ _ __ _
// / ___} (_) | ____} | | (_) / __ \ | | | |(_)
// | | ___ ___ _ __ ___ _ __ _ ___ | |__ _ _ _ __ ___| |_ _ ___ _ __ | | | |_ _____ _ __ | | ___ __ _ __| | _ _ __ __ _
// | |{__ |/ _ \ '_ \ / _ \ '__} |/ __| | __} | | | '_ \ / __} __} |/ _ \| '_ \ | | | \ \ / / _ \ '_ }| |/ _ \ / _` |/ _` || | '_ \ / _` |
@Ed94
Ed94 / example_of_generated_instantiation.c
Last active December 6, 2024 01:54
_Generic function overloading example in C11
#pragma region Array_ssize
#define GENERIC_SLOT_2__array_init Array_ssize, Array_ssize_init
#define GENERIC_SLOT_2__array_init_reserve Array_ssize, Array_ssize_init_reserve
#define GENERIC_SLOT_2__array_append Array_ssize, Array_ssize_append
#define GENERIC_SLOT_2__array_append_items Array_ssize, Array_ssize_append_items
#define GENERIC_SLOT_2__array_append_at Array_ssize, Array_ssize_append_at
#define GENERIC_SLOT_2__array_append_items_at Array_ssize, Array_ssize_append_items_at
#define GENERIC_SLOT_2__array_back Array_ssize, Array_ssize_back
#define GENERIC_SLOT_2__array_clear Array_ssize, Array_ssize_clear
@Ed94
Ed94 / odin_virtual_code_view.ps1
Last active May 12, 2024 20:00
Virtual view for odin source code: Use symbolic links on windows to create a custom view on the file system for large modules in odin for your codebase
$path_code = "DEFINE BASE DIRECTORY PATH FOR THE CODEBASE HERE"
$path_virtual_view = 'DEFINE BASE DIRECTORY PATH FOR THE VIRTUAL VIEW HERE'
if (test-path $path_virtual_view) {
Remove-Item -Path $path_virtual_view -Recurse -Force -ErrorAction Ignore
}
New-Item -ItemType Directory -Path $path_virtual_view
$files = Get-ChildItem -Path $path_code -File -Recurse
foreach ($file in $files)
@Ed94
Ed94 / UnrealNoMacro_UE_LOG.cpp
Last active April 13, 2024 09:57
UE_LOG but it's not a macro
// Straight from the Engine
UENUM(BlueprintType)
enum class E<YourModule>Verbosity : uint8
{
/** Not used */
NoLogging = 0,
/** Always prints a fatal error to console (and log file) and crashes (even if logging is disabled) */
//Fatal,
@Ed94
Ed94 / msvc_devenv.bat
Last active July 30, 2023 18:53
Finds the vcvarsall of an existing visual studio installation and runs it. (Arguments are transparently passed)
@echo off
setlocal enabledelayedexpansion
REM Use vswhere to find the latest Visual Studio installation
for /f "tokens=*" %%i in ('"C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" -latest -property installationPath') do set VS=%%i
if "!VS!" equ "" (
echo ERROR: Visual Studio installation not found
exit /b 1
)
@Ed94
Ed94 / msvc_devshell.ps1
Last active July 30, 2023 18:54
Find and load the msvc developer powershell from the default installation paths
$ErrorActionPreference = "Stop"
# Use vswhere to find the latest Visual Studio installation
$vswhere_out = & "C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" -latest -property installationPath
if ($null -eq $vswhere_out) {
Write-Host "ERROR: Visual Studio installation not found"
exit 1
}
# Find Launch-VsDevShell.ps1 in the Visual Studio installation
@Ed94
Ed94 / SConstruct (godot-cpp)
Last active February 23, 2023 22:46
godot-cpp multi-module fast incremental compile sconstruct example
#!/rusr/bin/env python
# Py Platform
import os
import platform
import shutil
import subprocess
import sys
import time
@Ed94
Ed94 / Vulkan_FixRegistryKey_ExplictLayers.py
Created December 31, 2020 21:41
Scoop Vulkan [Windows]: Fix registry entires for ExplicitLayers Key.
import ctypes; # Allows interface with low-level C API's.
import os;
import platform;
import sys;
import winreg; # Allows access to the windows registry.
LocalComputer = None;
RootKey_LocalMachine = None;
@Ed94
Ed94 / Bitfield.hpp
Last active February 9, 2021 07:05
/*
Bitfield
A wrapper for bitfields with support for specifying enum classes as bitmaskable types, and
ease of use functionality for manipulating the bitfield.
*/
#pragma once