diff options
Diffstat (limited to 'assets')
-rw-r--r-- | assets/Win32API.rb | 27 | ||||
-rw-r--r-- | assets/mkxp.conf | 7 |
2 files changed, 34 insertions, 0 deletions
diff --git a/assets/Win32API.rb b/assets/Win32API.rb new file mode 100644 index 0000000..b448457 --- /dev/null +++ b/assets/Win32API.rb @@ -0,0 +1,27 @@ +$VERBOSE = nil +class Win32Fun + def initialize(dll, func, arg_spec, ret_spec) + @dll = dll + @func = func + @arg_spec = arg_spec + @ret_spec = ret_spec + end + def call(*args) + method = @dll + "_" + @func + if self.class.private_method_defined? method + return self.send method, args + elsif Win32NativeAPI.respond_to? method + return Win32NativeAPI.send method, args[0] + else + puts "fixme: " + @dll + "." + @func + return 0 + end + end + private +end + +module Win32API + def self.new(dll, func, arg_spec, ret_spec) + return Win32Fun.new(dll, func, arg_spec, ret_spec) + end +end diff --git a/assets/mkxp.conf b/assets/mkxp.conf new file mode 100644 index 0000000..4b80f04 --- /dev/null +++ b/assets/mkxp.conf @@ -0,0 +1,7 @@ +preloadScript=Win32API.rb +useScriptNames=true +fullscreen=true +winResizable=true +subImageFix=true +enableBlitting=false +debugMode=true |