Skip to content

Instantly share code, notes, and snippets.

Ciro Mondueri cigumo

Block or report user

Report or block cigumo

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View p_outline.c
extern vec2 c_size; // canvas size
extern number c_ss; // canvas supersampling
extern number thickness;
extern vec4 outline_color;
extern int samples;
extern number threshold;
vec4 effect(vec4 color, Image texture, vec2 texture_coords, vec2 screen_coords)
{
@cigumo
cigumo / profiler.lua
Created Oct 20, 2018
luajit 2.1 + love2d simple profiler
View profiler.lua
--
-- use with luajit 2.1 profiler
-- klua.log functions not included! make your own :)
-- to be used with love2d
local log = (require 'klua.log'):new('profiler'); log.level = DEBUG_LEVEL
local G = love.graphics
local profile
local vmdef
@cigumo
cigumo / gist:c7a27aee4a8dec01cd8757432c0430a7
Created Oct 17, 2018
wegame-crashguid-B9B0AE22-9352-4205-AFA0-7441698B1E8D.json
View gist:c7a27aee4a8dec01cd8757432c0430a7
{
"version": "1002",
"CrashGUID": "B9B0AE22-9352-4205-AFA0-7441698B1E8D",
"AppName": "RailPlatformGame_2000212",
"AppVersion": "0.0.0.23",
"ImageName": "G:\\WeGame\\rail_apps\\王国保卫战:前线(2000212)\\Kingdom Rush Frontiers.exe",
"OperatingSystem": "Windows 10 Home China Build 17134",
"ProjectID": "2000212",
"UIN": "90457445",
"OSIs64Bit": "1",
@cigumo
cigumo / upload-steam-achievements.lua
Last active Apr 23, 2019
Script to upload achievements to Steam
View upload-steam-achievements.lua
--
-- Creates new achievements in steam and uploads the corresponding images.
--
-- WARNING: Based in a non-official API used internally by Steam. Can break anytime!
-- REQUIRES:
-- - lua 5.2/5.3 or luajit 2.0
-- - cURL (in path)
-- - json.lua https://github.com/rxi/json.lua
--
-- Created by Ciro on 02 Sep 2018.
@cigumo
cigumo / 0001-changes-SDL_AndroidGetInternalStoragePath-to-return-.patch
Created Jan 10, 2018
[PATCH] changes SDL_AndroidGetInternalStoragePath to return a canonical path
View 0001-changes-SDL_AndroidGetInternalStoragePath-to-return-.patch
diff --git a/love/src/jni/SDL2-2.0.5/src/core/android/SDL_android.c b/love/src/jni/SDL2-2.0.5/src/core/android/SDL_android.c
index b93b1625..e11fe3c5 100644
--- a/love/src/jni/SDL2-2.0.5/src/core/android/SDL_android.c
+++ b/love/src/jni/SDL2-2.0.5/src/core/android/SDL_android.c
@@ -1665,10 +1665,14 @@ const char * SDL_AndroidGetInternalStoragePath()
return NULL;
}
- /* path = fileObject.getAbsolutePath(); */
+ /* path = fileObject.getCanonicalPath(); */
@cigumo
cigumo / gist:840575d91c7479c1dd18f28c569de05e
Created Jan 10, 2018
physfs doMkdir patch to allow creating dirs when symlinks are part of the path
View gist:840575d91c7479c1dd18f28c569de05e
modified love/src/jni/physfs-2.1.0/src/physfs.c
@@ -2014,7 +2014,8 @@ static int doMkdir(const char *_dname, char *dname)
const int rc = h->funcs->stat(h->opaque, dname, &statbuf);
if ((!rc) && (currentErrorCode() == PHYSFS_ERR_NOT_FOUND))
exists = 0;
- retval = ((rc) && (statbuf.filetype == PHYSFS_FILETYPE_DIRECTORY));
+ retval = ((rc) && (statbuf.filetype == PHYSFS_FILETYPE_DIRECTORY ||
+ (allowSymLinks && statbuf.filetype == PHYSFS_FILETYPE_SYMLINK)));
} /* if */
@cigumo
cigumo / love_shader_array_length_test.lua
Created Dec 29, 2017
glsl shader compiler ignores .length() access and removes the variable
View love_shader_array_length_test.lua
local shader
local shader_code = [[
extern vec4 col[2];
vec4 effect(vec4 color, Image texture, vec2 texture_coords, vec2 screen_coords)
{
//float dummy = col[0][0];
return vec4(1/col.length(),0,1,1);
}
]]
View physfs Filesystem.cpp
bool Filesystem::setSource(const char *source)
{
if (!PHYSFS_isInit())
return false;
// Check whether directory is already set.
if (!game_source.empty())
return false;
std::string new_search_path = source;
@cigumo
cigumo / gist:316ef0e4d149b26d7a34ac0a0cf3eca3
Created Sep 16, 2017
Spelunky Classic - ASCII tiles table
View gist:316ef0e4d149b26d7a34ac0a0cf3eca3
"!" oShopkeeperTile
"#" oGoldIdolTile
"$" oGoldBarTile
"%" oSpectaclesTile
"&" oWebTile
"(" oMattockTile
")" oLeavesTile
"*" oGoldBarsTile
"+" oSmashTrapTile
"-" oPistolTile
View gist:c5755a7cfce5f379052b7070cd65da34
# Changelog - Kingdom Rush Frontiers | PC/Mac/Linux
## 1.4.2
- Dwarves say regular barracks taunts when the level starts (fixes #903)
- Saurian Deathcoils don't lock on to dwarves (fixes #903)
- Chinese and Korean font adjustments
- click area on continue button of victory screen (fixes #904)
- CJK testing credits
- Translation suggestions from Aix (JA), Soohyeon Wi (KR) and Junesung Oh (KR). Thanks!
- Korean font replacement
- typography credits (closes #906)
You can’t perform that action at this time.