Sauer2 {l Wrote}:i would like to ask, if you have some kind of minor programming task for me to practise C++ and to get in touch with the code structure of Me & My Shadow.
enum EditorOrder
{
EDITOR_FIRST=TYPE_START_PLAYER,
EDITOR_SECOND=TYPE_START_SHADOW,
[...]
EDITOR_LAST=TYPE_MAX
};
Sauer2 {l Wrote}:I guess, I going to start with the order of the blocks, then.
For what I can see, at the moment it is handled by the enumeration GameStates in Globals.h. It seems, the whole game depends on it, so what i would have to do is to create another enumeration like:
Sauer2 {l Wrote}:Also, some parts in LevelEditor.cpp should be changed.
Is this an acceptable solution? Correct me, if i'm wrong.
Edward_Lii {l Wrote}:Good luck!
Sauer2 {l Wrote}:OK, it seems to work now.
It's realised with an static array, which belongs to LevelEditor, since I noticed that one can't iterate through an enumeration.
if(currentType>=0 && currentType<TYPE_MAX){
static const int editorTileOrder[EDITOR_TILE_MAX];
Sauer2 {l Wrote}:I fixed it and it seems to work, but it would be cool if you could take a look on it, because i'm not too sure if the array is to large now.
currentType++;
if(currentType>=TYPE_MAX){
currentType=0;
}
currentType++;
if(currentType>=EDITOR_ORDER_MAX){
currentType=0;
}
Sauer2 {l Wrote}:Are these just the maps and themes or does this also cover scripting/plugin functionality?
Sauer2 {l Wrote}:Plus, i'm not totally sure, how scripting could be used. I mean, there could be triggers, but at the moment, the possibilities of actions are limited.
Sauer2 {l Wrote}:Nope, that's not me.
Sauer2 {l Wrote}:@Edward Lii: You mean, at the moment you can't uninstall themes and levelpacks, did I get that right?
Sauer2 {l Wrote}:i added an update button in the middle of the button row at the bottom, which is disabled if there is no update.
Sauer2 {l Wrote}:It would be cool if someone could test the update functionality, because to be honest, i don't know how.
entry(levels,Flight,1)
entry(levels,Flight,0)
Users browsing this forum: Bing [Bot] and 1 guest