Skip to content

Instantly share code, notes, and snippets.

@27thLiz
27thLiz / gist:f98ea1ccdd992dccd715
Created January 7, 2016 17:32
mingw godot_res.rc
i686-w64-mingw32-windres --include-dir . -i platform/windows/godot_res.rc -o platform/windows/godot_res.windows.tools.32.o
@27thLiz
27thLiz / gist:eeba04b561c0f4e17d7f
Created January 22, 2016 15:30
ps4 windows mapping
303534632d303563342d576972656c65,PS4 Controller,leftx:a0,lefty:a1,dpdown:b15,rightstick:b11,rightshoulder:b5,rightx:a2,start:b9,righty:a5,lefttrigger:a3,x:b0,dpup:b14,dpleft:b16,dpright:b17,back:b8,leftstick:b10,leftshoulder:b4,y:b3,a:b1,righttrigger:b7,b:b2,
@27thLiz
27thLiz / drag.py
Last active January 28, 2016 22:55
simple screen drag
const DRAGTIME = 0.2
var drag_up = false
var drag_down = false
var drag_left = false
var drag_right = false
var counter_up = 0.0
var counter_down = 0.0
var counter_left = 0.0
extends Sprite
var grid_size = 32
var speed = 64 # speed in pixels per second
var direction = Vector2(1, 0) # move in positive x direction, adapt this in your code for other directions
var is_moving = false
var moved_dist # keep track of how much we already moved
func _fixed_process(delta):
if Input.is_action_pressed("myInputAction") and !is_moving:
extends TextureButton
func _ready():
connect("pressed", self, "_on_pressed")
connect("released", self, "_released")
func _on_pressed():
print("pressed")
func _released():
@27thLiz
27thLiz / app.c
Created February 16, 2017 22:07
Try to replicate app launcher behavior
#include "app.h"
#include <stdio.h>
int get_version() {
return 2;
}
void run() {
printf("version h: %d\n", VERSION);
printf("version lib: %d\n", get_version());
@27thLiz
27thLiz / config
Created July 7, 2017 17:07
git alias for Godot PRs
[alias]
pr = !"wget https://github.com/godotengine/godot/pull/$1.patch && git apply $1.patch && rm -f $1.patch"
0x8AB358A686F67769Da9837CB34e59b1291F9b7D5
from github import Github
import os
#use authentication so we don't get rate-limited
g = Github(login_or_token="username", password="password")
repo = g.get_repo("godotengine/godot")
cherrypick_label = repo.get_label("cherrypick")