summaryrefslogtreecommitdiff
path: root/assets
diff options
context:
space:
mode:
authorJari Vetoniemi <jari.vetoniemi@indooratlas.com>2020-03-16 18:49:26 +0900
committerJari Vetoniemi <jari.vetoniemi@indooratlas.com>2020-03-30 00:39:06 +0900
commitfcbf63e62c627deae76c1b8cb8c0876c536ed811 (patch)
tree64cb17de3f41a2b6fef2368028fbd00349946994 /assets
Fresh start
Diffstat (limited to 'assets')
-rw-r--r--assets/Win32API.rb27
-rw-r--r--assets/mkxp.conf7
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