RPG Maker XP & Irrlicht
#1

RPG Maker XP & Irrlicht
post by jestemPolakiem

Welcome all users!
I have a problem - I am already a more advanced developer of Ruby and C + + and try to combine RPG Maker XP Irrlicht - here is the link. More or less know how to do it, but when I create the graphics card pops me an error.
Here you have an accurate description of what I do
1. Paste the Irrlicht library to the folder with the project.
2. I add this script
Code:
DEV = Win32API.new('Irrlicht', 'createDevice', 'IIIIII', 'I')
CREATEDEV_FUNC.call(0, 800, 640, 32, 0, 0)
When I start the game - I leap error - can someone help me
Thanks

b - u - m - p
Reply }
#2
First, that should raise a non method error for nil, as CREATEDEV_FUNC has never been initialized.

Second, it seems that createDevice takes 7 arguments, and you are only using six integers. The arguments that API takes are:
Code:
irr::createDevice      (video::E_DRIVER_TYPE deviceType = video::EDT_SOFTWARE,
        const core::dimension2d< u32 > &      windowSize = (core::dimension2d< u32 >(640, 480)),
        u32      bits = 16,
        bool      fullscreen = false,
        bool      stencilbuffer = false,
        bool      vsync = false,
        IEventReceiver *      receiver = 0    
    )
The first is an integer, the second is a class that seems to have two Uint32(Width and Height), and the others should work well with integers as argument type. If that's correct, it should be:
Code:
createDevice= Win32API.new('Irrlicht', 'createDevice', 'IPIIIII', 'I')
size = [800, 600].pack('LL')
device = createDevice.call(0, size, 32, 0, 0, 0, 0)

That may work, but maybe not. I haven't tested and I don't know how core::dimension2d< u32 > should be packed as it's a class.
Reply }
#3
how i can use a class function this is sample in c++
Code:
driverType = video::EDT_OPENGL;
IrrlichtDevice *device = createDevice(driverType, core::dimension2d<u32>(640, 480));
video::IVideoDriver* driver = device->getVideoDriver();
I must a use a device->getVideoDriver(); - how i can do it in ruby



b - u - m - p
b - u - m - p
Reply }
#4
B - U - M - P
Reply }
#5
If you know c++, you should create a DLL that uses Irrlicht externaly and call your DLL from ruby. Ruby Win32API is very limited, mainly because ruby hasn't pointers and that makes things complicated, specially for c++ classes.
Reply }
#6
can i give me a source code for this sample :) plz
Reply }
#7
I won't, but google may help you.
Reply }
#8
this source code isn't in google - i find ...
Reply }
#9
I supose that you already know how to work with Irrlicht, but if you don't: http://irrlicht.sourceforge.net/tutorials.html

Then, you will need to create a DLL in c++ (or in C if Irrlicht has a C port), here is a discussion about creating a C dll for RMXP, it is C, but c++ isn't much different. You should look for some dll tutorials, just search "creating a c++ dll".

Good luck with that.
Reply }


Possibly Related Threads…
Thread Author Replies Views Last Post
   in FPLE touching events after battle causes rpg maker to crash ThePrinceofMars 1 5,479 11-27-2014, 09:11 PM
Last Post: MechanicalPen
   show variables on screen rpg maker xp ThePrinceofMars 22 33,621 10-19-2014, 08:01 PM
Last Post: ThePrinceofMars
   Help with Shop Menu [RPG Maker XP] JackMonty 6 12,902 05-23-2013, 10:14 AM
Last Post: JackMonty



Users browsing this thread: 1 Guest(s)