Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@NuriYuri
NuriYuri / extract_event_commands.rb
Created October 11, 2023 14:41
Extract RMXP Script commands from Events
rgss_main {}
STDOUT.pos = 0 unless STDOUT.tty? # Go back so we don't end up with artifacts
def process_list(list)
list.each_with_index do |command, index|
if command.code == 355
@last_map_pos = @last_pos = nil
puts "#--> Script Command @#{index}"
puts command.parameters[0]
@NuriYuri
NuriYuri / bindings.rs
Created March 17, 2023 08:19
Test generating binding for rb-sys using cli
/* automatically generated by rust-bindgen 0.64.0 */
#![allow(missing_docs)]
#![allow(non_upper_case_globals)]
#![allow(non_camel_case_types)]
#![allow(non_snake_case)]
#![allow(clippy::upper_case_acronyms)]
#[repr(C)]
#[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)]
@NuriYuri
NuriYuri / test_image.rb
Created November 29, 2018 20:47
Cast PSDK screen to a webbrowser
# Demo : https://www.youtube.com/watch?v=a3IF8Yu0BWM
require "webrick"
class ImageReturn < WEBrick::HTTPServlet::AbstractServlet
def do_GET request, response
response.status = 200
response['Content-Type'] = 'image/png'
response.body = $GraphicsImage.to_s
end
end