Skip to content

Instantly share code, notes, and snippets.

#include "gdexample.h"
#include <godot_cpp/core/class_db.hpp>
#include <godot_cpp/variant/utility_functions.hpp>
#include <godot_cpp/classes/random_number_generator.hpp>
#include <stdio.h>
using namespace godot;
void GDExample::_bind_methods() {
ClassDB::bind_method(D_METHOD("tick", "delta"), &GDExample::tick);
@stucotso
stucotso / crosswin.cmake
Created February 13, 2023 00:37
Cross compile config for cmake linux to windows
# the name of the target operating system
set(CMAKE_SYSTEM_NAME Windows)
# which compilers to use for C and C++
set(CMAKE_C_COMPILER x86_64-w64-mingw32-gcc)
set(CMAKE_CXX_COMPILER x86_64-w64-mingw32-g++)
# where is the target environment located
set(CMAKE_FIND_ROOT_PATH /code/deps/install)
@stucotso
stucotso / bunnymark.py
Last active February 12, 2023 16:30
Python at near speed of C: Bunnymark using Raylib and Shedskin
# *******************************************************************************************
# *
# * raylib [textures] example - Bunnymark
# *
# * Example originally created with raylib 1.6, last time updated with raylib 2.5
# *
# * Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
# * BSD-like license that allows static linking with closed source software
# *
@stucotso
stucotso / rlhpp.py
Last active February 1, 2023 21:02
Raylib header preprocessor
from pycparser import parse_file, c_ast
import os
class ast:
def __init__(self, children=[], params=[], line=0):
self.children = children
self.params = params
self.line = line