Chaos Project

RPG Maker => RPG Maker Scripts => Script Troubleshooting => Topic started by: Fantasist on January 21, 2008, 05:11:09 am

Title: Using RGSS200 classes in RMXP
Post by: Fantasist on January 21, 2008, 05:11:09 am
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*:)
Title: Re: Using RGSS200 classes in RMXP
Post by: Blizzard on January 21, 2008, 06:17:37 am
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.
Title: Re: Using RGSS200 classes in RMXP
Post by: Fantasist on January 21, 2008, 06:50:57 am
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.
Title: Re: Using RGSS200 classes in RMXP
Post by: Blizzard on January 21, 2008, 07:55:41 am
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.
Title: Re: Using RGSS200 classes in RMXP
Post by: Fantasist on January 21, 2008, 04:56:44 pm
Will try.