|
CMapEditor v. 1.0 //
//
Copyright (C) 2003 Eugenio Panero. //
All Rights Reserved. //
//
www.eugigames.tk //
info@eugigames.tk //
//
//////////////////////////////////////////
====================
What is CMapEditor ?
====================
CMapEditor is a simple and efficient interface for using a multi-level a matrix of values. This can be easily used in games or any other program that requires a versatile map structure.
=========================
How do i use CMapEditor ?
=========================
You must include the
#include "CMapEditor.h"
direction in your file to be able to use CMapEditor. Keep also in mind that CMapEditor requires the <vector> header to be present on your machine.
To initialize a map just use:
CMapEditor meEditor(WIDTH,HEIGHT,LEVELS);
or
CMapEditor *meEditor = new CMapEditor(WIDTH,HEIGHT,LEVELS);
To set a cell's value in the map, use:
meEditor->SetMapValue(X,Y,LEVEL,VALUE)
You can also use advanced operations, such as region fill, or drag-like procedures:
meEditor->Fill(X,Y,LEVEL,REPLACE_VALUE,VALUE)
and
meEditor->StartDrag(X,Y,LEVEL)
meEditor->EndDrag(DX,DY,VALUE)
CMapEditor also supports basic Undo and Redo operations. You can decide what is going to be undone by calling
meEditor->NextUndo();
before performing other operations. For example:
meEditor->NextUndo();
meEditor->SetMapValue(X,Y,LEVEL,VALUE)
eEditor->Fill(X,Y,LEVEL,REPLACE_VALUE,VALUE)
...
in this case, the SetMapValue() and the Fill() effects will be undone together. To perform undo and redo, just use:
meEditor->Undo()
and
meEditor->Redo()
==========================================================
I found a bug in CMapEditor or i have a comment/suggestion
==========================================================
Please! Send an email to info@eugigames.tk !
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.