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
(melonDS::NDS *) this = 0x000000012b600000 | |
(melonDS::SPU) $0 = { | |
AudioLock = 0x0000600003e11440 | |
ApplyBias = true | |
NDS = 0x000000012b600000 | |
OutputBackbuffer = { | |
[0] = 0 | |
[1] = 0 | |
[2] = 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
PARAMS = { | |
max_angle = 80, | |
min_angle = -70, | |
glide_start_speed_y = 0.75, | |
glide_start_accel_y = 1, | |
glide_start_speed_x_mul = 1, | |
power_start = 1.7, | |
power_rate = 0.04, | |
max_speed = 2.2, | |
end_speed = 0.7, |
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
use prc::*; | |
use prc::hash40::{Hash40, to_hash40}; | |
fn edit_ui_chara_db() { | |
// with the param data ready, | |
let mut root = open("ui_chara_db.prc").unwrap(); | |
// enter the first and only node of the file ("db_root") | |
let (db_root_hash, db_root) = &mut root.0[0]; | |
assert_eq!(*db_root_hash, to_hash40("db_root")); |
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
ONES = { | |
"one": 1, | |
"two": 2, | |
"three": 3, | |
"four": 4, | |
"five": 5, | |
"six": 6, | |
"seven": 7, | |
"eight": 8, | |
"nine": 9, |
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
import time | |
start_time = time.time() | |
f = open('names_1.txt', 'r') | |
names_1 = f.read().split("\n") # List containing 10000 names | |
f.close() | |
# takes at most log(n) space, which is less than a second array | |
names_1.sort() |
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
use serde::{Deserialize, Serialize}; | |
macro_rules! generate_enum { | |
($first:ident, $($rest:ident),*) => { | |
#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)] | |
pub enum Program { | |
$first = 0, | |
$($rest),* | |
} |
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
#![feature(prelude_import)] | |
#[prelude_import] | |
use std::prelude::v1::*; | |
#[macro_use] | |
extern crate std; | |
pub mod error { | |
use std::error; | |
use std::fmt::Display; | |
use std::io; | |
pub enum Error { |
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 <string.h> | |
unsigned long HASH_TABLE[] = { | |
0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, 0x706af48f, 0xe963a535, 0x9e6495a3, | |
0x0edb8832, 0x79dcb8a4, 0xe0d5e91e, 0x97d2d988, 0x09b64c2b, 0x7eb17cbd, 0xe7b82d07, 0x90bf1d91, | |
0x1db71064, 0x6ab020f2, 0xf3b97148, 0x84be41de, 0x1adad47d, 0x6ddde4eb, 0xf4d4b551, 0x83d385c7, | |
0x136c9856, 0x646ba8c0, 0xfd62f97a, 0x8a65c9ec, 0x14015c4f, 0x63066cd9, 0xfa0f3d63, 0x8d080df5, | |
0x3b6e20c8, 0x4c69105e, 0xd56041e4, 0xa2677172, 0x3c03e4d1, 0x4b04d447, 0xd20d85fd, 0xa50ab56b, | |
0x35b5a8fa, 0x42b2986c, 0xdbbbc9d6, 0xacbcf940, 0x32d86ce3, 0x45df5c75, 0xdcd60dcf, 0xabd13d59, | |
0x26d930ac, 0x51de003a, 0xc8d75180, 0xbfd06116, 0x21b4f4b5, 0x56b3c423, 0xcfba9599, 0xb8bda50f, |
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
// has to be run in --release mode or else the lua_bind_hash method fails (due to integer overflows panicking) | |
pub mod lua_bind_hash; // https://github.com/ultimate-research/lua-bind-hash/blob/master/lua_bind_hash.rs | |
use lua_bind_hash as lhash; | |
use std::fs::File; | |
use std::io::{BufReader, BufRead, BufWriter, Write}; | |
use std::collections::BTreeMap; | |
use inflections::case::is_constant_case; | |
fn main() { |
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
<struct index="71"> | |
<hash40 hash="fighter_kind">fighter_kind_dolly</hash40> | |
<float hash="walk_accel_mul">0.1</float> | |
<float hash="walk_accel_add">0.03</float> | |
<float hash="walk_speed_max">0.85</float> | |
<float hash="walk_slow_speed_mul">0.2</float> | |
<float hash="walk_middle_ratio">0.33</float> | |
<float hash="walk_fast_ratio">0.75</float> | |
<float hash="ground_brake">0.111</float> | |
<float hash="dash_speed">1.65</float> |
NewerOlder