Commit c0129c90 authored by anotherguest's avatar anotherguest

Better palette, image parsing, Fade in for screens.

Missing font colours, spacing is not correct all of the time. ANimations not working.
parent 0b47d4f3
This diff is collapsed.
......@@ -48,57 +48,66 @@ public:
class ScriptText
{
public:
ScriptText()
{
x = -1;
y = -1;
}
ScriptText();
~ScriptText();
char* text;
int alignment;
int fontId;
int x;
int y;
SDL_Rect textRect;
int extraLineHeight;
};
// Class
class ScriptPage
{
public:
ScriptPage()
{
bgIndex = -1;
pageTime = 0;
noScriptTexts = 0;
}
int bgIndex;
ScriptPage();
~ScriptPage();
int backgrounds;
int bgIndex[30];
unsigned int bgPos[30];
// Length of the scene in seconds, or if zero = anim complete, or 256 = user interaction
int pageTime;
ScriptText scriptTexts[100];
int noScriptTexts;
char* musicfile;
int paletteIndex;
};
class ImageInfo
{
public:
ImageInfo();
~ImageInfo();
// SDL_Surface with the image
SDL_Surface *image;
// data index of the image (not the palette) to compare with scripts
int dataIndex;
};
class PaletteInfo
{
public:
// Palette associated with the image
SDL_Color palette[256];
// data index of the image (not the palette) to compare with scripts
int dataIndex;
};
class Scene {
private:
ImageInfo imageInfo[100];
ImageInfo imageInfos[100];
PaletteInfo paletteInfos[100];
unsigned short int scriptItems;
unsigned short int dataItems;
signed long int* scriptStarts;
signed long int* dataOffsets;
int imageIndex;
int bgIndex;
int paletteIndex;
// Scripts all information needed to render script pages, text etc
ScriptPage* scriptPages;
ImageInfo* FindImage(int dataIndex);
......@@ -106,18 +115,14 @@ class Scene {
protected:
void ParseScripts(File *f);
void ParseData(File *f);
void ParseAni(File* f);
void ParseAni(File* f, int dataIndex);
public:
Scene (char * fileName);
~Scene ();
int play ();
ScriptFont scriptFonts[5];
int noScriptFonts;
int textAlignment;
int textFont;
int textPosX;
int textPosY;
int noScriptFonts;
};
#endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment