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
;SMBDIS.ASM - A COMPREHENSIVE SUPER MARIO BROS. DISASSEMBLY | |
;by doppelganger (doppelheathen@gmail.com) | |
;This file is provided for your own use as-is. It will require the character rom data | |
;and an iNES file header to get it to work. | |
;There are so many people I have to thank for this, that taking all the credit for | |
;myself would be an unforgivable act of arrogance. Without their help this would | |
;probably not be possible. So I thank all the peeps in the nesdev scene whose insight into | |
;the 6502 and the NES helped me learn how it works (you guys know who you are, there's no |
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
#include "particles.h" | |
#include <assert.h> | |
#include <algorithm> | |
namespace particles | |
{ | |
void ParticleData::generate(size_t maxSize) | |
{ | |
m_count = maxSize; | |
m_countAlive = 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
# output binary | |
BIN := test | |
# source files | |
SRCS := \ | |
test.cpp | |
# files included in the tarball generated by 'make dist' (e.g. add LICENSE file) | |
DISTFILES := $(BIN) |
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
# Created by BrunoSXS | |
# LICENSED UNDER MIT | |
var save_slot = 0 # Just like classic JRPs, change the slot to save in a different place | |
var current_save_game # This is the contents of the save file, for now we just declare it | |
var default_save = {"money":0,"powers":null} # The default save contents, if there is no save file to load, then, the current_save_game gets its contents from this variable and then creates a save file with it | |
func _ready(): | |
current_save_game = load_game(save_slot) if typeof(load_game(save_slot)) == TYPE_DICTIONARY else default_save # This is the first loading, when the game starts. |
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
vec3 hueShift( vec3 color, float hueAdjust ){ | |
const vec3 kRGBToYPrime = vec3 (0.299, 0.587, 0.114); | |
const vec3 kRGBToI = vec3 (0.596, -0.275, -0.321); | |
const vec3 kRGBToQ = vec3 (0.212, -0.523, 0.311); | |
const vec3 kYIQToR = vec3 (1.0, 0.956, 0.621); | |
const vec3 kYIQToG = vec3 (1.0, -0.272, -0.647); | |
const vec3 kYIQToB = vec3 (1.0, -1.107, 1.704); |
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
// How to increment using the slope and offset comes from tasaboia's example but did not have a solution for A | |
// But found a way to calc for A from a ruby Wire Tool plugin, but it's incrementing did not work as well as tasaboia | |
// So mixing the two results in a good implementation of the Catenary Curve. All Credit belongs to those two developers. | |
// All I did is mash the code together and fixed / optimized it - SketchpunkLabs | |
// https://github.com/tasaboia/Procedural-Rope-Generator/blob/master/Assets/CatenaryTeste/Scripts/Catenary.cs | |
// http://rhin.crai.archi.fr/rld/plugin_details.php?id=990 | |
function catenary(a, x){ return a * Math.cosh( x / a ); } | |
catenary.MAX_TRIES = 100; | |
catenary.getA = function(vecLen, maxLen){ |
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
tool | |
extends AudioStreamPlayer #exactly the same code should work for extending 2D and 3D versions | |
class_name RoundRobinPlayer | |
export(int, "sequence", "random", "shuffle") var queue_mode = 0 | |
export(Array, AudioStream) var playlist = [] setget _set_playlist, _get_playlist | |
export(bool) var round_robin_playing = false setget _set_playing, _is_playing # can't override properties so use this for animations | |
var playlist_index = -1 # current position in the playlist | |
var shuffled_indices = [] # Array<int> of shuffled playlist indices |
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
# Loads a scene in the background using a seperate thread and a queue. | |
# Foreach new scene there will be an instance of ResourceInteractiveLoader | |
# that will raise an on_scene_loaded event once the scene has been loaded. | |
# Hooking the on_progress event will give you the current progress of any | |
# scene that is being processed in realtime. The loader also uses caching | |
# to avoid duplicate loading of scenes and it will prevent loading the | |
# same scene multiple times concurrently. | |
# | |
# Sample usage: | |
# |
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
tool | |
class_name FlexGridContainer | |
extends Container | |
var columns: int = 1 setget set_columns | |
func _notification(p_what): | |
match p_what: |
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
#include "wave.h" | |
#include <stdio.h> | |
#include <string.h> | |
// Convert 32-bit unsigned little-endian value to big-endian from byte array | |
static inline uint32_t little2big_u32(uint8_t const* data) { | |
return data[0] | (data[1] << 8) | (data[2] << 16) | (data[3] << 24); | |
} | |
// Convert 16-bit unsigned little-endian value to big-endian from byte array |
OlderNewer