This file contains 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
#!/bin/bash | |
# | |
# SDL 2.0.4 Bug-"Count" Checker for Mac OS X or KDE | |
# Version 1.6 | |
# | |
# Requirements: | |
# - any one of the following command-line notification tools: | |
# - Growl and growlnotify, for Mac OS X, available at http://growl.info | |
# - kdialog, for KDE | |
# - notify-send, for generic Linux notifications |
This file contains 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
/* | |
Ok, I answered too quickly, and Twitter is terrible for this, so have a gist. | |
You call this function twice: the first time with a NULL and it just sets | |
extension_count to the number of strings it plans to give you, so you can | |
allocate space for them and call the function again. | |
*/ | |
// (you should check return values for errors in all this, but whatever.) | |
unsigned int count = 0; |
This file contains 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
Linking mame.bc... | |
WARNING:root:emcc: cannot find library "util" | |
WARNING:root:emcc: cannot find library "SDL2_ttf" | |
Running post-build commands | |
/Users/icculus/Desktop/emsdk_portable/emscripten/1.37.9/emcc -O3 -s USE_SDL=2 -s USE_SDL_TTF=2 --memory-init-file 0 -s ALLOW_MEMORY_GROWTH=0 -s TOTAL_MEMORY=268435456 -s DISABLE_EXCEPTION_CATCHING=2 -s EXCEPTION_CATCHING_WHITELIST='["__ZN15running_machine17start_all_devicesEv","__ZN12cli_frontend7executeEiPPc"]' -s EXPORTED_FUNCTIONS="['_main', '_malloc', '__ZN15running_machine30emscripten_get_running_machineEv', '__ZN15running_machine17emscripten_get_uiEv', '__ZN15running_machine20emscripten_get_soundEv', '__ZN15mame_ui_manager12set_show_fpsEb', '__ZNK15mame_ui_manager8show_fpsEv', '__ZN13sound_manager4muteEbh', '_SDL_PauseAudio', '_SDL_SendKeyboardKey', '__ZN15running_machine15emscripten_saveEPKc', '__ZN15running_machine15emscripten_loadEPKc', '__ZN15running_machine21emscripten_hard_resetEv', '__ZN15running_machine21emscripten_soft_resetEv', '__ZN15running_machine15 |
This file contains 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
# This is the complete source code to Flappy Dragon: | |
# https://dragonruby.itch.io/flappydragon | |
# | |
# You can tinker with this by getting a copy of DragonRuby Game Toolkit: | |
# https://dragonruby.org/ | |
# | |
# Amir Rajan wrote this game, catch him at https://twitter.com/amirrajan ! | |
class FlappyDragon | |
attr_accessor :grid, :inputs, :game, :outputs |
This file contains 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
# This is the complete source code to Basic Gorillas: | |
# https://dragonruby.itch.io/basicgorillas | |
# | |
# You can tinker with this by getting a copy of DragonRuby Game Toolkit: | |
# https://dragonruby.org/ | |
# | |
# Amir Rajan wrote this game, catch him at https://twitter.com/amirrajan ! | |
class YouSoBasicGorillas | |
attr_accessor :outputs, :grid, :game, :inputs |
This file contains 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
var hasWebAssembly = false; | |
if (typeof WebAssembly==="object" && typeof WebAssembly.Memory==="function") { | |
hasWebAssembly = true; | |
} | |
//console.log("Do we have WebAssembly? " + ((hasWebAssembly) ? "YES" : "NO")); | |
var buildtype = hasWebAssembly ? "wasm" : "asmjs"; | |
var module = "dragonruby-" + buildtype + ".js"; |
This file contains 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
$gtk.reset | |
class TetrisGame | |
# This is just to get GTK to not complain in the console for now. | |
def serialize ; { args: '' } ; end | |
def inspect ; serialize.to_s ; end | |
def to_s ; serialize.to_s ; end | |
def render_cube_pixelpos x, y, r, g, b, a=255 | |
@args.outputs.solids << [ x, y, @boxsize, @boxsize, r, g, b, a ] |
This file contains 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
# This is the code as it stands at the end of | |
# "Let's make Tetris with DragonRuby Game Toolkit!" Part 1: | |
# https://www.youtube.com/watch?v=xZMwRSbC4rY | |
$gtk.reset | |
class TetrisGame | |
def initialize args | |
@args = args | |
@next_move = 30 |
This file contains 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
$gtk.reset | |
class TetrisGame | |
def initialize args | |
@args = args | |
@next_piece = nil | |
@next_move = 30 | |
@score = 0 | |
@gameover = false | |
@grid_w = 10 |
This file contains 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
SDL_AddEventWatch: 2.0.0 | |
SDL_AddHintCallback: 2.0.0 | |
SDL_AddTimer: 2.0.0 | |
SDL_AllocFormat: 2.0.0 | |
SDL_AllocPalette: 2.0.0 | |
SDL_AllocRW: 2.0.0 | |
SDL_AndroidGetActivity: 2.0.0 | |
SDL_AndroidGetExternalStoragePath: 2.0.0 | |
SDL_AndroidGetExternalStorageState: 2.0.0 | |
SDL_AndroidGetInternalStoragePath: 2.0.0 |
OlderNewer