BoA Editor Remake

Error message

Deprecated function: implode(): Passing glue string after array is deprecated. Swap the parameters in drupal_get_feeds() (line 394 of /var/www/pied-piper.ermarian.net/includes/common.inc).

Pages

AuthorTopic: BoA Editor Remake
Shock Trooper
Member # 4557
Profile #75
Done putting the structures in global.h into new files. Will load them onto the CVS a little later.

EDIT:
quote:
Sent wxGlade setting file, wxTest000.wxg, to CVS

Ummm, I already made one, and its basically the same as yours (no status bar). It has all the menu items from the old editor, though.

[ Thursday, February 24, 2005 18:20: Message edited by: KernelKnowledge12 ]
Posts: 264 | Registered: Wednesday, June 16 2004 07:00
Warrior
Member # 5289
Profile #76
quote:
Finished wxGlade file; code is not generated.
Doesn't wxGlade generate code on both setting file?
wxTest000.wxg generates code properly on my side.

[ Thursday, February 24, 2005 18:31: Message edited by: Notus ]

--------------------
Project: BoA Editor Remake on SourceForge.net
supports "3D BoA Editor" (Mac and Win), and creates advanced BoA Editor.
Posts: 107 | Registered: Tuesday, December 14 2004 08:00
Shock Trooper
Member # 4557
Profile #77
I meant just that I didn't put the generated code from my .wxg file onto the CVS server. Thought it should wait until the layout is finished.

EDIT:

All the classes (excluding those having to do with scripting) are on the CVS server. The scripting classes should be done next.

[ Thursday, February 24, 2005 18:38: Message edited by: KernelKnowledge12 ]
Posts: 264 | Registered: Wednesday, June 16 2004 07:00
Warrior
Member # 5289
Profile #78
I see.
Anyway, we don't use the code generated by wxGlade as it is. I think it is a "customizable example maker". After we know how to code, editing code on the text editor is easier than setting parameters on wxGlade GUI. For example, we can add menu items faster on a text editor.

[ Thursday, February 24, 2005 18:51: Message edited by: Notus ]

--------------------
Project: BoA Editor Remake on SourceForge.net
supports "3D BoA Editor" (Mac and Win), and creates advanced BoA Editor.
Posts: 107 | Registered: Tuesday, December 14 2004 08:00
Shock Trooper
Member # 4557
Profile #79
quote:
Originally written by Notus:

Anyway, we don't use the code generated by wxGlade as it is. I think it is a "customizable example maker". After we know how to code, editing code on the text editor is easier than setting parameters on wxGlade GUI. For example, we can add menu items faster on a text editor.
We should still use the generated code as a template for our own code, it should be pretty organized.

Coding using wxWidgets is very, very, very simple. Because there was no real IDE for so long, the makers of wxWidgets created code that did most of the work itself. For example, you create a wxFrame by using the new operator, but it deletes itself upon its closing or the application quitting.

EDIT:

Created a parser that does scenario data script parsing using Boost.Spirit. It compiles, but is untested. If it works, it will drastically speed up development.

It was loaded into the CVS repository under the file names: "avs_parser.hpp" and "avs_parser.cpp".

EDIT:

Forgot about a few undefined functions in the parser. I'll finish those now.

EDIT:

Hmmm, its going to take more time than I thought. I had to put = operators for that game_data.hpp classes and put some other stuff into avs_parser.hpp. Hopefully this was all the extraneous stuff I have to code.

EDIT:

Finished the parser. Its still inefficient, but several times more efficient and much cleaner than the original. I'll test it now, and when it works completely, I'll put more comments in.

EDIT:

Nope, doesn't work, but I know why. If I can't fix it soon, I'll load the original script parser.

[ Friday, February 25, 2005 19:31: Message edited by: KernelKnowledge12 ]
Posts: 264 | Registered: Wednesday, June 16 2004 07:00
Shock Trooper
Member # 4557
Profile #80
Sorry about the double post, but the topic's pretty old, and I wanted those involved to notice the thread is still alive.

