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
===== SYSTEM INFORMATION FOR PROTON BUG REPORT ===== | |
Date: Sun Mar 9 11:57:30 AM CET 2025 | |
GPU: | |
Intel Corporation UHD Graphics 620 (rev 07) | |
NVIDIA Corporation GP108M [GeForce MX150] (rev a1) | |
NVIDIA Driver Version: 565.77 | |
OS: Pop!_OS 22.04 LTS | |
Kernel: 6.9.3-76060903-generic |
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
to be modified |
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
#include <cstdio> | |
#include <fmt/format.h> | |
#include <physfs.h> | |
template <typename Derived> | |
struct PhysfsIo : PHYSFS_Io { | |
protected: | |
PhysfsIo() | |
: PHYSFS_Io { |
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
#pragma once | |
#include <string> | |
#include <spdlog/spdlog.h> | |
template <typename Derived> | |
struct DebugLogging { | |
DebugLogging() { spdlog::info("{} constructed", debugId()); } |
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
// g++ -Wall -Wextra -O0 -g -o log_test | |
#include <atomic> | |
#include <optional> | |
// Vyukov MPSC (wait-free multiple producers, single consumer) queue | |
// https://www.1024cores.net/home/lock-free-algorithms/queues/intrusive-mpsc-node-based-queue | |
template <typename T> | |
class MpscQueue { | |
public: |
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
#!/usr/bin/python3 | |
import argparse | |
import sys | |
import xml.etree.ElementTree as ET | |
# In general the attributes I copy are not the ones that BMFont allows, but the ones that löve will read: | |
# https://github.com/love2d/love/blob/fc4847c69d6c9ad7ed84501197427b23400ae1b4/src/modules/font/BMFontRasterizer.cpp | |
# That means in general this script might generate files that might not be fully compliant BMFont files | |
# but they should work with löve |
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
do | |
local oldSetColor = love.graphics.setColor | |
function love.graphics.setColor(r, g, b, a) | |
if type(r) == "table" then | |
assert(#r == 3 or #r == 4) | |
assert(g == nil and b == nil and a == nil) | |
r, g, b, a = unpack(r) | |
end | |
assert(type(r) == "number" and type(g) == "number" and type(b) == "number") |
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
#include <iostream> | |
using VarType = int; | |
const VarType DEFAULT_VAR = 0; | |
struct doesHaveVar { | |
static const VarType var = 1; | |
}; | |
struct doesNotHaveVar { |
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
local bit = require("bit") | |
local band, bor, bxor, bnot, lshift = bit.band, bit.bor, bit.bxor, bit.bnot, bit.lshift | |
local function pot(n) -- power of two | |
return lshift(1, n) | |
end | |
local BitMask = setmetatable({}, {__call = function(t, ...) | |
local self = setmetatable({}, t) | |
self:initialize(...) |
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
local potLut = {} | |
potLut[0] = 1 | |
for i = 1, 32 do | |
potLut[i] = potLut[i-1] * 2 | |
end | |
-- compare this with lshift(2, n) | |
local function potA(n) -- power of two | |
return potLut[n] | |
end |
NewerOlder