Page 6 of 13

Re: EGOBOO -- Another editor

Posted: Fri Mar 04, 2011 7:18 pm
by bitnapper
Question
Do I have to write carriage return / newline for windows into the text files, or is it enough to write the newline character as only this one is needed for linux ?

BTW: If using Notepad++, it doesnt matter if its Unix- or WIndows text format.
With Notepad++ its possible to have user-defined text files for syntax highlighting (think script files).

Work done
- Code tested for writing the 'menu.txt' file
- Underlines are removed, added to strings as files are loaded/saved

Work planned
- Activate editing of passages and spawn points
- Editing of the main data in 'menu.txt'
- Loading of game objects for display: Icons
- Display 'names' of spawn points / objects in 3D-Screen
- Clean up code for editing tiles
- Use mouse in the 3D-Window :ack:

Re: EGOBOO -- Another editor

Posted: Fri Mar 04, 2011 7:35 pm
by Zefz
I am not sure. We use the standard C library for scanning data from files using fscanf.

Re: EGOBOO -- Another editor

Posted: Sat Mar 05, 2011 10:32 am
by bitnapper
Thanks. So it doesn't matter, how the carriage return is handled.

Work done
- 'menu.txt' is now saved correct :D
- Prepared writing of line descriptions into text files

Work planned
- Activate editing for all dialogs :roll:
- Activate 'Ok' and 'Cancel'-Buttons for new dialogs (Only 'OK' does save the data / generate the map, 'Cancel' skips the changes)

:idea: If the egoboo-engine used 'fgets' for reading in lines, we could skip all that 'replace-spaces-by-underline-and-vice-versa' and the need for writing underlines for spaces. For the time being, the engine could support both types.

Questions
- What are the 'tx_flags' for in the Fan-Data-Description ?
- Has the editor to support them ?

Re: EGOBOO -- Another editor

Posted: Sat Mar 05, 2011 1:06 pm
by Zefz
I am not sure. I can't find any references to it in the game source. Isn't this the mpd_fx I mentioned before?

Re: EGOBOO -- Another editor

Posted: Sat Mar 05, 2011 5:10 pm
by bitnapper
Fan-FX-Flags:

Code: Select all

typedef struct {
  
    unsigned char tx_no;    /* Number of texture:                           */
                            /* (tx_no >> 6) & 3: Number of wall texture     */
                            /* tx_no & 0x3F:     Number of part of texture  */ 
    unsigned char tx_flags; /* Special flags                                */
    unsigned char fx;		/* Tile special effects flags                   */
    char type;              /* Tile fan type (index into COMMAND_T)         */

} FANDATA_T;
The 'fx' are this flags you mentioned, no idea what the 'tx_flags' are for.
Possibly the 'fx' is declared as 'short int'...
I think these other bits could be used for some more infos.

Work done
- Writing the data names to the text files (example 'menu.txt') :D

Work planned
- Editing text in dialog boxes (starting with 'menu.txt')
- Using mouse in 3D-Window :ack:
- Set correct edit modes for editing tiles and map

Re: EGOBOO -- Another editor

Posted: Mon Mar 07, 2011 12:05 am
by bgbirdsey
The fan data is 8 bits of image data an 8 bits of "extra" data that was supposed to be used by egomap to classify the tiles. If you can figure out what is going on with the data there, I will give you a prize.

Re: EGOBOO -- Another editor

Posted: Tue Mar 08, 2011 7:57 am
by bitnapper
The new editor don't need this extra bits for building a map, I use an internal copy holding info about the data on the map.

I think, we could use these other bits well as additional flags in-game.
I just need to know if you want to edit them.

Work done
- Reorganized code to handle edit-states like in 'EgoMap'

Work planned
- Adding boolean type for files and hanle it as checkboxes in Dialogs
- Adding and refining code for editing text in dialogs for 'menu.txt' and 'spawn.txt'
- Testing writing back 'spawn.txt' files

Re: EGOBOO -- Another editor

Posted: Sun Mar 13, 2011 12:47 pm
by bitnapper
Just for information here the links to a few screenshots of the new editor

Some screenshots:
http://fraueschueh.ch/egoboo/pics/edito ... pt_dlg.jpg
http://fraueschueh.ch/egoboo/pics/edito ... 0306_1.jpg
http://fraueschueh.ch/egoboo/pics/edito ... dialog.jpg

Work planned
- Adding an inventory dialog for objects from 'spawn.txt'

Re: EGOBOO -- Another editor

Posted: Sun Mar 13, 2011 1:11 pm
by Agent of Dread
That looks excellent! I might have to make a module or two when you get this finished. :)

Re: EGOBOO -- Another editor

Posted: Sun Mar 13, 2011 3:25 pm
by Zefz
Looking good.

You can remove Ghost from edit object btw. That one isn't used and never was.
Also you can rename Status-Bar to Is Player, because that is what it really means. Status bar for NPC's is done in scripts.

In passages you can also remove Slippy Close (same reason as Ghost)

Re: EGOBOO -- Another editor

Posted: Wed Mar 16, 2011 9:08 am
by bitnapper
I'll add soon e few more screenshots.

Work done
- Adjusted dialogs as given by Zefz :D
- Added a basic 'HowTo' documentation to be expanded as I test all functions
- Added a new test directory 'sewers'

Work planned
- Writing 'spawn.txt' file
- Add edit functions for dialogs
- Testing of editor with an example module 'sewers'
- Using mouse in 3D-Window :ack:

I hope to have added enough functionality until end of March (fingers crossed).
This may not include the support for the mouse in the 3D-Window. There may be as well some small flaws in the 'wall-maker' function (carve out the maze form a 'solid' map).
But I want to have it all the basic functionality done like placing objects and passages.

In the first place, the directories for the editor have to be 'pre-filled' with data for the map and for the objects.

Re: EGOBOO -- Another editor

Posted: Wed Mar 16, 2011 7:11 pm
by Zefz
Maybe we can finally add it into the next 2.6.2b (beta) release :)

Re: EGOBOO -- Another editor

Posted: Wed Mar 16, 2011 8:01 pm
by bitnapper
Zefz wrote:Maybe we can finally add it into the next 2.6.2b (beta) release :)
Strange version number :D

Work done
- Added edit functions for text fields
- Added arrows for choosing preset values in 'Module description'
- Menu point 'File -> New...' now works correct
- Work directory can be set using the 'data/editor.cfg' file

Work planned
- Test edit function 'Map mode' (Using mouse left/right)
- Adding a 'local' mouse menu for 'New...' things on map (objects / passages)
- Writing 'spawn.txt' file
- And still this mouse in the 3D-Window... :ack:

Re: EGOBOO -- Another editor

Posted: Wed Mar 16, 2011 8:37 pm
by Zefz
Ack, I meant 2.8.2b (Beta) of course...

Re: EGOBOO -- Another editor

Posted: Thu Mar 17, 2011 7:09 pm
by bitnapper
Work done
- Activating the 'Map'-Drawing mode from the menu http://fraueschueh.ch/egoboo/pics/menu_map.jpg :D
- Extended the 'HowTo' accordingly
- Made the 2D-Map bigger for easier use of Mouse (Map on/off with 'Ctrl-m')

Work planned
- Adding a 'local' mouse dialog for 'New...' things on map (objects / passages) Q: Is that a good idea ?
- Writing 'spawn.txt' file
- Writing 'passage.txt' file
- And still this mouse in the 3D-Window... :ack:

And here's the link to the 'How-To' for the editor on the web:

http://fraueschueh.ch/egoboo/howto/index.html

It's updated as the one in the SVN to keep interested people informed, without need to get it from SVN :D