This file contains hidden or 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
<script> | |
const imports = { | |
lume: 'https://raw.githack.com/lume/lume/develop/dist/index.js', | |
'lume/': 'https://raw.githack.com/lume/lume/develop/', | |
'@lume/element': 'https://raw.githack.com/lume/element/main/dist/index.js', | |
'classy-solid': 'https://raw.githack.com/lume/classy-solid/main/dist/index.js', | |
'@lume/eventful': 'https://raw.githack.com/lume/eventful/main/dist/index.js', | |
'@lume/kiwi': 'https://raw.githack.com/lume/kiwi/main/dist/kiwi.js', | |
'@lume/three-projected-material/': 'https://raw.githack.com/lume/three-projected-material/main/', | |
'@lume/autolayout': 'https://raw.githack.com/lume/autolayout/main/dist/AutoLayout.js', |
This file contains hidden or 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
// REMEMBER: Change SUBSYSTEM:WINDOWS to SUBSYSTEM:CONSOLE | |
/* | |
=========================================================================== | |
Copyright (C) 1999-2005 Id Software, Inc. | |
This file is part of Quake III Arena source code. | |
Quake III Arena source code is free software; you can redistribute it | |
and/or modify it under the terms of the GNU General Public License as | |
published by the Free Software Foundation; either version 2 of the License, |
This file contains hidden or 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
editor.getSession().selection.on('changeSelection', function(e) { | |
if (lock) { | |
return; | |
} | |
// Get the selection plus two extra chars. | |
var range = editor.getSelectionRange(); | |
range.end.column += 1; range.start.column -= 1; | |
var t = editor.getSession().getTextRange(range); | |
// Remove old slider. | |
if (_slider) { |
This file contains hidden or 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
global.window = { | |
navigator: { | |
userAgent: "node" | |
}, | |
removeEventListener() {} | |
}; | |
var fakeCanvas = { | |
id: "fakecanvas", | |
getBoundingClientRect: function() { |
This file contains hidden or 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
// Copyright 2010 The Emscripten Authors. All rights reserved. | |
// Emscripten is available under two separate licenses, the MIT license and the | |
// University of Illinois/NCSA Open Source License. Both these licenses can be | |
// found in the LICENSE file. | |
// The Module object: Our interface to the outside world. We import | |
// and export values on it. There are various ways Module can be used: | |
// 1. Not defined. We create it here | |
// 2. A function parameter, function(Module) { ..generated code.. } | |
// 3. pre-run appended it, var Module = {}; ..generated code.. |
This file contains hidden or 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
Code: | |
--- | |
68: vec2(0.6547356,0.373677), | |
69: vec2(-0.1999273,0.4483816), | |
70: vec2(0.167026,0.2838214), | |
71: vec2(0.2164582,0.6978411), | |
72: vec2(-0.7202712,-0.07400024), | |
73: vec2(-0.6624036,0.559697), | |
74: vec2(-0.1909649,0.8721116), | |
75: vec2(-0.6493049,-0.4945979), |
This file contains hidden or 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 file can be generated via: | |
# source = generateCallback("player_damage", Int32, Arg[Arg(Ptr{Int64}, "targ", Entity), Arg(Ptr{Int64}, "inflictor", Entity), Arg(Ptr{Int64}, "attacker", Entity), Arg(Ptr{Float32}, "dir", Vec3), Arg(Ptr{Float32}, "point", Vec3), Arg(Int32, "damage", nothing), Arg(Int32, "dflags", nothing), Arg(Int32, "mod", nothing)]) | |
# file_put_contents("julia/callbacks/player_damage.jl", source) | |
#= | |
int (*callback_player_damage)(int *targ, int *inflictor, int *attacker, float *dir, float *point, int damage, int dflags, int mod) = NULL; | |
CCALL void set_callback_player_damage(int (*cb)(int *targ, int *inflictor, int *attacker, float *dir, float *point, int damage, int dflags, int mod)) { | |
callback_player_damage = cb; | |
} |
This file contains hidden or 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
ImGui::SetNextWindowPos( ImVec2(0,0) ); | |
ImGui::SetNextWindowSize(io.DisplaySize); // this used to work, but not in latest imgui version... need to call SetWindowSize() now | |
ImGui::Begin("BCKGND", NULL, ImGui::GetIO().DisplaySize, 0.0, ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoScrollbar | ImGuiWindowFlags_NoScrollWithMouse | ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoSavedSettings | ImGuiWindowFlags_NoInputs | ImGuiWindowFlags_NoFocusOnAppearing | ImGuiWindowFlags_NoBringToFrontOnFocus); | |
//ImGuiWindow *bgwin = ImGui::GetCurrentWindow(); | |
if (false) // comment out = work | |
ImGui::SetWindowSize(io.DisplaySize); | |
ImDrawList *drawlist = ImGui::GetWindowDrawList(); |
This file contains hidden or 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
apt-get install libxml2-dev | |
apt-get install scons | |
apt-get install pkg-config | |
apt-get install libglib2.0-dev | |
apt-get install freeglut3-dev | |
apt-get install libgtkglext1-dev | |
apt-get install subversion | |
apt-get install libjpeg-dev |
This file contains hidden or 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
type ABC a::Int64; b::Int64; c::Int64 end | |
function offsetof(type_, member::Symbol) | |
for (i, item) in enumerate(fieldnames(type_)) | |
if item == member | |
return fieldoffset(type_, i) | |
end | |
#print(typeof(i)) | |
end | |
# what to do when symbol not in type_? |
NewerOlder