//---------------------------------------------------------------------------

#ifndef Unit1H
#define Unit1H
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include "AdvGrid.hpp"
#include "BaseGrid.hpp"
#include <Dialogs.hpp>
#include <Grids.hpp>
//---------------------------------------------------------------------------
struct rmmStruct {
    byte obj1;
    byte obj2;
    byte tle1;
    byte tle2;
    byte cursor1;
    byte unk1;
    byte unk2;
    byte unk3;
};

struct rmdStruct {
    unsigned int xstart;
    unsigned int ystart;
    unsigned int xend;
    unsigned int yend;
    int xOffset;
    int yOffset;
    unsigned int tlenumber;
    bool loaded;
    bool imageloaded;
    AnsiString filename;
};

class TForm1 : public TForm
{
__published:	// IDE-managed Components
    TAdvStringGrid *AdvStringGrid1;
    TButton *Button1;
    TOpenDialog *OpenDialog1;
    TMemo *Memo1;
    TButton *Button2;
    TSaveDialog *SaveDialog1;
    TButton *Button3;
    TEdit *Edit1;
    TEdit *Edit2;
    TButton *Button4;
    void __fastcall Button1Click(TObject *Sender);
    void __fastcall Button2Click(TObject *Sender);
    void __fastcall Button3Click(TObject *Sender);
    void __fastcall Button4Click(TObject *Sender);
private:	// User declarations
    void loadtle(int filenum);
    void loadobj(int filenum);
    void loadtlelst(void);
    void loadobjlst(void);
public:		// User declarations
    __fastcall TForm1(TComponent* Owner);
    int width, height, map, unk;
    rmdStruct tleData[241][128];
    rmdStruct objData[1417][128];
    rmmStruct mapData[250][250];
};
//---------------------------------------------------------------------------
extern PACKAGE TForm1 *Form1;
//---------------------------------------------------------------------------
#endif
