Skip to content

Instantly share code, notes, and snippets.

View gdianaty's full-sized avatar
🙉
monkey :)

Graham Dianaty gdianaty

🙉
monkey :)
View GitHub Profile
@gdianaty
gdianaty / symboldump.bat
Created December 19, 2019 21:00
Generate .lib files from every DLL in the same directory as this batch file.
@echo off
:: Authored by a very lazy Graham Dianaty, 2019
:: Move recursively thru all files in same directory and generate lib files for them using black magic.
:: Note: %%~nf removes the extension from a file.
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\Tools\VsDevCmd.bat"
cls
for /R %%f in (*.dll) do (
echo [symbolgen.bat] Dumping %%f...
@gdianaty
gdianaty / cmakejs.cmake
Last active February 23, 2024 04:32
CMake.js Inclusion Function for ordinary CMake
# Authored by Graham Dianaty for Bitlogix Technologies. Based on code from Rene Hollander. ==========//
function(setup_cmakejs)
find_program(CMAKEJS "cmake-js")
find_program(NPM "npm")
# first, check if we have NPM:
if(NPM)
message(VERBOSE "NPM found.")
else()
message(FATAL_ERROR "NPM not found. This project requires Node.js")
endif()
@gdianaty
gdianaty / swig.cmake
Last active April 19, 2020 01:50
SWIG generation function for CMake
# Authored by Graham Dianaty for Bitlogix Technologies. ==========//
cmake_minimum_required(VERSION 3.13)
function(swig_generate_wrapper ARGS_SWIG ARGS_OUTDIR ARGS_INTERFACE)
find_program(SWIG "swig" "swig.exe") # this should probably be somewhere in PATH
set(SWIG_IN_FILE "${CMAKE_CURRENT_SOURCE_DIR}/${ARGS_INTERFACE}")
set(SWIG_OUT_DIR "${CMAKE_CURRENT_SOURCE_DIR}/${ARGS_OUTDIR}")
# if we're getting no custom input directory, set to current dir.
@gdianaty
gdianaty / imgui_dx9_impl.cpp
Created August 10, 2020 16:50
ImGui DX9 Impl with sRGB color space correction
// ==================================================
// ImGui - LunchHouse Software Modified 8/10/2020
// Modified to be sRGB color space corrected for use
// in Valve's Source Engine.
// ==================================================
// dear imgui: Renderer for DirectX9
// This needs to be used along with a Platform Binding (e.g. Win32)
// Implemented features: