[XP] Heretic's Collection of Art and 100% Compatible Scripts

Started by Heretic86, November 26, 2013, 09:22:35 am

Previous topic - Next topic

ItsUnagi

Hi guys! I'm trying to run the demo, but it gives me an error about the 102E.dll file not being found. I tried following the instructions in the README file by changing the .ini and the .rxproj files to the latest versions (104E.dll and RPG XP 1.05 respectively), and while the error disappears, the game window turns completely black and stops responding every time I open it. I've also tried downloading RPG Maker XP's RTP, but that also has the same problem. Does anyone know why this happens?

KK20

https://forum.chaos-project.com/index.php?PHPSESSID=fc14dbfbe353909bbceceeb72412a45e&msg=197241
Last message on the page (if the above link doesn't auto-redirect you to it)

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

ItsUnagi

Oh, it worked! I guess I just wasn't reading the replies in the thread very thoroughly, thank you for being patient.

02fd

Hello! I am using some of the scripts here with mkxp-z; this means I need to re-build all of the DLLs for x64 Windows. Unfortunately, TransformBitmap.dll's source doesn't contain the "fill_color" function. It loads the "TransformBitmap" function just fine (as mkxp-z re-implements Win32API) and I can see the source for that function just fine. Does anyone have the source for fill_color?

KK20

The method itself isn't particularly difficult to create. It simply just replaces every pixel's color for the source bitmap with the passed in RGB color, while still respecting the Alpha channel's value.

It's been a while since I've worked with C++ and DLLs though, so here's what Copilot came up using RotateBitmap as a reference (I fixed obvious mistakes generated by the result). Untested of course.
Code: cpp
DLL_EXPORT int fill_color(long srcObject, float* color) {
// obtain the RGSS bitmap data
RGSSBMINFO* srcBitmap = ((RGSSBITMAP*)(srcObject << 1))->bm->bminfo;
if (srcBitmap == NULL)
{
return 1;
}
// used variables
int srcWidth = srcBitmap->infoheader->biWidth;
int srcHeight = srcBitmap->infoheader->biHeight;
// pointers to bitmap data, going from the first row, but the rows are in reverse order
unsigned char* srcData = (unsigned char*)srcBitmap->firstRow;
unsigned char* src = NULL;
// Local Variables used to determine positions during rotation
int x = 0;
int y = 0;
// Iterate each Row in the Height of the Bitmap
for (y = 0; y < srcHeight; ++y)
{
// Iterate each Pixel in the Row of the Bitmap
for (x = 0; x < srcWidth; ++x)
{
// access bitmaps' pixel data from the coordinates
// x - y * destWidth, because the x is the offset in the row,
// but since the rows are reverse, it's "- y * destWidth"
src = &srcData[(x - y * srcWidth) * BPP];
src[2] = (unsigned char)(color[0]);
src[1] = (unsigned char)(color[1]);
src[0] = (unsigned char)(color[2]);
}
}
// Color fill is successful
return 0;
}

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

Blizzard

IDK if the color byte order flip is ok. Just pointing it out as potential bug.
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.