Since I'm currently stuck on my Light Script, I thought I would expand my skillset and do it in a way that helps everyone interested. Im going with C++ for this. Getting a compiler was a pain, but I finally got one. Visual C++ 2015.
So what Ive done so far is this. New Win32 project, dll, and empty project.
Header.h#define DLLEXPORT __declspec(dllexport)
extern "C" DLLEXPORT int hello(int);
Source.cpp#include "header.h"
int hello(int arg)
{
arg++;
return arg;
}
RPG Maker Script (Ruby):
class Game_Character
Hello = Win32API.new("rotate.dll", "hello", "I", "I")
def hello(arg)
print Hello.call(arg)
end
end
Event Move Route -> Script:
$>script: hello(5)
---
This is as basic as it gets.
Im completely unfamiliar with C++ headers. So if my next step is to interact with a Bitmap, where do I go from there? Also assuming that since Im working with Transparency that is had from .png files, the term "Bitmap" is a bit misleading.
I tried looking at a few examples online, but it doesnt make sense yet. Im stuck at exporting the function in DLLEXPORT, but basically I'll make a function that does image rotation using some of the prebuilt methods, (GDI?) and return the Image. Or, do I need to use pointers and make changes to the memory addresses on the fly? Wouldnt that affect the bitmap stored in RPG::Cache?
extern "C" DLLEXPORT HBITMAP rotateBitmap(HBITMAP, float)
I know I need another header in there so I can declare what a HBITMAP is...
What is my next step?
*feels very stupid*