Cleanup and add extras

This commit is contained in:
Varun Patil 2020-10-19 00:52:59 +05:30
parent 7e3006c10e
commit fd2ba6c852
8 changed files with 1541 additions and 31 deletions

20
extra/build_config.rb Normal file
View file

@ -0,0 +1,20 @@
MRuby::Build.new do |conf|
toolchain :gcc
conf.gembox 'default'
end
MRuby::CrossBuild.new('wasm32-unknown-gnu') do |conf|
toolchain :clang
conf.gembox 'default'
conf.gem :github => 'take-cheeze/mruby-marshal'
conf.gem :github => 'monochromegane/mruby-time-strftime'
conf.gem :core => 'mruby-eval'
conf.cc.command = 'emcc'
conf.cc.flags = %W(-O3 -g0)
conf.cxx.command = 'em++'
conf.cxx.flags = %W(-O3 -g0)
conf.linker.command = 'emcc'
conf.archiver.command = 'emar'
end

7
extra/js/localforage.min.js vendored Normal file

File diff suppressed because one or more lines are too long

View file

@ -7,7 +7,13 @@ do
filename="${file%.*}"
fl="$(echo "$filename" | tr '[:upper:]' '[:lower:]')"
md5=`md5sum "${file}" | awk '{ print $1 }'`
if [ -f $file ]
then
md5=`md5sum "${file}" | awk '{ print $1 }'`
else
md5=''
fi
echo "\"$fl\": \"${file}?h=${md5}\"," >> mapping.js

1476
extra/rgss.rb Normal file

File diff suppressed because it is too large Load diff

19
extra/vm.c.patch Normal file
View file

@ -0,0 +1,19 @@
--- src/vm.c 2020-10-18 23:00:12.865875587 +0530
+++ src/vm.c 2020-10-18 23:06:10.887618558 +0530
@@ -2262,13 +2262,15 @@
switch (TYPES2(mrb_type(regs[a]),mrb_type(regs[a+1]))) {
case TYPES2(MRB_TT_FIXNUM,MRB_TT_FIXNUM):
#ifdef MRB_WITHOUT_FLOAT
+#else
{
mrb_int x = mrb_fixnum(regs[a]);
mrb_int y = mrb_fixnum(regs[a+1]);
SET_INT_VALUE(regs[a], y ? x / y : 0);
}
+ NEXT;
break;
-#else
+
x = (mrb_float)mrb_fixnum(regs[a]);
y = (mrb_float)mrb_fixnum(regs[a+1]);
break;