Skip to content

Instantly share code, notes, and snippets.

View britzl's full-sized avatar
💭
Making Defold even better!

Björn Ritzl britzl

💭
Making Defold even better!
View GitHub Profile
@britzl
britzl / tinted_label.fp
Last active May 19, 2019 09:28
DEPRECATED - How to tint labels in Defold
varying mediump vec2 var_texcoord0;
varying lowp vec4 var_face_color;
varying lowp vec4 var_outline_color;
varying lowp vec4 var_shadow_color;
uniform lowp vec4 texture_size_recip;
uniform lowp sampler2D texture;
uniform lowp vec4 tint;
void main()
@britzl
britzl / luautils.cpp
Last active September 1, 2019 14:02
Lua C utility functions for manipulating the stack and setting up listeners
#include <dmsdk/sdk.h>
#include "luautils.h"
void luaL_checklistener(lua_State* L, int idx, struct lua_Listener& listener) {
int top = lua_gettop(L);
luaL_checktype(L, idx, LUA_TFUNCTION);
lua_pushvalue(L, idx);
int cb = dmScript::Ref(L, LUA_REGISTRYINDEX);
if (listener.m_Callback != LUA_NOREF) {
@britzl
britzl / cla.txt
Created April 23, 2019 09:04
Trying out cla-assistant.io for the public Defold repos
Thank you for your interest in Defold. In order to clarify the intellectual property license granted with Contributions from any person or entity, Defold must have a Contributor License Agreement ("CLA") on file that has been signed by each Contributor, indicating agreement to the license terms below. This license is for your protection as a Contributor as well as the protection of Defold and its users; it does not change your rights to use your own Contributions for any other purpose.
You accept and agree to the following terms and conditions for Your present and future Contributions submitted to Defold. Except for the license granted herein to Defold and recipients of software distributed by Defold, You reserve all right, title, and interest in and to Your Contributions.
1. Definitions.
"You" (or "Your") shall mean the copyright owner or legal entity authorized by the copyright owner that is making this Agreement with Defold. For legal entities, the entity making a Contribution and all other entities that