Page 1 of 1

regarding smooth and plugin making

Posted: Thu Jul 10, 2003 9:11 am
by artaxerxes
To all users interested in smooth:
I've had to change quite a bit the way plugins are created so that it is more portable.

I've not entirely finalised everything but for now here is the new deal:
* you must have a init_plugin() defined
* you must have a deinit_plugin() defined as well.
* you still need to have a plugin_apply() and a plugin_parse() functions.

init_plugin() takes as a parameters a glob_statics, which is defined in the file globals.h
Review the globals.h for more information.

Anyways, I'd recommend you'd wait before writing any plugins. I'll post the changes soon as well as a more detailed step-by-step instruction on how to write a plugin.

smooth is a powerful tool to help you create maps for u7. It already supports the randomizing of a colour (nice for forests) and the automaking of roads/water streams so they can follow a path with the right chunks when turning or splitting.

Artaxerxes

Re: regarding smooth and plugin making

Posted: Thu Jul 10, 2003 12:13 pm
by artaxerxes
new package for smooth available at the usual place (http://si-french.sf.net/tools/).

The package compiles and runs properly on my machine. The plugins were rewritten to be portable. I _do_ believe it is ready to be compiled on windows (after putting in a couple of #ifdef's).
All the system dependent code is preceded by a comment having the string "Colourless" in it, so it's easy to grep on it.

I have also found a way to create the {smooth} plugin so it won't be come before long.

I'm off until Monday so d/l the beast and have fun!

Artaxerxes

Re: regarding smooth and plugin making

Posted: Fri Jul 11, 2003 6:51 pm
by Ram dragon
Portability is great for me. I've also worked out a system for smoothing ocean-land and mountain-land boundaries. It uses a 3x3 pixel mask. I'm going to test it today. Will post the results when I have them.

Ram Dragon

Re: regarding smooth and plugin making

Posted: Fri Jul 11, 2003 8:10 pm
by drcode
Anyone have screenshots showing results? And should we incorporate these into the Exult distribution?

Re: regarding smooth and plugin making

Posted: Sat Jul 12, 2003 6:00 am
by Dominus
I'm for incorporating (as always :-))
And some screenies would be nice too
and a port to Win32 of course....

Re: regarding smooth and plugin making

Posted: Sat Jul 12, 2003 6:25 am
by Wizardry Dragon
Win32 would be good, but screenys first would be nice :)

~ Wizardry Dragon
"Not sea shanty again!"

Re: regarding smooth and plugin making

Posted: Mon Jul 14, 2003 3:29 am
by artaxerxes
Alright all,
I'll make a set of screenshots today. As for Win32 porting, I'm waiting for Colourless to tell me what I have left of non-portable code. I'm not opposed to incorporate the code in exult's source but once again, it is coded in C and not C++ and I am not using autoconf/autoheader/automake. Just a plain Makefile. If someone would like to help me to write a makefile.ac, I'd be happy to learn though.

Anyways, I'll get the screenshots today (eastern time)! ;-)

Artaxerxes

Re: regarding smooth and plugin making

Posted: Mon Jul 14, 2003 5:42 am
by artaxerxes
Some screenshots and details of what plugins do are at:
http://si-french.sf.net/tools/smooth.html

Artaxerxes

Re: regarding smooth and plugin making

Posted: Mon Jul 14, 2003 10:43 am
by artaxerxes
windows executable is now available thanks to Colourless at the usual address:

http://si-french.sf.net/tools/smooth.html

Artaxerxes

ps: you will need SDL.dll and SDL_image.dll, both available on http://www.libsdl.org/libraries.php

Re: regarding smooth and plugin making

Posted: Mon Jul 21, 2003 10:17 am
by Skutarth
I reformatted recently, so I lost the Win32 compile of mockup. Can you please tell me where to find it?

Re: regarding smooth and plugin making

Posted: Mon Jul 21, 2003 10:35 am
by artaxerxes
I don't have the windows version on hand.
If anyone is willing to contact me with one, so I can put it on the site, that would be appreciated.

thx
Artaxerxes

Re: regarding smooth and plugin making

Posted: Tue Jul 22, 2003 6:37 am
by Skutarth
Maybe you should start putting this on the downloads page?

Re: regarding smooth and plugin making

Posted: Fri Jul 25, 2003 9:54 am
by Wizardry Dragon
It would help, and it's certainly related to Exult :)

Maybe put it in with the Exult Tools Binaries or something?

~ Wizardry Dragon

Re: regarding smooth and plugin making

Posted: Fri Jul 25, 2003 10:36 am
by Dominus
these tools by Artaxerxes are not yet in Exult cvs. I'm sure as soon as they are in there you will find them in the tools snapshot.

Re: regarding smooth and plugin making

Posted: Fri Jul 25, 2003 12:17 pm
by artaxerxes
and for those interested, have a look at http://si-french.sourceforge.net/packag ... gtk.tar.gz

It's a work in progress and it doesn't do much yet, but at least you'll know what it looks like.

MapStudio (temporary name, I like MapMaker too), is a GUI tool similar in purpose to smooth. Since it is GUI, it's easy to pick what colour you want to change into what and to check the results on the fly.

It should be pretty useful I think, my only problem is I know nothing about gtk programming and what I've seen so far makes my barf.

The documentation is horrible for gtk. Most important widgets are not even documented!

Oh well, the majority wins I guess.

Artaxerxes

Re: regarding smooth and plugin making

Posted: Fri Jul 25, 2003 2:48 pm
by drcode
:-) Been there. Maybe there's a book somewhere?

When I get stuck, I sometimes unpack the GTK source and figure it out from there.

Re: regarding smooth and plugin making

Posted: Fri Jul 25, 2003 10:44 pm
by SB-X
Can the new map tools be added to ExultStudio so that they have a GUI front-end, like this MapStudio (but as part of ES)?

Re: regarding smooth and plugin making

Posted: Sat Jul 26, 2003 3:40 am
by artaxerxes
SB-X: that's the goal eventually, but I hope to finish MapStudio/MapMaker first.

DrCode: That's exactly what I've done already! I wanted to know what functions to load an image in a widget out of a filename. So I greped GtkImage in /usr/include/gtk-2.0/gtk/ and I read for myself the content of gtkimage.h! And it worked! :-)

Artaxerxes