Modifications to the code made on 7/28/06 by DragonsIOA

-Added checkbox in texture flags (create scenery OVL) to copy the settings to all meshes (useful when an ASE file has lots of little meshes in it)

-Fixed minor memory leak

-Fixed import of texture in ASE file to use per-vertex texturing (now complex meshes should import texture UVs just fine!)


Modifications by Belgabor (Starting August 2006):
Notes:
- I used Dev-C++ 4.9.9.2 (http://www.bloodshed.net/index.html) and ResEdit (http://www.resedit.net/)
- You need to get the devpacks libjpeg, libpng, libtiff and Zlib. The currently available devpak for devIL (1.6.7) is too old and won't work. The source distribution will contain a directory called Dev-C++ which contains all you need for devIL 1.6.8R2, just copy its contents to your Dev-C++ install dir.
- I don't know if this will still compile in MSVC, it might contain some functions specefic to glibc. I also had to circumvent a bug in ResEdit, so the menus are loaded in the code now.

Version 1.0
* Made the source compile in GCC/mingw/dev-c++ (everythings open source now)
* Fixed Bug: Need to click on 'Install Theme' multiple times to make it work.
* UNFIXED Bug: Texture file haldles left open. I mention that since ireported it fixed elsewhere. I had to revoke that as it crashed the importer (which it shouldn't, I have no ***** idea why )
* Reorganized several windows, mostly to make it look nicer and to show more text
* Added an option ('Fix Orientation') to the Create Scenery OVL dialog. If you check that the importer will fix the weired axis reorganization in RCT3. That means you can forget those rotations before you export the object, just model your object on the default x/y-plane with z up. Important:This influences the effect stuff explained below, if you need it checked be sure to do so before playing with that.
* Made adding effect points easier. See rct3imp.txt for long explanation.
* One of the open source things I did was replacing the closed source ATI texture compression library with devIL, an open source image library. Currently this means that you can use most common image formats as an icon texture (transparency will probaby still only work with png).

Version 1.1
* Fixed some Bugs
* The lightcolor effect point is automatically added for custom light color lightstart points.

Version 1.2
* Removed lightcolor effect point as it's not necessary. (Should have been lightcolour anyways :p )
* Rearranged open/save sid buttons
* Create Scenery OVL: Double clicks on texture, mesh and effect point lists now open the respective edit dialog.
* Create Scenery OVL, Texture options: Texture name autogenerated from file name if not set before (spaces are ok, I tested it).
* Create Scenery OVL, Textures: Now devIL is used to read textures, so you can use many image formats as input (in fact more than listed in the open file box, but I didn't want to clutter the file extension box). The image is automatically converted to 8bit indexed or grayscale for alpha. No special handling yet for recolorable textures, they still should be 8bit bmps with the special palette, if not results are likely to be random and unexpected :)

Version 1.2.1
* Fixed orientation bugs.
* Fixed palette conversion bug.
* Image info button for texture bitmaps.

Version 1.3
* More info on light effect point radius.
* Most lists now act on double clicks.
* Scenery Options: Location now is an editable combo box where you can select other locations from the theme.
* Scenery Options: Show which sid was loaded.
* Text editor: you can now copy name to text and vice versa.
* Icon textures: Name auto-generated from texture filename if not entered.
* Image info button for icon texture bitmaps.
* Scenery  Creator: Mesh list entries are now colored (gray: disbaled, light green: single vertex mesh, red: missing data).
* First implementation of an easier recolorable texture implementation. Make the first color shades of red, the second shades of green and the third shades of blue. Colors should be clean (eg no green in red). The darkest color should be still slightly colored, not completely black (eg RGB 1,0,0 for red is enough). The brightest color should be the full color (eg RGB 255,0,0), not the lightened color like in the original Blue/Magenta/Yellow scheme. See rct3imp.txt for a brief howto. Important: These textures need to be truecolor, indexed images will be used as-is and need to use the old Blue/Magenta/Yellow palette. Also the RGB textures are saved with the old palette, so don't be surprised if they look Blue/Magenta/Yellow in the RCT3 dumper =)

Version 1.3.1
* Bugfix for the location combobox

Version 1.4
* Text editor: The text from 'Text' is automatically copied to 'Name' if you leave that empty and click 'Ok'. Also the entry focus is on the 'Text' edit box so just type and press enter to add a new string =)
* Text editor: 'Ok' grayed if 'Text' and 'Name' are empty.
* Icon Editor: 'Ok' grayed if no texture selected
* Icon Manager: 'Auto' genereates 64x64 entries for all icon textures. Note that the numbering differs from the 'Icon Number' setting in the icon editor. It starts with '1' and goes like western writing, ie left to right first and then downwards. Seemed more intuitive to me =)
* Main Window: Simple Prefix support. It will be prepended to the theme name on install and to the proposed ovl name in 'Create Scenery OVL'. Note that no further letter or symbol (like '-' or '_') is added in between, if you want that, add it to the enterd prefix.
* Restored functionality to test texture ovls. The editable combo-box was butchered like the bug I fixed in 1.3.1. I have a test running reagrding this. If it turns out to work, I'll explain how I did it =)
* Fixed the 'fix orientation' flag to do what I now think is right (see The_Cook's post). I'm afraid that this introduces a slight incompatibility if you used this flag before. Your objects will turn up rotated 90 degrees. For most objects this probabsy won't matter, but if you used the wall positioning flag (and similar non-origin centered flags) you will now have to place them on the -y side of the x/z plane.
* Related to the last I also changed the way 'fix orientation' is applied to effect points. It no longer matters if you check it before or after editing them. This also means that you can manually enter effect points as measured in your modeller. It also means that you probably need to reset effect points if you used one-vertex meshes with fix orientation in earlier versions.

Version 1.4.5
* Bugfix: One letter missing from theme directory if no prefix is used.
* Bugfix: Problem with truecolor textures with less than 256 colors.
* Bugfix: Image info not really showing something useful.
* Create Scenery OVL: If you open a scn file and the importer can't find the ase file, you now can manually select it.
* Create Scenery OVL: Visual options. These allows to mimic the placement effects and swaying of the in-game 3D trees. Please press the 'Notes' button for more details.
* (Internal: Switched from Dev-C++/wxDev-C++ to Code::Blocks before being tempted to throw things around :) )
* The last point made me take a look at the compiler flags which led to reduced sizes of the importer and some of the dlls. It shouldn't matter, but to be on the safe side overwrite them all.

Version 1.4.6
* Static compile. You can delete all old dlls. The only one you still need is libovl and you have to use the one that comes with this version.
* Bugfix: Crash if RCT3 Install Directory couldn't be read from the registry. Asks for a directory to install to.
* Icon Manager: Auto Button moved. Added query on which textures auto should be applied to.
* Preliminary support for real texture ovls. How-to:
    1. The texture ovl
        - Open the create scenery ovl dialog
        - Do not open any ASE! Also refrain from adding references or effect points.
        - Add your textures. Give them easy to remember names as we will need them later.
        - Save to an easy to remember name.
    2. The actual Scenery OVL
        - Open the create scenery ovl dialog
        - Open your ASE
        - You're probably able to add textures, but I have not tested that. Do NOT add the texture you will reference to.
        - Add the filename of your texture ovl (without the .common.ovl) to the references. This is a relative path to where the texture ovl will be in relation to the scenery ovl. I used for my test "../belgabor-snowwalltexture". It may be fine to put it in the same directory, but I also didn't test that.
        - Set the mesh options. For the referenced texture, type the name into the texture combo box.
        - Finish the scenery ovl as usual
    3. The Theme
        - Create as usual. Do NOT add the texture ovl as scenery. This is probably the reason shyguy failed.
        - Install
        - Copy the texture ovl files to where RCT3 expects them to be (in my case, in the theme directory with the style.*.ovl files).
        - That's it :D
  You cannot save scn files yet, sorry (I DID say it was preliminay :p ). I will add that as soon as a few people report it works for them as well as for me.

Version 1.4.7
* You can now save texture ovl scns
* Bugfix: Texture OVLs with more than one texture didn't work
* Bugfix: Random stuff in texture ovl
* I created a small test suite for this & future releases. That doesn't mean there won't be buggy releases anymore, but at least the basics should work =)