The new parser is loaded onto the CVS, and the functions that are meant to parse are changed to use it. It is not yet commented to any significant degree.
Posts: 264 | Registered: Wednesday, June 16 2004 07:00
Off With Their Heads
Member # 4045
Profile Homepage #81
What is this "parser" thing? (In general terms; I don't need details.)

--------------------
Arancaytar: Every time you ask people to compare TM and Kel, you endanger the poor, fluffy kittens.
Smoo: Get ready to face the walls!
Ephesos: In conclusion, yarr.

Kelandon's Pink and Pretty Page!!: the authorized location for all things by me
The Archive of all released BoE scenarios ever
Posts: 7968 | Registered: Saturday, February 28 2004 08:00
Shock Trooper
Member # 4557
Profile #82
The data that fills the scen_data object in the Editor is held in the scripts "corescendata.txt" and "corescendata2.txt". My parser parses these scripts and loads the data, much more efficiently than the one in the old editor. It also must load a specific scenario's own scenario data script before editing the towns, outdoor sects, etc.

EDIT:

If you want to know what a parser is in general, then it is a utility that reads scripts, and checks them. Its just programming lingo for script checker (Alint is a parser).

EDIT:

Actually, a parser can read/check any type of grammar. They're usually made for scripting languages/programming languages.

[ Monday, February 28, 2005 18:45: Message edited by: KernelKnowledge12 ]
Posts: 264 | Registered: Wednesday, June 16 2004 07:00
Off With Their Heads
Member # 4045
Profile Homepage #83
Ah. Nifty.

--------------------
Arancaytar: Every time you ask people to compare TM and Kel, you endanger the poor, fluffy kittens.
Smoo: Get ready to face the walls!
Ephesos: In conclusion, yarr.

Kelandon's Pink and Pretty Page!!: the authorized location for all things by me
The Archive of all released BoE scenarios ever
Posts: 7968 | Registered: Saturday, February 28 2004 08:00
Warrior
Member # 5289
Profile #84
The first plan for the user command interface including Tool palette is almost finished. I'll concentrate implementation of the graphic system this week.
Because of the entrance examination of our University, I couldn't take so much time last week. (Japanese school starts on April.)

[Edit]
KernelKnowledge12
Please retrieve the previous build (build0026) of Win 3D editor from CVS, and cut out the data loader part. That version worked fine as the loader to the data object, but I gave up it by another problem I told. We can use it on our new editor. Revise it by your new template style. Show me a good example of template implementation ;)

Retrieve procedure is,
1. In a new folder, execute "CVS Checkout...".
2. Select "Win3DBoAEditor/source" in Module tag.
3. Click Revision tag on the top of the TortoiseCVS dialog.
4. Check "Choose branch or tag"
5. Push "Update list.." button and connect CVS server to retrieve tags.
6. Now you get tag list on the pull-down menu, left of the push button.
7. Select "Build0026", the second one.
8. Push "OK" button at the bottom.
9. The connection to the CVS server retrieves the Build0026 version.

Maybe next parts are useful.
Bl A Fileio.cpp
do_load_campaign(), load_outdoor(), load_town()

CMemStream.h, CMemStream.cpp

global.h and Library.cpp
ReadDataFromStream(), WriteDataToStream() of each data object

[ Tuesday, March 01, 2005 09:49: Message edited by: Notus ]

--------------------
Project: BoA Editor Remake on SourceForge.net
supports "3D BoA Editor" (Mac and Win), and creates advanced BoA Editor.
Posts: 107 | Registered: Tuesday, December 14 2004 08:00
Shock Trooper
Member # 4557
Profile #85
quote:
Originally written by Notus:


Please retrieve the previous build (build0026) of Win 3D editor from CVS, and cut out the data loader part. That version worked fine as the loader to the data object, but I gave up it by another problem I told. We can use it on our new editor. Revise it by your new template style. Show me a good example of template implementation ;)

I've looked at the save/load functions, and I have a few ideas. (I'll go ahead and do them, but I won't load it onto SourceForge until I get your approval. Actually I loaded some stuff before I read this, but this shouldn't be a problem.)

