Giter Site home page Giter Site logo

Comments (12)

Ancurio avatar Ancurio commented on May 19, 2024

Ait, just committed it, seems to work fine: 4a8b0f3

(Small change: raw_key_states is in MKXP module instead of System)

from mkxp.

openmac avatar openmac commented on May 19, 2024

I built mkxp from git and got your wrapper script from here:
http://pastebin.com/zXW1hdrx

Then tried to start Sin Unsullied (http://legacyblade.com/downloads/SinUnsullied/SinUnsullied_B002.zip), which uses the Blizzard ABS script, and after fixing the usual syntax issues, I got this error:

[user32:GetKeyboardLayout] [0] 
win32_wrap.rb:228:in `call': undefined method `WIN32' for Scancodes:Module (NoMethodError)
    from win32_wrap.rb:321:in `call'
    from 107:Blizz-ABS Part 2:7532:in `update'
    from 101:Tons of Addons Part 2:695:in `block in main'
    from 101:Tons of Addons Part 2:693:in `loop'
    from 101:Tons of Addons Part 2:693:in `main'
    from 108:Blizz-ABS Part 3:6715:in `main'
    from 131:Main:15:in `<main>'

Is it supposed to work out of the box or it still needs some changes to the used scripts?

Thanks a lot for adding this Win32API emulation, by the way :)

from mkxp.

Ancurio avatar Ancurio commented on May 19, 2024

@openmac I have fixed all syntax errors I saw, please try again.

from mkxp.

openmac avatar openmac commented on May 19, 2024

Thanks, I download the updated win32_wrap.rb from pastebin and here is the new error:

[user32:GetKeyboardLayout] [0] 
win32_wrap.rb:230:in `block in call': undefined method `contains' for #<Hash:0x0000010211d6d8> (NoMethodError)
    from win32_wrap.rb:228:in `each'
    from win32_wrap.rb:228:in `call'
    from win32_wrap.rb:321:in `call'
    from 107:Blizz-ABS Part 2:7532:in `update'
    from 101:Tons of Addons Part 2:695:in `block in main'
    from 101:Tons of Addons Part 2:693:in `loop'
    from 101:Tons of Addons Part 2:693:in `main'
    from 108:Blizz-ABS Part 3:6715:in `main'
    from 131:Main:15:in `<main>'

from mkxp.

cremno avatar cremno commented on May 19, 2024

@openmac: Try replacing contains in line 230 with key?.

from mkxp.

openmac avatar openmac commented on May 19, 2024

Thanks, here is the new error:

[user32:GetKeyboardLayout] [0] 
win32_wrap.rb:236:in `block in call': undefined method `setbyte' for #<Array:0x0000010217e870> (NoMethodError)
    from win32_wrap.rb:228:in `each'
    from win32_wrap.rb:228:in `call'
    from win32_wrap.rb:321:in `call'
    from 107:Blizz-ABS Part 2:7532:in `update'
    from 101:Tons of Addons Part 2:695:in `block in main'
    from 101:Tons of Addons Part 2:693:in `loop'
    from 101:Tons of Addons Part 2:693:in `main'
    from 108:Blizz-ABS Part 3:6715:in `main'
    from 131:Main:15:in `<main>'

from mkxp.

Ancurio avatar Ancurio commented on May 19, 2024

Welp, blind fixing bug really wasn't a good idea. I have put up a new revision that works (tested).

from mkxp.

openmac avatar openmac commented on May 19, 2024

Thanks, it now starts without any error but in the game's initial screen that asks whether to choose Full Screen or not, no matter what key I press, it does not seem to be registered, so it is stuck there.

from mkxp.

Ancurio avatar Ancurio commented on May 19, 2024

New version up.

from mkxp.

openmac avatar openmac commented on May 19, 2024

It works now :)
There are other problems that I think they do not have anything to do with the keyboard and are issues with the game scripts Ruby 1.8.x syntax.
Thanks again.

Edit: I fixed the game scripts syntax issues and it seems to work perfectly, you are awesome!

from mkxp.

JeremyRand avatar JeremyRand commented on May 19, 2024

here's my current win32api wrapper script that makes use of it.

Any reason this wrapper isn't part of the Git repo? (And independently of that, what's the license for that wrapper? Same as mkxp itself?)

from mkxp.

Ancurio avatar Ancurio commented on May 19, 2024

@JeremyRand the reason is that I didn't consider it good quality code, just barely enough to make certain projects work. As for license, feel free to use it under CC0.

from mkxp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.