Save-Point
RPG Maker XP & Irrlicht - Printable Version

+- Save-Point (https://www.save-point.org)
+-- Forum: Games Development (https://www.save-point.org/forum-4.html)
+--- Forum: Code Support (https://www.save-point.org/forum-20.html)
+--- Thread: RPG Maker XP & Irrlicht (/thread-506.html)



RPG Maker XP & Irrlicht - jestemPolakiem - 03-16-2010


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


RPG Maker XP & Irrlicht - vgvgf - 03-16-2010

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.


RPG Maker XP & Irrlicht - jestemPolakiem - 03-17-2010

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


RPG Maker XP & Irrlicht - jestemPolakiem - 03-20-2010

B - U - M - P


RPG Maker XP & Irrlicht - vgvgf - 03-23-2010

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.


RPG Maker XP & Irrlicht - jestemPolakiem - 03-24-2010

can i give me a source code for this sample :) plz


RPG Maker XP & Irrlicht - vgvgf - 03-24-2010

I won't, but google may help you.


RPG Maker XP & Irrlicht - jestemPolakiem - 03-25-2010

this source code isn't in google - i find ...


RPG Maker XP & Irrlicht - vgvgf - 03-29-2010

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.