03-25-2021, 06:27 AM
Hi again,
It may be some incompatibility between the current version of the engine and the binding, because there are some breaking changes to the animation API since the C# binding was last updated. As I don't have .netcore environment installed I couldn't run the program.
However I did a quick translate to C, and it works. There's a slight mistake in the sqx file, as animation frame starts at 0, sequence should be 0,1,2,3,4 instead of 1,2,3,4,5, but it only causes a minor glitch on each loop, otherwise it loads and displays correctly. Relative paths seem also correct.
Here is the translated C test, running at .\Testing\Testing\bin\Debug\netcoreapp3.1 to keep the same folder structure:
And the top left corner captured with GifCam, after correcting the sqx file
It may be some incompatibility between the current version of the engine and the binding, because there are some breaking changes to the animation API since the C# binding was last updated. As I don't have .netcore environment installed I couldn't run the program.
However I did a quick translate to C, and it works. There's a slight mistake in the sqx file, as animation frame starts at 0, sequence should be 0,1,2,3,4 instead of 1,2,3,4,5, but it only causes a minor glitch on each loop, otherwise it loads and displays correctly. Relative paths seem also correct.
Here is the translated C test, running at .\Testing\Testing\bin\Debug\netcoreapp3.1 to keep the same folder structure:
Code:
#include "Tilengine.h"
int main(int argc, char* argv)
{
TLN_Init(427, 240, 11, 30, 30);
TLN_SetLoadPath("assets/Sprites/Terri");
TLN_Spriteset ss = TLN_LoadSpriteset("TerriIdle.png");
TLN_SequencePack sp = TLN_LoadSequencePack("TerriIdle.sqx");
TLN_Sequence idle = TLN_FindSequence(sp, "idle");
int sprite = TLN_GetAvailableSprite();
TLN_ConfigSprite(sprite, ss, 0);
TLN_SetSpriteAnimation(sprite, idle, 0);
int frame = 0;
TLN_CreateWindow(NULL, 0);
while (TLN_ProcessWindow()) {
TLN_DrawFrame(frame);
frame += 1;
}
return 0;
}
And the top left corner captured with GifCam, after correcting the sqx file