Using RGSS200 classes in RMXP

Started by Fantasist, January 21, 2008, 05:11:09 am

Previous topic - Next topic

Fantasist

So I like the bitmap effects in RMVX and decided to use it in RMXP, so I turned to the Win32API class. There's no documentation in RMXP help file and all I know is that there are 3 args - dll name, method/class/module, arguments, something I don't know. I tried this:

bmp = Win32API.new 'RGSS200E', 'Bitmap', 'Graphics/pic.jpg', ''


I get this error when I run the game:

Runtime error
GetProcAdress: Bitmap or BitmapA

I request anyone with knowledge on Win32API to shed some light on this *cough*Bliz*cough*:)
Do you like ambient/electronic music? Then you should promote a talented artist! Help out here. (I'm serious. Just listen to his work at least!)


The best of freeware reviews: Gizmo's Freeware Reviews




Blizzard

January 21, 2008, 06:17:37 am #1 Last Edit: January 21, 2008, 06:20:15 am by Blizzard
I know enough, not to be able to explain. >.<

Alright, I'll try. From what I know it works like this:

Win32API.new 'DLLFILENAME', 'METHODNAME', %w(INPUT_PARAMETER_TYPES), 'RETURN_TYPE'


So something like this here:

Win32API.new 'kernel32', 'GetPrivateProfileStringA', %w(p p p p l p), 'l'


would call kernel32.dll, the method called GetPrivateProfileStringA, sending inputs as pointer, pointer, pointer, pointer, integer, pointer and the return would be an integer (probably to test if the method was executed successfully). Keep in mind that a string is an object in RGSS, that means, you need to pass it through a pointer. Without knowing the specs of the method, you can hardly do anything. i.e. in this method the 4th string gets modified, but that's written in the documentation of the dll.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Fantasist

Oh, and the help file is all Japanese too.. I'll look at the method, but I doubt it'll help. I was hoping it wouldn't be a problem at all until the error showed up, would be grear if this works, wouldn't it?

PS: If it DID work, will it lag to load all bitmaps through win32api? I mean to modify the Bitmap's initialize method or the load_bitmap from cache if it's not bad. If it does lag, I'll just use when needed. If it works that is.
Do you like ambient/electronic music? Then you should promote a talented artist! Help out here. (I'm serious. Just listen to his work at least!)


The best of freeware reviews: Gizmo's Freeware Reviews




Blizzard

Depends. It's pretty hard to tell without knowing the inner structure. In any case, try "requires RGSS200E.dll", it might just overwrite RMXP's classes. Best you add it into a script in the first slot.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Fantasist

Do you like ambient/electronic music? Then you should promote a talented artist! Help out here. (I'm serious. Just listen to his work at least!)


The best of freeware reviews: Gizmo's Freeware Reviews