Converting from Older Version of VortexGE
This document will explain about how to convert applications previously created with
older version of VortexGE so that it can be compiled and linked with the newest version
of VortexGE. To see the project history (revisions and improvements) see the
"Project History".
Only conversion guide for converting to the two most recent releases are explained here.
To see the older conversion guides, click
here (text file, 80 columns/line).
Please report bugs to my e-mail if you have time (please do not send big attachments,
since my inbox capacity is limited and my internet connection is also slow).
A full credit will be given to you (listed) in the VortexGE "Credits"
section for any help in developing VortexGE.
Converting from Version 0.6.6-1 to Version 0.6.7-1
(and also to Development Version 0.6.6-5 and 0.6.6-3)
- [INCOMPATIBLE CHANGES] All classes' dtors should
now have the throw() specifiers. Concerning this:
- [INCOMPATIBLE CHANGES] In the current version,
when CPanelBar::GetXClient() and
CPanelBar::GetYClient() are called with their default
parameters (absolute = true), they will return values which
are 12 pixels less (compared to all older releases of
VortexGE). Simply adding 12 to the returned values will solve
the problem. This incompatibility is actually caused by bugs in the simple dialog
implementation in all older releases of VortexGE.
- [COULD BE INCOMPATIBLE CHANGES] These member
functions of dialog controls :
- DrawControl()s
- UpdateValue()s
- DoEdit()s
are no longer require the user to pass the CVideoEnv instance.
If you call those functions directly (instead of using dialog macros), just remove the
first parameters of the function calls.
Converting from Version 0.6.4-7 to Version 0.6.6-1
(and also to Development Version 0.6.5-6 and 0.6.5-3)
- [INCOMPATIBLE CHANGES] Use the provided
conversion script inside the directory "util/convert/"
for renaming the renamed symbols. Please follow these steps carefully:
- Backup your project tree first !!!
- Copy all the files from the directory "util/convert/"
to your project root directory.
- If you like, edit the copied file, "rename.table" and
remove lines that you think may conflict with your own symbols.
- Execute "./convert" from your project root
directory.
The script will work according to this flow:
- Building "convert.engine" executable from
"convert.engine.cc" using the default
"g++" in your box. If somehow it does not work, just edit
the "convert" shell script and adjust the command which
invokes "g++".
- Walk through all the sub directories and files starting from the directory in
which the "convert" script is executed (should be your
project's root directory).
- For each matched file found in the directories, the
"convert.engine" executable will be invoked to convert
the file. The file matching rule can be changed by editing the
"convert" shell script and adjusting the command which
invokes "grep".
Note :
- Since there are many symbols to be renamed and some
of the symbols may have exactly the same name with your own symbols (or 3rd party
libraries' symbols), the script may perform unwanted renaming. In this case,
removing some conflicting lines from "rename.table" may
help (and later you can rename those symbols manually).
- There are some member function calls that will not
be renamed by the script :
Classes |
Member Functions |
Should be Renamed Manually to |
CWalkingCameraControl::CSykbox |
render() | Render() |
CDefiniteAreaFractal
(and all classes derived from it) |
draw() |
Draw() |
CIndefiniteAreaFractal
(and all classes derived from it) |
draw() |
Draw() |
CException
(and all classes derived from it) |
what() |
What() |
location() |
Location() |
code() |
Code() |
CSourceInfo
(and all classes derived from it) |
valid() |
Valid() |
function() |
Function() |
file() |
File() |
line() |
Line() |
Those symbols are to short and renaming them automatically
may cause your own symbols (or 3rd party libraries' symbols) to be accidentally
renamed too. So you must rename them manually if you use them in your code.
- [INCOMPATIBLE CHANGES] Because now all
(file) I/O functions are no longer fix the file extensions, all file extensions
must be explicitly written. For example, code like:
- csImgBuild.LoadBMP("data/scenery1");
- csBox.LoadVPD("data/box");
must be converted to:
- csImgBuild.LoadBMP("data/scenery1.bmp");
- csBox.LoadVPD("data/box.vpd");
This changes are made so that users can freely select their
own file extension (eg.: when loading BMP or VPD file, the file extension needn't be
always .bmp nor .vpd, etc.).
- [INCOMPATIBLE CHANGES] These member functions
were converted from "normal" member functions to static member functions :
- C3DEnv::RDTSC()
- C3DEnv::GetTicks()
- C3DEnv::Ticks2mS()
- C3DEnv::CalcIntervalmS()
- C3DEnv::CalcAvgFPS()
and so, code like:
- C3DEnv myEnv;
- uint64_t cycles = myEnv.RDTSC();
must be converted to:
- C3DEnv myEnv;
- uint64_t cycles = C3DEnv::RDTSC();
- [INCOMPATIBLE CHANGES] The
"VGE_EXPORT" and "_sse" macros
are now considerer as semi-internal macros. To be able to use them in one's
applications, one must define the macro
"_KEEP_INTERNAL_MACROS_DEFINED" before including
"VMain" or "VMain.h"