1) First, I'd like to change it to use fstream, and Spirit's file_iterator.
2) The save function is dependent upon the set_up_lights() function, which is an algorithm that works on terrains. I'd like to start a modularization of BoA-centric algorithms. I'll create two files, "algo_base.hpp" and "terrain_algo.hpp".
3) The save/load functions are dependent on global data, and so cannot be extended to any other use. I'd like to change their declarations to:

save_campaign( const char* __original, const char* __to );
load_campaign( const char* __from );

Concerning my parser:

Since my parser uses Spirit, which uses an excessive amount of template metaprogramming, it can be a strain on the compiler. To fix this I tried to put the actual functor definitions along with the parser's grammar definition in a .cpp file, so it won't compile every time the header is included. This, however, created linker errors that made no sense. Do you know of another way to solve this problem?
Posts: 264 | Registered: Wednesday, June 16 2004 07:00
Warrior
Member # 5289
Profile #86
quote:
2) The save function is dependent upon the set_up_lights() function, which is an algorithm that works on terrains. I'd like to start a modularization of BoA-centric algorithms. I'll create two files, "algo_base.hpp" and "terrain_algo.hpp".
Yes, set_up_lights() etc. should be moved to the command handler that calls the loader for modularization.

quote:
Since my parser uses Spirit, which uses an excessive amount of template metaprogramming, it can be a strain on the compiler. To fix this I tried to put the actual functor definitions along with the parser's grammar definition in a .cpp file, so it won't compile every time the header is included. This, however, created linker errors that made no sense. Do you know of another way to solve this problem?
Did you try clean build including pre-compiled header? Pre-compiled header and incremental link sometimes falls out of tune even in non-template C++ code. Delete pre-compiled header .pch and object files and execute recompile. If many compile errors appear after deleting pre-compiled header, compile switch is not set properly.
"The strain on the compiler" may also be caused by the same reason.

Tool and other palette design
Appearance of Tool and other palette
Most of the function of the original tool palette is divided into these palette.

