|
Shinya Kitaoka |
810553 |
#pragma once
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
#ifndef TLEVEL_INCLUDED
|
|
Toshihiro Shimizu |
890ddd |
#define TLEVEL_INCLUDED
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
#include "timage.h"
|
|
Toshihiro Shimizu |
890ddd |
#include "tfilepath.h"
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
#undef DVAPI
|
|
Toshihiro Shimizu |
890ddd |
#undef DVVAR
|
|
Toshihiro Shimizu |
890ddd |
#ifdef TIMAGE_EXPORTS
|
|
Toshihiro Shimizu |
890ddd |
#define DVAPI DV_EXPORT_API
|
|
Toshihiro Shimizu |
890ddd |
#define DVVAR DV_EXPORT_VAR
|
|
Toshihiro Shimizu |
890ddd |
#else
|
|
Toshihiro Shimizu |
890ddd |
#define DVAPI DV_IMPORT_API
|
|
Toshihiro Shimizu |
890ddd |
#define DVVAR DV_IMPORT_VAR
|
|
Toshihiro Shimizu |
890ddd |
#endif
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
//-------------------------------------------------------------------
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
d1f6c4 |
class DVAPI TLevel final : public TSmartObject {
|
|
Shinya Kitaoka |
120a6e |
DECLARE_CLASS_CODE
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
public:
|
|
Shinya Kitaoka |
120a6e |
typedef std::map<const tframeid,="" timagep=""> Table;</const>
|
|
Shinya Kitaoka |
120a6e |
typedef Table::iterator Iterator;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
private:
|
|
Shinya Kitaoka |
120a6e |
std::string m_name;
|
|
Shinya Kitaoka |
120a6e |
Table *m_table;
|
|
Shinya Kitaoka |
120a6e |
TPalette *m_palette;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
public:
|
|
Shinya Kitaoka |
120a6e |
TLevel();
|
|
Shinya Kitaoka |
120a6e |
~TLevel();
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
private:
|
|
Shinya Kitaoka |
120a6e |
// not implemented
|
|
Shinya Kitaoka |
120a6e |
TLevel(const TLevel &);
|
|
Shinya Kitaoka |
120a6e |
TLevel &operator=(const TLevel &);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
public:
|
|
Shinya Kitaoka |
120a6e |
// nome
|
|
Shinya Kitaoka |
120a6e |
std::string getName() const;
|
|
Shinya Kitaoka |
120a6e |
void setName(std::string name);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
// frames
|
|
Shinya Kitaoka |
120a6e |
int getFrameCount() const { return (int)m_table->size(); };
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
const TImageP &frame(const TFrameId fid);
|
|
Shinya Kitaoka |
120a6e |
const TImageP &frame(int f) { return frame(TFrameId(f)); };
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
void setFrame(const TFrameId &fid, const TImageP &img);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
// ritorna la posizione (0..getNFrames()-1) del frame f
|
|
Shinya Kitaoka |
120a6e |
// se il frame f non c'e' ritorna -1
|
|
Shinya Kitaoka |
120a6e |
// int getIndex(const TFrameId fid);
|
|
Shinya Kitaoka |
120a6e |
// int getIndex(int f) {return getIndex(TFrameId(f));};
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
Iterator begin() { return m_table->begin(); };
|
|
Shinya Kitaoka |
120a6e |
Iterator end() { return m_table->end(); };
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
// uh - oh; serve a tinytoonz/filmstrip.
|
|
Shinya Kitaoka |
120a6e |
// PROVVISORIO !!
|
|
Shinya Kitaoka |
120a6e |
Table *getTable() { return m_table; }
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
TPalette *getPalette();
|
|
Shinya Kitaoka |
120a6e |
void setPalette(TPalette *);
|
|
Toshihiro Shimizu |
890ddd |
};
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
//-------------------------------------------------------------------
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
9f5a1b |
#ifdef _WIN32
|
|
Toshihiro Shimizu |
890ddd |
template class DVAPI TSmartPointerT<tlevel>;</tlevel>
|
|
Toshihiro Shimizu |
890ddd |
#endif
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
d1f6c4 |
class DVAPI TLevelP final : public TSmartPointerT<tlevel> {</tlevel>
|
|
Toshihiro Shimizu |
890ddd |
public:
|
|
Shinya Kitaoka |
120a6e |
TLevelP() : TSmartPointerT<tlevel>(new TLevel) {}</tlevel>
|
|
Shinya Kitaoka |
120a6e |
TLevelP(TLevel *level) : TSmartPointerT<tlevel>(level) {}</tlevel>
|
|
Toshihiro Shimizu |
890ddd |
};
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
//-------------------------------------------------------------------
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
#endif
|