ALEXRE'S PROFILE
AlexRE
30
Search
Filter
+++ DynRPG - The RM2k3 Plugin SDK +++
It seems that there is still a problem with recent compilators as I've installed different types of them like 20 times yesterday...
I've tried to do it with Eclipse instead of Code::Blocks, and compilator finds these errors in libDynRPG.a :
Maybe I've found a solution on stackoverflow => http://stackoverflow.com/questions/2340930/stray-342-in-c-program
I've tried to do it with Eclipse instead of Code::Blocks, and compilator finds these errors in libDynRPG.a :
stray '\254'
stray '\30'
stray '\306'
stray '`'
Maybe I've found a solution on stackoverflow => http://stackoverflow.com/questions/2340930/stray-342-in-c-program
+++ DynRPG - The RM2k3 Plugin SDK +++
Oh, thx, I will try that.
Someone reminded me that Cherry warned about it on the DynRPG website :
Someone reminded me that Cherry warned about it on the DynRPG website :
Important Information for Plugin Developers: Recent problems showed that DynRPG is not compatible with the latest GCC compiler version yet. Please only use version 4.6.1 or below!
+++ DynRPG - The RM2k3 Plugin SDK +++
Ok, now I have a new error :
It seems that it's coming from my compiler. (The exception handler SJLJ.)
I've tried other compilers but it's not working. Is your compiler old ?
This may be related to the Boost Library, do you use it ? => http://forums.xilinx.com/t5/Embedded-Development-Tools/Undefined-references-to-exception-symbols-mb-g/td-p/281766
undefined reference to `__gxx_personality_sj0'
undefined reference to `_Unwind_SjLj_Register'
It seems that it's coming from my compiler. (The exception handler SJLJ.)
I've tried other compilers but it's not working. Is your compiler old ?
Hi,
the newer series of MinGW released GCC does not use sjlj for C++ anymore.
This may be related to the Boost Library, do you use it ? => http://forums.xilinx.com/t5/Embedded-Development-Tools/Undefined-references-to-exception-symbols-mb-g/td-p/281766
+++ DynRPG - The RM2k3 Plugin SDK +++
Haha, okay...
Well, it says "undefined reference to 'RPG::DStringPtr::DStringPtr(RPG::DStringPtr&)'"
Showing this from Variables.h :
Is there anyone than can create the dll for me ? :p
Well, it says "undefined reference to 'RPG::DStringPtr::DStringPtr(RPG::DStringPtr&)'"
Showing this from Variables.h :
DStringPtr RPG::Variables::name(int index) {
RPG::NamedCatalogPtr<RPG::Variable *> &n = (**reinterpret_cast<RPG::NamedCatalogPtr<RPG::Variable *> **>(0x4CDFC4));
return n->name;
}
Is there anyone than can create the dll for me ? :p
#define AUTO_DLLMAIN
#include <DynRPG/DynRPG.h>
#include <cmath>
//==================================================================================
bool onComment(
const char *text,
const RPG::ParsedCommentData *parsedData,
RPG::EventScriptLine *nextScriptLine,
RPG::EventScriptData *scriptData,
int eventId,
int pageId,
int lineId,
int *nextLineId)
//==================================================================================
{
if (
!strcmp(parsedData->command, "drawFaceFromId")
)
{
if(
(parsedData->parametersCount == 3) &&
(parsedData->parameters[0].type == RPG::PARAM_NUMBER) &&
(parsedData->parameters[1].type == RPG::PARAM_NUMBER) &&
(parsedData->parameters[2].type == RPG::PARAM_NUMBER)
)
{
int heroId = (int)parsedData->parameters[0].number;
//int xDestination = (int)parsedData->parameters[1].number;
//int yDestination = (int)parsedData->parameters[2].number;
if(RPG::dbActors[heroId] != NULL)
{
// Get the filename of the used faceset
std::string facesetFile = RPG::dbActors[heroId]->facesetFilename;
// Get which of the 4x4 facesets is used
int faceUsed = RPG::dbActors[heroId]->facesetId;
int xFace = (faceUsed%4)*48;
int yface = floor(faceUsed/4)*48;
RPG::Image *imgPtr = RPG::Image::create();
if (imgPtr != NULL) {
imgPtr->useMaskColor = true;
imgPtr->loadFromFile(facesetFile , false);
RPG::pictures[nextScriptLine->parameter(0)]->image->clear();
RPG::pictures[nextScriptLine->parameter(0)]->image->draw(0, 0, imgPtr, xFace, yface, 48, 48, false);
RPG::pictures[nextScriptLine->parameter(0)]->image2->draw(0, 0, imgPtr, xFace, yface, 48, 48, false);
RPG::pictures[nextScriptLine->parameter(0)]->image->applyPalette();
RPG::pictures[nextScriptLine->parameter(0)]->image2->applyPalette();
RPG::Image::destroy(imgPtr);
}
}
}
}
else if (
!strcmp(parsedData->command, "rmFace")
)
{
// rien for now
}
return true;
}
//==================================================================================
+++ DynRPG - The RM2k3 Plugin SDK +++
(Thank you for your support!)
I've not forgotten this at the top of the file... I've just added the linkage as well (I hope it's not doing harm since it's the same thing as the top of the file).
Anyway, the errors are still there. I'm googling this, there must be a library missing or something like that.
I've not forgotten this at the top of the file... I've just added the linkage as well (I hope it's not doing harm since it's the same thing as the top of the file).
Anyway, the errors are still there. I'm googling this, there must be a library missing or something like that.
+++ DynRPG - The RM2k3 Plugin SDK +++
Ah, yes, amazing.
However, shit !!
My skills in Code::Blocks are just lame. xD
However, shit !!
author=BuildMessages
37|undefined reference to `RPG::DStringPtr::operator std::string()'|
45|undefined reference to `RPG::Image::create()'|
48|undefined reference to `RPG::Image::loadFromFile(std::string, bool, bool)'|
50|undefined reference to `RPG::EventScriptLine::parameter(int)'|
50|undefined reference to `RPG::Image::clear()'|
51|undefined reference to `RPG::EventScriptLine::parameter(int)'|
51|undefined reference to `RPG::Image::draw(int, int, RPG::Image*, int, int, int, int, int)'|
52|undefined reference to `RPG::EventScriptLine::parameter(int)'|
52|undefined reference to `RPG::Image::draw(int, int, RPG::Image*, int, int, int, int, int)'|
53|undefined reference to `RPG::EventScriptLine::parameter(int)'|
53|undefined reference to `RPG::Image::applyPalette()'|
54|undefined reference to `RPG::EventScriptLine::parameter(int)'|
54|undefined reference to `RPG::Image::applyPalette()'|
56|undefined reference to `RPG::Image::destroy(RPG::Image*&)'|
My skills in Code::Blocks are just lame. xD
+++ DynRPG - The RM2k3 Plugin SDK +++
Same error.
Actually, it's a compilation error, so this number shouldn't be the problem at this point.
Actually, it's a compilation error, so this number shouldn't be the problem at this point.
+++ DynRPG - The RM2k3 Plugin SDK +++
Thank you ! I'm not sure to get everything, but overriding the Show Picture command seems to be the best thing to do.
That's were I am :
But I have "error: no match for call to '(RPG::DArray<int>) (int)'" for the 3 RPG::pictures lines.
That's were I am :
author=me
int heroId = (int)parsedData->parameters[0].number;
int xDestination = (int)parsedData->parameters[1].number;
int yDestination = (int)parsedData->parameters[2].number;
if(RPG::dbActors[heroId] != NULL)
{
// Get the filename of the used faceset
std::string facesetFile = RPG::dbActors[heroId]->facesetFilename;
// Get which of the 4x4 facesets is used
int faceUsed = RPG::dbActors[heroId]->facesetId;
int xFace = (faceUsed%4)*48;
int yface = floor(faceUsed/4)*48;
RPG::Image *imgPtr = RPG::Image::create();
if (imgPtr != NULL) {
imgPtr->useMaskColor = true;
imgPtr->loadFromFile(facesetFile , false);
RPG::pictures[nextScriptLine->parameters(0)]->image->clear();
RPG::pictures[nextScriptLine->parameters(0)]->image->draw(0, 0, imgPtr, xFace, yface, 48, 48, false);
RPG::pictures[nextScriptLine->parameters(0)]->image->applyPalette();
RPG::Image::destroy(imgPtr);
}
}
But I have "error: no match for call to '(RPG::DArray<int>) (int)'" for the 3 RPG::pictures lines.
+++ DynRPG - The RM2k3 Plugin SDK +++
Oh, damn. This is obvious now that you say it... I need to use the onFrame-Callback then ? I'm going to look into other plug-ins' cpp files.
+++ DynRPG - The RM2k3 Plugin SDK +++
This is where I am currently :
(Inside an onComment function, I don't show everything here.)
I now have to learn how to create a DLL file, haha ! *noob*
author=Me
int heroId = (int)parsedData->parameters[0].number;
int xDestination = (int)parsedData->parameters[1].number;
int yDestination = (int)parsedData->parameters[2].number;
std::string facesetFile = RPG::dbActors[heroId]->facesetFilename;
int faceUsed = RPG::dbActors[heroId]->facesetId;
int xFace = (faceUsed%4)*48;
int yface = floor(faceUsed/4)*48;
RPG::Image *imgPtr= RPG::Image::create();
imgPtr->useMaskColor = true;
imgPtr->loadFromFile(facesetFile , false);
RPG::Screen::canvas->draw(xDestination, yDestination, imgPtr, xFace, yface, 48, 48);
(Inside an onComment function, I don't show everything here.)
I now have to learn how to create a DLL file, haha ! *noob*