Version 1.4.8
* Bugfix: Create Scenery OVL: Mesh list colors not updated if "Apply To All Meshes" was checked.
* Create Scenery OVL: Shift-Doubleclick on a mesh entry singles it out (activates it and deactivates all others). Useful if you tend to place several objects into one ASE file (like me).
* Scenery Settings: Shows the number of the currently edited scenery item in the title. Helps assigning icons references cretead with the auto button.
* Scenery Settings: Cost & Refund default to 0, Supports Type to 'None'.
* Limited automation for texture ovls:
    1. The Create Scenery dialog proposes PrefixThemename-texture as ovl name if no ase selected.
    2. The reference edit box in the Create Scenery OVL dialog comes prefilled with "../shared/PrefixThemename-texture", so you just need to press 'Add' to include the reference.
    3. If the importer finds an ovl named like proposed above (1) in the same directory as your theme file, it will be automatically installed to ThemeDir/shared. You will be notified if this happened.
* The exe now comes in two flavours, "RCT3 Importer.exe" defaults to 'Fix Orientation' checked, "RCT3 Importer NoFixOrient.exe" defaults to unchecked (like in the old versions).

Version 1.5.0
* Massive internal changes. You probably won't see much of them =)
** What may affect you is the new implementation of reading scenery files/3d object files. The new code tries to make sense of things the old one just discarded. If you get strange notices and think they are not justified, report it =)
** I also made ASE file loading more stable. If a mesh lacks uv-mapping, the importer won't crash anymore. Instead the mesh will be disabled automatically.
* The old "fix orientation" code as well as the effect point matrix has been replaced by a matrix transformation stack editor. Advantages:
** You can now add custom "fix orientation" matrices for your special modeler
** You can reuse the same model for several objects if they only differ in position/rotation/scale. Example: provide a wall with quad tile and wall placement
** Note: The model tranformation is also applied to the effect point matrices, just as the old "fix transformation" flag was.
** Note: All rotations are for a right-handed coordinate system and all transformation use the origin as reference.
** I'll post a tutorial about this soon. For now, refer to DRP's effect point tutorial on Atari (stickied in the Custom Scenery Forum) for some general hints.
* The importer can now load MS3D files directly.
** The correct fixup matrix for this is a Z mirror (If you didn't do any pre-importer fixups yourself :) )
** Single vertices that are not assigned to a group in MS are loaded as single-vertex meshes for effect point creation (and now also as reference points for translation matrices). As MS doesn't support names for these, they are named automatically based on their position.
** In contrast to what I said above about ASE files, MS3D files by design cannot lack uv-mapping information in a detectible way, so meshes that haven't been mapped in MS are not disabled.
* Limited configuration. You can save a default transformation matrix (Menu in Create Scenery OVL) and a default prefix (Main Menu). Note: the default matrix saved will be the result of the transformation matrix stack of the currently edited scenery item. Obviously this means I stop creating two binaries =)
* All across the Create Scenery OVL dialog sub-dialogs you can now load settings from other scn files
* Texture name cache. Fancy name for a simple thing =) It stores texture names of texture ovls so you have them available in the texture dropdown in the mesh settings. The cache is filled when you save a texture ovl or load a texture ovl scn via the special menu item. It is cleared when you start a new theme or clear it via the respective menu item.
* Tab-order cleanups
* Bugfix: Create Scenery OVL: Doubleclick on mesh list works again.

Version 1.5.1
* Bugfix: The model transformation was applied to the normals in a wrong way.
* Bugfix: A palette bug prevented alpha textures to work if you used a truecolor image as "normal" texture.
* Bugfix: Stability enhanced
* I started to convert the whole importer to wxWidgets, a C++ UI toolkit. I'm not finished and the first bug forced me to release this earlier than I originally intended. This (hopefully) doesn't mean instability or errors (except for the warning below).
** This makes the importer exe a lot larger. I hope in time the advandages will justify that =)
** Converted the texture and mesh settings dialog for creating scenery ovls. This means you can resize them =) This may not seem terribly useful in these cases, but as I'll convert other dialogs as well you get a glimpse at what will become possible.
** New dialog for opening texture files, so far only implemented for scenery ovl texture settings.
** Texture filenames in this texture settings dialog are now checked for validity when you close it.
** I reordered the texture styles in a way that seemed mor esensible to me. The basic styles are at the top, the less used more complicated ones below.
** Warning: If you have one of these windows open you can actually activate the create scenery dialog below. I cannot prevent this in the current half-state and it will almost certainly lead to a crash or corruption of your scenery data. In short, don't do it.