IMAGE(http://homepage2.nifty.com/Notus/ToolPalettePlan1.png)

The explanation of palettes function. Can you imagine function of each button without next explanation?

IMAGE(http://homepage2.nifty.com/Notus/ToolPaletteExp.png)

Context menu
Context menu appears when user enters double click on the edit screen. Alternative way is Command (Apple)-click (Macintosh) or right mouse button click (Windows).
* means that the command is effective to the selected area.

Context menu for town edit screen
-- Place bounding walls *
-- Swap walls 1 <--> 2 *
-- Create Area description *
-- Edit Sign
-- Edit Terrain Script
-- Create Special Encounter *
-- Edit Special Encouter
-- Erase Special Encouter
-- Edit placed object
-- Delete object
-- Delete Waypoint
-- Set NY All *
-- Reset NY All *

Context menu for outdoor edit screen
-- Place bounding walls *
-- Swap walls 1 <--> 2 *
-- Create Area description *
-- Edit Sign
-- Create town entrance *
-- Edit Town Entrance
-- Create Special Encounter *
-- Edit Special Encouter
-- Erase Special Encouter

Check box on edit windows
New editor can open several edit window for towns and outdoor at the same time. Each edit window has next display setting checkbox.

-- 3D display toggles 2D/3D display
-- Realistic (3D only) switch display to realistic mode
-- Zoom out (2D only) display with small icon
-- Height (2D only) display height number on each square <-- when height tool is selected, set to this mode automatically

[ Wednesday, March 02, 2005 02:39: Message edited by: Notus ]

--------------------
Project: BoA Editor Remake on SourceForge.net
supports "3D BoA Editor" (Mac and Win), and creates advanced BoA Editor.
Posts: 107 | Registered: Tuesday, December 14 2004 08:00
Shock Trooper
Member # 4557
Profile #87
Your designs look great :) !

As for my code, it might be awhile. I was able to write the parser quickly because a few storms closed the school systems for quite a while. I just finished a few metafunctions for the terrain classes (tiny_tr_type,ave_tr_type,big_tr_type), and I've commented a few of the files. I haven't loaded the metafunctions onto the CVS server yet, but I will soon.
Posts: 264 | Registered: Wednesday, June 16 2004 07:00
Infiltrator
Member # 148
Profile #88
An error?

When I attempt to copy text outside of the BoA application and paste it into the "Intro Text" dialog boxes, I get nothing. I tried coping text from within the scenario and I had no problems. I attempted to copy from the outside again and I all got was the text I had copied from another dialog box. I tried this 3 more times before I gave up.

OS 10.2.8, Latest Version.

--------------------
My ego is bigger than yours.
Posts: 480 | Registered: Thursday, October 11 2001 07:00
Off With Their Heads
Member # 4045
Profile Homepage #89
Note that when you open the intro text boxes, all the menus get grayed out. You can neither copy nor paste in those boxes.

EDIT: I read this again. How on earth did you copy from inside the app?

[ Thursday, March 03, 2005 17:11: Message edited by: Kelandon ]

--------------------
Arancaytar: Every time you ask people to compare TM and Kel, you endanger the poor, fluffy kittens.
Smoo: Get ready to face the walls!
Ephesos: In conclusion, yarr.

Kelandon's Pink and Pretty Page!!: the authorized location for all things by me
The Archive of all released BoE scenarios ever
Posts: 7968 | Registered: Saturday, February 28 2004 08:00
...b10010b...
Member # 869
Profile Homepage #90
quote:
Originally written by Kelandon:

EDIT: I read this again. How on earth did you copy from inside the app?
Keyboard commands, presumably. I could do the same from dialog boxes in BoE.

--------------------
The Empire Always Loses: This Time For Sure!
Posts: 9973 | Registered: Saturday, March 30 2002 08:00
Shock Trooper
Member # 4557
Profile #91
This is not an error, just an example of how primitive the editor is. In the new editor, this will not be a problem, but chances are it won't be fixed in the old editor.

I am also curious as to how you managed to copy text within the application. I checked the code, and I couldn't find anything that would account for such a feature. Of course, I only looked in the Windows code.

[ Thursday, March 03, 2005 18:02: Message edited by: KernelKnowledge12 ]
Posts: 264 | Registered: Wednesday, June 16 2004 07:00
Off With Their Heads
Member # 4045
Profile Homepage #92
Funny -- I've never seen keyboard commands work when the menus are grayed out, but they do here.

--------------------
Arancaytar: Every time you ask people to compare TM and Kel, you endanger the poor, fluffy kittens.
Smoo: Get ready to face the walls!
Ephesos: In conclusion, yarr.

Kelandon's Pink and Pretty Page!!: the authorized location for all things by me
The Archive of all released BoE scenarios ever
Posts: 7968 | Registered: Saturday, February 28 2004 08:00
Shock Trooper
Member # 4557
Profile #93
Not in the Windows version. I guess Jeff wasn't as lazy when he created the Mac version of the editor.
Posts: 264 | Registered: Wednesday, June 16 2004 07:00
Infiltrator
Member # 148
Profile #94
I used command + c. Generic Macintosh Copy command.

--------------------
My ego is bigger than yours.
Posts: 480 | Registered: Thursday, October 11 2001 07:00
Warrior
Member # 5289
Profile #95
quote:
Not in the Windows version. I guess Jeff wasn't as lazy when he created the Mac version of the editor.
To be fair for JV, he did nothing on copy-paste of text on dialogs in either Mac or Win Editor. It's the difference of basic OS support or history.
MacOS has defined copy-paste shortcut keys on its user interface guidline, and supports it on OS as default. But Windows did't specify key assignment, though it has API to support copy-paste.

Mac has two "clipboards", internal clipboard (within application) and system clipboard (between application). As the internal clipboard is supported by default, Mac application can copy-paste within the application. But to interact with the system clipboard, we should implement a transfer procedure between system and internal clipboard when the application becomes front or background.
Don't you have an experience when Photoshop becomes background, it asks "Do you want to convert large clipboard?"

quote:
Funny -- I've never seen keyboard commands work when the menus are grayed out, but they do here.
It's the result of sweat of programmers. Synchronization of "Edit" menu and clipboard owes to coding.

To enable TRUE copy-paste on the dialogs on the current editor takes much time to implement, because it affects all dialogs and we should examine it. Please wait the new editor.

[ Friday, March 04, 2005 12:40: Message edited by: Notus ]

--------------------
Project: BoA Editor Remake on SourceForge.net
supports "3D BoA Editor" (Mac and Win), and creates advanced BoA Editor.
Posts: 107 | Registered: Tuesday, December 14 2004 08:00
Shock Trooper
Member # 4557
Profile #96
I've started porting a rather long string of functions into the new editor, and I've found it neccessary to remake most of them. To do this, I've created a line class with three iterators (in line.hpp), and made a new direction system (in directional.hpp). The line class' tile_iterator will be used on the old_can_see, etc. functions, which I plan to split into four separate functions.

Notus, Isaac (any other developers who are working on this), please take a look at these files, and make sure you don't see anything wrong with them.

I believe I'll have these functions done by the end of the weekend:

look_block
move_block
old_can_see_to
old_can_see_in
old_can_travel_to
old_can_travel_in
set_up_lights

After this, I should be able to finish the file i/o functions pretty fast.

EDIT:

Nevermind about my direction system; I don't believe I was thinking clearly when I coded it. Also, I think I'll only split the old_can_see function into two different functions.

EDIT:

FYI, I only tested my tile iterator for forward iteration. It my not work with backward iteration, but I'll test it soon.

EDIT:

I was looking at the terrain classes (ave_tr_type, big_tr_type, tiny_tr_type) and I thought it would speed things up if instead of holding indexes to a specific floor or terrain, they held the actual pointers to the objects. This way instead of referencing the scen_data object every time a terrain was drawn, the program could just use the terrain object.

Notus, would this be a good idea, and if so, should we implement it now or later?

[ Sunday, March 06, 2005 12:52: Message edited by: KernelKnowledge12 ]
Posts: 264 | Registered: Wednesday, June 16 2004 07:00
Warrior
Member # 5289
Profile #97
Sorry, I should go back to my home town now. I'll return tomorrow.

town's limit

class scenario_data_type {
...
unsigned char num_towns;
...
// town data
unsigned char town_size[200]; // 0 - large, 1 - medium, 2 - small
unsigned char town_starts_hidden[200];
...
}

num_towns counts the number of towns actually implemented in .bas file.
The arrays, town_size[] and town_starts_hidden[], shows attribute of corresponding towns. If number of towns exceed 200, the towns which index is more than (and equal to) 200 cannot have these attributes. Thus, the maximum number of towns is 200.

[ Monday, March 07, 2005 09:37: Message edited by: Notus ]

--------------------
Project: BoA Editor Remake on SourceForge.net
supports "3D BoA Editor" (Mac and Win), and creates advanced BoA Editor.
Posts: 107 | Registered: Tuesday, December 14 2004 08:00
Shock Trooper
Member # 4557
Profile #98
I just finished the algorithms neccessary for set_up_lights to function (sorry for the delay). It is loaded into the CVS, but I think I should look it over some. It isn't commented, so I apologize for any confusion. I'll work on the fileio tomorrow, and then write the old_can_travel functions.

Just saw the town limit part of your post Notus. I think I forgot that the editor writes those 2 arrays as full length no matter how many towns there are. The BoA application, then, must read it in this way. Thank you for clearing this up.

EDIT:

Finished with the save_campaign() function.

[ Wednesday, March 09, 2005 15:23: Message edited by: KernelKnowledge12 ]
Posts: 264 | Registered: Wednesday, June 16 2004 07:00
BANNED
Member # 4
Profile Homepage #99
Say, could you have more keyboard shortcuts for placing and deleting objects (ie, barrels, blood, etc) like we had in BoE?

And does your "hill formation" tool work on the same flawed bases that the one from the regular BoA editor is based on?

--------------------
*
Posts: 6936 | Registered: Tuesday, September 18 2001 07:00

Pages