git » fp-git.git » commit f81ea2e

This commit was manufactured by cvs2svn to create tag 'arelease'.

author cvs2svn
2004-03-23 21:09:15 UTC
committer cvs2svn
2004-03-23 21:09:15 UTC
parent ace6051324164b1ee1431f3afcb5f12a54133ed7

This commit was manufactured by cvs2svn to create tag 'arelease'.

CVSROOT/checkoutlist +0 -13
CVSROOT/commitinfo +0 -15
CVSROOT/config +0 -14
CVSROOT/cvswrappers +0 -23
CVSROOT/editinfo +0 -21
CVSROOT/loginfo +0 -26
CVSROOT/modules +0 -26
CVSROOT/notify +0 -12
CVSROOT/rcsinfo +0 -13
CVSROOT/taginfo +0 -20
CVSROOT/verifymsg +0 -21
PR/doc/changelog.txt +0 -149
PR/doc/gpl.txt +0 -340
PR/doc/readme.coders.txt +0 -182
PR/doc/readme.txt +0 -141
PR/src/Makefile +0 -149
PR/src/Makefile.lcc +0 -119
PR/src/Makefile.old +0 -142
PR/src/addons/vb/pr.bas +0 -79
PR/src/addons/vb/samples/pr.dll +0 -0
PR/src/addons/vb/samples/prsample.exe +0 -0
PR/src/addons/vb/samples/prsample.vbp +0 -32
PR/src/addons/vb/samples/prsample.vbw +0 -2
PR/src/addons/vb/samples/prtest1.frm +0 -116
PR/src/console/main.c +0 -489
PR/src/include/autodetect.h +0 -146
PR/src/include/bitmap.h +0 -48
PR/src/include/bmp.h +0 -48
PR/src/include/classify.h +0 -59
PR/src/include/common.h +0 -199
PR/src/include/compress.h +0 -94
PR/src/include/dat.h +0 -59
PR/src/include/direntwin.h +0 -50
PR/src/include/disk.h +0 -83
PR/src/include/english.h +0 -171
PR/src/include/export.h +0 -41
PR/src/include/filedir.h +0 -80
PR/src/include/getopt.h +0 -129
PR/src/include/idlist.h +0 -146
PR/src/include/image.h +0 -94
PR/src/include/import.h +0 -42
PR/src/include/memory.h +0 -44
PR/src/include/mid.h +0 -43
PR/src/include/pal.h +0 -49
PR/src/include/parse.h +0 -62
PR/src/include/plv.h +0 -89
PR/src/include/png.h +0 -48
PR/src/include/pr.h +0 -199
PR/src/include/search.h +0 -80
PR/src/include/spanish.h +0 -167
PR/src/include/tree.h +0 -146
PR/src/include/unknown.h +0 -146
PR/src/include/wav.h +0 -45
PR/src/include/xml.h +0 -31
PR/src/lib/actions/classify.c +0 -171
PR/src/lib/actions/export.c +0 -186
PR/src/lib/actions/import.c +0 -211
PR/src/lib/compression/rle_compress.c +0 -325
PR/src/lib/compression/rle_decompress.c +0 -325
PR/src/lib/compression/rlev_decompress.c +0 -325
PR/src/lib/formats/bmp.c +0 -208
PR/src/lib/formats/mid.c +0 -57
PR/src/lib/formats/pal.c +0 -143
PR/src/lib/formats/plv.c +0 -190
PR/src/lib/formats/wav.c +0 -75
PR/src/lib/layers/autodetect.c +0 -443
PR/src/lib/layers/dat.c +0 -243
PR/src/lib/layers/disk.c +0 -477
PR/src/lib/layers/idlist.c +0 -443
PR/src/lib/layers/memory.c +0 -45
PR/src/lib/object/image/image16.c +0 -325
PR/src/lib/object/image/image2.c +0 -325
PR/src/lib/object/image/image256.c +0 -325
PR/src/lib/object/image/image_common.c +0 -325
PR/src/lib/pr.c +0 -489
PR/src/lib/xml/parse.c +0 -502
PR/src/lib/xml/search.c +0 -241
PR/src/lib/xml/tree.c +0 -443
PR/src/lib/xml/unknown.c +0 -443
PR/src/ports/dirent.c +0 -145
PR/src/ports/getopt.c +0 -758
PR/src/ports/getopt1.c +0 -179
PR/src/ports/winfiles/pr.def +0 -14
PR/src/ports/winfiles/pr.dll +0 -0
PR/src/ports/winfiles/pr.exe +0 -0
PR/src/ports/winfiles/pr.exp +0 -14
PR/src/ports/winfiles/pr.lib +0 -0
PR/src/pr.dsp +0 -650
PR/src/pr.dsw +0 -29
pv3/ChildFrm.cpp +0 -88
pv3/ChildFrm.h +0 -56
pv3/MainFrm.cpp +0 -109
pv3/MainFrm.h +0 -58
pv3/MyDialog.cpp +0 -244
pv3/MyDialog.h +0 -46
pv3/Princed V3.aps +0 -0
pv3/Princed V3.clw +0 -504
pv3/Princed V3.cpp +0 -207
pv3/Princed V3.dsp +0 -294
pv3/Princed V3.dsw +0 -29
pv3/Princed V3.h +0 -55
pv3/Princed V3.ncb +0 -1
pv3/Princed V3.opt +0 -0
pv3/Princed V3.rc +0 -885
pv3/Princed V3Doc.cpp +0 -236
pv3/Princed V3Doc.h +0 -141
pv3/Princed V3View.cpp +0 -697
pv3/Princed V3View.h +0 -111
pv3/RegisterWIN32.cpp +0 -973
pv3/RegisterWIN32.h +0 -132
pv3/StdAfx.cpp +0 -8
pv3/StdAfx.h +0 -28
pv3/cSelectLevelWindow.cpp +0 -52
pv3/cSelectLevelWindow.h +0 -46
pv3/conf.cpp +0 -60
pv3/gpl.txt +0 -340
pv3/maps.cpp +0 -841
pv3/maps.h +0 -216
pv3/process.cpp +0 -23
pv3/res/32x32.ped.ico +0 -0
pv3/res/Princed V3.rc2 +0 -13
pv3/res/Toolbar.bmp +0 -0
pv3/res/about.bmp +0 -0
pv3/res/about.jpg +0 -0
pv3/res/about_pi.bmp +0 -0
pv3/res/backmask.bmp +0 -0
pv3/res/backs.bmp +0 -0
pv3/res/dropper.cur +0 -0
pv3/res/elemmask.bmp +0 -0
pv3/res/elemp.bmp +0 -0
pv3/res/elempmask.bmp +0 -0
pv3/res/elems.bmp +0 -0
pv3/res/guard.bmp +0 -0
pv3/res/guardmask.bmp +0 -0
pv3/res/hand.cur +0 -0
pv3/res/icons & cursors.zip +0 -0
pv3/res/manifest.txt +0 -21
pv3/res/newer BMPs.zip +0 -0
pv3/res/palette.bmp +0 -0
pv3/res/princed.ico +0 -0
pv3/res/pspbrwse.jbf +0 -0
pv3/res/zoomer.cur +0 -0
pv3/resource.h +0 -126
pv3/stackqueue.cpp.cpp +0 -76
pv3/structures.h +0 -52
stuff/cvsroot-pr/CVSROOT/checkoutlist +0 -13
stuff/cvsroot-pr/CVSROOT/commitinfo +0 -15
stuff/cvsroot-pr/CVSROOT/config +0 -14
stuff/cvsroot-pr/CVSROOT/cvswrappers +0 -23
stuff/cvsroot-pr/CVSROOT/editinfo +0 -21
stuff/cvsroot-pr/CVSROOT/loginfo +0 -26
stuff/cvsroot-pr/CVSROOT/modules +0 -26
stuff/cvsroot-pr/CVSROOT/notify +0 -12
stuff/cvsroot-pr/CVSROOT/rcsinfo +0 -13
stuff/cvsroot-pr/CVSROOT/taginfo +0 -20
stuff/cvsroot-pr/CVSROOT/verifymsg +0 -21

diff --git a/CVSROOT/checkoutlist b/CVSROOT/checkoutlist
deleted file mode 100644
index b04b350..0000000
--- a/CVSROOT/checkoutlist
+++ /dev/null
@@ -1,13 +0,0 @@
-# The "checkoutlist" file is used to support additional version controlled
-# administrative files in $CVSROOT/CVSROOT, such as template files.
-#
-# The first entry on a line is a filename which will be checked out from
-# the corresponding RCS file in the $CVSROOT/CVSROOT directory.
-# The remainder of the line is an error message to use if the file cannot
-# be checked out.
-#
-# File format:
-#
-#	[<whitespace>]<filename><whitespace><error message><end-of-line>
-#
-# comment lines begin with '#'
diff --git a/CVSROOT/commitinfo b/CVSROOT/commitinfo
deleted file mode 100644
index b19e7b7..0000000
--- a/CVSROOT/commitinfo
+++ /dev/null
@@ -1,15 +0,0 @@
-# The "commitinfo" file is used to control pre-commit checks.
-# The filter on the right is invoked with the repository and a list 
-# of files to check.  A non-zero exit of the filter program will 
-# cause the commit to be aborted.
-#
-# The first entry on a line is a regular expression which is tested
-# against the directory that the change is being committed to, relative
-# to the $CVSROOT.  For the first match that is found, then the remainder
-# of the line is the name of the filter to run.
-#
-# If the repository name does not match any of the regular expressions in this
-# file, the "DEFAULT" line is used, if it is specified.
-#
-# If the name "ALL" appears as a regular expression it is always used
-# in addition to the first matching regex or "DEFAULT".
diff --git a/CVSROOT/config b/CVSROOT/config
deleted file mode 100644
index ff43ec0..0000000
--- a/CVSROOT/config
+++ /dev/null
@@ -1,14 +0,0 @@
-# Set this to "no" if pserver shouldn't check system users/passwords
-#SystemAuth=no
-
-# Put CVS lock files in this directory rather than directly in the repository.
-#LockDir=/var/lock/cvs
-
-# Set `TopLevelAdmin' to `yes' to create a CVS directory at the top
-# level of the new working directory when using the `cvs checkout'
-# command.
-#TopLevelAdmin=no
-
-# Set `LogHistory' to `all' or `TOFEWGCMAR' to log all transactions to the
-# history file, or a subset as needed (ie `TMAR' logs all write operations)
-#LogHistory=TOFEWGCMAR
diff --git a/CVSROOT/cvswrappers b/CVSROOT/cvswrappers
deleted file mode 100644
index 0accaf1..0000000
--- a/CVSROOT/cvswrappers
+++ /dev/null
@@ -1,23 +0,0 @@
-# This file affects handling of files based on their names.
-#
-# The -t/-f options allow one to treat directories of files
-# as a single file, or to transform a file in other ways on
-# its way in and out of CVS.
-#
-# The -m option specifies whether CVS attempts to merge files.
-#
-# The -k option specifies keyword expansion (e.g. -kb for binary).
-#
-# Format of wrapper file ($CVSROOT/CVSROOT/cvswrappers or .cvswrappers)
-#
-#  wildcard	[option value][option value]...
-#
-#  where option is one of
-#  -f		from cvs filter		value: path to filter
-#  -t		to cvs filter		value: path to filter
-#  -m		update methodology	value: MERGE or COPY
-#  -k		expansion mode		value: b, o, kkv, &c
-#
-#  and value is a single-quote delimited value.
-# For example:
-#*.gif -k 'b'
diff --git a/CVSROOT/editinfo b/CVSROOT/editinfo
deleted file mode 100644
index d78886c..0000000
--- a/CVSROOT/editinfo
+++ /dev/null
@@ -1,21 +0,0 @@
-# The "editinfo" file is used to allow verification of logging
-# information.  It works best when a template (as specified in the
-# rcsinfo file) is provided for the logging procedure.  Given a
-# template with locations for, a bug-id number, a list of people who
-# reviewed the code before it can be checked in, and an external
-# process to catalog the differences that were code reviewed, the
-# following test can be applied to the code:
-#
-#   Making sure that the entered bug-id number is correct.
-#   Validating that the code that was reviewed is indeed the code being
-#       checked in (using the bug-id number or a seperate review
-#       number to identify this particular code set.).
-#
-# If any of the above test failed, then the commit would be aborted.
-#
-# Actions such as mailing a copy of the report to each reviewer are
-# better handled by an entry in the loginfo file.
-#
-# One thing that should be noted is the the ALL keyword is not
-# supported.  There can be only one entry that matches a given
-# repository.
diff --git a/CVSROOT/loginfo b/CVSROOT/loginfo
deleted file mode 100644
index 5a59f0a..0000000
--- a/CVSROOT/loginfo
+++ /dev/null
@@ -1,26 +0,0 @@
-# The "loginfo" file controls where "cvs commit" log information
-# is sent.  The first entry on a line is a regular expression which must match
-# the directory that the change is being made to, relative to the
-# $CVSROOT.  If a match is found, then the remainder of the line is a filter
-# program that should expect log information on its standard input.
-#
-# If the repository name does not match any of the regular expressions in this
-# file, the "DEFAULT" line is used, if it is specified.
-#
-# If the name ALL appears as a regular expression it is always used
-# in addition to the first matching regex or DEFAULT.
-#
-# You may specify a format string as part of the
-# filter.  The string is composed of a `%' followed
-# by a single format character, or followed by a set of format
-# characters surrounded by `{' and `}' as separators.  The format
-# characters are:
-#
-#   s = file name
-#   V = old version number (pre-checkin)
-#   v = new version number (post-checkin)
-#
-# For example:
-#DEFAULT (echo ""; id; echo %s; date; cat) >> $CVSROOT/CVSROOT/commitlog
-# or
-#DEFAULT (echo ""; id; echo %{sVv}; date; cat) >> $CVSROOT/CVSROOT/commitlog
diff --git a/CVSROOT/modules b/CVSROOT/modules
deleted file mode 100644
index cb9e9ef..0000000
--- a/CVSROOT/modules
+++ /dev/null
@@ -1,26 +0,0 @@
-# Three different line formats are valid:
-#	key	-a    aliases...
-#	key [options] directory
-#	key [options] directory files...
-#
-# Where "options" are composed of:
-#	-i prog		Run "prog" on "cvs commit" from top-level of module.
-#	-o prog		Run "prog" on "cvs checkout" of module.
-#	-e prog		Run "prog" on "cvs export" of module.
-#	-t prog		Run "prog" on "cvs rtag" of module.
-#	-u prog		Run "prog" on "cvs update" of module.
-#	-d dir		Place module in directory "dir" instead of module name.
-#	-l		Top-level directory only -- do not recurse.
-#
-# NOTE:  If you change any of the "Run" options above, you'll have to
-# release and re-checkout any working directories of these modules.
-#
-# And "directory" is a path to a directory relative to $CVSROOT.
-#
-# The "-a" option specifies an alias.  An alias is interpreted as if
-# everything on the right of the "-a" had been typed on the command line.
-#
-# You can encode a module within a module by using the special '&'
-# character to interpose another module into the current module.  This
-# can be useful for creating a module that consists of many directories
-# spread out over the entire source repository.
diff --git a/CVSROOT/notify b/CVSROOT/notify
deleted file mode 100644
index 34f0bc2..0000000
--- a/CVSROOT/notify
+++ /dev/null
@@ -1,12 +0,0 @@
-# The "notify" file controls where notifications from watches set by
-# "cvs watch add" or "cvs edit" are sent.  The first entry on a line is
-# a regular expression which is tested against the directory that the
-# change is being made to, relative to the $CVSROOT.  If it matches,
-# then the remainder of the line is a filter program that should contain
-# one occurrence of %s for the user to notify, and information on its
-# standard input.
-#
-# "ALL" or "DEFAULT" can be used in place of the regular expression.
-#
-# For example:
-#ALL mail %s -s "CVS notification"
diff --git a/CVSROOT/rcsinfo b/CVSROOT/rcsinfo
deleted file mode 100644
index 49e59f4..0000000
--- a/CVSROOT/rcsinfo
+++ /dev/null
@@ -1,13 +0,0 @@
-# The "rcsinfo" file is used to control templates with which the editor
-# is invoked on commit and import.
-#
-# The first entry on a line is a regular expression which is tested
-# against the directory that the change is being made to, relative to the
-# $CVSROOT.  For the first match that is found, then the remainder of the
-# line is the name of the file that contains the template.
-#
-# If the repository name does not match any of the regular expressions in this
-# file, the "DEFAULT" line is used, if it is specified.
-#
-# If the name "ALL" appears as a regular expression it is always used
-# in addition to the first matching regex or "DEFAULT".
diff --git a/CVSROOT/taginfo b/CVSROOT/taginfo
deleted file mode 100644
index 274a46d..0000000
--- a/CVSROOT/taginfo
+++ /dev/null
@@ -1,20 +0,0 @@
-# The "taginfo" file is used to control pre-tag checks.
-# The filter on the right is invoked with the following arguments:
-#
-# $1 -- tagname
-# $2 -- operation "add" for tag, "mov" for tag -F, and "del" for tag -d
-# $3 -- repository
-# $4->  file revision [file revision ...]
-#
-# A non-zero exit of the filter program will cause the tag to be aborted.
-#
-# The first entry on a line is a regular expression which is tested
-# against the directory that the change is being committed to, relative
-# to the $CVSROOT.  For the first match that is found, then the remainder
-# of the line is the name of the filter to run.
-#
-# If the repository name does not match any of the regular expressions in this
-# file, the "DEFAULT" line is used, if it is specified.
-#
-# If the name "ALL" appears as a regular expression it is always used
-# in addition to the first matching regex or "DEFAULT".
diff --git a/CVSROOT/verifymsg b/CVSROOT/verifymsg
deleted file mode 100644
index 86f747c..0000000
--- a/CVSROOT/verifymsg
+++ /dev/null
@@ -1,21 +0,0 @@
-# The "verifymsg" file is used to allow verification of logging
-# information.  It works best when a template (as specified in the
-# rcsinfo file) is provided for the logging procedure.  Given a
-# template with locations for, a bug-id number, a list of people who
-# reviewed the code before it can be checked in, and an external
-# process to catalog the differences that were code reviewed, the
-# following test can be applied to the code:
-#
-#   Making sure that the entered bug-id number is correct.
-#   Validating that the code that was reviewed is indeed the code being
-#       checked in (using the bug-id number or a seperate review
-#       number to identify this particular code set.).
-#
-# If any of the above test failed, then the commit would be aborted.
-#
-# Actions such as mailing a copy of the report to each reviewer are
-# better handled by an entry in the loginfo file.
-#
-# One thing that should be noted is the the ALL keyword is not
-# supported.  There can be only one entry that matches a given
-# repository.
diff --git a/PR/doc/changelog.txt b/PR/doc/changelog.txt
deleted file mode 100644
index 51ebef5..0000000
--- a/PR/doc/changelog.txt
+++ /dev/null
@@ -1,149 +0,0 @@
-Princed Resources v1.0
-(c) Copyright 2003 - Princed Development Team
-http://www.princed.com.ar
-This program is open source under the GNU General Public License terms
-
-
-1) Change Log
-Legend:
- + Format descovery first implementation
-    Previous versions didn't support this features
-    Format bug fixes
- - Code improvement
-    Things that were supported before, but they have been improved
-    Code bug fixes
-
-Versions:
- * PG (unreleased)
-  + Added support to export .bmp files
-  + Added bitmap decompression
-  + Added static palette extraction
- * PS (unreleased)
-  + Added support to .mid files
-  + Added support to indexed dat files
- * PR 0.1 alpha (2003-06-09)
-  - Merged PS and PG into one extractor.
-  + Added dynamic palette extraction
-  - Added resource.txt parser.
-  + Added support to .wav files.
-  + Added support to export JASC palette for .pal files.
-  + Coded type header verification
-  - Solved several bugs.
- * PR 0.2 alpha (2003-06-17)
-  + Added classifying dat type feature
-  + Added support to import .bmp files
-  - Implemented CGI output support for UNIX versions
-  - Source files were abstracted
- * PR 0.3 beta (2003-06-25)
-  - Added modifiers -x[rnu] -c[r]
-  - Added pr.dll compiling
-  + Bitmaps aren't upside down anymore 
-  + Images bigger than 256 pixels length or width now are recognized
-  + Improved decompression algorithm in bigger images
-  - Optimized bitmap handling
-  - Solved bugs in bitmap format
-  + Solved segmentation fault in title.dat
- * PR 0.4 beta (2003-06-27)
-  - Fixed a memory bug since v0.3
-  + Pop2 DAT files detected (file type 11)
- * PR 0.5 beta (2003-07-03)
-  - Abstracted format handling
-  - Optimized bmp saving algorithm
-  + Solved and optimized decompression for big images
-  + Some Pop2 graphics are extracted (palettes aren't supported yet)
- * PR 0.6 alpha (2003-10-08)
-  - Coded full import/export bmp (in separate files not included
-    in this distribution)
-  + Completed and tested bmp reading algorithm
-  - Optimized PG algorithms and reserved memory sizes
- * PR 0.6 beta (2003-10-17)
-  + Added full import bmp support
-  + Solved palette import bug
- * PR 0.7 (2003-10-23)
-  - Added Makefile
-  - Moved PG module to compress.c and bmp.c
-  - Moved midi support to mid.c
-  + Solved corrupted images on compression bug
-  - Source ported to several compilers and platforms
- * PR 0.8 beta (2003-11-04)
-  - Abstracted disk functions into one module
-  + Added PC Speaker sound classification
-  + Added compression algorithms B0 and B2. Before that it was only
-    working B1.
-  - Coded a base directory creator for files
-  - Coded a parser and the resources tree in xmlparse. 
-  - Coded inheritance of owner's attributes to tag child
-  - Coded linking from an id to a palette
-  - Coded the compression algorithm selector to optimize the bitmap
-    compiled dat files
-  - Coded unknown extracted files saved in unknown.xml
- * PR v0.9 Release 1 (unstable) (2003-12-22)
-  - Abstracted output
-  - Added pr.so dynamic library for unix versions
-  - Coded detector of dat file in relative path
-  - Coded full extractor that looks into directories
-  - Coded new UNIX-style command line parsing and options
-  - Defined and supported .plv format for RoomShaker & Princed. 
-  - Dropped old code (txt parser and directory parsing functions)
-  - Improved B1/B2 compressor (4% gained in big files, 1% in small files)
-  - Tested and more stable
- * PR v0.9 Release 2 (stable) (2004-02-21)
-  - Added and improved PLV support
-  - Empty files automatically removed
-  - Fixed minor bugs
-  - Fixed wav quality bug
-  - Force and backup options are working
-  - Improved resources.xml. Now it works in digisnd1.dat, digisnd2.dat,
-    digisnd3.dat, fat.dat, guard.dat, guard1.dat, guard2.dat,
-    ibm_snd1.dat, ibm_snd2.dat, kid.dat, levels.dat, midisnd1.dat,
-    midisnd2.dat, prince.dat, pv.dat, shadow.dat, skel.dat, title.dat,
-    vdungeon.dat, vizier.dat and vpalace.dat
-  - Fixed lcc makefile
-  - Ported to BSD and SunOs
-  + Added monochrome format support for image types 00,01,02,03 and 04;
-    only stable in title.dat texts.
-  + Fixed palette bug
- * PR v1.0 beta
-  - Added attribute "path" as an alias of "external" in XML
-  + Added full monochrome resource support
-  - Added the itemtype attribute "autodetect"
-  - Added XML handling primitives in DLL
-  - Better resource naming when unknown extraction is performed
-  - Changed tag name "itemtypes" to "resources"
-  - Code made a bit easy to read, abstracted dat handling library
-  - DAT File list recycle bug fix
-  - Directory ended in "/" bug
-  - Fixed backup bug. Implemented a file pointer dynamic table using the
-    LIFO philosophy for safe open files in the disk handling library
-  - Fixed bug in compressed image size (2 bytes bigger than the normal)
-  - Fixed memory freeing
-  - Improved and abstracted transposition in monochromatic images
-  - Lower memory allocation (getmemory & image compress size bugs fixed)
-  - Optimizations
-  - PLV Checksum not ignored anymore
-  - Removed support of numeric "itemtype" attributes
-  - Renamed xml module to xmlparse
-  - Unknown option bug fixed
-  o Coded partial importing and exporting feature
-  o Code in strict ANSI C (test with GCC pedantic)
-  x Checksum verification
-  x Full testing
-  x Other versions of POP 1 tested
-  x Set, if applicable, POP2 in the parent folder of the    unknown.xml file
-
-2) ToDo List & Future Plans:
-
- * PR v1.0:
-  x Optimization
-  x & stable version for win32 and unix
-    based systems
- * PR v1.1:
-  x Add a C++ class to use PR
- * PR v1.5:
-  x Code the compression algorithms Lzg to optimize compiled
-    bitmap dat files
- * PR v2.0 beta:
-  x Add full pop2 support
- * PR v2.0:
-  x Optimized & stable version for win32 and unix based systems
-
diff --git a/PR/doc/gpl.txt b/PR/doc/gpl.txt
deleted file mode 100644
index 5b6e7c6..0000000
--- a/PR/doc/gpl.txt
+++ /dev/null
@@ -1,340 +0,0 @@
-		    GNU GENERAL PUBLIC LICENSE
-		       Version 2, June 1991
-
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.
-                       59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-			    Preamble
-
-  The licenses for most software are designed to take away your
-freedom to share and change it.  By contrast, the GNU General Public
-License is intended to guarantee your freedom to share and change free
-software--to make sure the software is free for all its users.  This
-General Public License applies to most of the Free Software
-Foundation's software and to any other program whose authors commit to
-using it.  (Some other Free Software Foundation software is covered by
-the GNU Library General Public License instead.)  You can apply it to
-your programs, too.
-
-  When we speak of free software, we are referring to freedom, not
-price.  Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it
-if you want it, that you can change the software or use pieces of it
-in new free programs; and that you know you can do these things.
-
-  To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the rights.
-These restrictions translate to certain responsibilities for you if you
-distribute copies of the software, or if you modify it.
-
-  For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must give the recipients all the rights that
-you have.  You must make sure that they, too, receive or can get the
-source code.  And you must show them these terms so they know their
-rights.
-
-  We protect your rights with two steps: (1) copyright the software, and
-(2) offer you this license which gives you legal permission to copy,
-distribute and/or modify the software.
-
-  Also, for each author's protection and ours, we want to make certain
-that everyone understands that there is no warranty for this free
-software.  If the software is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original, so
-that any problems introduced by others will not reflect on the original
-authors' reputations.
-
-  Finally, any free program is threatened constantly by software
-patents.  We wish to avoid the danger that redistributors of a free
-program will individually obtain patent licenses, in effect making the
-program proprietary.  To prevent this, we have made it clear that any
-patent must be licensed for everyone's free use or not licensed at all.
-
-  The precise terms and conditions for copying, distribution and
-modification follow.
-
-		    GNU GENERAL PUBLIC LICENSE
-   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
-  0. This License applies to any program or other work which contains
-a notice placed by the copyright holder saying it may be distributed
-under the terms of this General Public License.  The "Program", below,
-refers to any such program or work, and a "work based on the Program"
-means either the Program or any derivative work under copyright law:
-that is to say, a work containing the Program or a portion of it,
-either verbatim or with modifications and/or translated into another
-language.  (Hereinafter, translation is included without limitation in
-the term "modification".)  Each licensee is addressed as "you".
-
-Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope.  The act of
-running the Program is not restricted, and the output from the Program
-is covered only if its contents constitute a work based on the
-Program (independent of having been made by running the Program).
-Whether that is true depends on what the Program does.
-
-  1. You may copy and distribute verbatim copies of the Program's
-source code as you receive it, in any medium, provided that you
-conspicuously and appropriately publish on each copy an appropriate
-copyright notice and disclaimer of warranty; keep intact all the
-notices that refer to this License and to the absence of any warranty;
-and give any other recipients of the Program a copy of this License
-along with the Program.
-
-You may charge a fee for the physical act of transferring a copy, and
-you may at your option offer warranty protection in exchange for a fee.
-
-  2. You may modify your copy or copies of the Program or any portion
-of it, thus forming a work based on the Program, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
-    a) You must cause the modified files to carry prominent notices
-    stating that you changed the files and the date of any change.
-
-    b) You must cause any work that you distribute or publish, that in
-    whole or in part contains or is derived from the Program or any
-    part thereof, to be licensed as a whole at no charge to all third
-    parties under the terms of this License.
-
-    c) If the modified program normally reads commands interactively
-    when run, you must cause it, when started running for such
-    interactive use in the most ordinary way, to print or display an
-    announcement including an appropriate copyright notice and a
-    notice that there is no warranty (or else, saying that you provide
-    a warranty) and that users may redistribute the program under
-    these conditions, and telling the user how to view a copy of this
-    License.  (Exception: if the Program itself is interactive but
-    does not normally print such an announcement, your work based on
-    the Program is not required to print an announcement.)
-
-These requirements apply to the modified work as a whole.  If
-identifiable sections of that work are not derived from the Program,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works.  But when you
-distribute the same sections as part of a whole which is a work based
-on the Program, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Program.
-
-In addition, mere aggregation of another work not based on the Program
-with the Program (or with a work based on the Program) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
-  3. You may copy and distribute the Program (or a work based on it,
-under Section 2) in object code or executable form under the terms of
-Sections 1 and 2 above provided that you also do one of the following:
-
-    a) Accompany it with the complete corresponding machine-readable
-    source code, which must be distributed under the terms of Sections
-    1 and 2 above on a medium customarily used for software interchange; or,
-
-    b) Accompany it with a written offer, valid for at least three
-    years, to give any third party, for a charge no more than your
-    cost of physically performing source distribution, a complete
-    machine-readable copy of the corresponding source code, to be
-    distributed under the terms of Sections 1 and 2 above on a medium
-    customarily used for software interchange; or,
-
-    c) Accompany it with the information you received as to the offer
-    to distribute corresponding source code.  (This alternative is
-    allowed only for noncommercial distribution and only if you
-    received the program in object code or executable form with such
-    an offer, in accord with Subsection b above.)
-
-The source code for a work means the preferred form of the work for
-making modifications to it.  For an executable work, complete source
-code means all the source code for all modules it contains, plus any
-associated interface definition files, plus the scripts used to
-control compilation and installation of the executable.  However, as a
-special exception, the source code distributed need not include
-anything that is normally distributed (in either source or binary
-form) with the major components (compiler, kernel, and so on) of the
-operating system on which the executable runs, unless that component
-itself accompanies the executable.
-
-If distribution of executable or object code is made by offering
-access to copy from a designated place, then offering equivalent
-access to copy the source code from the same place counts as
-distribution of the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
-  4. You may not copy, modify, sublicense, or distribute the Program
-except as expressly provided under this License.  Any attempt
-otherwise to copy, modify, sublicense or distribute the Program is
-void, and will automatically terminate your rights under this License.
-However, parties who have received copies, or rights, from you under
-this License will not have their licenses terminated so long as such
-parties remain in full compliance.
-
-  5. You are not required to accept this License, since you have not
-signed it.  However, nothing else grants you permission to modify or
-distribute the Program or its derivative works.  These actions are
-prohibited by law if you do not accept this License.  Therefore, by
-modifying or distributing the Program (or any work based on the
-Program), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Program or works based on it.
-
-  6. Each time you redistribute the Program (or any work based on the
-Program), the recipient automatically receives a license from the
-original licensor to copy, distribute or modify the Program subject to
-these terms and conditions.  You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties to
-this License.
-
-  7. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License.  If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Program at all.  For example, if a patent
-license would not permit royalty-free redistribution of the Program by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Program.
-
-If any portion of this section is held invalid or unenforceable under
-any particular circumstance, the balance of the section is intended to
-apply and the section as a whole is intended to apply in other
-circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system, which is
-implemented by public license practices.  Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
-  8. If the distribution and/or use of the Program is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Program under this License
-may add an explicit geographical distribution limitation excluding
-those countries, so that distribution is permitted only in or among
-countries not thus excluded.  In such case, this License incorporates
-the limitation as if written in the body of this License.
-
-  9. The Free Software Foundation may publish revised and/or new versions
-of the General Public License from time to time.  Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
-Each version is given a distinguishing version number.  If the Program
-specifies a version number of this License which applies to it and "any
-later version", you have the option of following the terms and conditions
-either of that version or of any later version published by the Free
-Software Foundation.  If the Program does not specify a version number of
-this License, you may choose any version ever published by the Free Software
-Foundation.
-
-  10. If you wish to incorporate parts of the Program into other free
-programs whose distribution conditions are different, write to the author
-to ask for permission.  For software which is copyrighted by the Free
-Software Foundation, write to the Free Software Foundation; we sometimes
-make exceptions for this.  Our decision will be guided by the two goals
-of preserving the free status of all derivatives of our free software and
-of promoting the sharing and reuse of software generally.
-
-			    NO WARRANTY
-
-  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
-FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
-OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
-PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
-OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
-TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
-PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
-REPAIR OR CORRECTION.
-
-  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
-REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
-INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
-OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
-TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
-YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
-PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGES.
-
-		     END OF TERMS AND CONDITIONS
-
-	    How to Apply These Terms to Your New Programs
-
-  If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
-  To do so, attach the following notices to the program.  It is safest
-to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
-    <one line to give the program's name and a brief idea of what it does.>
-    Copyright (C) <year>  <name of author>
-
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program; if not, write to the Free Software
-    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-
-Also add information on how to contact you by electronic and paper mail.
-
-If the program is interactive, make it output a short notice like this
-when it starts in an interactive mode:
-
-    Gnomovision version 69, Copyright (C) year name of author
-    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
-    This is free software, and you are welcome to redistribute it
-    under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License.  Of course, the commands you use may
-be called something other than `show w' and `show c'; they could even be
-mouse-clicks or menu items--whatever suits your program.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the program, if
-necessary.  Here is a sample; alter the names:
-
-  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
-  `Gnomovision' (which makes passes at compilers) written by James Hacker.
-
-  <signature of Ty Coon>, 1 April 1989
-  Ty Coon, President of Vice
-
-This General Public License does not permit incorporating your program into
-proprietary programs.  If your program is a subroutine library, you may
-consider it more useful to permit linking proprietary applications with the
-library.  If this is what you want to do, use the GNU Library General
-Public License instead of this License.
diff --git a/PR/doc/readme.coders.txt b/PR/doc/readme.coders.txt
deleted file mode 100644
index 02d2e27..0000000
--- a/PR/doc/readme.coders.txt
+++ /dev/null
@@ -1,182 +0,0 @@
-Princed Resources V0.9
-(c) Copyright 2003 - Princed Development Team
-http://www.princed.com.ar
-This program is open source under the GNU General Public License terms
-
-1) Unix-based OS compiling:
-
-GCC will work:
-
--shell-2.05b$ make
-Compiling import module...
-Compiling compression module...
-Compiling export module...
-Compiling main module...
-Compiling resource manager module...
-Compiling extra tasks module...
-Compiling disk access functions...
-Compiling xml parsing module...
-Compiling xml search features...
-Compiling bitmap files support (bmp)...
-Compiling midi audio files support (mid)...
-Compiling JASC palette support (pal)...
-Compiling digital wave audio support (wav)...
-Linking files...
-Program successfully compiled
-
-Please read readme.txt for syntax information
-
--shell-2.05b$ cd bin
--shell-2.05b$ ./pr
-Princed resources (PR) V0.9 Linux
-(c) Copyright 2003 - Princed Development Team
-http://www.princed.com.ar
-
-Usage: 
-  pr [-x[EXTRACTDIR]|-c[COMPILEDIR]|-d] [DATFILEPATH]
-  pr [OPTIONS] [DATFILEPATH]
-
-  Mandatory arguments to long options are mandatory for short options too.
-
-   -c, --import[=DIRNAME]     imports from DIRNAME into given dat file
-(...)
-       --version              output version information and exit
-
--shell-2.05b$
-
-2) Dos/Win32 Console compiling
-
-You can use the VC workspace file: pr.dsw and build the project (selecting
-Build/Set active configuration...), setting up Dll or Release compilation
-modes and pressing F7.
-
-If you are using LCC, rename Makefile.lcc to Makefile and compile. Make sure
-you have added the lcc path in the system. For further information read the
-shell information in the program documentation at www.princed.com.ar
-
-3) CVS download
-
-Anonymous CVS access to SourceForge.net will work. Just type:
-
- cvs -d:pserver:anonymous@cvs.princed.com.ar:/cvsroot/princed login
-Hit enter when prompted for password
- cvs -d:pserver:anonymous@cvs.princed.com.ar:/cvsroot/princed co PR
-
-Sample:
-
--shell-2.05b$ cvs -d:pserver:anonymous@cvs.princed.com.ar:/cvsroot/princed login
-Logging in to :pserver:anonymous@cvs.princed.com.ar:2401/cvsroot/princed
-CVS password:
--shell-2.05b$ cvs -d:pserver:anonymous@cvs.princed.com.ar:/cvsroot/princed co PR
-cvs server: Updating PR
-U PR/compile.bat
-(..)
-U PR/zip/pr06.zip
-U PR/zip/prlib.zip
-U PR/zip/prvbdll.zip
--shell-2.05b$
-
-4) Need assistance?
- Just ask here
- http://sourceforge.net/tracker/?func=add&group_id=91915&atid=598846
-
-5) Bug reporting?
- http://sourceforge.net/tracker/?func=add&group_id=91915&atid=598845
-
-6) Feature requests?
- http://sourceforge.net/tracker/?func=add&group_id=91915&atid=598848
-
-7) SourceForge project home page
- http://project.princed.com.ar
-
-8) UNIX Install HowTo sample
-
--shell-2.05b$ ls -l
-total 64
--rw-r--r--    1 ecalot   users       57667 dec  9 10:00 pr.09-dev3.tar.bz2
--shell-2.05b$ bunzip2 pr.09-dev3.tar.bz2
--shell-2.05b$ ls
-pr.09-dev3.tar
--shell-2.05b$ tar -xvf pr.09-dev3.tar
-src/
-src/extract.c
-src/include/
-src/include/compile.h
-src/include/compress.h
-src/include/extract.h
-src/include/memory.h
-src/include/pr.h
-src/include/resources.h
-src/include/tasks.h
-src/include/bmp.h
-(...)
-src/formats/pal.c
-src/formats/wav.c
-src/formats/plv.c
-src/resources.c
-src/tasks.c
-src/xml.c
-src/xmlsearch.c
-src/pr.dsp
-src/pr.c
--shell-2.05b$ cd src
--shell-2.05b$ make
-Compiling import module...
-Compiling compression module...
-Compiling export module...
-Compiling main module in standard mode...
-Compiling resource manager module...
-Compiling extra tasks module...
-Compiling disk access functions...
-Compiling xml parsing module...
-Compiling xml search features...
-Compiling bitmap files support (bmp)...
-Compiling midi audio files support (mid)...
-Compiling JASC palette support (pal)...
-Compiling digital wave audio support (wav)...
-Compiling prince level files support (plv)...
-Compiling main module in library mode...
-Linking files...
-Making dynamic library...
-Program successfully compiled
-
-Please read readme.txt for syntax information
-
--shell-2.05b$ cd bin
--shell-2.05b$ ls -l
-total 76
--rwxr-xr-x    1 ecalot   users       32656 dic  9 10:02 pr
--rwxr-xr-x    1 ecalot   users       42941 dic  9 10:02 pr.so
--shell-2.05b$ ./pr
-Princed resources (PR) V0.9 Linux
-(c) Copyright 2003 - Princed Development Team
-http://www.princed.com.ar
-
-Usage: 
-  pr [-x[EXTRACTDIR]|-c[COMPILEDIR]|-d] [DATFILEPATH]
-  pr [OPTIONS] [DATFILEPATH]
-
-  Mandatory arguments to long options are mandatory for short options too.
-
-   -c, --import[=DIRNAME]     imports from DIRNAME into given dat file
-   -d, --classify             returns the DAT file type
-   -x, -e, --export[=DIRNAME] extracts given dat file into DIRNAME
-
-   -a, --setauthor=NAME       sets your name in extracted PLV files
-   -b, --backup[=EXTENSION]   backup your files
-   -f, --force                default option, you cannot disable it,
-                              so please make a backup of your files
-   -g, --cgi                  run as CGI and output mime headers
-   -h, -?, --help             display this help and exit
-   -m, --resource=RESFILE     uses an user-specific resource xml file
-   -r, --raw                  uses raw format
-   -R, --recursive            searches for all dat files (only if DATFILEPATH
-                              is not a dat file)
-   -t, --datfile=DATFILE      specifies a dat file to read resources
-                              different that the original file
-       --unknown              generate the unknown file without performing
-                              any extraction
-   -v, --verbose              explain what is being done
-       --version              output version information and exit
-
--shell-2.05b$
diff --git a/PR/doc/readme.txt b/PR/doc/readme.txt
deleted file mode 100644
index bc45eee..0000000
--- a/PR/doc/readme.txt
+++ /dev/null
@@ -1,141 +0,0 @@
-Princed Resources v1.0
-(c) Copyright 2003 - Princed Development Team
-http://www.princed.com.ar
-This program is open source under the GNU General Public License terms
-
-Please read this readme file throughly before starting to use Princed
-Resource Editor.
-
-1) Supported file formats:
-
- The extractor supports only a few file formats, it uses the most commonly
- supported versions of the formats to allow maximum compatibility. 
- As we haven't got enough time to code the program we decided to support
- only those kinds of formats, and let the user make the necessary
- conversions.
-
-Resource Types:
- Name       Extension  Description
-
- level      plv        Prince of Persia level
- image      bmp        Graphic in windows bitmap format
- wave       wav        Wave digital audio sounds
- midi       mid        Game music in midi format
- binary     bin        Binary files
- palette    pal        Image palette in the Jasc format
- pcspeaker  pcs        Internal PC Speaker Sounds
-
-Type "level":
- We decided to give Level files the extension ".plv".  These files
- can be edited in RoomShaker from version 1.66 and Princed V3.
- PV3 can also edit the whole levels.dat file.
- Recommended editor: RoomShaker.
-
-Type "image":
- We use Windows Bitmaps (BMP) to extract the files.
- The file specifications are:
-  - 16 color-palette in paletted images and a 2 color-palette in B/W images
-  - No compression.
- Recommended editor: Paint Shop Pro, but even MS Paint works.
- 
-Type "wave":
- For digital audio we are using the standard .wav format.
- The file specifications are:
-  - Size of Format: 16
-  - Format: PCM
-  - Attributes: 8 bit, mono, unsigned
-  - Channels: 1
-  - Sample rate: 11025
-  - Bytes/Sec: 11025
-  - Block Align: 1
- Recommended editors: GoldWave, CoolEdit.  Standard Windows programs do not
- understand the .wav format.
-
-Type "midi":
- For musical instrument digital interface we are using the standard midi
- format (mid) and type 0 midi format.
- The file specifications are:
-  - Unknown (see standard MIDI specifications)
- Recommended editor: Power Tracks.
-
-Type "binary":
- Some binary garbage or untested stuff.
- Recommended editor: xvi32 or any other hex editor.
-
-Type "palette":
- For the bitmap palettes we are using the Jasc Pal format (Not Microsoft
-  .pal format)
- Recommended editor: Paint Shop Pro.
-
-Type "pcspeaker":
- For the internal PC Speaker sound we are using binary data saved in pcs
-  format
- The formas is saved this way:
-  2 unique bytes for headers
-  3 bytes per note (2 for frequency and 1 for duration)
- Recommended editor: xvi32 or any other hex editor.
-
-2) Bugs:
- All known bugs were solved. If you find a bug (program crashes, corrupted
- resources, typos, etc), it's very probable that we haven't found it. So
- please report it. To report bugs just post them in
- http://sourceforge.net/tracker/?func=add&group_id=91915&atid=598845
-
-3) Usage: 
- Run the program without parameters to get the usage help.
- 
- Syntax samples:
- 
- C:\PRINCED\PR> pr -xext dat\vdungeon.dat
- 
- This will extract the bitmaps and palettes allocated in 
- C:\princed\pr\dat\vdungeon.dat into the c:\princed\pr\ext. 
- Note: ext must exist.
- 
- C:\PRINCE> pr -x vdungeon.dat
- 
- This will extract all the bitmaps and palettes allocated in
- c:\prince\vdungeon.dat into c:\prince.
- 
- C:\PRINCED\PR> pr -cext compiled\vdungeon.dat
- 
- This will compile the bitmaps and palettes that are in c:\princed\pr\ext
- and associated to vdungeon.dat in the resource file and generate the file
- c:\princed\pr\compiled\vdungeon.dat.
- 
-4) New versions
- It's strongly recommended that you download a newer stable version of
- this program as soon as it comes available in the official url
- http://www.princed.com.ar
-
-5) Requirements
-  
-  25127199 bytes in ram are approx required for a normal full directory task
-  
-  Recomended:
-   AMD K6-II at 350Mhz or higher
-   32 Mb ram
-
-6) Credits
-
- Coding & main routines
-  Enrique Calot
-  
- Coding Assistant
-  Santiago Zamora
-
- Graphic compression algorithms
-  Tammo Jan Dijkema
-  Enrique Calot
-
- Graphic format development
-  Tammo Jan Dijkema
-  Anke Balderer
-
- MID Sound format development
-  Christian Lundheim
-
- Resources.xml edition
-  Steven Fayers
-
-Please enjoy using Princed Resource Editor!
diff --git a/PR/src/Makefile b/PR/src/Makefile
deleted file mode 100644
index 82d77c5..0000000
--- a/PR/src/Makefile
+++ /dev/null
@@ -1,149 +0,0 @@
-#Programs
-CC      = @gcc
-LINKER  = @ld
-INFO    = @echo
-MAKEDIR = @mkdir -p
-
-#Operating Systems
-OS      := $(shell uname)
-ifeq ($(OS),Linux)
-  LINUX = -DLINUX
-  OS    = GNU/Linux
-  SRC2  =
-else
-  LINUX = -DNOLINUX
-  SRC2  = getopt.o getopt1.o
-endif
-
-#Compiler options
-INCLUDE = -Iinclude/
-DEFINES = -DOS=\"$(OS)\" $(LINUX) 
-OPTIONS = $(INCLUDE) $(DEFINES)
-
-OBJFILES = compile.o compress.o extract.o resources.o tasks.o disk.o\
-           xmlparse.o xmlsearch.o dat.o bmp.o mid.o pal.o wav.o plv.o\
-           memory.o $(SRC2)
-
-SRC1     = pr.o
-SRC3     = prlib.o
-
-EXEFILE  = bin/pr
-
-#main file
-
-bin/pr: $(OBJFILES) $(SRC1) bin/resources.xml
-	$(INFO) Linking files...
-	$(MAKEDIR) bin
-	$(CC) -o bin/pr $(OBJFILES) $(SRC1) -s -O2
-	$(INFO) Program successfully compiled
-	$(INFO)
-	$(INFO) Please read readme.txt for syntax information
-	$(INFO)
-
-#command options
-
-clean:
-	$(INFO) Erasing temporary object files...
-	@rm -f *.o bin/pr
-
-build: clean bin/pr
-
-all: $(EXEFILE)
-
-lib: clean $(OBJFILES) $(SRC3)
-	$(MAKEDIR) bin
-	$(INFO) Making dynamic library...
-	$(CC) -o bin/pr.so $(OBJFILES) $(SRC3) -O2 -Llibc -shared -dynamic
-	$(INFO) Library successfully compiled
-	$(INFO)
-	$(INFO) Please read readme.coders.txt and pr.h for interfaces
-	$(INFO)
-
-#files
-
-bin/resources.xml: resources.xml.gz
-	$(INFO) Uncompressing resources...
-	@mkdir -p bin
-	@gunzip resources.xml.gz
-	@cp -f resources.xml bin
-	@gzip resources.xml
-
-compile.o: compile.c
-	$(INFO) Compiling import module...
-	$(CC) -c compile.c $(OPTIONS)
-
-memory.o: memory.c
-	$(INFO) Compiling memory manager...
-	$(CC) -c memory.c $(OPTIONS)
-
-extract.o: extract.c
-	$(INFO) Compiling export module...
-	$(CC) -c extract.c $(OPTIONS)
-
-compress.o: compress.c
-	$(INFO) Compiling compression module...
-	$(CC) -c compress.c $(OPTIONS)
-
-pr.o: pr.c
-	$(INFO) Compiling main module in standard mode...
-	$(CC) -c pr.c $(OPTIONS)
-
-prlib.o: pr.c
-	$(INFO) Compiling main module in library mode...
-	$(CC) -c pr.c $(OPTIONS) -DDLL -o prlib.o
-
-resources.o: resources.c
-	$(INFO) Compiling resource manager module...
-	$(CC) -c resources.c $(OPTIONS)
-
-tasks.o: tasks.c
-	$(INFO) Compiling extra tasks module...
-	$(CC) -c tasks.c $(OPTIONS)
-
-xmlparse.o: xmlparse.c
-	$(INFO) Compiling xml parsing module...
-	$(CC) -c xmlparse.c $(OPTIONS)
-
-xmlsearch.o: xmlsearch.c
-	$(INFO) Compiling xml search features...
-	$(CC) -c xmlsearch.c $(OPTIONS)
-
-disk.o: disk.c
-	$(INFO) Compiling disk access library...
-	$(CC) -c disk.c $(OPTIONS)
-
-dat.o: dat.c
-	$(INFO) Compiling dat editing library...
-	$(CC) -c dat.c $(OPTIONS)
-
-bmp.o: formats/bmp.c
-	$(INFO) Compiling bitmap files support \(bmp\)...
-	$(CC) -c formats/bmp.c $(OPTIONS)
-
-mid.o: formats/mid.c
-	$(INFO) Compiling midi audio files support \(mid\)...
-	$(CC) -c formats/mid.c $(OPTIONS)
-
-plv.o: formats/plv.c
-	$(INFO) Compiling prince level files support \(plv\)...
-	$(CC) -c formats/plv.c $(OPTIONS)
-
-pal.o: formats/pal.c
-	$(INFO) Compiling JASC palette support \(pal\)...
-	$(CC) -c formats/pal.c $(OPTIONS)
-
-wav.o: formats/wav.c
-	$(INFO) Compiling digital wave audio support \(wav\)...
-	$(CC) -c formats/wav.c $(OPTIONS)
-
-dirent.o: ports/dirent.c
-	$(INFO) Porting the dirent structure...
-	$(CC) $(OPTIONS) -c ports/dirent.c
-	
-getopt.o: ports/getopt.c
-	$(INFO) Porting the Unix-like getopt function \(first part\)...
-	$(CC) $(OPTIONS) -c ports/getopt.c
-
-getopt1.o: ports/getopt1.c
-	$(INFO) Porting the Unix-like getopt function \(second part\)...
-	$(CC) $(OPTIONS) -c ports/getopt1.c
diff --git a/PR/src/Makefile.lcc b/PR/src/Makefile.lcc
deleted file mode 100644
index 1cd55d8..0000000
--- a/PR/src/Makefile.lcc
+++ /dev/null
@@ -1,119 +0,0 @@
-CC=@lc
-LINKER=@lcclnk
-INFO=@echo
-
-INCLUDE = -Iinclude\ 
-DEFINES = -DWIN32 
-#-DDLL
-OPTIONS = $(INCLUDE) $(DEFINES)
-
-OBJFILES = compile.obj compress.obj extract.obj pr.obj dat.obj resources.obj\
-           tasks.obj disk.obj xmlparse.obj xmlsearch.obj bmp.obj mid.obj\
-           pal.obj wav.obj plv.obj memory.obj\
-           dirent.obj getopt.obj getopt1.obj
-
-EXEFILE  = pr.exe
-
-#main file
-
-$(EXEFILE): $(OBJFILES)
-	$(INFO) Linking files...
-	$(LINKER) $(OBJFILES) -o $(EXEFILE) -s
-	#$(INFO) Making dynamic library...
-	#$(LINKER) $(OBJFILES) -dll pr.def -s -o pr.dll
-	$(INFO) Program successfully compiled
-	$(INFO):
-	$(INFO) Please read readme.txt for syntax information
-	$(INFO):
-
-#command options
-
-clean:
-	$(INFO) Erasing temporary object files...
-	@del *.obj
-
-build: clean all
-
-all: $(EXEFILE)
-
-#files
-
-compile.obj: compile.c
-	$(INFO) Compiling import module...
-	$(CC) $(OPTIONS) -c compile.c
-
-memory.obj: memory.c
-	$(INFO) Compiling memory manager...
-	$(CC) $(OPTIONS) -c memory.c
-
-extract.obj: extract.c
-	$(INFO) Compiling export module...
-	$(CC) $(OPTIONS) -c extract.c
-
-compress.obj: compress.c
-	$(INFO) Compiling compression module...
-	$(CC) $(OPTIONS) -c compress.c
-
-pr.obj: pr.c
-	$(INFO) Compiling main module in standard mode...
-	$(CC) $(OPTIONS) -c pr.c
-
-prlib.obj: pr.c
-	$(INFO) Compiling main module in library mode...
-	$(CC) $(OPTIONS) -DDLL -o prlib.obj -c pr.c
-
-resources.obj: resources.c
-	$(INFO) Compiling resource manager module...
-	$(CC) $(OPTIONS) -c resources.c
-
-tasks.obj: tasks.c
-	$(INFO) Compiling classify module...
-	$(CC) $(OPTIONS) -c tasks.c
-
-dat.obj: dat.c
-	$(INFO) Compiling abstract dat handling library...
-	$(CC) $(OPTIONS) -c dat.c
-
-xmlparse.obj: xmlparse.c
-	$(INFO) Compiling xml parsing module...
-	$(CC) $(OPTIONS) -c xmlparse.c
-
-xmlsearch.obj: xmlsearch.c
-	$(INFO) Compiling xml search features...
-	$(CC) $(OPTIONS) -c xmlsearch.c
-
-disk.obj: disk.c
-	$(INFO) Compiling disk access functions...
-	$(CC) $(OPTIONS) -c disk.c
-
-bmp.obj: formats\bmp.c
-	$(INFO) Compiling bitmap files support (bmp)...
-	$(CC) $(OPTIONS) -c formats\bmp.c
-
-mid.obj: formats\mid.c
-	$(INFO) Compiling midi audio files support (mid)...
-	$(CC) $(OPTIONS) -c formats\mid.c
-
-plv.obj: formats\plv.c
-	$(INFO) Compiling prince level files support (plv)...
-	$(CC) $(OPTIONS) -c formats\plv.c
-
-pal.obj: formats\pal.c
-	$(INFO) Compiling JASC palette support (pal)...
-	$(CC) $(OPTIONS) -c formats\pal.c
-
-wav.obj: formats\wav.c
-	$(INFO) Compiling digital wave audio support (wav)...
-	$(CC) $(OPTIONS) -c formats\wav.c
-
-dirent.obj: ports\dirent.c
-	$(INFO) Porting the dirent structure...
-	$(CC) $(OPTIONS) -c ports\dirent.c
-	
-getopt.obj: ports\getopt.c
-	$(INFO) Porting the Unix-like getopt function (first part)...
-	$(CC) $(OPTIONS) -c ports\getopt.c
-
-getopt1.obj: ports\getopt1.c
-	$(INFO) Porting the Unix-like getopt function (second part)...
-	$(CC) $(OPTIONS) -c ports\getopt1.c
diff --git a/PR/src/Makefile.old b/PR/src/Makefile.old
deleted file mode 100644
index 4ec78a8..0000000
--- a/PR/src/Makefile.old
+++ /dev/null
@@ -1,142 +0,0 @@
-#Programs
-CC      = @gcc
-LINKER  = @ld
-INFO    = @echo
-MAKEDIR = @mkdir -p
-
-#Operating Systems
-OS      = `uname`
-SRC2    = getopt.o getopt1.o
-
-#Compiler options
-INCLUDE = -Iinclude/
-DEFINES = -DOS=\"$(OS)\"
-OPTIONS = $(INCLUDE) $(DEFINES)
-
-OBJFILES = compile.o compress.o extract.o resources.o tasks.o disk.o\
-           xmlparse.o xmlsearch.o dat.o bmp.o mid.o pal.o wav.o plv.o\
-           memory.o $(SRC2)
-
-SRC1     = pr.o
-SRC3     = prlib.o
-
-EXEFILE  = bin/pr
-
-#main file
-
-bin/pr: $(OBJFILES) $(SRC1) bin/resources.xml
-	$(INFO) Linking files...
-	$(MAKEDIR) bin
-	$(CC) -o bin/pr $(OBJFILES) $(SRC1) -s -O2
-	$(INFO) Program successfully compiled
-	$(INFO)
-	$(INFO) Please read readme.txt for syntax information
-	$(INFO)
-
-#command options
-
-clean:
-	$(INFO) Erasing temporary object files...
-	@rm -f *.o bin/pr
-
-build: clean bin/pr
-
-all: $(EXEFILE)
-
-lib: clean $(OBJFILES) $(SRC3)
-	$(MAKEDIR) bin
-	$(INFO) Making dynamic library...
-	$(CC) -o bin/pr.so $(OBJFILES) $(SRC3) -O2 -Llibc -shared -dynamic
-	$(INFO) Library successfully compiled
-	$(INFO)
-	$(INFO) Please read readme.coders.txt and pr.h for interfaces
-	$(INFO)
-
-#files
-
-bin/resources.xml: resources.xml.gz
-	$(INFO) Uncompressing resources...
-	@mkdir -p bin
-	@gunzip resources.xml.gz
-	@cp -f resources.xml bin
-	@gzip resources.xml
-
-compile.o: compile.c
-	$(INFO) Compiling import module...
-	$(CC) -c compile.c $(OPTIONS)
-
-memory.o: memory.c
-	$(INFO) Compiling memory manager...
-	$(CC) -c memory.c $(OPTIONS)
-
-extract.o: extract.c
-	$(INFO) Compiling export module...
-	$(CC) -c extract.c $(OPTIONS)
-
-compress.o: compress.c
-	$(INFO) Compiling compression module...
-	$(CC) -c compress.c $(OPTIONS)
-
-pr.o: pr.c
-	$(INFO) Compiling main module in standard mode...
-	$(CC) -c pr.c $(OPTIONS)
-
-prlib.o: pr.c
-	$(INFO) Compiling main module in library mode...
-	$(CC) -c pr.c $(OPTIONS) -DDLL -o prlib.o
-
-resources.o: resources.c
-	$(INFO) Compiling resource manager module...
-	$(CC) -c resources.c $(OPTIONS)
-
-tasks.o: tasks.c
-	$(INFO) Compiling extra tasks module...
-	$(CC) -c tasks.c $(OPTIONS)
-
-xmlparse.o: xmlparse.c
-	$(INFO) Compiling xml parsing module...
-	$(CC) -c xmlparse.c $(OPTIONS)
-
-xmlsearch.o: xmlsearch.c
-	$(INFO) Compiling xml search features...
-	$(CC) -c xmlsearch.c $(OPTIONS)
-
-disk.o: disk.c
-	$(INFO) Compiling disk access library...
-	$(CC) -c disk.c $(OPTIONS)
-
-dat.o: dat.c
-	$(INFO) Compiling dat editing library...
-	$(CC) -c dat.c $(OPTIONS)
-
-bmp.o: formats/bmp.c
-	$(INFO) Compiling bitmap files support \(bmp\)...
-	$(CC) -c formats/bmp.c $(OPTIONS)
-
-mid.o: formats/mid.c
-	$(INFO) Compiling midi audio files support \(mid\)...
-	$(CC) -c formats/mid.c $(OPTIONS)
-
-plv.o: formats/plv.c
-	$(INFO) Compiling prince level files support \(plv\)...
-	$(CC) -c formats/plv.c $(OPTIONS)
-
-pal.o: formats/pal.c
-	$(INFO) Compiling JASC palette support \(pal\)...
-	$(CC) -c formats/pal.c $(OPTIONS)
-
-wav.o: formats/wav.c
-	$(INFO) Compiling digital wave audio support \(wav\)...
-	$(CC) -c formats/wav.c $(OPTIONS)
-
-dirent.o: ports/dirent.c
-	$(INFO) Porting the dirent structure...
-	$(CC) $(OPTIONS) -c ports/dirent.c
-	
-getopt.o: ports/getopt.c
-	$(INFO) Porting the Unix-like getopt function \(first part\)...
-	$(CC) $(OPTIONS) -c ports/getopt.c
-
-getopt1.o: ports/getopt1.c
-	$(INFO) Porting the Unix-like getopt function \(second part\)...
-	$(CC) $(OPTIONS) -c ports/getopt1.c
diff --git a/PR/src/addons/vb/pr.bas b/PR/src/addons/vb/pr.bas
deleted file mode 100644
index 9e8e2cb..0000000
--- a/PR/src/addons/vb/pr.bas
+++ /dev/null
@@ -1,79 +0,0 @@
-Attribute VB_Name = "Module1"
-'pr.dll V2.0 declaration for Visual Basic
-'PR is a Princed Development Team work
-'check for the latest version at http://www.princed.com.ar
-
-'Enumerations
-
-'Resource type
-enum prResourceType
- prResMemoryError=-2
- prResFileNotFoundError=-1
- 
- prResInvalidDatFile=00
- 
- prResLevelFile=01
- prResGraphicExtFile=02
- prResWaveFile=03
- prResMidiFile=04
- prResValidUnknownFile=05
- prResGraphicFile=06
-
-end
-
-'Export
-enum prExportResult
- prExpMemoryError=-2
- prExpAccessDenied=-1
- prExpOk=0
-end
-
-enum prExportOpt 'To use more than one option separate them with "+".
- prExpExtract=1  'If this option is not given, the files won't be extracted
- prExpUpdate=2   'This will update the resource file
- prExpUseRaw=4   'This will extract to raw files
- prExpDontSave=8 'Running the function using this option will perform all
-                 ' commands but without saving the changes in resource file
-                 ' (update option will be ignored)
-end
-
-'Import
-enum prImportResult
- prImpAccessDenied=-1
- prImpOk=0
- 'Note: If the file was parcially compiled a positive number of files missing will be returned
-end
-
-enum prImportOpt
- prImpUseRaw=0
- prImpReadDataType=1
-end
-
-'This function will extract vDatFile into vDirName adding the extracted files in vResFilename
-Public Declare Function prExportDat Lib "pr.dll" Alias "_prExportDat" (ByVal vDatFile As String, ByVal vDirName As String, ByVal vResFilename As String) As Integer
-'This function will import the files located in vDirName into vDatFile acording to the information read in vResFilename
-Public Declare Function prImportDat Lib "pr.dll" Alias "_prImportDat" (ByVal vDatFile As String, ByVal vDirName As String, ByVal vResFilename As String) As Integer
-'This function will clear vResFilename information table but It will keep the file header and foot
-Public Declare Function prClearRes Lib "pr.dll" Alias "_prClearRes" (ByVal vResFilename As String) As Integer
-'This function will verify if the vDatFile exists, id it is a valid POP1 DAT file, and what kind of DAT file it is
-Public Declare Function prVerifyDatType Lib "pr.dll" Alias "_prVerifyDatType" (ByVal vDatFile As String) As integer
-
-'  verifyDatType return values may be:
-'    -2 PR internal Memory error (only if RAM is too low)
-'    -1 File not found
-'
-'    00 Not a valid POP1 DAT file
-'
-'    01 Levels file
-'    02 Graphic file with an image in the first valid entry (not common)
-'    03 Waves/Digital sound file
-'    04 Midis file
-'    05 Valid DAT file with Undefined content (example ibmsnd for the moment)
-'    06 Graphic file with a palette in the first valid entry (common)
-
-' extended functions
-
-Public Declare Function prVerifyDatTypeRes Lib "pr.dll" Alias "_prVerifyDatType" (ByVal vDatFile As String) As prResourceType
-Public Declare Function prClearResBool Lib "pr.dll" Alias "_prClearRes" (ByVal vResFilename As String) As Boolean
-Public Declare Function prExportDatOpt Lib "pr.dll" Alias "_prExportDatOpt" (ByVal vDatFile As String, ByVal vDirName As String, ByVal vResFilename As String, ByVal vExportOpt as prExportOpt) As prExportResult
-Public Declare Function prImportDatOpt Lib "pr.dll" Alias "_prImportDatOpt" (ByVal vDatFile As String, ByVal vDirName As String, ByVal vResFilename As String, ByVal vImportOpt as prImportOpt) As prImportResult
diff --git a/PR/src/addons/vb/samples/pr.dll b/PR/src/addons/vb/samples/pr.dll
deleted file mode 100644
index eb545ad..0000000
Binary files a/PR/src/addons/vb/samples/pr.dll and /dev/null differ
diff --git a/PR/src/addons/vb/samples/prsample.exe b/PR/src/addons/vb/samples/prsample.exe
deleted file mode 100755
index 1d64181..0000000
Binary files a/PR/src/addons/vb/samples/prsample.exe and /dev/null differ
diff --git a/PR/src/addons/vb/samples/prsample.vbp b/PR/src/addons/vb/samples/prsample.vbp
deleted file mode 100644
index 8723e90..0000000
--- a/PR/src/addons/vb/samples/prsample.vbp
+++ /dev/null
@@ -1,32 +0,0 @@
-Type=Exe
-Form=prtest1.frm
-Reference=*\G{00020430-0000-0000-C000-000000000046}#2.0#0#..\..\SYSTEM\Stdole2.tlb#OLE Automation
-Module=Module1; pr.bas
-IconForm="Form1"
-Startup="Form1"
-ExeName32="prsample.exe"
-Command32=""
-Name="Project1"
-HelpContextID="0"
-CompatibleMode="0"
-MajorVer=1
-MinorVer=0
-RevisionVer=0
-AutoIncrementVer=0
-ServerSupportFiles=0
-VersionCompanyName="Princed Development Team"
-CompilationType=0
-OptimizationType=0
-FavorPentiumPro(tm)=0
-CodeViewDebugInfo=0
-NoAliasing=0
-BoundsCheck=0
-OverflowCheck=0
-FlPointCheck=0
-FDIVCheck=0
-UnroundedFP=0
-StartMode=0
-Unattended=0
-Retained=0
-ThreadPerObject=0
-MaxNumberOfThreads=1
diff --git a/PR/src/addons/vb/samples/prsample.vbw b/PR/src/addons/vb/samples/prsample.vbw
deleted file mode 100644
index 71df962..0000000
--- a/PR/src/addons/vb/samples/prsample.vbw
+++ /dev/null
@@ -1,2 +0,0 @@
-Form1 = 110, 110, 485, 456, , 88, 88, 463, 434, C
-Module1 = 132, 132, 507, 478, Z
diff --git a/PR/src/addons/vb/samples/prtest1.frm b/PR/src/addons/vb/samples/prtest1.frm
deleted file mode 100644
index d732b0a..0000000
--- a/PR/src/addons/vb/samples/prtest1.frm
+++ /dev/null
@@ -1,116 +0,0 @@
-VERSION 5.00
-Begin VB.Form Form1 
-   Caption         =   "PR sample program"
-   ClientHeight    =   1860
-   ClientLeft      =   60
-   ClientTop       =   345
-   ClientWidth     =   6720
-   LinkTopic       =   "Form1"
-   ScaleHeight     =   1860
-   ScaleWidth      =   6720
-   StartUpPosition =   3  'Windows Default
-   Begin VB.CommandButton Command4 
-      Caption         =   "Clear"
-      Height          =   375
-      Left            =   5280
-      TabIndex        =   9
-      Top             =   120
-      Width           =   1335
-   End
-   Begin VB.CommandButton Command3 
-      Caption         =   "Classify"
-      Height          =   375
-      Left            =   3720
-      TabIndex        =   8
-      Top             =   120
-      Width           =   1455
-   End
-   Begin VB.CommandButton Command2 
-      Caption         =   "Export"
-      Height          =   375
-      Left            =   1920
-      TabIndex        =   7
-      Top             =   120
-      Width           =   1695
-   End
-   Begin VB.TextBox Text3 
-      Height          =   285
-      Left            =   1320
-      TabIndex        =   3
-      Text            =   "Text3"
-      Top             =   1440
-      Width           =   5295
-   End
-   Begin VB.TextBox Text2 
-      Height          =   285
-      Left            =   1320
-      TabIndex        =   2
-      Text            =   "Text2"
-      Top             =   1080
-      Width           =   5295
-   End
-   Begin VB.TextBox Text1 
-      Height          =   285
-      Left            =   1320
-      TabIndex        =   1
-      Text            =   "Text1"
-      Top             =   720
-      Width           =   5295
-   End
-   Begin VB.CommandButton Command1 
-      Caption         =   "Import"
-      Height          =   375
-      Left            =   0
-      TabIndex        =   0
-      Top             =   120
-      Width           =   1815
-   End
-   Begin VB.Label Label3 
-      Caption         =   "resource file"
-      Height          =   255
-      Left            =   120
-      TabIndex        =   6
-      Top             =   1440
-      Width           =   1095
-   End
-   Begin VB.Label Label2 
-      Caption         =   "resources dir"
-      Height          =   255
-      Left            =   120
-      TabIndex        =   5
-      Top             =   1080
-      Width           =   975
-   End
-   Begin VB.Label d 
-      Caption         =   "dat file"
-      Height          =   255
-      Left            =   120
-      TabIndex        =   4
-      Top             =   720
-      Width           =   615
-   End
-End
-Attribute VB_Name = "Form1"
-Attribute VB_GlobalNameSpace = False
-Attribute VB_Creatable = False
-Attribute VB_PredeclaredId = True
-Attribute VB_Exposed = False
-Private Sub Command1_Click()
- result = prImportDat(Text1.Text, Text2.Text, Text3.Text)
- MsgBox ("The given result was " & result)
-End Sub
-
-Private Sub Command2_Click()
- result = prExportDat(Text1.Text, Text2.Text, Text3.Text)
- MsgBox ("The given result was " & result)
-End Sub
-
-Private Sub Command3_Click()
- result = prVerifyDatType(Text1.Text)
- MsgBox ("The given result was " & result)
-End Sub
-
-Private Sub Command4_Click()
- result = prClearRes(Text3.Text)
- MsgBox ("The given result was " & result)
-End Sub
diff --git a/PR/src/console/main.c b/PR/src/console/main.c
deleted file mode 100644
index 2390b8a..0000000
--- a/PR/src/console/main.c
+++ /dev/null
@@ -1,489 +0,0 @@
-/*  Princed V3 - Prince of Persia Level Editor for PC Version
-    Copyright (C) 2003 Princed Development Team
-
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program; if not, write to the Free Software
-    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-    The authors of this program may be contacted at http://forum.princed.com.ar
-*/
-
-/*
-pr.c: Main source file for Princed Resources
-\xaf\xaf\xaf\xaf
-	Princed Resources editor
-	(c) Copyright 2003, Princed Development Team
-
-	Authors
-	 Coding & main routines
-	  Enrique Calot
-	  Santiago Zamora
-
-	 Graphic compression algorithms
-	  Tammo Jan Dijkema
-	  Enrique Calot
-
-	 Graphic format development
-	  Tammo Jan Dijkema
-	  Anke Balderer
-
-	 MID Sound format development
-	  Christian Lundheim
-
-	 Resources.xml edition
-	  Steven Fayers
-
- Note:
-  DO NOT remove this copyright notice
-*/
-
-/* Headers */
-#include <stdio.h>
-#include <string.h>
-
-#include "pr.h"
-
-#include "compress.h"
-
-#include "extract.h"
-#include "compile.h"
-#include "tasks.h"
-
-#include "memory.h"    /* getMemory, free */
-#include "disk.h"      /* getFileNameFromPath */
-
-#ifndef DLL
- #ifdef UNIX
-  #include <unistd.h>
-  #ifndef LINUX
-   #include "getopt.h"
-  #endif
- #else
-  #include "getopt.h"
- #endif
-#endif
-
-/***************************************************************\
-|                      Main working functions                   |
-\***************************************************************/
-
-FILE* outputStream=NULL;
-
-#ifdef DLL
-void prSetOutput(FILE* output) {
-	outputStream=output;
-}
-#endif
-
-#ifdef DLL
-int prExportDat(const char* vDatFile, const char* vDirName, const char* vResFile) {
-	outputStream=stdout;
-	return prExportDatOpt(vDatFile,vDirName,vResFile,export_flag,NULL,NULL,NULL);
-}
-#endif
-
-int prExportDatOpt(const char* vDatFile, const char* vDirName, const char* vResFile,int opt,const char* vDatFileName,const char* datAuthor, const char* backupExtension) {
-	/*
-		Arguments:
-			char* vDatFile        - full Path to the dat file;
-			                        if file use it, if directory, perform it for
-			                        all files
-			char* vDirName        - full Path to the extracting folder
-			                        (doesn't need to exist)
-			char* vResFile        - full Path to the resources XML file
-			                        NULL is the default file resources.xml
-			char opt              - program options, see below
-			char* vDatFileName    - name of the file to be extracted
-			                        NULL means predict it from vDatFile
-			const char* datAuthor - Author's name when extracting PLV's,
-			                        NULL is default
-			const char* backupExtension
-			                      - If backup_flag is set, the string to attach
-			                        to the backup files
-
-		Options:
-			unknown_flag   - generate the unknown file without performing
-                       any extraction
-			raw_flag       - uses raw format
-			verbose_flag   - explain what is being done
-			recursive_flag - searches for all dat files (only if vDatFile
-			                 is not a dat file and vDatFileName is NULL)
-			force_flag     - default option, you cannot disable it,
-			                 so please make a backup of your files
-			backup_flag    - backup your files
-
-
-		Return values:
-			00 Ok
-			-1 Error accessing the file DAT
-			-2 Memory error in extraction
-			-3 Invalid DAT file
-			-4 XML Parse error
-			-5 Memory error in parsing
-			-6 XML Attribute not recognized
-			-7 XML File not found
-	*/
-
-	/* Declare variables */
-	tResource* r[MAX_RES_COUNT];
-	int a;
-	const char* aux;
-	char* currentDatFileName;
-	char* currentDatFile;
-
-	currentDatFile=strallocandcopy(vDatFileName);
-
-	parseGivenPath(currentDatFile);
-
-	if (vDatFileName==NULL) { /* if no special dat file was specified, a path parsed will be used */
-		aux=getFileNameFromPath(vDatFile);
-	} else {
-		aux=currentDatFile;
-	}
-	currentDatFileName=strallocandcopy(aux);
-
-	/* Parse XML and export the file */
-	a=parseFile(vResFile,currentDatFileName,r);
-	if (a<0) {
-		/* parsing errors */
-		a-=3;
-	} else {
-		/* exporting errors/no errors */
-		a=extract(vDatFile,vDirName,r,opt,currentDatFileName,datAuthor,backupExtension);
-	}
-	free(currentDatFileName);
-	free(currentDatFile);
-	freePartialList();
-
-	return a;
-}
-
-#ifdef DLL
-int prImportDat(const char* vDatFile, const char* vDirName, const char* vResFile) {
-	outputStream=stdout;
-	return prImportDatOpt(vDatFile,vDirName,vResFile,0,NULL,NULL);
-}
-#endif
-
-int prImportDatOpt(const char* vDatFile, const char* vDirName, const char* vResFile,int opt,const char* vDatFileName, const char* backupExtension) {
-	/*
-		Arguments:
-			char* vDatFile        - full Path to the dat file;
-			                        if file use it, if directory, perform it for
-			                        all files
-			char* vDirName        - full Path to the extracting folder
-			                        (doesn't need to exist)
-			char* vResFile        - full Path to the resources XML file
-			                        (resources.xml by default)
-			char opt              - program options, see below
-			char *vDatFileName    - name of the file to be extracted
-			                        NULL means predict it from vDatFile
-			const char* backupExtension
-			                      - If backup_flag is set, the string to attach
-			                        to the backup files
-
-		Options:
-			raw_flag       - uses raw format
-			verbose_flag   - explain what is being done
-			recursive_flag - searches for all dat files (only if vDatFile
-			                 is not a dat file and vDatFileName is NULL)
-			force_flag     - If not set and the file exists it will prompt
-			                 for action
-			backup_flag    - backup your files
-
-
-		Return values:
-			-1 DAT File couldn't be open for writing
-			-2 DAT file not found or invalid in partial importation
-			-3 XML Parse error
-			-4 No memory
-			-5 XML Attribute not recognized
-			-6 XML File not found
-			00 File successfully imported
-			positive number: number of missing files
-	*/
-
-	/* Declare variables */
-	tResource* r[MAX_RES_COUNT];
-	int a;
-	const char* aux;
-	char* currentDatFileName;
-
-	if (vDatFileName==NULL) { /* if no special dat file was specified, a path parsed will be used */
-		aux=getFileNameFromPath(vDatFile);
-	} else {
-		aux=vDatFileName;
-	}
-	currentDatFileName=strallocandcopy(aux);
-
-	/* Parse XML and import files */
-	a=parseFile(vResFile,currentDatFileName,r);
-	if (a<0) {
-		/* parsing errors */
-		a-=2;
-	} else {
-		/* importing errors/no errors */
-		a=compile (vDatFile, vDirName,r,opt,currentDatFileName,backupExtension);
-	}
-	free(currentDatFileName);
-	return a;
-}
-
-/***************************************************************\
-|                     M A I N   P R O G R A M                   |
-\***************************************************************/
-
-void syntax() {
-	fprintf(outputStream,PARSING_HELP_BEGIN);
-	fprintf(outputStream,PARSING_HELP_PART1);
-	fprintf(outputStream,PARSING_HELP_PART2);
-	fprintf(outputStream,PARSING_HELP_PART3);
-}
-
-int prMain(int optionflag, const char* extension,const char* dirName,const char* resFile,const char* datfile, const char* datfilename,const char* datAuthor,FILE* output) {
-
-	/* declare variables */
-	int returnValue;
-
-	outputStream=output;
-
-	/* do selected tasks */
-	if (hasFlag(export_flag)) { /* Export file */
-		char* array[]=PR_TEXT_EXPORT_ARRAY;
-		fprintf(output,PR_TEXT_TASK_EXTRACT,datfile,dirName);
-		returnValue=prExportDatOpt(datfile,dirName,resFile,optionflag,datfilename,datAuthor,extension);
-		fprintf(output,PR_TEXT_RESULT,array[-returnValue],returnValue);
-	}	else if (hasFlag(classify_flag)) { /* Classify file */
-		char* array[]=PR_TEXT_CLASSIFY_ARRAY;
-		fprintf(output,PR_TEXT_TASK_CLASSIFY,datfile);
-		returnValue=prVerifyDatType(datfile);
-		if (hasFlag(cgi_flag)) {
-			fprintf(output,PR_CGI_TEXT2,returnValue);
-		} else {
-			fprintf(output,PR_TEXT_RESULT,array[2+returnValue],returnValue);
-		}
-	}	else if (hasFlag(import_flag)) { /* Import file */
-		char* array[]=PR_TEXT_IMPORT_ARRAY;
-		fprintf(output,PR_TEXT_TASK_COMPILE,datfile,dirName);
-		returnValue=prImportDatOpt(datfile,dirName,resFile,optionflag,datfilename,extension);
-		if (returnValue<=0) {
-			fprintf(output,PR_TEXT_RESULT,array[-returnValue],returnValue);
-		} else {
-			fprintf(output,PR_TEXT_RESULT_ERR,returnValue);
-		}
-	} else {
-		syntax();
-		returnValue=-1;
-	}
-
-	return returnValue;
-}
-
-#ifndef DLL
-
-/***************************************************************\
-|             Standard executable specific functions            |
-\***************************************************************/
-
-int prStart(int optionflag, const char* extension,const char* dirName,const char* resFile,const char* datfile, const char* datfilename,const char* datAuthor,FILE* output) {
-	int result=1;
-	whatIs selectedFile;
-	outputStream=output;
-
-	/* Show about or cgi stuff */
-	if (hasFlag(cgi_flag)) {
-		fprintf(output,PR_CGI_TEXT1);
-	} else {
-		fprintf(output,PR_ABOUT);
-	}
-
-	/* Show version screen if requested */
-	if (hasFlag(version_flag)) {
-		fprintf(output,PARSING_ABOUT);
-		return -1;
-	}
-
-	/* If bad syntax or help screen requested */
-	if (hasFlag(help_flag)) {
-		syntax();
-		return -1;
-	}
-
-	/* Perform tasks depending on the argument */
-	if (hasFlag(import_flag)) {
-		/* We have to import something, let's see what the parameters are */
-		if (datfile==NULL) {
-			/* no files? let's use the whole current directory */
-			fprintf(output,PR_TEXT_IMPORTING_CURRENT);
-			importDir(dirName,resFile,optionflag,extension,".",output);
-		} else if ((selectedFile=isDir(datfile))!=eFile) {
-			fprintf(output,PR_TEXT_IMPORTING_GIVEN);
-			if ((selectedFile==eDirectory)||(isntADatFile(getFileNameFromPath(datfile),resFile))) {
-				/* it's a directory or doesn't exist (but it's not a dat file) */
-				importDir(dirName,resFile,optionflag,extension,datfile,output);
-			} else {
-				/* it doesn't exist but it's a dat file */
-				result=prMain(optionflag,extension,dirName,resFile,datfile,datfilename,datAuthor,output);
-			}
-		} else { /* it's only one existent file */
-			result=prMain(optionflag,extension,dirName,resFile,datfile,datfilename,datAuthor,output);
-		}
-	} else {
-		/* We have to export/classify something, perhaps we'll need to use somerecursive functions */
-		if (datfile==NULL) {
-			/* If nothing, let's use the current dir and check for all the files there */
-			fprintf(output,PR_TEXT_SCANNING_CURRENT);
-			recurseDirectory(".",optionflag,extension,dirName,resFile,datfilename,datAuthor,output);
-		} else if ((selectedFile=isDir(datfile))==eDirectory) {
-			/* If it's a directory, let's check for all the files there */
-			fprintf(output,PR_TEXT_SCANNING_GIVEN);
-			recurseDirectory(datfile,optionflag,extension,dirName,resFile,datfilename,datAuthor,output);
-		} else if (selectedFile==eNotFound) {
-			/* If the file doesn't exist, print an error and exit */
-			fprintf(output,PR_TEXT_FILE_NOT_FOUND,datfile);
-			result=0;
-		} else {
-			/* If it is a file, just do the tasks for it */
-			result=prMain(optionflag,extension,dirName,resFile,datfile,datfilename,datAuthor,output);
-		}
-	}
-
-	freeParsedStructure();
-	return result;
-}
-
-/***************************************************************\
-|      Standard executable command line parsing function        |
-\***************************************************************/
-
-int main (int argc, char **argv) {
-	/* declare variables */
-	char  dirName[MAX_FILENAME_SIZE]=".";
-	char* datAuthor  =NULL;
-	char* datFileName=NULL;
-	char* datFilePath=NULL;
-	char* extension  =NULL;
-	char* resFile    =NULL;
-	int   c;
-	int   optionflag=0;
-
-	/* Parse command line options */
-	do {
-		static struct option long_options[] = PARSING_OPTIONS;
-		int junk = 0;
-
-		c = getopt_long(argc,argv,PARSING_CHARS,long_options,&junk);
-		switch (c) {
-				case 'c':
-				case 'i':
-					if (hasFlag(classify_flag|export_flag)) setFlag(help_flag);
-					setFlag(import_flag);
-					if (optarg) strncpy(dirName,optarg,MAX_FILENAME_SIZE);
-					break;
-				case 'g':
-					setFlag(cgi_flag); /* if cgi, a classify must be performed */
-				case 'd':
-					if (hasFlag(import_flag|export_flag)) setFlag(help_flag);
-					setFlag(classify_flag);
-					break;
-				case 'x':
-				case 'e':
-					if (hasFlag(classify_flag|import_flag)) setFlag(help_flag);
-					setFlag(export_flag);
-					if (optarg) strncpy(dirName,optarg,MAX_FILENAME_SIZE);
-					break;
-				case 'b':
-					setFlag(backup_flag);
-					freeAllocation(extension);
-					extension=strallocandcopy(optarg);
-					break;
-				case 'f':
-					setFlag(force_flag);
-					break;
-				case 's':
-					freeAllocation(resFile);
-					resFile=strallocandcopy(optarg);
-					break;
-				case 'r':
-#ifndef PR_IGNORE_RAW_OPTION
-					setFlag(raw_flag);
-					break;
-#endif
-				case 'R':
-					setFlag(recursive_flag);
-					break;
-				case 't':
-					freeAllocation(datFileName);
-					datFileName=strallocandcopy(optarg);
-					break;
-				case 'a':
-					freeAllocation(datAuthor);
-					datAuthor=strallocandcopy(optarg);
-					break;
-				case 'v':
-					setFlag(verbose_flag);
-					break;
-				case 2:
-					setFlag(unknown_flag);
-				case -1:
-					break;
-				case 1:
-					setFlag(version_flag);
-				default:
-					setFlag(help_flag);
-		}
-	} while (c!=-1);
-
-	if (optind < argc) {
-		int size;
-		datFilePath=strallocandcopy(argv[optind]);
-		/* Erase the last "/" if exists. TODO: send to parseGivenPath  */
-		size=strlen(datFilePath);
-		if (size>0) {
-			size--;
-			if (isDirSep(datFilePath,size)) datFilePath[size]=0;
-		}
-	}
-
-	/* At least one of these options must be selected, if not, the user needs help! */
-	if (!(hasFlag(import_flag|export_flag|classify_flag))) setFlag(help_flag);
-
-	parseGivenPath(datFilePath);
-
-	/* Run main program */
-	prStart(optionflag,extension,dirName,resFile,datFilePath,datFileName,datAuthor,stdout);
-
-	/* Free memory and exit */
-	freePartialList();
-	freeAllocation(datAuthor);
-	freeAllocation(datFileName);
-	freeAllocation(datFilePath);
-	freeAllocation(extension);
-	freeAllocation(resFile);
-
-	return 0;
-}
-
-#endif
-
-/***************************************************************\
-|              Main Library start dummy function                |
-\***************************************************************/
-
-#ifdef SO
-/* When compiling in Unix SO libraries */
-void start() {}
-#endif
-
-
-
diff --git a/PR/src/include/autodetect.h b/PR/src/include/autodetect.h
deleted file mode 100644
index ab7b920..0000000
--- a/PR/src/include/autodetect.h
+++ /dev/null
@@ -1,146 +0,0 @@
-/*  Princed V3 - Prince of Persia Level Editor for PC Version
-    Copyright (C) 2003 Princed Development Team
-
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program; if not, write to the Free Software
-    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-    The authors of this program may be contacted at http://forum.princed.com.ar
-*/
-
-/*
-resources.h: Princed Resources : Resource Handler headers
-\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf
- Copyright 2003 Princed Development Team
-  Created: 24 Aug 2003
-
-  Author: Enrique Calot <ecalot.cod@princed.com.ar>
-  Version: 1.01 (2003-Oct-23)
-
- Note:
-  DO NOT remove this copyright notice
-*/
-
-#ifndef _RESOURCES_H_
-#define _RESOURCES_H_
-
-/* XML generation defines */
-
-#define RES_XML_UNKNOWN_PATH  "%s/unknown/%s/"
-#define RES_XML_UNKNOWN_FILES "%s%02d.%s"
-#define RES_XML_UNKNOWN_START "<?xml version=\"1.0\" ?>\n<resources version=\"generated\">\n <folder name=\"unknown\" path=\"%s\" file=\"%s\" palette=\"%d\">\n"
-#define RES_XML_UNKNOWN_ITEM  "  <item value=\"%d\" path=\""RES_XML_UNKNOWN_FILES"\" itemtype=\"%s\">Unknown %s %d</item>\n"
-#define RES_XML_UNKNOWN_END   " </folder>\n</resources>\n"
-
-/* File extensions */
-
-#define RES_FILE_EXTENSIONS   {"raw","plv","bmp","wav","mid","bin","pal","pcs"}
-#define RES_FILE_TYPES        {"autodetect","level","image","wave","midi","binary","palette","pcspeaker"}
-
-/* Item Types */
-
-#define RES_TYPE_RAW          0
-#define RES_TYPE_LEVEL        1
-#define RES_TYPE_IMAGE        2
-#define RES_TYPE_WAVE         3
-#define RES_TYPE_MIDI         4
-#define RES_TYPE_BINARY       5
-#define RES_TYPE_PALETTE      6
-#define RES_TYPE_PCSPEAKER    7
-
-#define RES_TYPECOUNT         8
-
-/* types */
-typedef struct {
-	unsigned short int palette;
-	unsigned short int size;
-	unsigned long int offset;
-	unsigned char number; /* Used for level number */
-	char      type;
-	char*     path;
-	unsigned char*     palAux;
-	char*     name;
-	char*     desc;
-}tResource;
-
-/* Id list for partial manipulation */
-typedef enum {eString,eValue}tResIdType;
-
-typedef struct {
-	tResIdType idType;
-	char*      value;
-}tResIdListItem;
-
-typedef struct {
-	int             count;
-	tResIdListItem* list;
-}tResIdList;
-
-void parseGivenPath(char* path);
-int partialListActive();
-int isInThePartialList(const char* file, int value);
-void freePartialList();
-
-/* Includes */
-#include <stdio.h>
-#include "xmlparse.h"
-
-/* Verify  header */
-int verifyHeader(const unsigned char* array, int size);
-
-/*
-	Headers may be:
-	 01 Levels
-	 02 Bitmaps
-	 03 Waves
-	 04 Midis
-	 05 Binary
-	 06 Palette
-	 07 Internal Speaker Sounds
-*/
-
-/***************************************************************\
-|                       File format handling                    |
-\***************************************************************/
-
-/* CheckSum verification */
-int checkSum(unsigned char* data,int size);
-
-/* Empty resource table */
-void emptyTable(tResource* r[]);
-
-/* Resources extras */
-void getFileName(char* vFileext,const char* vDirExt,tResource* r,unsigned short id,const char* vFiledat, const char* vDatFileName,int optionflag,const char* backupExtension);
-void getUpperFolder(char* aux, char* vFiledat);
-
-const char* getExtDesc(int type);
-
-/* parse file and free parsed structure */
-int parseFile(const char* vFile, const char* datFile, tResource* r[]);
-void freeParsedStructure();
-#ifdef DLL
-int parseStructure(const char* vFile);
-tTag* resourceTreeGetChild(tTag* whereAmI);
-tTag* resourceTreeGetNext (tTag* whereAmI);
-tTag* resourceTreeGetRoot ();
-int   resourceTreeGetInfo (tTag* whereAmI, char** tag, char** desc, char** path, char** file, char** itemtype, char** name, char** palette, char** type, char** value, char** version, char** number);
-#endif
-
-/* In case there are unknown resources it closes the unknown XML output */
-void endUnknownXml();
-
-/* Search files for the Import feature */
-int importDir(const char* directory, const char* vResFile, int pOption, const char* backupExtension,const char* vDirectory,FILE* output);
-int isntADatFile(const char* testFile, const char* vResFile);
-
-#endif
diff --git a/PR/src/include/bitmap.h b/PR/src/include/bitmap.h
deleted file mode 100644
index f896737..0000000
--- a/PR/src/include/bitmap.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/*  Princed V3 - Prince of Persia Level Editor for PC Version
-    Copyright (C) 2003 Princed Development Team
-
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program; if not, write to the Free Software
-    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-    The authors of this program may be contacted at http://forum.princed.com.ar
-*/
-
-/*
-bmp.h: Princed Resources : BMP file support headers
-\xaf\xaf\xaf\xaf\xaf
- Copyright 2003 Princed Development Team
-  Created: 24 Aug 2003
-
-  Author: Enrique Calot <ecalot.cod@princed.com.ar>
-  Version: 1.01 (2003-Oct-23)
-  Version: 1.10 (2004-Feb-17)
-
- Note:
-  DO NOT remove this copyright notice
-*/
-
-#ifndef _BMP_H_
-#define _BMP_H_
-
-#include "resources.h"
-#include "compress.h"
-
-#define FORMATS_BMP_PALETTE_BW "\x00\x00\x00\0\xFF\xFF\xFF"
-
-int mFormatExportBmp(const unsigned char* data, const char *vFileext,unsigned long int size,tImage image,int optionflag,const char* backupExtension);
-int mFormatImportBmp(unsigned char* data, tResource *res);
-int mWriteBitMap(tImage img,const char* vFile,int optionflag,const char* backupExtension);
-int mReadBitMap(tImage* img,unsigned char* data, int size); /* Note: this will ignore the palette */
-
-#endif
diff --git a/PR/src/include/bmp.h b/PR/src/include/bmp.h
deleted file mode 100644
index f896737..0000000
--- a/PR/src/include/bmp.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/*  Princed V3 - Prince of Persia Level Editor for PC Version
-    Copyright (C) 2003 Princed Development Team
-
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program; if not, write to the Free Software
-    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-    The authors of this program may be contacted at http://forum.princed.com.ar
-*/
-
-/*
-bmp.h: Princed Resources : BMP file support headers
-\xaf\xaf\xaf\xaf\xaf
- Copyright 2003 Princed Development Team
-  Created: 24 Aug 2003
-
-  Author: Enrique Calot <ecalot.cod@princed.com.ar>
-  Version: 1.01 (2003-Oct-23)
-  Version: 1.10 (2004-Feb-17)
-
- Note:
-  DO NOT remove this copyright notice
-*/
-
-#ifndef _BMP_H_
-#define _BMP_H_
-
-#include "resources.h"
-#include "compress.h"
-
-#define FORMATS_BMP_PALETTE_BW "\x00\x00\x00\0\xFF\xFF\xFF"
-
-int mFormatExportBmp(const unsigned char* data, const char *vFileext,unsigned long int size,tImage image,int optionflag,const char* backupExtension);
-int mFormatImportBmp(unsigned char* data, tResource *res);
-int mWriteBitMap(tImage img,const char* vFile,int optionflag,const char* backupExtension);
-int mReadBitMap(tImage* img,unsigned char* data, int size); /* Note: this will ignore the palette */
-
-#endif
diff --git a/PR/src/include/classify.h b/PR/src/include/classify.h
deleted file mode 100644
index 07fe3b4..0000000
--- a/PR/src/include/classify.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/*  Princed V3 - Prince of Persia Level Editor for PC Version
-    Copyright (C) 2003 Princed Development Team
-
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program; if not, write to the Free Software
-    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-    The authors of this program may be contacted at http://forum.princed.com.ar
-*/
-
-/*
-tasks.h: Princed Resources : Other DAT file handling tasks headers
-\xaf\xaf\xaf\xaf\xaf\xaf\xaf
- Copyright 2003 Princed Development Team
-  Created: 24 Aug 2003
-
-  Author: Enrique Calot <ecalot.cod@princed.com.ar>
-  Version: 1.01 (2003-Oct-23)
-
- Note:
-  DO NOT remove this copyright notice
-*/
-
-#ifndef _TASKS_H_
-#define _TASKS_H_
-
-/*
-	Return values may be:
-	 -2 Memory error
-	 -1 File not found or no access error
-
-	 00 Not a valid POP1 DAT file
-
-	 01 Levels file
-	 02 Graphic file with an image in the first valid entry (not common)
-	 03 Waves/Digital sound file
-	 04 Midis file
-	 05 Valid DAT file with Undefined content
-	 06 Graphic file with a palette in the first valid entry (common)
-	 07 PC Speaker dat file
-
-	 11 Pop2 dat files
-*/
-
-int prVerifyDatType(const char* vFiledat);
-
-void compareFiles(const char* vModified,const char* vOriginal);
-
-#endif
diff --git a/PR/src/include/common.h b/PR/src/include/common.h
deleted file mode 100644
index 8221f0c..0000000
--- a/PR/src/include/common.h
+++ /dev/null
@@ -1,199 +0,0 @@
-/*  Princed V3 - Prince of Persia Level Editor for PC Version
-    Copyright (C) 2003 Princed Development Team
-
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program; if not, write to the Free Software
-    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-    The authors of this program may be contacted at http://forum.princed.com.ar
-*/
-
-/*
-pr.h: Princed Resources : Main header prototypes and definitions
-\xaf\xaf\xaf\xaf
- Copyright 2003 Princed Development Team
-  Created: 24 Aug 2003
-
-  Author: Enrique Calot <ecalot.cod@princed.com.ar>
-  Version: 1.00 (2003-Aug-24)
-
-  Modified by: Enrique Calot <ecalot.cod@princed.com.ar>
-  Version: 1.10 (2003-Dec-03)
-
-  Language: Abstract
-
- Note:
-  DO NOT remove this copyright notice
-*/
-
-#ifndef _PR_H_
-#define _PR_H_
-
-/***************************************************************\
-|                Princed Resource Library Functions             |
-\***************************************************************/
-
-#include <stdio.h>
-
-/* User configuration defines */
-#ifndef WIN32
- #define UNIX
-#endif
-
-/* do not #define DLL, use -DDLL as a precompiler option instead */
-#ifdef DLL
-void prSetOutput(FILE* output);
- #ifdef UNIX
-  #define SO
- #endif
-#endif
-
-#ifndef OS
- #ifndef UNIX
-  #define OS "Win32"
- #else
-  #define OS ""
- #endif
-#endif
-
-/* Debug options */
-/* #define DEB_FLAG */
-/* #define MEM_CHECK */
-
-#ifdef MEM_CHECK
-
-#ifdef malloc
-#undef malloc
-#endif
-
-#include "memory.h"
- #define malloc(a) mymalloc(a,__FILE__,__LINE__)
- #define free(a) myfree(a,__FILE__,__LINE__)
-
-#endif
-
-#ifdef DEB_FLAG
- #define fld(a) printf(a "\n")
-#else
- #define fld(a)
-#endif
-
-/***************************************************************\
-|             M A I N   P R O G R A M   D E F I N E S           |
-\***************************************************************/
-
-/***************************************************************\
-|                     PR Specific Defines                       |
-\***************************************************************/
-
-#define PR_URL                    "http://www.princed.com.ar"
-#define PR_VERSION                "v1.0b-dev2"
-#define PR_COPY                   "(c) Copyright 2003, 2004 - Princed Development Team"
-/***************************************************************\
-|                         Other defines                         |
-\***************************************************************/
-
-/* Default Files */
-#define RES_XML_UNKNOWN_XML      "unknown.xml"
-#define RES_XML_RESOURC_XML      "resources.xml"
-
-#define DEFAULT_BACKUP_EXTENSION "bak"
-
-/* Define max & min's */
-#define MAX_RES_COUNT            25000
-#define MAX_FILENAME_SIZE        260
-
-/* Path defines */
-#ifdef UNIX
- #define DIR_SEPARATOR           '/'
-#else
- #define DIR_SEPARATOR           '\\'
-#endif
-
-/***************************************************************\
-|                        L A N G U A G E                        |
-\***************************************************************/
-
-#include "english.h"
-
-/***************************************************************\
-|                           Prototypes                          |
-\***************************************************************/
-
-/* Main functions */
-int prExportDat(const char* vDatFile, const char* vDirName, const char* vResFile);
-int prImportDat(const char* vDatFile, const char* vDirName, const char* vResFile);
-int prVerifyDatType(const char* vFiledat);
-
-/* Extra featured functions */
-int prExportDatOpt(const char* vDatFile, const char* vDirName, const char* vResFile,int opt,const char * vDatFileName,const char* datAuthor, const char* backupExtension);
-int prImportDatOpt(const char* vDatFile, const char* vDirName, const char* vResFile,int opt,const char* vDatFileName, const char* backupExtension);
-
-/* Recursive function */
-int prMain(int option, const char* extension,const char* dirName,const char* resFile,const char* datfile, const char* datfilename,const char* datAuthor,FILE* output);
-
-/***************************************************************\
-|                   Command Line specific options               |
-\***************************************************************/
-
-#ifndef PR_IGNORE_RAW_OPTION
-#define PARSING_OPTRAW ,{"raw",         no_argument,       0,'r'},
-#define PARSING_CHRRAW "r"
-#else
-#define PARSING_OPTRAW ,
-#define PARSING_CHRRAW ""
-#endif
-#define PARSING_OPTIONS {\
-{"import",      optional_argument, 0,'c'},\
-{"classify",    no_argument,       0,'d'},\
-{"export",      optional_argument, 0,'x'},\
-\
-{"setauthor",   required_argument, 0,'a'},\
-{"backup",      optional_argument, 0,'b'},\
-{"force",       no_argument,       0,'f'},\
-{"cgi",         no_argument,       0,'g'},\
-{"help",        no_argument,       0,'?'},\
-{"resource",    required_argument, 0,'s'}\
-PARSING_OPTRAW\
-{"recursive",   no_argument,       0,'R'},\
-{"datfile",     required_argument, 0,'t'},\
-{"unknown",     no_argument,       0,2},\
-{"verbose",     no_argument,       0,'v'},\
-{"version",     no_argument,       0,1},\
-{0, 0, 0, 0}\
-}
-
-#define PARSING_CHARS    "i::c::dx::e::b::a::fgs::t::Rvh?"PARSING_CHRRAW
-
-/* Flags */
-#define import_flag      0x0001
-#define classify_flag    0x0002
-#define export_flag      0x0004
-#define backup_flag      0x0008
-#define force_flag       0x0010
-#define cgi_flag         0x0020
-#define help_flag        0x0040
-#define raw_flag         0x0080
-#define recursive_flag   0x0100
-#define verbose_flag     0x0200
-#define version_flag     0x0400
-#define unknown_flag     0x0800
-#define undef1_flag      0x1000
-#define undef2_flag      0x2000
-#define undef3_flag      0x4000
-#define undef4_flag      0x8000
-
-#define hasFlag(a) (optionflag&(a))
-#define setFlag(a) optionflag|=(a)
-
-#endif
diff --git a/PR/src/include/compress.h b/PR/src/include/compress.h
deleted file mode 100644
index 5581951..0000000
--- a/PR/src/include/compress.h
+++ /dev/null
@@ -1,94 +0,0 @@
-/*  Princed V3 - Prince of Persia Level Editor for PC Version
-    Copyright (C) 2003 Princed Development Team
-
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program; if not, write to the Free Software
-    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-    The authors of this program may be contacted at http://forum.princed.com.ar
-*/
-
-/*
-compress.c: Princed Resources : Image Compressor headers
-\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf
- Copyright 2003 Princed Development Team
-  Created: 24 Aug 2003
-
-  Author: Enrique Calot <ecalot.cod@princed.com.ar>
-  Version: 1.01 (2003-Oct-23)
-
- Note:
-  DO NOT remove this copyright notice
-*/
-
-#ifndef _COMPRESS_H_
-#define _COMPRESS_H_
-
-#define SIZE_OF_PALETTE 3*16
-
-#define COMPRESS_RAW    0x00
-#define COMPRESS_RLE_LR 0x01
-#define COMPRESS_RLE_UD 0x02
-#define COMPRESS_LZG_LR 0x03
-#define COMPRESS_LZG_UD 0x04
-
-#define COMPRESS_WORKING_ALGORITHMS 3
-
-#define COMPRESS_RESULT_FATAL   -2
-#define COMPRESS_RESULT_WARNING -1
-#define COMPRESS_RESULT_SUCCESS 0
-
-/* reserved memory for the Lzx algorithm */
-#define MAX_MOD_SIZE_IN_LZG    32001                /* 38401 */
-/* modulus to be used in the 10 bits of the algorithm */
-#define MAX_MXD_SIZE_IN_LZG    0x400
-
-typedef struct {
-	int width;
-	int widthInBytes;
-	int height;
-	unsigned char* pix;
-	unsigned char pal[SIZE_OF_PALETTE];
-	unsigned char type; /* XY where X=B if 4 bits or X=0 if 1 bit; Y=algorithm */
-}tImage;
-
-/* Prototypes */
-
-int mCompressGraphic(unsigned char* a,tImage* i, int* size);
-int mExpandGraphic(const unsigned char* array,tImage *image, int size);
-
-#define getCarry(a) ((a)>>6)
-#define getAlgor(a) a&0x4F
-
-/*
-	Class future definitions
-
-public:
- char cPrincedGraph::mOpenGraphDat     (char* fileName);
- char cPrincedGraph::mSaveGraphDat     (char* fileName);
- char cPrincedGraph::mGetGraphFull     (int id, CBitmap &bitmap, CBitmap &mask);
- char cPrincedGraph::mGetGraphMap      (int id, CBitmap &bitmap);
- char cPrincedGraph::mGetGraphMask     (int id, CBitmap &bmask);
- char cPrincedGraph::mSetGraph         (int id, CBitmap &bitmap);
- int  cPrincedGraph::mGetGraphCount    ();
- char cPrincedGraph::mSaveImportBmp    (int id, char* fileName);
- char cPrincedGraph::mSaveExportBmp    (int id, char* fileName);
-
-private:
- unsigned char* file;
- int            fileSize;
- tImage*        imageArray[256];
- int            imageArrayLength;
-
-*/
-#endif
diff --git a/PR/src/include/dat.h b/PR/src/include/dat.h
deleted file mode 100644
index 6369379..0000000
--- a/PR/src/include/dat.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/*  Princed V3 - Prince of Persia Level Editor for PC Version
-    Copyright (C) 2003 Princed Development Team
-
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program; if not, write to the Free Software
-    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-    The authors of this program may be contacted at http://forum.princed.com.ar
-*/
-
-/*
-dat.h: Princed Resources : DAT library headers
-\xaf\xaf\xaf\xaf\xaf
- Copyright 2004 Princed Development Team
-  Created: 15 Mar 2004
-
-  Author: Enrique Calot <ecalot.cod@princed.com.ar>
-  Version: 1.00 (2004-Mar-15)
-
- Note:
-  DO NOT remove this copyright notice
-*/
-
-#ifndef _DAT_H_
-#define _DAT_H_
-
-#include "resources.h"
-
-/* DAT reading and writing primitives primitives */
-int mRWBeginDatFile(const char* vFile, unsigned short int *numberOfItems, int optionflag);
-#define mRWCloseDatFile(dontSave) \
-mReadCloseDatFile();\
-mWriteCloseDatFile(r,dontSave,optionflag,backupExtension)
-
-
-/* DAT reading primitives */
-int  mReadBeginDatFile(unsigned short int *numberOfItems,const char* vFile);
-int  mReadGetFileInDatFile(int indexNumber,unsigned char* *data,unsigned long  int *size);
-int  mReadInitResource(tResource** res,const unsigned char* data,long size);
-void mReadCloseDatFile();
-
-/* DAT writing primitives */
-int  mWriteBeginDatFile(const char* vFile, int optionflag);
-void mWriteSetFileInDatFile(unsigned char* data, int size);
-void mWriteSetFileInDatFileIgnoreChecksum(unsigned char* data,int size);
-void mWriteInitResource(tResource** res);
-void mWriteCloseDatFile(tResource* r[],int dontSave,int optionflag, const char* backupExtension);
-
-#endif
diff --git a/PR/src/include/direntwin.h b/PR/src/include/direntwin.h
deleted file mode 100644
index a02a0d8..0000000
--- a/PR/src/include/direntwin.h
+++ /dev/null
@@ -1,50 +0,0 @@
-#ifndef DIRENT_INCLUDED
-#define DIRENT_INCLUDED
-
-/*
-
-    Declaration of POSIX directory browsing functions and types for Win32.
-
-    Author:  Kevlin Henney (kevlin@acm.org, kevlin@curbralan.com)
-    History: Created March 1997. Updated June 2003.
-    Rights:  See end of file.
-    
-*/
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-
-typedef struct DIR DIR;
-
-struct dirent
-{
-    char *d_name;
-};
-
-DIR           *opendir(const char *);
-int           closedir(DIR *);
-struct dirent *readdir(DIR *);
-void          rewinddir(DIR *);
-
-/*
-
-    Copyright Kevlin Henney, 1997, 2003. All rights reserved.
-
-    Permission to use, copy, modify, and distribute this software and its
-    documentation for any purpose is hereby granted without fee, provided
-    that this copyright and permissions notice appear in all copies and
-    derivatives.
-    
-    This software is supplied "as is" without express or implied warranty.
-
-    But that said, if there are any problems please get in touch.
-
-*/
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/PR/src/include/disk.h b/PR/src/include/disk.h
deleted file mode 100644
index b68a112..0000000
--- a/PR/src/include/disk.h
+++ /dev/null
@@ -1,83 +0,0 @@
-/*  Princed V3 - Prince of Persia Level Editor for PC Version
-    Copyright (C) 2003 Princed Development Team
-
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program; if not, write to the Free Software
-    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-    The authors of this program may be contacted at http://forum.princed.com.ar
-*/
-
-/*
-disk.h: Princed Resources : Disk Access & File handling functions headers
-\xaf\xaf\xaf\xaf\xaf\xaf
- Copyright 2003 Princed Development Team
-  Created: 29 Oct 2003
-
-  Author: Enrique Calot <ecalot.cod@princed.com.ar>
-  Version: 1.00 (2003-Oct-29)
-
-  Modified by: Enrique Calot <ecalot.cod@princed.com.ar>
-  Version: 1.10 (2003-Dec-03)
-  Modified by: Santiago Zamora <drkzight@users.sourceforge.net>
-  Version: 1.20 (2004-Jan-06)
-
- Note:
-  DO NOT remove this copyright notice
-*/
-
-#ifndef _DISK_H_
-#define _DISK_H_
-
-#include <stdio.h>
-
-/* 64 Kb */
-#define SIZE_OF_FILE     256*1024
-
-typedef enum {eFile,eDirectory,eNotFound}whatIs;
-
-#define charToUpper(a) ((a)&0xDF)
-#define isDirSep(a,i) ((a[i]=='\\')||(a[i]=='/'))
-
-typedef struct tOpenFiles {
-	struct tOpenFiles* next;
-	FILE* file;
-	char* name;
-	unsigned char* content;
-	unsigned long int size;
-}tOpenFiles;
-
-char mDiskVealidateFileHeader(unsigned char* text, int size, FILE* fp);
-/* char mSaveRaw      (const char* vFile,const unsigned char* output, int size); */
-#define mSaveRaw(f,d,s,optionflag,backup) writeData(d,0,f,s,optionflag,backup)
-#define writeCloseOk(a,b,c) writeClose(a,0,b,c)
-#define writeCloseDelete(a,b,c) writeClose(a,1,b,c)
-int  writeData     (const unsigned char* data, int ignoreChars, char* vFileext, int size, int optionflag,const char* backupExtension);
-int  writeOpen     (const char* vFileext, FILE* *fp, int optionflag);
-int  writeClose    (FILE* fp,int dontSave,int optionflag,const char* backupExtension);
-int  mLoadFileArray(const char* vFile,unsigned char** array);
-int  makebase      (const char* p);
-const char* repairFolders(const char* a);
-const char* getFileNameFromPath(const char* path);
-int recurseDirectory(const char* path,int optionflag, const char* extension,const char* dirName,const char* resFile, const char* datfilename,const char* datAuthor,FILE* output);
-whatIs isDir(const char *nombre);
-int mCopy(const char* strSource, const char* strTarget);
-#define mRemoveFile(a) remove(repairFolders(a))
-
-/* array2vars*/
-
-#define array2short(a) ((*a))+((*(a+1))<<8)
-#define array2long(a)  ((*a))+((*(a+1))<<8)+((*(a+2))<<16)+((*(a+3))<<24)
-
-
-#endif
\ No newline at end of file
diff --git a/PR/src/include/english.h b/PR/src/include/english.h
deleted file mode 100644
index db26172..0000000
--- a/PR/src/include/english.h
+++ /dev/null
@@ -1,171 +0,0 @@
-/*  Princed V3 - Prince of Persia Level Editor for PC Version
-    Copyright (C) 2003 Princed Development Team
-
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program; if not, write to the Free Software
-    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-    The authors of this program may be contacted at http://forum.princed.com.ar
-*/
-
-/*
-pr.h: Princed Resources : English language strings
-\xaf\xaf\xaf\xaf
- Copyright 2003 Princed Development Team
-  Created: 18 Feb 2004
-
-  Author: Enrique Calot <ecalot.cod@princed.com.ar>
-  Version: 1.00 (2004-Feb-18)
-
-  Language: English
-
- Note:
-  DO NOT remove this copyright notice
-*/
-
-/***************************************************************\
-|                           Text Defines                        |
-\***************************************************************/
-
-#define PR_ABOUT                  "Princed resources (PR) "PR_VERSION" "OS"\n"PR_COPY"\n"PR_URL"\n\n"
-
-#define PR_CGI_TEXT1              "Content-Type:text/html\n\nRunning as a cgi\n"
-#define PR_CGI_TEXT2              "Result: %02d type\n"
-
-#define PR_TEXT_RESULT            "Result: %s (%d)\n"
-#define PR_TEXT_RESULT_ERR        "Result: %d files with errors\n"
-
-#define PR_TEXT_FILE_NOT_FOUND    "Result: File or directory '%s' not found\n"
-
-#define PR_TEXT_SCANNING_CURRENT  "Scanning dat files in current directory\n"
-#define PR_TEXT_SCANNING_GIVEN    "Scanning dat files in given directory\n"
-
-#define PR_TEXT_IMPORTING_CURRENT "Importing all valid dat files from the current directory\n"
-#define PR_TEXT_IMPORTING_GIVEN   "Importing all valid files from given directory\n"
-
-#define PR_TEXT_TASK_COMPILE      "Importing '%s' from '%s'\n"
-#define PR_TEXT_TASK_CLASSIFY     "Classifying '%s'\n"
-#define PR_TEXT_TASK_EXTRACT      "Exporting '%s' to '%s'\n"
-
-#define PR_TEXT_DISK_PROCESSING   "Processing '%s'...\n"
-#define PR_TEXT_DISK_REPLACE      "File %s already exists. Replace? [Yes/no/all]:"
-#define PR_DISK_REPLACE_NO        'N'
-#define PR_DISK_REPLACE_ALL       'A'
-
-#define PR_TEXT_IMPORT_NOT_OPEN   "'%s' not open, skipped\n"
-#define PR_TEXT_IMPORT_SUCCESS    "'%s' successfully imported\n"
-#define PR_TEXT_IMPORT_ERRORS     "'%s' has errors, skipped\n"
-#define PR_TEXT_IMPORT_DONE       "Importing done, %d files imported ok, %d files with error\n"
-
-#define PR_TEXT_EXPORT_WORKING    "'%s' successfully exported\n"
-#define PR_TEXT_EXPORT_ERROR      "'%s' has errors, aborting...\n"
-#define PR_TEXT_EXPORT_BMP_WARN   "Warning: Extracted file may be corrupt\n"
-
-/***************************************************************\
-|                        Text Output Arrays                     |
-\***************************************************************/
-
-#define PR_TEXT_EXPORT_ARRAY {\
-"Ok",\
-"Error accessing a file",\
-"Memory error in extraction",\
-"Invalid DAT file",\
-"XML Parsing error",\
-"Memory error in parsing",\
-"XML Attribute not recognized",\
-"XML File not found"}
-
-#define PR_TEXT_CLASSIFY_ARRAY {\
-"Memory error",\
-"File not found or no access error",\
-"Not a valid DAT file",\
-"Levels file",\
-"Graphic DAT file without palette",\
-"Waves/Digital sound file",\
-"Midis file",\
-"Valid DAT file with undefined content",\
-"Graphic DAT file",\
-"Internal PC Speaker dat file",\
-"","","",\
-"Pop2 dat file"}
-
-#define PR_TEXT_IMPORT_ARRAY {\
-"File successfully imported",\
-"DAT file not found or invalid in partial importation",\
-"DAT File couldn't be open",\
-"XML Parseing error",\
-"No memory",\
-"XML Attribute not recognized",\
-"XML File not found"}
-
-/***************************************************************\
-|                 Command Line options information              |
-\***************************************************************/
-
-#ifndef PR_IGNORE_RAW_OPTION
-#define PARSING_RAW "   -r, --raw                  uses raw format\n"
-#else
-#define PARSING_RAW ""
-#endif
-#define PARSING_HELP_BEGIN "Usage: \n\
-  pr [-x[EXPORTDIR]|-i[IMPORTDIR]|-d] [DATFILEPATH]\n\
-  pr [OPTIONS] [DATFILEPATH]\n\
-\n\
-  Mandatory arguments to long options are mandatory for short options too.\n\
-\n"
-#define PARSING_HELP_PART1 "\
-   -i, -c, --import[=DIRNAME] imports from DIRNAME into given dat file\n\
-   -d, --classify             returns the dat file type\n\
-   -x, -e, --export[=DIRNAME] exports given dat file into DIRNAME\n\
-\n"
-#define PARSING_HELP_PART2 "\
-   -a, --setauthor=NAME       sets your name in extracted plv files\n\
-   -b, --backup[=EXTENSION]   backup your files\n\
-   -f, --force                rewrites your files without prompting\n\
-   -g, --cgi                  run as CGI and output mime headers\n\
-   -h, -?, --help             display this help and exit\n\
-   -s, --resource=RESFILE     uses an user-specific resource xml file\n\
-"PARSING_RAW
-
-#define PARSING_HELP_PART3 "\
-   -R, --recursive            searches for all dat files (only if DATFILEPATH\n\
-                              is not a dat file)\n\
-   -t, --datfile=DATFILE      specifies a dat file to read resources\n\
-                              different than the original file\n\
-       --unknown              generate the unknown file without performing\n\
-                              any extraction\n\
-   -v, --verbose              explain what is being done\n\
-       --version              output version information and exit\n\
-\n"
-
-#define PARSING_ABOUT "Authors: \n\
-   Coding & main routines\n\
-    Enrique Calot\n\
-\n\
-   Coding assistant\n\
-    Santiago Zamora\n\
-\n\
-   Graphic compression algorithms\n\
-    Tammo Jan Dijkema\n\
-    Enrique Calot\n\
-\n\
-   Graphic format development\n\
-    Tammo Jan Dijkema\n\
-    Anke Balderer\n\
-\n\
-   MID Sound format development\n\
-    Christian Lundheim\n\
-\n\
-   Resources.xml edition\n\
-    Steven Fayers\n\
-\n"
diff --git a/PR/src/include/export.h b/PR/src/include/export.h
deleted file mode 100644
index dd78230..0000000
--- a/PR/src/include/export.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/*  Princed V3 - Prince of Persia Level Editor for PC Version
-    Copyright (C) 2003 Princed Development Team
-
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program; if not, write to the Free Software
-    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-    The authors of this program may be contacted at http://forum.princed.com.ar
-*/
-
-/*
-extract.h: Princed Resources : DAT Extractor headers
-\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf
- Copyright 2003 Princed Development Team
-  Created: 24 Aug 2003
-
-  Author: Enrique Calot <ecalot.cod@princed.com.ar>
-  Version: 1.01 (2003-Oct-23)
-
- Note:
-  DO NOT remove this copyright notice
-*/
-
-#ifndef _EXTARCT_H_
-#define _EXTRACT_H_
-
-#include "resources.h"
-
-int extract(const char* vFiledat,const char* vDirExt, tResource* r[], int task, const char* vDatFileName, const char* vDatAuthor,const char* backupExtension);
-
-#endif
diff --git a/PR/src/include/filedir.h b/PR/src/include/filedir.h
deleted file mode 100644
index e537976..0000000
--- a/PR/src/include/filedir.h
+++ /dev/null
@@ -1,80 +0,0 @@
-/*  Princed V3 - Prince of Persia Level Editor for PC Version
-    Copyright (C) 2003 Princed Development Team
-
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program; if not, write to the Free Software
-    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-    The authors of this program may be contacted at http:/forum.princed.com.ar
-*/
-
-/*
-xmlparse.h: Princed Resources : xml handling functions header file
-\xaf\xaf\xaf\xaf\xaf
- Copyright 2003 Princed Development Team
-  Created: 23 Oct 2003
-
-  Author: Enrique Calot <ecalot.cod@princed.com.ar>
-  Version: 1.01 (2003-Oct-25)
-
- Note:
-  DO NOT remove this copyright notice
-*/
-
-/***************************************************************\
-|                  I M P L E M E N T A T I O N                  |
-\***************************************************************/
-
-#ifndef _XMLSEARCH_H_
-#define _XMLSEARCH_H_
-
-/* Includes */
-#include "xmlparse.h"
-#include "resources.h"
-
-/****************************************************************\
-|                   Tag Tree Searching Functions                 |
-\****************************************************************/
-
-const tTag* searchTree(const tTag* t,const char* datFile, const char* id);
-void workTag(const tTag* t,void* pass);
-
-/* Abstract function that runs all the tree and executes "function(tag,pass)" for each tag */
-void workTree(const tTag* t,void* pass, void (*function)(const tTag*,void*));
-
-void compareXmlFile(tTag* modified,tTag* original);
-
-/* Searching Structures */
-
-/* File List Structure */
-typedef struct tListNode {
- char* file;
- struct tListNode* next;
-}tListNode;
-
-/* File List Functions */
-void addFileToList(const tTag* t,void* junk);
-char* getFileFromList();
-
-/* Abstract passing structures */
-typedef struct tPassWork {
-	const char* datFile;
-	tResource** r;
-}tPassWork;
-
-typedef struct tPassCompare {
-	const tTag* tag;
-}tPassCompare;
-
-#endif
-
diff --git a/PR/src/include/getopt.h b/PR/src/include/getopt.h
deleted file mode 100644
index 4ac33b7..0000000
--- a/PR/src/include/getopt.h
+++ /dev/null
@@ -1,129 +0,0 @@
-/* Declarations for getopt.
-   Copyright (C) 1989, 90, 91, 92, 93, 94 Free Software Foundation, Inc.
-
-   This program is free software; you can redistribute it and/or modify it
-   under the terms of the GNU General Public License as published by the
-   Free Software Foundation; either version 2, or (at your option) any
-   later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
-
-#ifndef _GETOPT_H
-#define _GETOPT_H 1
-
-#ifdef	__cplusplus
-extern "C" {
-#endif
-
-/* For communication from `getopt' to the caller.
-   When `getopt' finds an option that takes an argument,
-   the argument value is returned here.
-   Also, when `ordering' is RETURN_IN_ORDER,
-   each non-option ARGV-element is returned here.  */
-
-extern char *optarg;
-
-/* Index in ARGV of the next element to be scanned.
-   This is used for communication to and from the caller
-   and for communication between successive calls to `getopt'.
-
-   On entry to `getopt', zero means this is the first call; initialize.
-
-   When `getopt' returns EOF, this is the index of the first of the
-   non-option elements that the caller should itself scan.
-
-   Otherwise, `optind' communicates from one call to the next
-   how much of ARGV has been scanned so far.  */
-
-extern int optind;
-
-/* Callers store zero here to inhibit the error message `getopt' prints
-   for unrecognized options.  */
-
-extern int opterr;
-
-/* Set to an option character which was unrecognized.  */
-
-extern int optopt;
-
-/* Describe the long-named options requested by the application.
-   The LONG_OPTIONS argument to getopt_long or getopt_long_only is a vector
-   of `struct option' terminated by an element containing a name which is
-   zero.
-
-   The field `has_arg' is:
-   no_argument		(or 0) if the option does not take an argument,
-   required_argument	(or 1) if the option requires an argument,
-   optional_argument 	(or 2) if the option takes an optional argument.
-
-   If the field `flag' is not NULL, it points to a variable that is set
-   to the value given in the field `val' when the option is found, but
-   left unchanged if the option is not found.
-
-   To have a long-named option do something other than set an `int' to
-   a compiled-in constant, such as set a value from `optarg', set the
-   option's `flag' field to zero and its `val' field to a nonzero
-   value (the equivalent single-letter option character, if there is
-   one).  For long options that have a zero `flag' field, `getopt'
-   returns the contents of the `val' field.  */
-
-struct option
-{
-#if defined (__STDC__) && __STDC__
-  const char *name;
-#else
-  char *name;
-#endif
-  /* has_arg can't be an enum because some compilers complain about
-     type mismatches in all the code that assumes it is an int.  */
-  int has_arg;
-  int *flag;
-  int val;
-};
-
-/* Names for the values of the `has_arg' field of `struct option'.  */
-
-#define	no_argument		0
-#define required_argument	1
-#define optional_argument	2
-
-#if defined (__STDC__) && __STDC__
-#ifdef __GNU_LIBRARY__
-/* Many other libraries have conflicting prototypes for getopt, with
-   differences in the consts, in stdlib.h.  To avoid compilation
-   errors, only prototype getopt for the GNU C library.  */
-extern int getopt (int argc, char *const *argv, const char *shortopts);
-#else /* not __GNU_LIBRARY__ */
-extern int getopt ();
-#endif /* __GNU_LIBRARY__ */
-extern int getopt_long (int argc, char *const *argv, const char *shortopts,
-		        const struct option *longopts, int *longind);
-extern int getopt_long_only (int argc, char *const *argv,
-			     const char *shortopts,
-		             const struct option *longopts, int *longind);
-
-/* Internal only.  Users should not call this directly.  */
-extern int _getopt_internal (int argc, char *const *argv,
-			     const char *shortopts,
-		             const struct option *longopts, int *longind,
-			     int long_only);
-#else /* not __STDC__ */
-extern int getopt ();
-extern int getopt_long ();
-extern int getopt_long_only ();
-
-extern int _getopt_internal ();
-#endif /* __STDC__ */
-
-#ifdef	__cplusplus
-}
-#endif
-
-#endif /* _GETOPT_H */
diff --git a/PR/src/include/idlist.h b/PR/src/include/idlist.h
deleted file mode 100644
index ab7b920..0000000
--- a/PR/src/include/idlist.h
+++ /dev/null
@@ -1,146 +0,0 @@
-/*  Princed V3 - Prince of Persia Level Editor for PC Version
-    Copyright (C) 2003 Princed Development Team
-
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program; if not, write to the Free Software
-    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-    The authors of this program may be contacted at http://forum.princed.com.ar
-*/
-
-/*
-resources.h: Princed Resources : Resource Handler headers
-\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf
- Copyright 2003 Princed Development Team
-  Created: 24 Aug 2003
-
-  Author: Enrique Calot <ecalot.cod@princed.com.ar>
-  Version: 1.01 (2003-Oct-23)
-
- Note:
-  DO NOT remove this copyright notice
-*/
-
-#ifndef _RESOURCES_H_
-#define _RESOURCES_H_
-
-/* XML generation defines */
-
-#define RES_XML_UNKNOWN_PATH  "%s/unknown/%s/"
-#define RES_XML_UNKNOWN_FILES "%s%02d.%s"
-#define RES_XML_UNKNOWN_START "<?xml version=\"1.0\" ?>\n<resources version=\"generated\">\n <folder name=\"unknown\" path=\"%s\" file=\"%s\" palette=\"%d\">\n"
-#define RES_XML_UNKNOWN_ITEM  "  <item value=\"%d\" path=\""RES_XML_UNKNOWN_FILES"\" itemtype=\"%s\">Unknown %s %d</item>\n"
-#define RES_XML_UNKNOWN_END   " </folder>\n</resources>\n"
-
-/* File extensions */
-
-#define RES_FILE_EXTENSIONS   {"raw","plv","bmp","wav","mid","bin","pal","pcs"}
-#define RES_FILE_TYPES        {"autodetect","level","image","wave","midi","binary","palette","pcspeaker"}
-
-/* Item Types */
-
-#define RES_TYPE_RAW          0
-#define RES_TYPE_LEVEL        1
-#define RES_TYPE_IMAGE        2
-#define RES_TYPE_WAVE         3
-#define RES_TYPE_MIDI         4
-#define RES_TYPE_BINARY       5
-#define RES_TYPE_PALETTE      6
-#define RES_TYPE_PCSPEAKER    7
-
-#define RES_TYPECOUNT         8
-
-/* types */
-typedef struct {
-	unsigned short int palette;
-	unsigned short int size;
-	unsigned long int offset;
-	unsigned char number; /* Used for level number */
-	char      type;
-	char*     path;
-	unsigned char*     palAux;
-	char*     name;
-	char*     desc;
-}tResource;
-
-/* Id list for partial manipulation */
-typedef enum {eString,eValue}tResIdType;
-
-typedef struct {
-	tResIdType idType;
-	char*      value;
-}tResIdListItem;
-
-typedef struct {
-	int             count;
-	tResIdListItem* list;
-}tResIdList;
-
-void parseGivenPath(char* path);
-int partialListActive();
-int isInThePartialList(const char* file, int value);
-void freePartialList();
-
-/* Includes */
-#include <stdio.h>
-#include "xmlparse.h"
-
-/* Verify  header */
-int verifyHeader(const unsigned char* array, int size);
-
-/*
-	Headers may be:
-	 01 Levels
-	 02 Bitmaps
-	 03 Waves
-	 04 Midis
-	 05 Binary
-	 06 Palette
-	 07 Internal Speaker Sounds
-*/
-
-/***************************************************************\
-|                       File format handling                    |
-\***************************************************************/
-
-/* CheckSum verification */
-int checkSum(unsigned char* data,int size);
-
-/* Empty resource table */
-void emptyTable(tResource* r[]);
-
-/* Resources extras */
-void getFileName(char* vFileext,const char* vDirExt,tResource* r,unsigned short id,const char* vFiledat, const char* vDatFileName,int optionflag,const char* backupExtension);
-void getUpperFolder(char* aux, char* vFiledat);
-
-const char* getExtDesc(int type);
-
-/* parse file and free parsed structure */
-int parseFile(const char* vFile, const char* datFile, tResource* r[]);
-void freeParsedStructure();
-#ifdef DLL
-int parseStructure(const char* vFile);
-tTag* resourceTreeGetChild(tTag* whereAmI);
-tTag* resourceTreeGetNext (tTag* whereAmI);
-tTag* resourceTreeGetRoot ();
-int   resourceTreeGetInfo (tTag* whereAmI, char** tag, char** desc, char** path, char** file, char** itemtype, char** name, char** palette, char** type, char** value, char** version, char** number);
-#endif
-
-/* In case there are unknown resources it closes the unknown XML output */
-void endUnknownXml();
-
-/* Search files for the Import feature */
-int importDir(const char* directory, const char* vResFile, int pOption, const char* backupExtension,const char* vDirectory,FILE* output);
-int isntADatFile(const char* testFile, const char* vResFile);
-
-#endif
diff --git a/PR/src/include/image.h b/PR/src/include/image.h
deleted file mode 100644
index 5581951..0000000
--- a/PR/src/include/image.h
+++ /dev/null
@@ -1,94 +0,0 @@
-/*  Princed V3 - Prince of Persia Level Editor for PC Version
-    Copyright (C) 2003 Princed Development Team
-
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program; if not, write to the Free Software
-    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-    The authors of this program may be contacted at http://forum.princed.com.ar
-*/
-
-/*
-compress.c: Princed Resources : Image Compressor headers
-\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf
- Copyright 2003 Princed Development Team
-  Created: 24 Aug 2003
-
-  Author: Enrique Calot <ecalot.cod@princed.com.ar>
-  Version: 1.01 (2003-Oct-23)
-
- Note:
-  DO NOT remove this copyright notice
-*/
-
-#ifndef _COMPRESS_H_
-#define _COMPRESS_H_
-
-#define SIZE_OF_PALETTE 3*16
-
-#define COMPRESS_RAW    0x00
-#define COMPRESS_RLE_LR 0x01
-#define COMPRESS_RLE_UD 0x02
-#define COMPRESS_LZG_LR 0x03
-#define COMPRESS_LZG_UD 0x04
-
-#define COMPRESS_WORKING_ALGORITHMS 3
-
-#define COMPRESS_RESULT_FATAL   -2
-#define COMPRESS_RESULT_WARNING -1
-#define COMPRESS_RESULT_SUCCESS 0
-
-/* reserved memory for the Lzx algorithm */
-#define MAX_MOD_SIZE_IN_LZG    32001                /* 38401 */
-/* modulus to be used in the 10 bits of the algorithm */
-#define MAX_MXD_SIZE_IN_LZG    0x400
-
-typedef struct {
-	int width;
-	int widthInBytes;
-	int height;
-	unsigned char* pix;
-	unsigned char pal[SIZE_OF_PALETTE];
-	unsigned char type; /* XY where X=B if 4 bits or X=0 if 1 bit; Y=algorithm */
-}tImage;
-
-/* Prototypes */
-
-int mCompressGraphic(unsigned char* a,tImage* i, int* size);
-int mExpandGraphic(const unsigned char* array,tImage *image, int size);
-
-#define getCarry(a) ((a)>>6)
-#define getAlgor(a) a&0x4F
-
-/*
-	Class future definitions
-
-public:
- char cPrincedGraph::mOpenGraphDat     (char* fileName);
- char cPrincedGraph::mSaveGraphDat     (char* fileName);
- char cPrincedGraph::mGetGraphFull     (int id, CBitmap &bitmap, CBitmap &mask);
- char cPrincedGraph::mGetGraphMap      (int id, CBitmap &bitmap);
- char cPrincedGraph::mGetGraphMask     (int id, CBitmap &bmask);
- char cPrincedGraph::mSetGraph         (int id, CBitmap &bitmap);
- int  cPrincedGraph::mGetGraphCount    ();
- char cPrincedGraph::mSaveImportBmp    (int id, char* fileName);
- char cPrincedGraph::mSaveExportBmp    (int id, char* fileName);
-
-private:
- unsigned char* file;
- int            fileSize;
- tImage*        imageArray[256];
- int            imageArrayLength;
-
-*/
-#endif
diff --git a/PR/src/include/import.h b/PR/src/include/import.h
deleted file mode 100644
index bb80ef0..0000000
--- a/PR/src/include/import.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/*  Princed V3 - Prince of Persia Level Editor for PC Version
-    Copyright (C) 2003 Princed Development Team
-
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program; if not, write to the Free Software
-    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-    The authors of this program may be contacted at http://forum.princed.com.ar
-*/
-
-/*
-compile.h: Princed Resources : DAT Compiler headers
-\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf
- Copyright 2003 Princed Development Team
-  Created: 24 Aug 2003
-
-  Author: Enrique Calot <ecalot.cod@princed.com.ar>
-  Version: 1.01 (2003-Oct-23)
-
- Note:
-  DO NOT remove this copyright notice
-*/
-
-#ifndef _COMPILE_H_
-#define _COMPILE_H_
-
-#include <stdio.h>
-#include "resources.h"
-
-int compile(const char* vFiledat, const char* vDirExt, tResource* r[], int opt, const char* vDatFileName,const char* backupExtension);
-
-#endif
diff --git a/PR/src/include/memory.h b/PR/src/include/memory.h
deleted file mode 100644
index 3e2bfe7..0000000
--- a/PR/src/include/memory.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/*  Princed V3 - Prince of Persia Level Editor for PC Version
-    Copyright (C) 2003 Princed Development Team
-
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program; if not, write to the Free Software
-    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-    The authors of this program may be contacted at http://forum.princed.com.ar
-*/
-
-/*
-memory.h: Princed Resources : Memory handling headers
-\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf
- Copyright 2003 Princed Development Team
-  Created: 20 Dec 2003
-
-  Author: Enrique Calot <ecalot.cod@princed.com.ar>
-  Version: 1.01 (2004-Feb-13)
-
- Note:
-  DO NOT remove this copyright notice
-*/
-
-#ifndef _MEMORY_H_
-#define _MEMORY_H_
-
-#include <stdlib.h>
-
-#define getMemory(size) ((unsigned char*)malloc(size))
-char* strallocandcopy(const char* text);
-#define freeAllocation(m) if ((m)!=NULL) free(m)
-
-#endif
-
diff --git a/PR/src/include/mid.h b/PR/src/include/mid.h
deleted file mode 100644
index 3bd8753..0000000
--- a/PR/src/include/mid.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/*  Princed V3 - Prince of Persia Level Editor for PC Version
-    Copyright (C) 2003 Princed Development Team
-
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program; if not, write to the Free Software
-    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-    The authors of this program may be contacted at http://forum.princed.com.ar
-*/
-
-/*
-mid.h: Princed Resources : MIDI files support headers
-\xaf\xaf\xaf\xaf\xaf
- Copyright 2003 Princed Development Team
-  Created: 24 Aug 2003
-
-  Author: Enrique Calot <ecalot.cod@princed.com.ar>
-  Version: 1.01 (2003-Oct-23)
-
- Note:
-  DO NOT remove this copyright notice
-*/
-
-#ifndef _MID_H_
-#define _MID_H_
-
-#include <stdio.h>
-#include "resources.h"
-
-int mFormatImportMid(unsigned char* data, tResource *res);
-int mFormatExportMid(const unsigned char* data, char *vFileext,unsigned long int size,int optionflag,const char* backupExtension);
-
-#endif
diff --git a/PR/src/include/pal.h b/PR/src/include/pal.h
deleted file mode 100644
index 3662f3c..0000000
--- a/PR/src/include/pal.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/*  Princed V3 - Prince of Persia Level Editor for PC Version
-    Copyright (C) 2003 Princed Development Team
-
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program; if not, write to the Free Software
-    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-    The authors of this program may be contacted at http://forum.princed.com.ar
-*/
-
-/*
-pal.h: Princed Resources : JASC PAL files support headers
-\xaf\xaf\xaf\xaf\xaf
- Copyright 2003 Princed Development Team
-  Created: 24 Aug 2003
-
-  Author: Enrique Calot <ecalot.cod@princed.com.ar>
-  Version: 1.01 (2003-Oct-23)
-
- Note:
-  DO NOT remove this copyright notice
-*/
-
-#ifndef _PAL_H_
-#define _PAL_H_
-
-#include "compress.h"
-#include "resources.h"
-#include <stdio.h>
-
-#define PAL_HEADER "JASC-PAL\r\n0100\r\n16\r\n"
-#define PAL_SAMPLE {0x97, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x03, 0x08, 0x0F, 0x07, 0x0C, 0x13, 0x0C, 0x11, 0x16, 0x11, 0x17, 0x1C, 0x1E, 0x21, 0x25, 0x2F, 0x31, 0x33, 0x3F, 0x3F, 0x3F, 0x2A, 0x2A, 0x2A, 0x15, 0x15, 0x15, 0x17, 0x1C, 0x20, 0x07, 0x0C, 0x13, 0x0C, 0x12, 0x17, 0x15, 0x1A, 0x1F, 0x00, 0x1D, 0x13, 0x00, 0x29, 0x27, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
-
-int mFormatExportPal(const unsigned char* data, char *vFileext,unsigned long int size,int optionflag,const char* backupExtensio);
-int mFormatImportPal(unsigned char* data, tResource *res,const char* vFile);
-
-#define mLoadPalette(array,image)	memcpy(((image).pal),((array)+5),(16*3))
-
-#endif
diff --git a/PR/src/include/parse.h b/PR/src/include/parse.h
deleted file mode 100644
index 9035800..0000000
--- a/PR/src/include/parse.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/*  Princed V3 - Prince of Persia Level Editor for PC Version
-    Copyright (C) 2003 Princed Development Team
-
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program; if not, write to the Free Software
-    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-    The authors of this program may be contacted at http://forum.princed.com.ar
-*/
-
-/*
-xmlparse.h: Princed Resources : xml handling functions headers
-\xaf\xaf\xaf\xaf\xaf
- Copyright 2003 Princed Development Team
-  Created: 23 Oct 2003
-
-  Author: Enrique Calot <ecalot.cod@princed.com.ar>
-  Version: 1.01 (2003-Oct-25)
-
- Note:
-  DO NOT remove this copyright notice
-*/
-
-#ifndef _XMLPARSE_H_
-#define _XMLPARSE_H_
-
-int equalsIgnoreCase(const char s1[],const char s2[]);
-
-typedef struct tTag {
-	struct tTag* child;
-	struct tTag* next;
-	char* tag;
-	char* desc;
-	char* path;
-	char* file;
-	char* itemtype;
-	char* name;
-	char* palette;
-	char* type;
-	char* value;
-	char* version;
-	char* number;
-}tTag;
-
-/* Constants */
-#define MAX_VALUE_SIZE 3000
-
-/* Prototypes */
-void  freeTagStructure (tTag* structure);
-tTag* parseXmlFile     (const char* vFile,int* error);
-
-#endif
diff --git a/PR/src/include/plv.h b/PR/src/include/plv.h
deleted file mode 100644
index 164f71d..0000000
--- a/PR/src/include/plv.h
+++ /dev/null
@@ -1,89 +0,0 @@
-/*  Princed V3 - Prince of Persia Level Editor for PC Version
-    Copyright (C) 2003 Princed Development Team
-
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program; if not, write to the Free Software
-    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-    The authors of this program may be contacted at http://forum.princed.com.ar
-*/
-
-/*
-plv.h: Princed Resources : PLV prince level files support headers
-\xaf\xaf\xaf\xaf\xaf
- Copyright 2003 Princed Development Team
-  Created: 29 Nov 2003
-
-  Author: Enrique Calot <ecalot.cod@princed.com.ar>
-  Version: 1.00 (2003-Nov-29)
-
- PLV file format:
-  Defined: 28 Nov 2003
-
-  Authors:
-   Brendon James <roomshaker@princed.com.ar>
-   Enrique Calot <ecalot.cod@princed.com.ar>
-  Version: 1.00 (2003-Nov-28)
-
-
- Note:
-  DO NOT remove this copyright notice
-*/
-
-#ifndef _PLV_H_
-#define _PLV_H_
-
-/*
-	PLV 1 SPECS:
-	bytes offset description                     content
-	    7      0 HAS FILE TAG OF 8 LETTERS       "POP_LVL"
-	    1      7 POP VERS                        0x01
-	    1      8 PLV VERS                        0x01
-	    1      9 LEV NUM
-	    4     10 FIELD-PAIR ( NAME / CONTENT ) COUNT
-	    4     14 BLOCK 1: LEVEL SIZE (B1)        2306 (including the checksum)
-	   B1     18 BLOCK 1: LEVEL CODE
-	    4  18+B1 BLOCK 2: USER DATA SIZE VALUE IN BYTES (B2)
-	   B2  22+B1 BLOCK 2: LEVEL CODE NEXT, REST OF FILE
-
-	Total size of file B1+B2+22.
-	All values are unsigned and in the intel x86 architecture
-*/
-
-#include <stdio.h>
-#include "resources.h"
-#include "pr.h" /* for PR_VERSION */
-
-int mFormatImportPlv(unsigned char* data, tResource *res);
-int mFormatExportPlv(const unsigned char* data, const char *vFileext,unsigned long int size,unsigned char level, const char* filename, const char* desc, const char* title, const char* vDatAuthor,int optionflag, const char* backupExtension);
-
-/* Weekdays and months */
-#define DATE_WEEKDAYS "Sun\0Mon\0Tue\0Wed\0Thu\0Fri\0Sat"
-#define DATE_MONTHS   "Jan\0Feb\0Mar\0Apr\0May\0Jun\0Jul\0Aug\0Sep\0Oct\0Nov\0Dec"
-
-/* Format stuff */
-#define PLV_HEADER_A           "POP_LVL\x01\x01"
-#define PLV_HEADER_A_SIZE      9
-#define PLV_HEADER_B           "\08x\0\0"
-#define PLV_HEADER_B_SIZE      4
-#define PLV_FOOT_EDITOR        "EDITORNAME\0PR\0EDITORVERS\0"PR_VERSION"\0AUTHOR"
-#define PLV_FOOT_TITLE         "TITLE"
-#define PLV_FOOT_DESC          "DESCRIPTION"
-#define PLV_FOOT_TCREAT        "TIMECREATED"
-#define PLV_FOOT_TMODIF        "TIMELASTMODIF"
-#define PLV_FOOT_ORIG_FILE     "ORIGINALFILENAME"
-#define PLV_HEADER_SIZE_OFFSET PLV_HEADER_A_SIZE+PLV_HEADER_B_SIZE
-
-#define PLV_DEFAULT_AUTHOR     "PR user"
-
-#endif
diff --git a/PR/src/include/png.h b/PR/src/include/png.h
deleted file mode 100644
index f896737..0000000
--- a/PR/src/include/png.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/*  Princed V3 - Prince of Persia Level Editor for PC Version
-    Copyright (C) 2003 Princed Development Team
-
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program; if not, write to the Free Software
-    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-    The authors of this program may be contacted at http://forum.princed.com.ar
-*/
-
-/*
-bmp.h: Princed Resources : BMP file support headers
-\xaf\xaf\xaf\xaf\xaf
- Copyright 2003 Princed Development Team
-  Created: 24 Aug 2003
-
-  Author: Enrique Calot <ecalot.cod@princed.com.ar>
-  Version: 1.01 (2003-Oct-23)
-  Version: 1.10 (2004-Feb-17)
-
- Note:
-  DO NOT remove this copyright notice
-*/
-
-#ifndef _BMP_H_
-#define _BMP_H_
-
-#include "resources.h"
-#include "compress.h"
-
-#define FORMATS_BMP_PALETTE_BW "\x00\x00\x00\0\xFF\xFF\xFF"
-
-int mFormatExportBmp(const unsigned char* data, const char *vFileext,unsigned long int size,tImage image,int optionflag,const char* backupExtension);
-int mFormatImportBmp(unsigned char* data, tResource *res);
-int mWriteBitMap(tImage img,const char* vFile,int optionflag,const char* backupExtension);
-int mReadBitMap(tImage* img,unsigned char* data, int size); /* Note: this will ignore the palette */
-
-#endif
diff --git a/PR/src/include/pr.h b/PR/src/include/pr.h
deleted file mode 100644
index 8221f0c..0000000
--- a/PR/src/include/pr.h
+++ /dev/null
@@ -1,199 +0,0 @@
-/*  Princed V3 - Prince of Persia Level Editor for PC Version
-    Copyright (C) 2003 Princed Development Team
-
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program; if not, write to the Free Software
-    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-    The authors of this program may be contacted at http://forum.princed.com.ar
-*/
-
-/*
-pr.h: Princed Resources : Main header prototypes and definitions
-\xaf\xaf\xaf\xaf
- Copyright 2003 Princed Development Team
-  Created: 24 Aug 2003
-
-  Author: Enrique Calot <ecalot.cod@princed.com.ar>
-  Version: 1.00 (2003-Aug-24)
-
-  Modified by: Enrique Calot <ecalot.cod@princed.com.ar>
-  Version: 1.10 (2003-Dec-03)
-
-  Language: Abstract
-
- Note:
-  DO NOT remove this copyright notice
-*/
-
-#ifndef _PR_H_
-#define _PR_H_
-
-/***************************************************************\
-|                Princed Resource Library Functions             |
-\***************************************************************/
-
-#include <stdio.h>
-
-/* User configuration defines */
-#ifndef WIN32
- #define UNIX
-#endif
-
-/* do not #define DLL, use -DDLL as a precompiler option instead */
-#ifdef DLL
-void prSetOutput(FILE* output);
- #ifdef UNIX
-  #define SO
- #endif
-#endif
-
-#ifndef OS
- #ifndef UNIX
-  #define OS "Win32"
- #else
-  #define OS ""
- #endif
-#endif
-
-/* Debug options */
-/* #define DEB_FLAG */
-/* #define MEM_CHECK */
-
-#ifdef MEM_CHECK
-
-#ifdef malloc
-#undef malloc
-#endif
-
-#include "memory.h"
- #define malloc(a) mymalloc(a,__FILE__,__LINE__)
- #define free(a) myfree(a,__FILE__,__LINE__)
-
-#endif
-
-#ifdef DEB_FLAG
- #define fld(a) printf(a "\n")
-#else
- #define fld(a)
-#endif
-
-/***************************************************************\
-|             M A I N   P R O G R A M   D E F I N E S           |
-\***************************************************************/
-
-/***************************************************************\
-|                     PR Specific Defines                       |
-\***************************************************************/
-
-#define PR_URL                    "http://www.princed.com.ar"
-#define PR_VERSION                "v1.0b-dev2"
-#define PR_COPY                   "(c) Copyright 2003, 2004 - Princed Development Team"
-/***************************************************************\
-|                         Other defines                         |
-\***************************************************************/
-
-/* Default Files */
-#define RES_XML_UNKNOWN_XML      "unknown.xml"
-#define RES_XML_RESOURC_XML      "resources.xml"
-
-#define DEFAULT_BACKUP_EXTENSION "bak"
-
-/* Define max & min's */
-#define MAX_RES_COUNT            25000
-#define MAX_FILENAME_SIZE        260
-
-/* Path defines */
-#ifdef UNIX
- #define DIR_SEPARATOR           '/'
-#else
- #define DIR_SEPARATOR           '\\'
-#endif
-
-/***************************************************************\
-|                        L A N G U A G E                        |
-\***************************************************************/
-
-#include "english.h"
-
-/***************************************************************\
-|                           Prototypes                          |
-\***************************************************************/
-
-/* Main functions */
-int prExportDat(const char* vDatFile, const char* vDirName, const char* vResFile);
-int prImportDat(const char* vDatFile, const char* vDirName, const char* vResFile);
-int prVerifyDatType(const char* vFiledat);
-
-/* Extra featured functions */
-int prExportDatOpt(const char* vDatFile, const char* vDirName, const char* vResFile,int opt,const char * vDatFileName,const char* datAuthor, const char* backupExtension);
-int prImportDatOpt(const char* vDatFile, const char* vDirName, const char* vResFile,int opt,const char* vDatFileName, const char* backupExtension);
-
-/* Recursive function */
-int prMain(int option, const char* extension,const char* dirName,const char* resFile,const char* datfile, const char* datfilename,const char* datAuthor,FILE* output);
-
-/***************************************************************\
-|                   Command Line specific options               |
-\***************************************************************/
-
-#ifndef PR_IGNORE_RAW_OPTION
-#define PARSING_OPTRAW ,{"raw",         no_argument,       0,'r'},
-#define PARSING_CHRRAW "r"
-#else
-#define PARSING_OPTRAW ,
-#define PARSING_CHRRAW ""
-#endif
-#define PARSING_OPTIONS {\
-{"import",      optional_argument, 0,'c'},\
-{"classify",    no_argument,       0,'d'},\
-{"export",      optional_argument, 0,'x'},\
-\
-{"setauthor",   required_argument, 0,'a'},\
-{"backup",      optional_argument, 0,'b'},\
-{"force",       no_argument,       0,'f'},\
-{"cgi",         no_argument,       0,'g'},\
-{"help",        no_argument,       0,'?'},\
-{"resource",    required_argument, 0,'s'}\
-PARSING_OPTRAW\
-{"recursive",   no_argument,       0,'R'},\
-{"datfile",     required_argument, 0,'t'},\
-{"unknown",     no_argument,       0,2},\
-{"verbose",     no_argument,       0,'v'},\
-{"version",     no_argument,       0,1},\
-{0, 0, 0, 0}\
-}
-
-#define PARSING_CHARS    "i::c::dx::e::b::a::fgs::t::Rvh?"PARSING_CHRRAW
-
-/* Flags */
-#define import_flag      0x0001
-#define classify_flag    0x0002
-#define export_flag      0x0004
-#define backup_flag      0x0008
-#define force_flag       0x0010
-#define cgi_flag         0x0020
-#define help_flag        0x0040
-#define raw_flag         0x0080
-#define recursive_flag   0x0100
-#define verbose_flag     0x0200
-#define version_flag     0x0400
-#define unknown_flag     0x0800
-#define undef1_flag      0x1000
-#define undef2_flag      0x2000
-#define undef3_flag      0x4000
-#define undef4_flag      0x8000
-
-#define hasFlag(a) (optionflag&(a))
-#define setFlag(a) optionflag|=(a)
-
-#endif
diff --git a/PR/src/include/search.h b/PR/src/include/search.h
deleted file mode 100644
index e537976..0000000
--- a/PR/src/include/search.h
+++ /dev/null
@@ -1,80 +0,0 @@
-/*  Princed V3 - Prince of Persia Level Editor for PC Version
-    Copyright (C) 2003 Princed Development Team
-
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program; if not, write to the Free Software
-    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-    The authors of this program may be contacted at http:/forum.princed.com.ar
-*/
-
-/*
-xmlparse.h: Princed Resources : xml handling functions header file
-\xaf\xaf\xaf\xaf\xaf
- Copyright 2003 Princed Development Team
-  Created: 23 Oct 2003
-
-  Author: Enrique Calot <ecalot.cod@princed.com.ar>
-  Version: 1.01 (2003-Oct-25)
-
- Note:
-  DO NOT remove this copyright notice
-*/
-
-/***************************************************************\
-|                  I M P L E M E N T A T I O N                  |
-\***************************************************************/
-
-#ifndef _XMLSEARCH_H_
-#define _XMLSEARCH_H_
-
-/* Includes */
-#include "xmlparse.h"
-#include "resources.h"
-
-/****************************************************************\
-|                   Tag Tree Searching Functions                 |
-\****************************************************************/
-
-const tTag* searchTree(const tTag* t,const char* datFile, const char* id);
-void workTag(const tTag* t,void* pass);
-
-/* Abstract function that runs all the tree and executes "function(tag,pass)" for each tag */
-void workTree(const tTag* t,void* pass, void (*function)(const tTag*,void*));
-
-void compareXmlFile(tTag* modified,tTag* original);
-
-/* Searching Structures */
-
-/* File List Structure */
-typedef struct tListNode {
- char* file;
- struct tListNode* next;
-}tListNode;
-
-/* File List Functions */
-void addFileToList(const tTag* t,void* junk);
-char* getFileFromList();
-
-/* Abstract passing structures */
-typedef struct tPassWork {
-	const char* datFile;
-	tResource** r;
-}tPassWork;
-
-typedef struct tPassCompare {
-	const tTag* tag;
-}tPassCompare;
-
-#endif
-
diff --git a/PR/src/include/spanish.h b/PR/src/include/spanish.h
deleted file mode 100644
index 9b3ccb3..0000000
--- a/PR/src/include/spanish.h
+++ /dev/null
@@ -1,167 +0,0 @@
-/*  Princed V3 - Prince of Persia Level Editor for PC Version
-    Copyright (C) 2003 Princed Development Team
-
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program; if not, write to the Free Software
-    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-    The authors of this program may be contacted at http://forum.princed.com.ar
-*/
-
-/*
-pr.h: Princed Resources : Spanish language strings
-\xaf\xaf\xaf\xaf
- Copyright 2003 Princed Development Team
-  Created: 18 Feb 2004
-
-  Author: Enrique Calot <ecalot.cod@princed.com.ar>
-  Version: 1.00 (2004-Feb-18)
-
-  Language: Spanish
-
- Note:
-  DO NOT remove this copyright notice
-*/
-
-/***************************************************************\
-|                           Text Defines                        |
-\***************************************************************/
-
-#define PR_ABOUT                  "Princed resources (PR) "PR_VERSION" "OS"\n(c) Copyright 2003 - Princed Development Team\n"PR_URL"\n\n"
-
-#define PR_CGI_TEXT1              "Content-Type:text/html\n\nCorriendo como cgi\n"
-#define PR_CGI_TEXT2              "Result: %02d type\n"
-
-#define PR_TEXT_RESULT            "Resultado: %s (%d)\n"
-#define PR_TEXT_RESULT_ERR        "Resultado: %d archivos con errores\n"
-
-#define PR_TEXT_FILE_NOT_FOUND    "Resultado: Archivo o directorio '%s' no encontrado\n"
-
-#define PR_TEXT_SCANNING_CURRENT  "Buscando archivos dat en el directorio actual\n"
-#define PR_TEXT_SCANNING_GIVEN    "Buscando archivos dat en el directorio dado\n"
-
-#define PR_TEXT_IMPORTING_CURRENT "Importando todos los archivos dat validos del directorio actual\n"
-#define PR_TEXT_IMPORTING_GIVEN   "Importando todos los archivos dat validos del directorio dado\n"
-
-#define PR_TEXT_TASK_COMPILE      "Compilando '%s' desde '%s'\n"
-#define PR_TEXT_TASK_CLASSIFY     "Clasificando '%s'\n"
-#define PR_TEXT_TASK_EXTRACT      "Extrayendo '%s' a '%s'\n"
-
-#define PR_TEXT_DISK_PROCESSING   "Procesando '%s'...\n"
-#define PR_TEXT_DISK_REPLACE      "El archivo %s ya existia. Reemplazar? [Si/no/todos]:"
-#define PR_DISK_REPLACE_NO        'N'
-#define PR_DISK_REPLACE_ALL       'T'
-
-#define PR_TEXT_IMPORT_NOT_OPEN   "'%s' no abierto, ignorado\n"
-#define PR_TEXT_IMPORT_SUCCESS    "'%s' importado exitosamente\n"
-#define PR_TEXT_IMPORT_ERRORS     "'%s' tiene errores, ignorado\n"
-#define PR_TEXT_IMPORT_DONE       "Compilacion terminada, %d archivos correctos, %d archivos con errores\n"
-
-#define PR_TEXT_EXPORT_WORKING    "'%s' exportado exitosamente\n"
-#define PR_TEXT_EXPORT_ERROR      "'%s' tiene errores, abortando...\n"
-#define PR_TEXT_EXPORT_BMP_WARN   "Advertencia: El archivo exportado puede estar corrompido\n"
-
-
-/***************************************************************\
-|                        Text Output Arrays                     |
-\***************************************************************/
-
-#define PR_TEXT_EXPORT_ARRAY {\
-"Correcto",\
-"Error al acceder un archivo",\
-"Error de memoria en la extraccion",\
-"Archivo DAT invalido",\
-"Error de codificacion en el XML",\
-"Error de memoria en la lectura del XML",\
-"Atributo XML no reconocido",\
-"Archivo XML no encontrado"}
-
-#define PR_TEXT_CLASSIFY_ARRAY {\
-"Error de memoria",\
-"Archivo no encontrado no acceso denegado",\
-"No es un archivo DAT del POP1 valido",\
-"Archivo de niveles",\
-"Archivo de graficos con una imagen en la primera entrada (poco comun)",\
-"Archivo de sonido digital",\
-"Archivo de sonido midi",\
-"Archivo DAT valido con contenido indefinido",\
-"Archivo de graficos con una paleta en la primera entrada (comun)",\
-"Archivo de sonido del parlante de la PC",\
-"","","",\
-"Archivo del POP2"}
-
-#define PR_TEXT_IMPORT_ARRAY {\
-"Archivo compilado exitosamente",\
-"El archivo DAT no pudo ser abierto para su escritura",\
-"Error de codificacion XML",\
-"Sin memoria",\
-"Atributo XML no reconocido",\
-"Archivo XML no encontrado"}
-
-/***************************************************************\
-|                 Command Line options information              |
-\***************************************************************/
-
-#ifndef PR_IGNORE_RAW_OPTION
-#define PARSING_RAW "   -r, --raw                  utiliza el formato crudo\n"
-#else
-#define PARSING_RAW ""
-#endif
-#define PARSING_HELP "Utilizacion: \n\
-  pr [-x[EXTRACTDIR]|-c[COMPILEDIR]|-d] [DATFILEPATH]\n\
-  pr [OPTIONS] [DATFILEPATH]\n\
-\n\
-  Los argumentos obligatorios para las opciones largas lo son tambien\n\
-  para las opciones cortas.\n\
-\n\
-   -i, -c, --import[=DIRNAME] importa desde DIRNAME al directorio dado\n\
-   -d, --classify             retorna el tipo del archivo dat\n\
-   -x, -e, --export[=DIRNAME] extrae el archivo dat en DIRNAME\n\
-\n\
-   -a, --setauthor=NAME       setea un nombre de autor en los archivos plv\n\
-                              extraidos\n\
-   -b, --backup[=EXTENSION]   realiza copias de seguridad\n\
-   -f, --force                reescribe los archivos sin preguntar\n\
-   -g, --cgi                  corre en modo CGI e imprime encabezados mime\n\
-   -h, -?, --help             muestra este texto y sale\n\
-   -s, --resource=RESFILE     utiliza el archivo xml de recursos especificado\n\
-"PARSING_RAW"\
-   -R, --recursive            busca todos los archivos dat en subdirectorios\n\
-                              (solo si DATFILEPATH no es un archivo dat)\n\
-   -t, --datfile=DATFILE      especifica un archivo para leer recursos\n\
-                              distintos al archivo original\n\
-       --unknown              genera el archivo de items desconocidos sin\n\
-                              realizar extraccion alguna\n\
-   -v, --verbose              explica lo que se esta haciendo\n\
-       --version              impreme informacion de la version y sale\n\
-\n"
-
-#define PARSING_ABOUT "Autores: \n\
-   Codinficacion & rutinas principales\n\
-    Enrique Calot\n\
-    Santiago Zamora\n\
-\n\
-   Algoritmos de compresion de graficos\n\
-    Tammo Jan Dijkema\n\
-    Enrique Calot\n\
-\n\
-   Investigacion del formato grafico\n\
-    Tammo Jan Dijkema\n\
-    Anke Balderer\n\
-\n\
-   Investigacion del formato de sonido MID\n\
-    Christian Lundheim\n\
-\n\
-   Edicion de resources.xml\n\
-    Steven Fayers\n\
-\n"
diff --git a/PR/src/include/tree.h b/PR/src/include/tree.h
deleted file mode 100644
index ab7b920..0000000
--- a/PR/src/include/tree.h
+++ /dev/null
@@ -1,146 +0,0 @@
-/*  Princed V3 - Prince of Persia Level Editor for PC Version
-    Copyright (C) 2003 Princed Development Team
-
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program; if not, write to the Free Software
-    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-    The authors of this program may be contacted at http://forum.princed.com.ar
-*/
-
-/*
-resources.h: Princed Resources : Resource Handler headers
-\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf
- Copyright 2003 Princed Development Team
-  Created: 24 Aug 2003
-
-  Author: Enrique Calot <ecalot.cod@princed.com.ar>
-  Version: 1.01 (2003-Oct-23)
-
- Note:
-  DO NOT remove this copyright notice
-*/
-
-#ifndef _RESOURCES_H_
-#define _RESOURCES_H_
-
-/* XML generation defines */
-
-#define RES_XML_UNKNOWN_PATH  "%s/unknown/%s/"
-#define RES_XML_UNKNOWN_FILES "%s%02d.%s"
-#define RES_XML_UNKNOWN_START "<?xml version=\"1.0\" ?>\n<resources version=\"generated\">\n <folder name=\"unknown\" path=\"%s\" file=\"%s\" palette=\"%d\">\n"
-#define RES_XML_UNKNOWN_ITEM  "  <item value=\"%d\" path=\""RES_XML_UNKNOWN_FILES"\" itemtype=\"%s\">Unknown %s %d</item>\n"
-#define RES_XML_UNKNOWN_END   " </folder>\n</resources>\n"
-
-/* File extensions */
-
-#define RES_FILE_EXTENSIONS   {"raw","plv","bmp","wav","mid","bin","pal","pcs"}
-#define RES_FILE_TYPES        {"autodetect","level","image","wave","midi","binary","palette","pcspeaker"}
-
-/* Item Types */
-
-#define RES_TYPE_RAW          0
-#define RES_TYPE_LEVEL        1
-#define RES_TYPE_IMAGE        2
-#define RES_TYPE_WAVE         3
-#define RES_TYPE_MIDI         4
-#define RES_TYPE_BINARY       5
-#define RES_TYPE_PALETTE      6
-#define RES_TYPE_PCSPEAKER    7
-
-#define RES_TYPECOUNT         8
-
-/* types */
-typedef struct {
-	unsigned short int palette;
-	unsigned short int size;
-	unsigned long int offset;
-	unsigned char number; /* Used for level number */
-	char      type;
-	char*     path;
-	unsigned char*     palAux;
-	char*     name;
-	char*     desc;
-}tResource;
-
-/* Id list for partial manipulation */
-typedef enum {eString,eValue}tResIdType;
-
-typedef struct {
-	tResIdType idType;
-	char*      value;
-}tResIdListItem;
-
-typedef struct {
-	int             count;
-	tResIdListItem* list;
-}tResIdList;
-
-void parseGivenPath(char* path);
-int partialListActive();
-int isInThePartialList(const char* file, int value);
-void freePartialList();
-
-/* Includes */
-#include <stdio.h>
-#include "xmlparse.h"
-
-/* Verify  header */
-int verifyHeader(const unsigned char* array, int size);
-
-/*
-	Headers may be:
-	 01 Levels
-	 02 Bitmaps
-	 03 Waves
-	 04 Midis
-	 05 Binary
-	 06 Palette
-	 07 Internal Speaker Sounds
-*/
-
-/***************************************************************\
-|                       File format handling                    |
-\***************************************************************/
-
-/* CheckSum verification */
-int checkSum(unsigned char* data,int size);
-
-/* Empty resource table */
-void emptyTable(tResource* r[]);
-
-/* Resources extras */
-void getFileName(char* vFileext,const char* vDirExt,tResource* r,unsigned short id,const char* vFiledat, const char* vDatFileName,int optionflag,const char* backupExtension);
-void getUpperFolder(char* aux, char* vFiledat);
-
-const char* getExtDesc(int type);
-
-/* parse file and free parsed structure */
-int parseFile(const char* vFile, const char* datFile, tResource* r[]);
-void freeParsedStructure();
-#ifdef DLL
-int parseStructure(const char* vFile);
-tTag* resourceTreeGetChild(tTag* whereAmI);
-tTag* resourceTreeGetNext (tTag* whereAmI);
-tTag* resourceTreeGetRoot ();
-int   resourceTreeGetInfo (tTag* whereAmI, char** tag, char** desc, char** path, char** file, char** itemtype, char** name, char** palette, char** type, char** value, char** version, char** number);
-#endif
-
-/* In case there are unknown resources it closes the unknown XML output */
-void endUnknownXml();
-
-/* Search files for the Import feature */
-int importDir(const char* directory, const char* vResFile, int pOption, const char* backupExtension,const char* vDirectory,FILE* output);
-int isntADatFile(const char* testFile, const char* vResFile);
-
-#endif
diff --git a/PR/src/include/unknown.h b/PR/src/include/unknown.h
deleted file mode 100644
index ab7b920..0000000
--- a/PR/src/include/unknown.h
+++ /dev/null
@@ -1,146 +0,0 @@
-/*  Princed V3 - Prince of Persia Level Editor for PC Version
-    Copyright (C) 2003 Princed Development Team
-
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program; if not, write to the Free Software
-    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-    The authors of this program may be contacted at http://forum.princed.com.ar
-*/
-
-/*
-resources.h: Princed Resources : Resource Handler headers
-\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf
- Copyright 2003 Princed Development Team
-  Created: 24 Aug 2003
-
-  Author: Enrique Calot <ecalot.cod@princed.com.ar>
-  Version: 1.01 (2003-Oct-23)
-
- Note:
-  DO NOT remove this copyright notice
-*/
-
-#ifndef _RESOURCES_H_
-#define _RESOURCES_H_
-
-/* XML generation defines */
-
-#define RES_XML_UNKNOWN_PATH  "%s/unknown/%s/"
-#define RES_XML_UNKNOWN_FILES "%s%02d.%s"
-#define RES_XML_UNKNOWN_START "<?xml version=\"1.0\" ?>\n<resources version=\"generated\">\n <folder name=\"unknown\" path=\"%s\" file=\"%s\" palette=\"%d\">\n"
-#define RES_XML_UNKNOWN_ITEM  "  <item value=\"%d\" path=\""RES_XML_UNKNOWN_FILES"\" itemtype=\"%s\">Unknown %s %d</item>\n"
-#define RES_XML_UNKNOWN_END   " </folder>\n</resources>\n"
-
-/* File extensions */
-
-#define RES_FILE_EXTENSIONS   {"raw","plv","bmp","wav","mid","bin","pal","pcs"}
-#define RES_FILE_TYPES        {"autodetect","level","image","wave","midi","binary","palette","pcspeaker"}
-
-/* Item Types */
-
-#define RES_TYPE_RAW          0
-#define RES_TYPE_LEVEL        1
-#define RES_TYPE_IMAGE        2
-#define RES_TYPE_WAVE         3
-#define RES_TYPE_MIDI         4
-#define RES_TYPE_BINARY       5
-#define RES_TYPE_PALETTE      6
-#define RES_TYPE_PCSPEAKER    7
-
-#define RES_TYPECOUNT         8
-
-/* types */
-typedef struct {
-	unsigned short int palette;
-	unsigned short int size;
-	unsigned long int offset;
-	unsigned char number; /* Used for level number */
-	char      type;
-	char*     path;
-	unsigned char*     palAux;
-	char*     name;
-	char*     desc;
-}tResource;
-
-/* Id list for partial manipulation */
-typedef enum {eString,eValue}tResIdType;
-
-typedef struct {
-	tResIdType idType;
-	char*      value;
-}tResIdListItem;
-
-typedef struct {
-	int             count;
-	tResIdListItem* list;
-}tResIdList;
-
-void parseGivenPath(char* path);
-int partialListActive();
-int isInThePartialList(const char* file, int value);
-void freePartialList();
-
-/* Includes */
-#include <stdio.h>
-#include "xmlparse.h"
-
-/* Verify  header */
-int verifyHeader(const unsigned char* array, int size);
-
-/*
-	Headers may be:
-	 01 Levels
-	 02 Bitmaps
-	 03 Waves
-	 04 Midis
-	 05 Binary
-	 06 Palette
-	 07 Internal Speaker Sounds
-*/
-
-/***************************************************************\
-|                       File format handling                    |
-\***************************************************************/
-
-/* CheckSum verification */
-int checkSum(unsigned char* data,int size);
-
-/* Empty resource table */
-void emptyTable(tResource* r[]);
-
-/* Resources extras */
-void getFileName(char* vFileext,const char* vDirExt,tResource* r,unsigned short id,const char* vFiledat, const char* vDatFileName,int optionflag,const char* backupExtension);
-void getUpperFolder(char* aux, char* vFiledat);
-
-const char* getExtDesc(int type);
-
-/* parse file and free parsed structure */
-int parseFile(const char* vFile, const char* datFile, tResource* r[]);
-void freeParsedStructure();
-#ifdef DLL
-int parseStructure(const char* vFile);
-tTag* resourceTreeGetChild(tTag* whereAmI);
-tTag* resourceTreeGetNext (tTag* whereAmI);
-tTag* resourceTreeGetRoot ();
-int   resourceTreeGetInfo (tTag* whereAmI, char** tag, char** desc, char** path, char** file, char** itemtype, char** name, char** palette, char** type, char** value, char** version, char** number);
-#endif
-
-/* In case there are unknown resources it closes the unknown XML output */
-void endUnknownXml();
-
-/* Search files for the Import feature */
-int importDir(const char* directory, const char* vResFile, int pOption, const char* backupExtension,const char* vDirectory,FILE* output);
-int isntADatFile(const char* testFile, const char* vResFile);
-
-#endif
diff --git a/PR/src/include/wav.h b/PR/src/include/wav.h
deleted file mode 100644
index 8ca71bf..0000000
--- a/PR/src/include/wav.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/*  Princed V3 - Prince of Persia Level Editor for PC Version
-    Copyright (C) 2003 Princed Development Team
-
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program; if not, write to the Free Software
-    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-    The authors of this program may be contacted at http://forum.princed.com.ar
-*/
-
-/*
-wav.h: Princed Resources : WAV files support headers
-\xaf\xaf\xaf\xaf\xaf
- Copyright 2003 Princed Development Team
-  Created: 24 Aug 2003
-
-  Author: Enrique Calot <ecalot.cod@princed.com.ar>
-  Version: 1.01 (2003-Oct-23)
-
- Note:
-  DO NOT remove this copyright notice
-*/
-
-#ifndef _WAV_H_
-#define _WAV_H_
-
-#include "resources.h"
-#include <stdio.h>
-
-#define WAVE_HEADER {0x52, 0x49, 0x46, 0x46, 0x12, 0x16, 0x00, 0x00, 0x57, 0x41, 0x56, 0x45, 0x66, 0x6D, 0x74, 0x20, 0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x11, 0x2B, 0x00, 0x00, 0x11, 0x2B, 0x00, 0x00, 0x01, 0x00, 0x08, 0x00, 0x64, 0x61, 0x74, 0x61, 0xA3, 0x15, 0x00, 0x00}
-
-int mFormatExportWav(const unsigned char* data, char *vFileext,unsigned long int size,int optionflag,const char* backupExtension);
-int mFormatImportWav(unsigned char* data, tResource *res);
-
-#endif
diff --git a/PR/src/include/xml.h b/PR/src/include/xml.h
deleted file mode 100644
index 37d7434..0000000
--- a/PR/src/include/xml.h
+++ /dev/null
@@ -1,31 +0,0 @@
-
-#ifndef _XML_H_
-#define _XML_H_
-
-int equalsIgnoreCase(const char s1[],const char s2[]);
-
-typedef struct tTag {
- struct tTag* child;
- struct tTag* next;
- char* tag;
- char* desc;
- char* external;
- char* file;
- char* itemtype;
- char* name;
- char* palette;
- char* type;
- char* value;
- char* version;
- char* number;
-}tTag;
-
-//Constants
-#define MAX_VALUE_SIZE 1000
-#define MAX_SIZE_OF_FILE 30000
-
-//tTag* getTagStructure(); //initializes
-void freeTagStructure(tTag* structure);
-//int parseNext(char** pString, tTag* tag);
-tTag* parseXmlFile(const char* vFile,int* error);
-#endif
diff --git a/PR/src/lib/actions/classify.c b/PR/src/lib/actions/classify.c
deleted file mode 100644
index 31a9d50..0000000
--- a/PR/src/lib/actions/classify.c
+++ /dev/null
@@ -1,171 +0,0 @@
-/*  Princed V3 - Prince of Persia Level Editor for PC Version
-    Copyright (C) 2003 Princed Development Team
-
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program; if not, write to the Free Software
-    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-    The authors of this program may be contacted at http://forum.princed.com.ar
-*/
-
-/*
-tasks.c: Princed Resources : Classify a DAT file
-\xaf\xaf\xaf\xaf\xaf\xaf\xaf
- Copyright 2003 Princed Development Team
-  Created: 24 Aug 2003
-
-  Author: Enrique Calot <ecalot.cod@princed.com.ar>
-  Version: 1.01 (2003-Oct-23)
-
- Note:
-  DO NOT remove this copyright notice
-*/
-
-#include <stdio.h>
-#include "tasks.h"
-#include "memory.h"
-#include "resources.h"
-#include "dat.h"
-#include "xmlparse.h"
-#include "xmlsearch.h"
-#include "pr.h"
-
-/***************************************************************\
-|                    Get the type of a DAT file                 |
-\***************************************************************/
-
-#ifndef IGNOREVERIFYDATTYPES
-
-extern int pop1;
-
-#define READ_ERROR {mReadCloseDatFile();return 0;}
-
-int prVerifyDatType(const char* vFiledat) {
-	int                indexNumber;
-	long int           id;
-	unsigned char*     data;
-	unsigned long  int size;
-	int                type=RES_TYPE_BINARY;
-	unsigned short int numberOfItems;
-
-	/* Initialize abstract variables to read this new DAT file */
-	if (!mReadBeginDatFile(&numberOfItems,vFiledat)) return -1;
-
-	/* main loop */
-	for (indexNumber=0;(indexNumber<numberOfItems)&&(type==RES_TYPE_BINARY);indexNumber++) {
-		id=mReadGetFileInDatFile(indexNumber,&data,&size);
-		if (id<0) READ_ERROR; /* Read error */
-		if (id==0xFFFF) continue; /* Tammo Jan Bug fix */
-		if (id>=MAX_RES_COUNT) READ_ERROR; /* A file with an ID out of range will be treated as invalid */
-		type=verifyHeader(data,size);
-	}
-
-	mReadCloseDatFile();
-	return pop1?type:(type+10);
-}
-
-#if 0
-	/* Variables */
-	FILE*              fp;
-	char               ok;
-	int 					     k;
-
-	/* variables in case header is ok */
-	unsigned short int offset;
-	unsigned long  int size;
-	unsigned char*     data;
-	unsigned char      type=5;
-
-	/* loop variables */
-	unsigned long  int indexOffset;
-	unsigned short int indexSize;
-	unsigned short int numberOfItems;
-	unsigned char*     index;
-
-
-	if ((ok=(((fp=fopen(vFiledat,"rb")))!=NULL))) {
-		/* verify dat format */
-		ok    = fread(&indexOffset,4,1,fp);
-		ok=ok&& fread(&indexSize,2,1,fp);
-		ok=ok&& !fseek(fp,indexOffset,SEEK_SET);
-		ok=ok&& fread(&numberOfItems,2,1,fp);
-		if (!ok) {
-			fclose(fp);
-			return 0; /* this is not a valid prince dat file */
-		}
-		if ((numberOfItems*8+2)!=indexSize) {
-			indexOffset+=indexSize;
-			fseek(fp,0,SEEK_END);
-			ok=(((unsigned long)ftell(fp))==indexOffset)?11:0; /* see if it is a pop2 file */
-			fclose(fp);
-			return ok; /* this is a pop2 dat file or invalid */
-		}
-		if ((index=getMemory(indexSize-2))==NULL) {
-			fclose(fp);
-			return -2; /* no memory */
-		}
-		ok=fread(index,indexSize-2,1,fp);
-
-		/* main loop */
-		for (k=0;ok&&(k<numberOfItems)&&(type==5);k++) {
-			/* for each archived file */
-			ok=ok&&!(index[k*8+4]||index[k*8+5]);
-			offset=index[k*8+2]+256*index[k*8+3];
-			size=index[k*8+6]+256*index[k*8+7]+1;
-			ok=ok&&((data=getMemory(size))!=NULL);
-			ok=ok&&(!fseek(fp,offset,SEEK_SET));
-			ok=ok&&fread(data,size,1,fp);
-
-			/* set resource information on this index entry */
-			type=verifyHeader(data,(unsigned short int)size);
-
-		}
-		fclose(fp);
-		return ok?type:0;
-	} else {
-		return -1; /* file could not be open */
-	}
-}
-#endif
-#else
-extern FILE* outputStream;
-void showTag(int n,tTag* t);
-void compareFiles(const char* vModified,const char* vOriginal) {
-	/* Declare variables */
-	int error;
-	tTag* modified;
-	tTag* original;
-
-	/* Parse modified file */
-	modified=parseXmlFile(vModified,&error);
-	fprintf(outputStream,"Modified file parsing result: %d\n",error);
-
-	/* Parse original file */
-	original=parseXmlFile(vOriginal,&error);
-	fprintf(outputStream,"Original file parsing result: %d\n",error);
-
-
-	fprintf(outputStream,"Original tree\n");
-	showTag(0,original);
-	fprintf(outputStream,"Modified tree\n");
-	showTag(0,modified);
-
-
-	/* Compare */
-	compareXmlFile(modified,original);
-
-	/* Free memory */
-	freeTagStructure(modified);
-	freeTagStructure(original);
-}
-#endif
diff --git a/PR/src/lib/actions/export.c b/PR/src/lib/actions/export.c
deleted file mode 100644
index cf75a5f..0000000
--- a/PR/src/lib/actions/export.c
+++ /dev/null
@@ -1,186 +0,0 @@
-/*  Princed V3 - Prince of Persia Level Editor for PC Version
-    Copyright (C) 2003 Princed Development Team
-
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program; if not, write to the Free Software
-    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-    The authors of this program may be contacted at http://forum.princed.com.ar
-*/
-
-/*
-extract.c: Princed Resources : DAT Extractor
-\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf
- Copyright 2003, 2004 Princed Development Team
-  Created: 24 Aug 2003
-
-  Author: Enrique Calot <ecalot.cod@princed.com.ar>
-  Version: 1.01 (2003-Oct-23)
-  Version: 1.20 (2004-Mar-07)
-  Version: 1.30 (2004-Mar-15)
-
- Note:
-  DO NOT remove this copyright notice
-*/
-
-#include <stdio.h>
-#include <string.h>
-#include "pr.h"
-
-#include "extract.h"
-#include "dat.h"
-#include "disk.h"
-#include "memory.h"
-
-#include "bmp.h"
-#include "wav.h"
-#include "pal.h"
-#include "plv.h"
-#include "mid.h"
-
-extern FILE* outputStream;
-
-/***************************************************************\
-|                  I M P L E M E N T A T I O N                  |
-\***************************************************************/
-
-#define initializePaletteList \
-for (id=0;id<MAX_RES_COUNT;id++) {\
-	if (r[id]!=NULL) {\
-		r[id]->palAux=NULL;\
-	}\
-}
-
-/***************************************************************\
-|                    M A I N   E X T R A C T                    |
-\***************************************************************/
-
-
-/*
-	Extracts a dat file
-	For parameter documentation, see pr.c
-*/
-
-int extract(const char* vFiledat,const char* vDirExt, tResource* r[], int optionflag, const char* vDatFileName, const char* vDatAuthor,const char* backupExtension) {
-	char               vFileext[MAX_FILENAME_SIZE];
-	int                indexNumber;
-	int                ok=1;
-	long int           id;
-	tImage             image; /* this is used to make a persistent palette */
-	unsigned char*     data;
-	unsigned long  int size;
-	unsigned short int numberOfItems;
-	unsigned short int paletteId=0;
-
-	/* Initialize abstract variables to read this new DAT file */
-	if (!mReadBeginDatFile(&numberOfItems,vFiledat)) return -1;
-
-	/* Initializes the palette list */
-	initializePaletteList;
-
-	/* main loop */
-	for (indexNumber=0;ok&&(indexNumber<numberOfItems);indexNumber++) {
-		id=mReadGetFileInDatFile(indexNumber,&data,&size);
-
-		if (id<0) return -3; /* Read error */
-		if (id==0xFFFF) continue; /* Tammo Jan Bug fix */
-		if (id>=MAX_RES_COUNT) return -3; /* A file with an ID out of range will be treated as invalid */
-
-		/* set resource information on this index entry */
-		if (mReadInitResource(r+id,data,size)) return -2;
-
-		if ((r[id]->type==RES_TYPE_PALETTE)||isInThePartialList(r[id]->path,id)) { /* If the resource was specified or is a palette, do the tasks */
-			if (!(hasFlag(unknown_flag))) { /* If unknown flag is set do nothing but generate the unknown.xml file */
-				if (hasFlag(raw_flag)) r[id]->type=0; /* If "extract as raw" is set, type is 0 */
-
-				/* get save file name (if unknown document it in the xml) */
-				getFileName(vFileext,vDirExt,r[id],(unsigned short)id,vFiledat,vDatFileName,optionflag,backupExtension);
-
-				switch (r[id]->type) {
-					case RES_TYPE_LEVEL:
-						ok=ok&&mFormatExportPlv(data,vFileext,size,r[id]->number,vDatFileName,r[id]->name,r[id]->desc,vDatAuthor,optionflag,backupExtension);
-						break;
-					case RES_TYPE_BINARY: /* Binary files */
-					case RES_TYPE_RAW: /* Raw files */
-						ok=ok&&writeData(data,1,vFileext,size,optionflag,backupExtension); /* Ignore checksum */
-						break;
-					case RES_TYPE_PALETTE: /* save and remember palette file */
-						/* This will remember the palette for the next images */
-						r[id]->palAux=getMemory(size);
-						memcpy(r[id]->palAux,data,size);
-						if (!paletteId) { /* In case there is no loaded palettes load immediately the first found palette to clear garbage */
-							mLoadPalette(data,image);
-							paletteId=id;
-						}
-						/* This will export the palette */
-						if (isInThePartialList(r[id]->path,id))  /* If the palette was specified extract it */
-							ok=ok&&mFormatExportPal(data,vFileext,size,optionflag,backupExtension);
-						break;
-					case RES_TYPE_PCSPEAKER: /* save pcs file */
-					case RES_TYPE_MIDI:	/* save midi file */
-						ok=ok&&mFormatExportMid(data,vFileext,size,optionflag,backupExtension);
-						break;
-					case RES_TYPE_WAVE: /* save wav file */
-						ok=ok&&mFormatExportWav(data,vFileext,size,optionflag,backupExtension);
-						break;
-					case RES_TYPE_IMAGE: /* save image */
-						/* Palette handling */
-						if (r[id]->palette!=paletteId) { /* The palette isn't the already loaded */
-							if (r[id]->palette) { /* We need a palette */
-								/*
-									We need a palette and it is not the palette we have loaded in memory
-									So a new palette is going to be loaded.
-								*/
-								if ((r[r[id]->palette]->palAux)!=NULL) { /* If this palette wasn't loaded, it becomes loaded */
-									mLoadPalette(r[r[id]->palette]->palAux,image);
-									paletteId=r[id]->palette; /* sets the new palette loaded */
-								}
-							}
-						}
-						/* Export bitmap */
-						ok=ok&&mFormatExportBmp(data,vFileext,size,image,optionflag,backupExtension);
-						break;
-				}
-				/* Verbose information */
-				if (hasFlag(verbose_flag)) {
-					if (ok) {
-						fprintf(outputStream,PR_TEXT_EXPORT_WORKING,getFileNameFromPath(vFileext));
-					} else {
-						fprintf(outputStream,PR_TEXT_EXPORT_ERROR,getFileNameFromPath(vFileext));
-					}
-				}
-			} else {
-				/* if the dat file is unknown, add it in the xml */
-				getFileName(vFileext,vDirExt,r[id],(unsigned short)id,vFiledat,vDatFileName,optionflag,backupExtension);
-			}
-			/*freeAllocation(data);*/
-		}
-	}
-
-	/* Free allocated resources, dynamic strings and the index */
-	for (id=0;id<MAX_RES_COUNT;id++) {
-		if (r[id]!=NULL) {
-			freeAllocation(r[id]->palAux);
-			freeAllocation(r[id]->desc);
-			freeAllocation(r[id]->name);
-			freeAllocation(r[id]->path);
-			free(r[id]);
-		}
-	}
-	mReadCloseDatFile();
-
-	/* Close unknownXML */
-	endUnknownXml(optionflag,backupExtension);
-	return ok-1;
-}
-
diff --git a/PR/src/lib/actions/import.c b/PR/src/lib/actions/import.c
deleted file mode 100644
index 084b9cf..0000000
--- a/PR/src/lib/actions/import.c
+++ /dev/null
@@ -1,211 +0,0 @@
-/*  Princed V3 - Prince of Persia Level Editor for PC Version
-    Copyright (C) 2003 Princed Development Team
-
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program; if not, write to the Free Software
-    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-    The authors of this program may be contacted at http://forum.princed.com.ar
-*/
-
-/*
-compile.c: Princed Resources : DAT Compiler
-\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf
- Copyright 2003 Princed Development Team
-  Created: 24 Aug 2003
-
-  Author: Enrique Calot <ecalot.cod@princed.com.ar>
-  Version: 1.01 (2003-Oct-23)
-
- Note:
-  DO NOT remove this copyright notice
-*/
-
-/***************************************************************\
-|                  I M P L E M E N T A T I O N                  |
-\***************************************************************/
-
-#include <string.h>
-#include "pr.h"
-#include "compile.h"
-
-#include "dat.h"
-#include "memory.h"
-#include "disk.h"
-
-#include "bmp.h"
-#include "mid.h"
-#include "wav.h"
-#include "pal.h"
-#include "plv.h"
-
-extern FILE* outputStream;
-
-/***************************************************************\
-|                    Dat compiling primitive                    |
-\***************************************************************/
-
-/* Format detection function (private function, not in header file) */
-int mAddCompiledFileToDatFile(unsigned char* data, tResource* res,const char* vFile) {
-	/* return 1 	if ok, 0 	if error */
-	switch (res->type) {
-		case RES_TYPE_LEVEL:
-			return mFormatImportPlv(data,res);
-		case RES_TYPE_IMAGE:
-			return mFormatImportBmp(data,res);
-		case RES_TYPE_WAVE:
-			return mFormatImportWav(data,res);
-		case RES_TYPE_MIDI:
-		case RES_TYPE_PCSPEAKER:
-			return mFormatImportMid(data,res);
-		case RES_TYPE_PALETTE:
-			return mFormatImportPal(data,res,vFile);
-		case RES_TYPE_BINARY:
-		default:
-			mWriteSetFileInDatFile(data,res->size);
-			break;
-	}
-	return 1;
-}
-
-#define freeResources \
-for (id=0;id<MAX_RES_COUNT;id++) {\
-	if (r[id]!=NULL) {\
-		freeAllocation(r[id]->desc);\
-		freeAllocation(r[id]->name);\
-		freeAllocation(r[id]->path);\
-		free(r[id]);\
-	}\
-}
-
-
-/***************************************************************\
-|                   M A I N   F U N C T I O N                   |
-\***************************************************************/
-
-int fullCompile(const char* vFiledat, const char* vDirExt, tResource* r[], int optionflag, const char* vDatFileName,const char* backupExtension) {
-	/*
-		Return values:
-			-1 File couldn't be open for writing
-			00 File successfully compiled
-			positive number: number of missing files
-	*/
-
-	char vFileext[MAX_FILENAME_SIZE];
-	int error=0;
-	int ok=0;
-	unsigned char* data;
-	unsigned short int id=1;
-
-	if (!mWriteBeginDatFile(vFiledat,optionflag)) return -1; /* File couldn't be open */
-
-	for (;id!=MAX_RES_COUNT;id++) {
-		if (r[id]!=NULL) {
-			if (hasFlag(raw_flag)) r[id]->type=0; /* compile from raw */
-			getFileName(vFileext,vDirExt,r[id],id,vFiledat,vDatFileName,optionflag,backupExtension);
-			/* the file is in the archive, so i'll add it to the main dat body */
-			if ((r[id]->size=((unsigned short)mLoadFileArray(vFileext,&data)))) {
-				mWriteInitResource(r+id);
-				if (!mAddCompiledFileToDatFile(data,r[id],vFileext)) {
-					if (hasFlag(verbose_flag)) fprintf(outputStream,PR_TEXT_IMPORT_ERRORS,getFileNameFromPath(vFileext));
-					error++;
-				} else {
-					if (hasFlag(verbose_flag)) fprintf(outputStream,PR_TEXT_IMPORT_SUCCESS,getFileNameFromPath(vFileext));
-					ok++;
-				}
-				free(data);
-			} else {
-				if (hasFlag(verbose_flag)) fprintf(outputStream,PR_TEXT_IMPORT_NOT_OPEN,getFileNameFromPath(vFileext));
-				error++;
-			}
-		}
-	}
-	/* Close file. 	if empty, don't save */
-	mWriteCloseDatFile(r,!ok,optionflag,backupExtension);
-
-	/* Free allocated resources and dynamic strings */
-	freeResources;
-
-	if (hasFlag(verbose_flag)) fprintf(outputStream,PR_TEXT_IMPORT_DONE,ok,error);
-	return error;
-}
-
-#define RW_ERROR {mRWCloseDatFile(1);return 0;}
-int partialCompile(const char* vFiledat, const char* vDirExt, tResource* r[], int optionflag, const char* vDatFileName,const char* backupExtension) {
-	/*
-		Return values:
-			-2 Previous DAT file was invalid
-			-1 File couldn't be open for writing
-			00 File successfully compiled
-			positive number: number of missing files
-	*/
-
-	char vFileext[MAX_FILENAME_SIZE];
-	int                error,ok=0;
-	int                indexNumber;
-	long int           id;
-	unsigned char*     data;
-	unsigned long  int size;
-	unsigned short int numberOfItems;
-
-	/* Initialize abstract variables to read this new DAT file */
-	if ((error=mRWBeginDatFile(vFiledat,&numberOfItems,optionflag))) return error;
-
-	/* main loop */
-	for (indexNumber=0;(indexNumber<numberOfItems);indexNumber++) {
-		id=mReadGetFileInDatFile(indexNumber,&data,&size);
-		if (id<0) RW_ERROR; /* Read error */ /* TODO BUG: return doesn't close file */
-		if (id==0xFFFF) continue; /* Tammo Jan Bug fix */
-		if (id>=MAX_RES_COUNT) RW_ERROR; /* A file with an ID out of range will be treated as invalid */
-
-		mWriteInitResource(r+id);
-		if (r[id]&&isInThePartialList(r[id]->path,id)) { /* If the resource was specified */
-			if (hasFlag(raw_flag)) r[id]->type=0; /* compile from raw */
-			getFileName(vFileext,vDirExt,r[id],(unsigned short)id,vFiledat,vDatFileName,optionflag,backupExtension);
-			/* the file is in the archive, so i'll add it to the main dat body */
-			if ((r[id]->size=((unsigned long)mLoadFileArray(vFileext,&data)))) {
-				if (!mAddCompiledFileToDatFile(data,r[id],vFileext)) {
-					if (hasFlag(verbose_flag)) fprintf(outputStream,PR_TEXT_IMPORT_ERRORS,getFileNameFromPath(vFileext));
-					error++;
-				} else {
-					if (hasFlag(verbose_flag)) fprintf(outputStream,PR_TEXT_IMPORT_SUCCESS,getFileNameFromPath(vFileext));
-					ok++;
-				}
-				free(data);
-			} else {
-				if (hasFlag(verbose_flag)) fprintf(outputStream,PR_TEXT_IMPORT_NOT_OPEN,getFileNameFromPath(vFileext));
-				error++;
-			}
-		} else {
-			r[id]->size=size-1;
-			mWriteSetFileInDatFileIgnoreChecksum(data,size);
-		}
-	}
-
-	/* Close dat file */
-	mRWCloseDatFile(0);
-
-	/* Free allocated resources and dynamic strings */
-	freeResources;
-
-	if (hasFlag(verbose_flag)) fprintf(outputStream,PR_TEXT_IMPORT_DONE,ok,error);
-	return error;
-}
-
-int compile(const char* vFiledat, const char* vDirExt, tResource* r[], int optionflag, const char* vDatFileName,const char* backupExtension) {
-	if (partialListActive()) {
-		return partialCompile(vFiledat,vDirExt,r,optionflag,vDatFileName,backupExtension);
-	} else {
-		return fullCompile(vFiledat,vDirExt,r,optionflag,vDatFileName,backupExtension);
-	}
-}
diff --git a/PR/src/lib/compression/rle_compress.c b/PR/src/lib/compression/rle_compress.c
deleted file mode 100644
index 1b2680e..0000000
--- a/PR/src/lib/compression/rle_compress.c
+++ /dev/null
@@ -1,325 +0,0 @@
-/*  Princed V3 - Prince of Persia Level Editor for PC Version
-    Copyright (C) 2003 Princed Development Team
-
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program; if not, write to the Free Software
-    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-    The authors of this program may be contacted at http://forum.princed.com.ar
-*/
-
-/*
-compress.c: Princed Resources : Image Compression Library
-\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf
- Copyright 2003, 2004 Princed Development Team
-  Created: 24 Aug 2003
-
-  Author: Enrique Calot <ecalot.cod@princed.com.ar>
-  Version: 1.01 (2003-Oct-23)
-  Version: 2.00 (2004-Mar-07)
-
- Note:
-  DO NOT remove this copyright notice
-*/
-
-/***************************************************************\
-|                  I M P L E M E N T A T I O N                  |
-\***************************************************************/
-
-#include <stdio.h>
-#include <string.h>
-#include "compress.h"
-#include "memory.h"
-#include "pr.h"
-
-/***************************************************************\
-|                        Image transpose                        |
-\***************************************************************/
-
-/* Determines where the transposed byte must be saved */
-int transpose(int x,int w,int h) {
-	return ((x%h)*(w))+(int)(x/h);
-}
-
-void transposeImage(tImage* image,int size) {
-	unsigned char* outputaux=getMemory(size);
-	int cursor=0;
-
-	while (cursor<size) {outputaux[transpose(cursor,image->widthInBytes,image->height)]=image->pix[cursor];cursor++;}
-	free(image->pix);
-	image->pix=outputaux;
-}
-
-void antiTransposeImage(tImage* image,int size) {
-	unsigned char* outputaux=getMemory(size);
-	int cursor=0;
-
-	while (cursor<size) {outputaux[cursor]=image->pix[transpose(cursor,image->widthInBytes,image->height)];cursor++;}
-	free(image->pix);
-	image->pix=outputaux;
-}
-
-/***************************************************************\
-|                    Uncompression algorithms                   |
-\***************************************************************/
-
-/* LZG expansion algorithm sub function */
-unsigned char popBit(unsigned char *byte) {
-	unsigned char bit=(unsigned char)((*byte)&1);
-	(*byte)>>=1;
-	return bit;
-}
-
-/* Expands LZ Groody algorithm. This is the core of PR */
-int expandLzg(const unsigned char* array, int arraySize, tImage* image, int imageSize) {
-	char k;
-	int location,h,cursor=0,pos=0;
-	unsigned char maskbyte,rep;
-
-	if ((image->pix=getMemory(/*imageSize*/MAX_MOD_SIZE_IN_LZG))==NULL) return COMPRESS_RESULT_FATAL; /* reserve memory */
-	for(location=0;location<MAX_MOD_SIZE_IN_LZG;image->pix[location]=0,location++); /* clean output garbage */
-
-	/* main loop */
-	while (cursor<imageSize) {
-		maskbyte=array[pos++];
-		for (k=8;k&&(cursor<imageSize);k--) {
-			if (popBit(&maskbyte)) {
-				image->pix[cursor++]=array[pos++];
-			} else {
-				location=66+(((rep=array[pos])&3)<<8)+(unsigned char)array[pos+1];pos+=2;
-				rep=(unsigned char)((rep>>2)+3);
-				while (rep--) { /* Be careful in big images */
-					h=cursor/MAX_MXD_SIZE_IN_LZG-((location%MAX_MXD_SIZE_IN_LZG)>(cursor%MAX_MXD_SIZE_IN_LZG));
-					image->pix[cursor++]=image->pix[((h<0)?0:h)*MAX_MXD_SIZE_IN_LZG+(location++)%MAX_MXD_SIZE_IN_LZG];
-/*
-					h=((cursor-(location&0x3FF))&(~0x3FF));
-					image->pix[cursor]=image->pix[((h<0)?0:h)+(location&0x3FF)];
-					cursor++;location++;
-*/
-				}
-			}
-		}
-	}
-	return ((pos==arraySize)&(cursor==imageSize))-1; /* WARNING or SUCCESS */
-}
-
-/* Expands RLE algorithm */
-int expandRle(const unsigned char* array, int arraySize, tImage* image, int imageSize) {
-	int cursor=0;
-	register signed char rep;
-	int pos=0;
-
-	if ((image->pix=getMemory(imageSize+128))==NULL) return COMPRESS_RESULT_FATAL; /* reserve memory */
-
-	/* main loop */
-	while (cursor<imageSize) {
-		rep=(signed char)(array[pos++]);
-		if (rep<0) {
-			/* Negative */
-			while (rep++) image->pix[cursor++]=array[pos];
-			pos++;
-		} else {
-			/* Positive */
-			rep=~rep;
-			while (rep++) image->pix[cursor++]=array[pos++];
-		}
-	}
-	return ((pos==arraySize)&(cursor==imageSize))-1; /* WARNING or SUCCESS */
-}
-
-/***************************************************************\
-|                    Compression algorithms                     |
-\***************************************************************/
-
-/* Compress using the Run Length Encoding algorithm */
-void compressRle(unsigned char* data,tImage* img,int *dataSize) {
-	/* Declare pointers */
-	unsigned char* cursorData  = data;
-	char*          counter;
-	unsigned char* cursorPix   = img->pix;
-	unsigned char* imgEnd      = img->pix+(*dataSize);
-
-	while (cursorPix<imgEnd) {
-		/* Step 1: Create counter */
-		*(counter=(char*)(cursorData++))=-1;
-
-		/* Step 2: Look and copy the string until a repeated byte is found */
-		while (
-			(cursorPix<imgEnd)&&
-			(
-				(*cursorPix!=*(cursorPix+1))||
-				(
-					/*(*cursorPix==*(cursorPix+1))&&*/
-					((cursorPix+1)<imgEnd)&&
-					(*cursorPix!=*(cursorPix+2))
-				)
-			)&&
-			((*counter)!=127)
-		) {
-			*(cursorData)=*(cursorPix);
-			(*counter)++;
-			cursorPix++;
-			cursorData++;
-		}
-
-		/* Step 3: If there was a repeated string, let's ignore it and add the cursor with the repetitions */
-		if (*counter==-1) {
-			while ((cursorPix+1<imgEnd)&&(*cursorPix==(*(cursorPix+1)))&&((*counter)!=-128)) {
-				cursorPix++;
-				(*counter)--;
-			}
-
-			*(cursorData)=*(cursorPix); /* Print repeated char */
-			cursorPix++;
-			cursorData++;
-		}
-	}
-
-	*(cursorData++)=0;
-	*(cursorData++)=*(cursorPix);
-	*dataSize=(int)((long int)cursorData-(long int)data)-2; /* Note: casted to long for portability with 64 bits architectures */
-}
-
-/***************************************************************\
-|               Main compress and expand graphics               |
-\***************************************************************/
-
-/*
-		Header info:
-		 1 byte  - checksum           char checksum
-		 2 bytes - height             short int height
-		 2 bytes - width              short int width
-		 1 byte  - 00                 (char)0
-		 1 byte  - compression type   unsigned char compressionType
-*/
-
-/* Expands an array into an image */
-int mExpandGraphic(const unsigned char* data,tImage *image, int dataSizeInBytes) {
-	/*
-		Reads data and extracts tImage
-		returns the next image address or -1 in case of error
-	*/
-
-	int imageSizeInBytes;
-	int result;
-
-	data++;
-	image->height=((unsigned char)data[0])+((unsigned char)data[1]<<8);data+=2;
-	image->width =((unsigned char)data[0])+((unsigned char)data[1]<<8);data+=2;
-
-	if (*(data++)) return -1; /* Verify format */
-	image->type=(unsigned char)(*(data++));
-	dataSizeInBytes-=7;
-
-	if (image->type&0xB0) {
-		image->widthInBytes=(image->width+1)/2;
-	} else {
-		image->widthInBytes=(image->width+7)/8;
-	}
-	imageSizeInBytes=image->widthInBytes*image->height;
-
-	switch (getAlgor(image->type)) {
-		case COMPRESS_RAW: /* No Compression Algorithm */
-			if ((image->pix=getMemory(imageSizeInBytes))==NULL) return COMPRESS_RESULT_FATAL;
-			memcpy(image->pix,data,imageSizeInBytes);
-			result=COMPRESS_RESULT_SUCCESS;
-			break;
-		case COMPRESS_RLE_LR: /* RLE Left to Right Compression Algorithm */
-			result=expandRle(data,dataSizeInBytes,image,imageSizeInBytes);
-			break;
-		case COMPRESS_RLE_UD: /* RLE Up to Down Compression Algorithm */
-			result=expandRle(data,dataSizeInBytes,image,imageSizeInBytes);
-			if (result==COMPRESS_RESULT_FATAL) return COMPRESS_RESULT_FATAL;
-			transposeImage(image,imageSizeInBytes);
-			break;
-		case COMPRESS_LZG_LR: /* LZ Groody Left to Right Compression Algorithm */
-			result=expandLzg(data,dataSizeInBytes,image,imageSizeInBytes);
-			break;
-		case COMPRESS_LZG_UD: /* LZ Groody Up to Down Compression Algorithm */
-			result=expandLzg(data,dataSizeInBytes,image,imageSizeInBytes);
-			if (result==COMPRESS_RESULT_FATAL) return COMPRESS_RESULT_FATAL;
-			transposeImage(image,imageSizeInBytes);
-			break;
-		default:
-			result=COMPRESS_RESULT_FATAL;
-			break;
-	}
-	return result; /* Ok */
-}
-
-/* Compress an image into binary data */
-int mCompressGraphic(unsigned char* data,tImage* image, int* dataSizeInBytes) {
-	/* Declare variables */
-	unsigned char* compressed     [COMPRESS_WORKING_ALGORITHMS];
-	int            compressedSize [COMPRESS_WORKING_ALGORITHMS];
-	int            algorithm;
-	int            i;
-	int            imageSizeInBytes;
-
-	/* Initialize variables */
-	imageSizeInBytes=image->widthInBytes*image->height;
-	for (i=0;i<COMPRESS_WORKING_ALGORITHMS;i++) compressedSize[i]=imageSizeInBytes;
-
-	/*
-		Perform all compressions
-	*/
-
-	/* COMPRESS_RAW */
-	compressed[COMPRESS_RAW]=getMemory(compressedSize[COMPRESS_RAW]);
-	memcpy(compressed[COMPRESS_RAW],image->pix,compressedSize[COMPRESS_RAW]);
-
-	/* COMPRESS_RLE_LR */
-	compressed[COMPRESS_RLE_LR]=getMemory(10*imageSizeInBytes+50); /* This will reserve 10*(image size)+50 bytes, to allocate the compressed file */
-	compressRle(compressed[COMPRESS_RLE_LR],image,&(compressedSize[COMPRESS_RLE_LR]));
-
-	/* COMPRESS_RLE_UD */
-	compressed[COMPRESS_RLE_UD]=getMemory(10*imageSizeInBytes+50); /* This will reserve 10*(image size)+50 bytes, to allocate the compressed file */
-	antiTransposeImage(image,imageSizeInBytes);
-	compressRle(compressed[COMPRESS_RLE_UD],image,&(compressedSize[COMPRESS_RLE_UD]));
-
-	/*
-		Process results
-	*/
-
-	/* Select the best compression (find minimum) */
-	*dataSizeInBytes=compressedSize[COMPRESS_RAW];
-	algorithm=COMPRESS_RAW;
-	for (i=COMPRESS_RLE_LR;i<COMPRESS_WORKING_ALGORITHMS;i++) {
-		if ((*dataSizeInBytes)>compressedSize[i]) {
-			(*dataSizeInBytes)=compressedSize[i];
-			algorithm=i;
-		}
-	}
-
-	/* Copy the best algorithm in the compressed data */
-	memcpy(data+6,compressed[algorithm],*dataSizeInBytes);
-	(*dataSizeInBytes)+=6;
-
-	/*
-		Write header
-	*/
-
-	/* (16 bits)height (Intel short int format) */
-	data[0]=image->height;
-	data[1]=image->height>>8;
-	/* (16 bits)width (Intel short int format) */
-	data[2]=image->width;
-	data[3]=image->width>>8;
-	/* (8 bits)00000000+(4 bits)palette type+(4 bits)algorithm */
-	data[4]=0;
-	data[5]=image->type|algorithm;
-
-	/* Free all compression attempts */
-	for (i=COMPRESS_RAW;i<COMPRESS_WORKING_ALGORITHMS;i++) free(compressed[i]);
-	return 1;
-}
diff --git a/PR/src/lib/compression/rle_decompress.c b/PR/src/lib/compression/rle_decompress.c
deleted file mode 100644
index 1b2680e..0000000
--- a/PR/src/lib/compression/rle_decompress.c
+++ /dev/null
@@ -1,325 +0,0 @@
-/*  Princed V3 - Prince of Persia Level Editor for PC Version
-    Copyright (C) 2003 Princed Development Team
-
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program; if not, write to the Free Software
-    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-    The authors of this program may be contacted at http://forum.princed.com.ar
-*/
-
-/*
-compress.c: Princed Resources : Image Compression Library
-\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf
- Copyright 2003, 2004 Princed Development Team
-  Created: 24 Aug 2003
-
-  Author: Enrique Calot <ecalot.cod@princed.com.ar>
-  Version: 1.01 (2003-Oct-23)
-  Version: 2.00 (2004-Mar-07)
-
- Note:
-  DO NOT remove this copyright notice
-*/
-
-/***************************************************************\
-|                  I M P L E M E N T A T I O N                  |
-\***************************************************************/
-
-#include <stdio.h>
-#include <string.h>
-#include "compress.h"
-#include "memory.h"
-#include "pr.h"
-
-/***************************************************************\
-|                        Image transpose                        |
-\***************************************************************/
-
-/* Determines where the transposed byte must be saved */
-int transpose(int x,int w,int h) {
-	return ((x%h)*(w))+(int)(x/h);
-}
-
-void transposeImage(tImage* image,int size) {
-	unsigned char* outputaux=getMemory(size);
-	int cursor=0;
-
-	while (cursor<size) {outputaux[transpose(cursor,image->widthInBytes,image->height)]=image->pix[cursor];cursor++;}
-	free(image->pix);
-	image->pix=outputaux;
-}
-
-void antiTransposeImage(tImage* image,int size) {
-	unsigned char* outputaux=getMemory(size);
-	int cursor=0;
-
-	while (cursor<size) {outputaux[cursor]=image->pix[transpose(cursor,image->widthInBytes,image->height)];cursor++;}
-	free(image->pix);
-	image->pix=outputaux;
-}
-
-/***************************************************************\
-|                    Uncompression algorithms                   |
-\***************************************************************/
-
-/* LZG expansion algorithm sub function */
-unsigned char popBit(unsigned char *byte) {
-	unsigned char bit=(unsigned char)((*byte)&1);
-	(*byte)>>=1;
-	return bit;
-}
-
-/* Expands LZ Groody algorithm. This is the core of PR */
-int expandLzg(const unsigned char* array, int arraySize, tImage* image, int imageSize) {
-	char k;
-	int location,h,cursor=0,pos=0;
-	unsigned char maskbyte,rep;
-
-	if ((image->pix=getMemory(/*imageSize*/MAX_MOD_SIZE_IN_LZG))==NULL) return COMPRESS_RESULT_FATAL; /* reserve memory */
-	for(location=0;location<MAX_MOD_SIZE_IN_LZG;image->pix[location]=0,location++); /* clean output garbage */
-
-	/* main loop */
-	while (cursor<imageSize) {
-		maskbyte=array[pos++];
-		for (k=8;k&&(cursor<imageSize);k--) {
-			if (popBit(&maskbyte)) {
-				image->pix[cursor++]=array[pos++];
-			} else {
-				location=66+(((rep=array[pos])&3)<<8)+(unsigned char)array[pos+1];pos+=2;
-				rep=(unsigned char)((rep>>2)+3);
-				while (rep--) { /* Be careful in big images */
-					h=cursor/MAX_MXD_SIZE_IN_LZG-((location%MAX_MXD_SIZE_IN_LZG)>(cursor%MAX_MXD_SIZE_IN_LZG));
-					image->pix[cursor++]=image->pix[((h<0)?0:h)*MAX_MXD_SIZE_IN_LZG+(location++)%MAX_MXD_SIZE_IN_LZG];
-/*
-					h=((cursor-(location&0x3FF))&(~0x3FF));
-					image->pix[cursor]=image->pix[((h<0)?0:h)+(location&0x3FF)];
-					cursor++;location++;
-*/
-				}
-			}
-		}
-	}
-	return ((pos==arraySize)&(cursor==imageSize))-1; /* WARNING or SUCCESS */
-}
-
-/* Expands RLE algorithm */
-int expandRle(const unsigned char* array, int arraySize, tImage* image, int imageSize) {
-	int cursor=0;
-	register signed char rep;
-	int pos=0;
-
-	if ((image->pix=getMemory(imageSize+128))==NULL) return COMPRESS_RESULT_FATAL; /* reserve memory */
-
-	/* main loop */
-	while (cursor<imageSize) {
-		rep=(signed char)(array[pos++]);
-		if (rep<0) {
-			/* Negative */
-			while (rep++) image->pix[cursor++]=array[pos];
-			pos++;
-		} else {
-			/* Positive */
-			rep=~rep;
-			while (rep++) image->pix[cursor++]=array[pos++];
-		}
-	}
-	return ((pos==arraySize)&(cursor==imageSize))-1; /* WARNING or SUCCESS */
-}
-
-/***************************************************************\
-|                    Compression algorithms                     |
-\***************************************************************/
-
-/* Compress using the Run Length Encoding algorithm */
-void compressRle(unsigned char* data,tImage* img,int *dataSize) {
-	/* Declare pointers */
-	unsigned char* cursorData  = data;
-	char*          counter;
-	unsigned char* cursorPix   = img->pix;
-	unsigned char* imgEnd      = img->pix+(*dataSize);
-
-	while (cursorPix<imgEnd) {
-		/* Step 1: Create counter */
-		*(counter=(char*)(cursorData++))=-1;
-
-		/* Step 2: Look and copy the string until a repeated byte is found */
-		while (
-			(cursorPix<imgEnd)&&
-			(
-				(*cursorPix!=*(cursorPix+1))||
-				(
-					/*(*cursorPix==*(cursorPix+1))&&*/
-					((cursorPix+1)<imgEnd)&&
-					(*cursorPix!=*(cursorPix+2))
-				)
-			)&&
-			((*counter)!=127)
-		) {
-			*(cursorData)=*(cursorPix);
-			(*counter)++;
-			cursorPix++;
-			cursorData++;
-		}
-
-		/* Step 3: If there was a repeated string, let's ignore it and add the cursor with the repetitions */
-		if (*counter==-1) {
-			while ((cursorPix+1<imgEnd)&&(*cursorPix==(*(cursorPix+1)))&&((*counter)!=-128)) {
-				cursorPix++;
-				(*counter)--;
-			}
-
-			*(cursorData)=*(cursorPix); /* Print repeated char */
-			cursorPix++;
-			cursorData++;
-		}
-	}
-
-	*(cursorData++)=0;
-	*(cursorData++)=*(cursorPix);
-	*dataSize=(int)((long int)cursorData-(long int)data)-2; /* Note: casted to long for portability with 64 bits architectures */
-}
-
-/***************************************************************\
-|               Main compress and expand graphics               |
-\***************************************************************/
-
-/*
-		Header info:
-		 1 byte  - checksum           char checksum
-		 2 bytes - height             short int height
-		 2 bytes - width              short int width
-		 1 byte  - 00                 (char)0
-		 1 byte  - compression type   unsigned char compressionType
-*/
-
-/* Expands an array into an image */
-int mExpandGraphic(const unsigned char* data,tImage *image, int dataSizeInBytes) {
-	/*
-		Reads data and extracts tImage
-		returns the next image address or -1 in case of error
-	*/
-
-	int imageSizeInBytes;
-	int result;
-
-	data++;
-	image->height=((unsigned char)data[0])+((unsigned char)data[1]<<8);data+=2;
-	image->width =((unsigned char)data[0])+((unsigned char)data[1]<<8);data+=2;
-
-	if (*(data++)) return -1; /* Verify format */
-	image->type=(unsigned char)(*(data++));
-	dataSizeInBytes-=7;
-
-	if (image->type&0xB0) {
-		image->widthInBytes=(image->width+1)/2;
-	} else {
-		image->widthInBytes=(image->width+7)/8;
-	}
-	imageSizeInBytes=image->widthInBytes*image->height;
-
-	switch (getAlgor(image->type)) {
-		case COMPRESS_RAW: /* No Compression Algorithm */
-			if ((image->pix=getMemory(imageSizeInBytes))==NULL) return COMPRESS_RESULT_FATAL;
-			memcpy(image->pix,data,imageSizeInBytes);
-			result=COMPRESS_RESULT_SUCCESS;
-			break;
-		case COMPRESS_RLE_LR: /* RLE Left to Right Compression Algorithm */
-			result=expandRle(data,dataSizeInBytes,image,imageSizeInBytes);
-			break;
-		case COMPRESS_RLE_UD: /* RLE Up to Down Compression Algorithm */
-			result=expandRle(data,dataSizeInBytes,image,imageSizeInBytes);
-			if (result==COMPRESS_RESULT_FATAL) return COMPRESS_RESULT_FATAL;
-			transposeImage(image,imageSizeInBytes);
-			break;
-		case COMPRESS_LZG_LR: /* LZ Groody Left to Right Compression Algorithm */
-			result=expandLzg(data,dataSizeInBytes,image,imageSizeInBytes);
-			break;
-		case COMPRESS_LZG_UD: /* LZ Groody Up to Down Compression Algorithm */
-			result=expandLzg(data,dataSizeInBytes,image,imageSizeInBytes);
-			if (result==COMPRESS_RESULT_FATAL) return COMPRESS_RESULT_FATAL;
-			transposeImage(image,imageSizeInBytes);
-			break;
-		default:
-			result=COMPRESS_RESULT_FATAL;
-			break;
-	}
-	return result; /* Ok */
-}
-
-/* Compress an image into binary data */
-int mCompressGraphic(unsigned char* data,tImage* image, int* dataSizeInBytes) {
-	/* Declare variables */
-	unsigned char* compressed     [COMPRESS_WORKING_ALGORITHMS];
-	int            compressedSize [COMPRESS_WORKING_ALGORITHMS];
-	int            algorithm;
-	int            i;
-	int            imageSizeInBytes;
-
-	/* Initialize variables */
-	imageSizeInBytes=image->widthInBytes*image->height;
-	for (i=0;i<COMPRESS_WORKING_ALGORITHMS;i++) compressedSize[i]=imageSizeInBytes;
-
-	/*
-		Perform all compressions
-	*/
-
-	/* COMPRESS_RAW */
-	compressed[COMPRESS_RAW]=getMemory(compressedSize[COMPRESS_RAW]);
-	memcpy(compressed[COMPRESS_RAW],image->pix,compressedSize[COMPRESS_RAW]);
-
-	/* COMPRESS_RLE_LR */
-	compressed[COMPRESS_RLE_LR]=getMemory(10*imageSizeInBytes+50); /* This will reserve 10*(image size)+50 bytes, to allocate the compressed file */
-	compressRle(compressed[COMPRESS_RLE_LR],image,&(compressedSize[COMPRESS_RLE_LR]));
-
-	/* COMPRESS_RLE_UD */
-	compressed[COMPRESS_RLE_UD]=getMemory(10*imageSizeInBytes+50); /* This will reserve 10*(image size)+50 bytes, to allocate the compressed file */
-	antiTransposeImage(image,imageSizeInBytes);
-	compressRle(compressed[COMPRESS_RLE_UD],image,&(compressedSize[COMPRESS_RLE_UD]));
-
-	/*
-		Process results
-	*/
-
-	/* Select the best compression (find minimum) */
-	*dataSizeInBytes=compressedSize[COMPRESS_RAW];
-	algorithm=COMPRESS_RAW;
-	for (i=COMPRESS_RLE_LR;i<COMPRESS_WORKING_ALGORITHMS;i++) {
-		if ((*dataSizeInBytes)>compressedSize[i]) {
-			(*dataSizeInBytes)=compressedSize[i];
-			algorithm=i;
-		}
-	}
-
-	/* Copy the best algorithm in the compressed data */
-	memcpy(data+6,compressed[algorithm],*dataSizeInBytes);
-	(*dataSizeInBytes)+=6;
-
-	/*
-		Write header
-	*/
-
-	/* (16 bits)height (Intel short int format) */
-	data[0]=image->height;
-	data[1]=image->height>>8;
-	/* (16 bits)width (Intel short int format) */
-	data[2]=image->width;
-	data[3]=image->width>>8;
-	/* (8 bits)00000000+(4 bits)palette type+(4 bits)algorithm */
-	data[4]=0;
-	data[5]=image->type|algorithm;
-
-	/* Free all compression attempts */
-	for (i=COMPRESS_RAW;i<COMPRESS_WORKING_ALGORITHMS;i++) free(compressed[i]);
-	return 1;
-}
diff --git a/PR/src/lib/compression/rlev_decompress.c b/PR/src/lib/compression/rlev_decompress.c
deleted file mode 100644
index 1b2680e..0000000
--- a/PR/src/lib/compression/rlev_decompress.c
+++ /dev/null
@@ -1,325 +0,0 @@
-/*  Princed V3 - Prince of Persia Level Editor for PC Version
-    Copyright (C) 2003 Princed Development Team
-
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program; if not, write to the Free Software
-    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-    The authors of this program may be contacted at http://forum.princed.com.ar
-*/
-
-/*
-compress.c: Princed Resources : Image Compression Library
-\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf
- Copyright 2003, 2004 Princed Development Team
-  Created: 24 Aug 2003
-
-  Author: Enrique Calot <ecalot.cod@princed.com.ar>
-  Version: 1.01 (2003-Oct-23)
-  Version: 2.00 (2004-Mar-07)
-
- Note:
-  DO NOT remove this copyright notice
-*/
-
-/***************************************************************\
-|                  I M P L E M E N T A T I O N                  |
-\***************************************************************/
-
-#include <stdio.h>
-#include <string.h>
-#include "compress.h"
-#include "memory.h"
-#include "pr.h"
-
-/***************************************************************\
-|                        Image transpose                        |
-\***************************************************************/
-
-/* Determines where the transposed byte must be saved */
-int transpose(int x,int w,int h) {
-	return ((x%h)*(w))+(int)(x/h);
-}
-
-void transposeImage(tImage* image,int size) {
-	unsigned char* outputaux=getMemory(size);
-	int cursor=0;
-
-	while (cursor<size) {outputaux[transpose(cursor,image->widthInBytes,image->height)]=image->pix[cursor];cursor++;}
-	free(image->pix);
-	image->pix=outputaux;
-}
-
-void antiTransposeImage(tImage* image,int size) {
-	unsigned char* outputaux=getMemory(size);
-	int cursor=0;
-
-	while (cursor<size) {outputaux[cursor]=image->pix[transpose(cursor,image->widthInBytes,image->height)];cursor++;}
-	free(image->pix);
-	image->pix=outputaux;
-}
-
-/***************************************************************\
-|                    Uncompression algorithms                   |
-\***************************************************************/
-
-/* LZG expansion algorithm sub function */
-unsigned char popBit(unsigned char *byte) {
-	unsigned char bit=(unsigned char)((*byte)&1);
-	(*byte)>>=1;
-	return bit;
-}
-
-/* Expands LZ Groody algorithm. This is the core of PR */
-int expandLzg(const unsigned char* array, int arraySize, tImage* image, int imageSize) {
-	char k;
-	int location,h,cursor=0,pos=0;
-	unsigned char maskbyte,rep;
-
-	if ((image->pix=getMemory(/*imageSize*/MAX_MOD_SIZE_IN_LZG))==NULL) return COMPRESS_RESULT_FATAL; /* reserve memory */
-	for(location=0;location<MAX_MOD_SIZE_IN_LZG;image->pix[location]=0,location++); /* clean output garbage */
-
-	/* main loop */
-	while (cursor<imageSize) {
-		maskbyte=array[pos++];
-		for (k=8;k&&(cursor<imageSize);k--) {
-			if (popBit(&maskbyte)) {
-				image->pix[cursor++]=array[pos++];
-			} else {
-				location=66+(((rep=array[pos])&3)<<8)+(unsigned char)array[pos+1];pos+=2;
-				rep=(unsigned char)((rep>>2)+3);
-				while (rep--) { /* Be careful in big images */
-					h=cursor/MAX_MXD_SIZE_IN_LZG-((location%MAX_MXD_SIZE_IN_LZG)>(cursor%MAX_MXD_SIZE_IN_LZG));
-					image->pix[cursor++]=image->pix[((h<0)?0:h)*MAX_MXD_SIZE_IN_LZG+(location++)%MAX_MXD_SIZE_IN_LZG];
-/*
-					h=((cursor-(location&0x3FF))&(~0x3FF));
-					image->pix[cursor]=image->pix[((h<0)?0:h)+(location&0x3FF)];
-					cursor++;location++;
-*/
-				}
-			}
-		}
-	}
-	return ((pos==arraySize)&(cursor==imageSize))-1; /* WARNING or SUCCESS */
-}
-
-/* Expands RLE algorithm */
-int expandRle(const unsigned char* array, int arraySize, tImage* image, int imageSize) {
-	int cursor=0;
-	register signed char rep;
-	int pos=0;
-
-	if ((image->pix=getMemory(imageSize+128))==NULL) return COMPRESS_RESULT_FATAL; /* reserve memory */
-
-	/* main loop */
-	while (cursor<imageSize) {
-		rep=(signed char)(array[pos++]);
-		if (rep<0) {
-			/* Negative */
-			while (rep++) image->pix[cursor++]=array[pos];
-			pos++;
-		} else {
-			/* Positive */
-			rep=~rep;
-			while (rep++) image->pix[cursor++]=array[pos++];
-		}
-	}
-	return ((pos==arraySize)&(cursor==imageSize))-1; /* WARNING or SUCCESS */
-}
-
-/***************************************************************\
-|                    Compression algorithms                     |
-\***************************************************************/
-
-/* Compress using the Run Length Encoding algorithm */
-void compressRle(unsigned char* data,tImage* img,int *dataSize) {
-	/* Declare pointers */
-	unsigned char* cursorData  = data;
-	char*          counter;
-	unsigned char* cursorPix   = img->pix;
-	unsigned char* imgEnd      = img->pix+(*dataSize);
-
-	while (cursorPix<imgEnd) {
-		/* Step 1: Create counter */
-		*(counter=(char*)(cursorData++))=-1;
-
-		/* Step 2: Look and copy the string until a repeated byte is found */
-		while (
-			(cursorPix<imgEnd)&&
-			(
-				(*cursorPix!=*(cursorPix+1))||
-				(
-					/*(*cursorPix==*(cursorPix+1))&&*/
-					((cursorPix+1)<imgEnd)&&
-					(*cursorPix!=*(cursorPix+2))
-				)
-			)&&
-			((*counter)!=127)
-		) {
-			*(cursorData)=*(cursorPix);
-			(*counter)++;
-			cursorPix++;
-			cursorData++;
-		}
-
-		/* Step 3: If there was a repeated string, let's ignore it and add the cursor with the repetitions */
-		if (*counter==-1) {
-			while ((cursorPix+1<imgEnd)&&(*cursorPix==(*(cursorPix+1)))&&((*counter)!=-128)) {
-				cursorPix++;
-				(*counter)--;
-			}
-
-			*(cursorData)=*(cursorPix); /* Print repeated char */
-			cursorPix++;
-			cursorData++;
-		}
-	}
-
-	*(cursorData++)=0;
-	*(cursorData++)=*(cursorPix);
-	*dataSize=(int)((long int)cursorData-(long int)data)-2; /* Note: casted to long for portability with 64 bits architectures */
-}
-
-/***************************************************************\
-|               Main compress and expand graphics               |
-\***************************************************************/
-
-/*
-		Header info:
-		 1 byte  - checksum           char checksum
-		 2 bytes - height             short int height
-		 2 bytes - width              short int width
-		 1 byte  - 00                 (char)0
-		 1 byte  - compression type   unsigned char compressionType
-*/
-
-/* Expands an array into an image */
-int mExpandGraphic(const unsigned char* data,tImage *image, int dataSizeInBytes) {
-	/*
-		Reads data and extracts tImage
-		returns the next image address or -1 in case of error
-	*/
-
-	int imageSizeInBytes;
-	int result;
-
-	data++;
-	image->height=((unsigned char)data[0])+((unsigned char)data[1]<<8);data+=2;
-	image->width =((unsigned char)data[0])+((unsigned char)data[1]<<8);data+=2;
-
-	if (*(data++)) return -1; /* Verify format */
-	image->type=(unsigned char)(*(data++));
-	dataSizeInBytes-=7;
-
-	if (image->type&0xB0) {
-		image->widthInBytes=(image->width+1)/2;
-	} else {
-		image->widthInBytes=(image->width+7)/8;
-	}
-	imageSizeInBytes=image->widthInBytes*image->height;
-
-	switch (getAlgor(image->type)) {
-		case COMPRESS_RAW: /* No Compression Algorithm */
-			if ((image->pix=getMemory(imageSizeInBytes))==NULL) return COMPRESS_RESULT_FATAL;
-			memcpy(image->pix,data,imageSizeInBytes);
-			result=COMPRESS_RESULT_SUCCESS;
-			break;
-		case COMPRESS_RLE_LR: /* RLE Left to Right Compression Algorithm */
-			result=expandRle(data,dataSizeInBytes,image,imageSizeInBytes);
-			break;
-		case COMPRESS_RLE_UD: /* RLE Up to Down Compression Algorithm */
-			result=expandRle(data,dataSizeInBytes,image,imageSizeInBytes);
-			if (result==COMPRESS_RESULT_FATAL) return COMPRESS_RESULT_FATAL;
-			transposeImage(image,imageSizeInBytes);
-			break;
-		case COMPRESS_LZG_LR: /* LZ Groody Left to Right Compression Algorithm */
-			result=expandLzg(data,dataSizeInBytes,image,imageSizeInBytes);
-			break;
-		case COMPRESS_LZG_UD: /* LZ Groody Up to Down Compression Algorithm */
-			result=expandLzg(data,dataSizeInBytes,image,imageSizeInBytes);
-			if (result==COMPRESS_RESULT_FATAL) return COMPRESS_RESULT_FATAL;
-			transposeImage(image,imageSizeInBytes);
-			break;
-		default:
-			result=COMPRESS_RESULT_FATAL;
-			break;
-	}
-	return result; /* Ok */
-}
-
-/* Compress an image into binary data */
-int mCompressGraphic(unsigned char* data,tImage* image, int* dataSizeInBytes) {
-	/* Declare variables */
-	unsigned char* compressed     [COMPRESS_WORKING_ALGORITHMS];
-	int            compressedSize [COMPRESS_WORKING_ALGORITHMS];
-	int            algorithm;
-	int            i;
-	int            imageSizeInBytes;
-
-	/* Initialize variables */
-	imageSizeInBytes=image->widthInBytes*image->height;
-	for (i=0;i<COMPRESS_WORKING_ALGORITHMS;i++) compressedSize[i]=imageSizeInBytes;
-
-	/*
-		Perform all compressions
-	*/
-
-	/* COMPRESS_RAW */
-	compressed[COMPRESS_RAW]=getMemory(compressedSize[COMPRESS_RAW]);
-	memcpy(compressed[COMPRESS_RAW],image->pix,compressedSize[COMPRESS_RAW]);
-
-	/* COMPRESS_RLE_LR */
-	compressed[COMPRESS_RLE_LR]=getMemory(10*imageSizeInBytes+50); /* This will reserve 10*(image size)+50 bytes, to allocate the compressed file */
-	compressRle(compressed[COMPRESS_RLE_LR],image,&(compressedSize[COMPRESS_RLE_LR]));
-
-	/* COMPRESS_RLE_UD */
-	compressed[COMPRESS_RLE_UD]=getMemory(10*imageSizeInBytes+50); /* This will reserve 10*(image size)+50 bytes, to allocate the compressed file */
-	antiTransposeImage(image,imageSizeInBytes);
-	compressRle(compressed[COMPRESS_RLE_UD],image,&(compressedSize[COMPRESS_RLE_UD]));
-
-	/*
-		Process results
-	*/
-
-	/* Select the best compression (find minimum) */
-	*dataSizeInBytes=compressedSize[COMPRESS_RAW];
-	algorithm=COMPRESS_RAW;
-	for (i=COMPRESS_RLE_LR;i<COMPRESS_WORKING_ALGORITHMS;i++) {
-		if ((*dataSizeInBytes)>compressedSize[i]) {
-			(*dataSizeInBytes)=compressedSize[i];
-			algorithm=i;
-		}
-	}
-
-	/* Copy the best algorithm in the compressed data */
-	memcpy(data+6,compressed[algorithm],*dataSizeInBytes);
-	(*dataSizeInBytes)+=6;
-
-	/*
-		Write header
-	*/
-
-	/* (16 bits)height (Intel short int format) */
-	data[0]=image->height;
-	data[1]=image->height>>8;
-	/* (16 bits)width (Intel short int format) */
-	data[2]=image->width;
-	data[3]=image->width>>8;
-	/* (8 bits)00000000+(4 bits)palette type+(4 bits)algorithm */
-	data[4]=0;
-	data[5]=image->type|algorithm;
-
-	/* Free all compression attempts */
-	for (i=COMPRESS_RAW;i<COMPRESS_WORKING_ALGORITHMS;i++) free(compressed[i]);
-	return 1;
-}
diff --git a/PR/src/lib/formats/bmp.c b/PR/src/lib/formats/bmp.c
deleted file mode 100644
index 1b8ae62..0000000
--- a/PR/src/lib/formats/bmp.c
+++ /dev/null
@@ -1,208 +0,0 @@
-/*  Princed V3 - Prince of Persia Level Editor for PC Version
-    Copyright (C) 2003 Princed Development Team
-
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program; if not, write to the Free Software
-    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-    The authors of this program may be contacted at http://forum.princed.com.ar
-*/
-
-/*
-bmp.c: Princed Resources : BMP file support
-\xaf\xaf\xaf\xaf\xaf
- Copyright 2003 Princed Development Team
-  Created: 24 Aug 2003
-
-  Author: Enrique Calot <ecalot.cod@princed.com.ar>
-  Version: 1.01 (2003-Oct-23)
-  Version: 1.10 (2004-Feb-17)
-
- Note:
-  DO NOT remove this copyright notice
-*/
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include "pr.h"
-#include "bmp.h"
-#include "disk.h"
-#include "memory.h"
-#include "dat.h"
-
-int mFormatExportBmp(const unsigned char* data, const char *vFileext,unsigned long int size,tImage image,int optionflag, const char* backupExtension) {
-	/*
-		This function will expand the data into an image structure,
-		then the bitmap structure will be saved to disk
-
-		Note: The old structure is passed by paremeters in order to
-		      keep the right palette.
-	*/
-	int result;
-
-	/* Expand graphic and check results */
-	result=mExpandGraphic(data,&image,size);
-	if ((result==COMPRESS_RESULT_WARNING)&&hasFlag(verbose_flag))
-		printf (PR_TEXT_EXPORT_BMP_WARN);
-	if (result==COMPRESS_RESULT_FATAL) return 0;
-
-	/* Write bitmap */
-	mWriteBitMap(image,vFileext,optionflag,backupExtension);
-
-	/* free bitmap */
-	free(image.pix);
-	return 1;
-}
-
-
-int mFormatImportBmp(unsigned char* data, tResource *res) {
-	int size;
-	tImage img;
-	unsigned char aux[32700];
-
-	if (!mReadBitMap(&img,data,res->size)) return 0;
-	mCompressGraphic(aux,&img,&size);
-	free(img.pix);
-	mWriteSetFileInDatFile(aux,size);
-	res->size=(unsigned short)size; /* this was a bug (added to debug ;) ironic, don't you think? */
-	/* Note: after the debugging we realized this line was missing so this is not a bug anymore*/
-	return 1;
-}
-
-int mWriteBitMap(tImage img,const char* vFile,int optionflag,const char* backupExtension) {
-
-	/* declare variables */
-	int a;
-	int x;
-	unsigned char* b;
-	unsigned char* g;
-	unsigned char* r;
-	unsigned short int bits;
-	unsigned short int planes=1;
-	unsigned long int colours;
-	unsigned long int extra=1000;
-	unsigned long int filesize;
-	unsigned long int headerSize;
-	unsigned long int height;
-	unsigned long int offset;
-	unsigned long int width;
-	const unsigned long int zero=0;
-	char lineSerialization;
-	FILE* bitmap;
-
-	/* open file */
-	if (!writeOpen(vFile,&bitmap,optionflag)) return 0;
-
-	/* initialize variables */
-	width=img.width;
-	height=img.height;
-	bits=1<<getCarry(img.type);
-	colours=1<<bits;
-	headerSize=40;
-	offset=54+(colours<<2);
-	r=(g=(b=(unsigned char*)&extra)+1)+1;
-	lineSerialization=(-img.widthInBytes)&3;
-	filesize=offset+(img.widthInBytes+lineSerialization)*height;
-
-	/* Write header */
-	fwrite("BM"       ,2,1,bitmap);    /* Magic identifier            */
-	fwrite(&filesize  ,4,1,bitmap);    /* File size in bytes          */
-	fwrite(&zero      ,4,1,bitmap);    /* reserved                    */
-	fwrite(&offset    ,4,1,bitmap);    /* Offset to image data, bytes */
-	fwrite(&headerSize,4,1,bitmap);    /* Header size in bytes        */
-	fwrite(&width     ,4,1,bitmap);    /* Width of image              */
-	fwrite(&height    ,4,1,bitmap);    /* Height of image             */
-	fwrite(&planes    ,2,1,bitmap);    /* Number of colour planes     */
-	fwrite(&bits      ,2,1,bitmap);    /* Bits per pixel              */
-	fwrite(&zero      ,4,1,bitmap);    /* Compression type (0=none)   */
-	fwrite(&zero      ,4,1,bitmap);    /* Image size in bytes         */
-	fwrite(&extra     ,4,1,bitmap);    /* Pixels per meter x          */
-	fwrite(&extra     ,4,1,bitmap);    /* Pixels per meter y          */
-	fwrite(&colours   ,4,1,bitmap);    /* Number of colours           */
-	fwrite(&zero      ,4,1,bitmap);    /* Important colours           */
-
-	/* Write ColorTable */
-	if (colours==2) {
-		/* Black & White */
-		fwrite(FORMATS_BMP_PALETTE_BW,8,1,bitmap);    /* 24-bit palette: #000000, #FFFFFF */
-	} else {
-		/* Colours */
-		for (a=0,x=0;a<colours;a++) {
-			*r=(unsigned char)(img.pal[x++]<<2);  /* Red   */
-			*g=(unsigned char)(img.pal[x++]<<2);  /* Green */
-			*b=(unsigned char)(img.pal[x++]<<2);  /* Blue  */
-			fwrite(&extra,4,1,bitmap);    /* 24-bit Color value */
-		}
-	}
-
-	/* Write data */
-	while (img.height--) {
-		fwrite(img.pix+img.height*img.widthInBytes,img.widthInBytes,1,bitmap);
-		fwrite(&zero,lineSerialization,1,bitmap);
-	}
-
-	writeCloseOk(bitmap,optionflag,backupExtension);
-	return 1;
-}
-
-int mReadBitMap(tImage* image,unsigned char* data, int size) {
-	char lineSerialization;
-	int ok;
-	int serializedWidth;
-	int x=0;
-	unsigned char carry;
-	unsigned long int colours;
-	unsigned long int filesize;
-	unsigned long int offset;
-	unsigned short int bits;
-	unsigned short int height;
-	unsigned short int width;
-
-	/* Validate if there is header and if it starts in BM */
-	ok    = size>50;
-	ok=ok&& data[0]=='B' && data[1]=='M';
-	/* Read sizes from header */
-	width=(unsigned short)(data[18]+(data[19]<<8));
-	height=(unsigned short)(data[22]+(data[23]<<8));
-	bits=(unsigned short)(data[28]);
-
-	/* Save sizes into image */
-	image->width=width;            /* width in pixels */
-	image->height=height;
-
-	/* Calculate serialized widths */
-	carry=(bits==1)?0:2;
-	image->type=(bits==1)?0:0xB0;
-	colours=1<<bits;
-	offset=54+(colours<<2);
-	width=(width+1)>>1;
-	image->widthInBytes=(width+(0x07>>(1+carry)))>>(2-carry); /* this is an optimization of /(8/bits) : image->widthInBytes=imageWidthInPixels*bitsPerPixel/(8 bits/byte) */
-	lineSerialization=(-image->widthInBytes)&3;
-	serializedWidth=image->widthInBytes+lineSerialization;
-	filesize=offset+serializedWidth*height;
-
-	/* Validate image and file size; get memory to allocate the image */
-	ok=ok&& (filesize==size);
-	ok=ok&& (	(image->pix=getMemory(height*image->widthInBytes)) != NULL	);
-	/* if validations==wrong */
-	if (!ok) {
-		freeAllocation(image->pix);
-		return 0; /* this is not a valid bmp file format or memory too low */
-	}
-
-	/* Serialize bitmap-->raw array */
-	while (height--) memcpy(image->pix+(x++)*image->widthInBytes,data+offset+height*serializedWidth,image->widthInBytes);
-
-	return 1;
-}
diff --git a/PR/src/lib/formats/mid.c b/PR/src/lib/formats/mid.c
deleted file mode 100644
index 5e895f4..0000000
--- a/PR/src/lib/formats/mid.c
+++ /dev/null
@@ -1,57 +0,0 @@
-/*  Princed V3 - Prince of Persia Level Editor for PC Version
-    Copyright (C) 2003 Princed Development Team
-
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program; if not, write to the Free Software
-    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-    The authors of this program may be contacted at http://forum.princed.com.ar
-*/
-
-/*
-mid.c: Princed Resources : MIDI files support
-\xaf\xaf\xaf\xaf\xaf
- Copyright 2003 Princed Development Team
-  Created: 24 Aug 2003
-
-  Author: Enrique Calot <ecalot.cod@princed.com.ar>
-  Version: 1.01 (2003-Oct-23)
-
- Note:
-  DO NOT remove this copyright notice
-*/
-
-/* Includes */
-#include "mid.h"
-#include "disk.h"
-#include "pr.h"
-#include "dat.h"
-#include "memory.h"
-#include <string.h>
-
-int mFormatExportMid(const unsigned char* data, char *vFileext,unsigned long int size,int optionflag,const char* backupExtension) {
-	/* Mid files are saved as raw except you must ignore checksum & sound type */
-	return writeData(data,2,vFileext,size,optionflag,backupExtension);
-}
-
-int mFormatImportMid(unsigned char* data, tResource *res) {
-	unsigned char* file;
-
-	file=getMemory(res->size+1);
-	file[0]=(unsigned char)((res->type==4)?2:0); /* Now should be 0x02: First character must be a 0x01 (wav type in dat) */
-	memcpy(file+1,data,res->size);
-	res->size++;
-	mWriteSetFileInDatFile(file,res->size);
-	free(file);
-	return 1;
-}
diff --git a/PR/src/lib/formats/pal.c b/PR/src/lib/formats/pal.c
deleted file mode 100644
index ff3b20b..0000000
--- a/PR/src/lib/formats/pal.c
+++ /dev/null
@@ -1,143 +0,0 @@
-/*  Princed V3 - Prince of Persia Level Editor for PC Version
-    Copyright (C) 2003 Princed Development Team
-
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program; if not, write to the Free Software
-    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-    The authors of this program may be contacted at http://forum.princed.com.ar
-*/
-
-/*
-pal.c: Princed Resources : JASC PAL files support
-\xaf\xaf\xaf\xaf\xaf
- Copyright 2003 Princed Development Team
-  Created: 24 Aug 2003
-
-  Author: Enrique Calot <ecalot.cod@princed.com.ar>
-  Version: 1.01 (2003-Oct-23)
-
- Note:
-  DO NOT remove this copyright notice
-*/
-
-/* Includes */
-#include <string.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include "pal.h"
-#include "pr.h" /* for MAX_FILENAME_SIZE */
-#include "memory.h"
-#include "disk.h"
-#include "resources.h"
-#include "dat.h"
-
-/***************************************************************\
-|                 Jasc Palette handling functions               |
-\***************************************************************/
-
-static const char* enter="\r\n";
-
-/* Public functions */
-int mFormatExportPal(const unsigned char* data, char *vFileext,unsigned long int size,int optionflag,const char* backupExtension ) {
-	unsigned char* pal=getMemory(240);
-	unsigned char* aux=getMemory(MAX_FILENAME_SIZE);
-	int i;
-
-	/* Export extra palette information */
-	sprintf((char*)aux,"%s.more",vFileext);
-	writeData(data,1,(char*)aux,size,optionflag,backupExtension);
-
-	/* Convert palette from POP format to JASC format */
-	strcpy((char*)pal,PAL_HEADER);
-	for (i=0;i<16;i++) {
-		strcpy((char*)aux,(char*)pal);
-		sprintf((char*)pal,"%s%d %d %d%s",
-			aux,
-			data[(i*3)+5]<<2,
-			data[(i*3)+6]<<2,
-			data[(i*3)+7]<<2,
-			enter
-		);
-	}
-	for (i=0;pal[i];i++);
-	size=i-1;
-
-	/* save JASC palette */
-	i=writeData(pal,0,vFileext,size,optionflag,backupExtension);
-
-	free(pal);
-	free(aux);
-	return i;
-}
-
-int mFormatImportPal(unsigned char* data, tResource *res,const char* vFile) {
-
-	/* declare variables */
-	unsigned char* pals;
-	unsigned char* pals1;
-	unsigned char  pals2[]=PAL_SAMPLE;
-	unsigned char  palh []=PAL_HEADER;
-	unsigned char* pal;
-	unsigned char* pal2;
-	char* data2;
-	char aux[MAX_FILENAME_SIZE];
-	unsigned int r;
-	unsigned int g;
-	unsigned int b;
-	int i=0;
-	int k=16;
-	int sample1;
-
-	/* check size */
-	if ((res->size)<130) return 0;
-
-	/* verify jasc pal header */
-	while (palh[i]==(data)[i++]);
-	if (i!=sizeof(palh)) return 0; /* palette differs with headers */
-
-	/* Read sample */
-	sprintf(aux,"%s.more",vFile);
-	sample1=mLoadFileArray(aux,&pals1);
-	if (sample1==100) {
-		pals=pals1;
-	} else {
-		pals=pals2;
-	}
-
-	/* Allocate palette */
-	pal=getMemory(100);
-
-	/* set palette with sample */
-	memcpy(pal,pals,100);
-	pal2=pal+4;
-	if (sample1) free(pals1);
-
-	/* set current values */
-	data2=strtok((char*)(data)+sizeof(palh)-1,enter);
-	while (k--) {
-		if (!sscanf(data2,"%d %d %d",&r,&g,&b)) return 0;
-		/* Those lines mean a loss of data (palette colors are saved in the nearest multiple of 4) */
-		*(pal2++)=(unsigned char)((r+2)>>2);
-		*(pal2++)=(unsigned char)((g+2)>>2);
-		*(pal2++)=(unsigned char)((b+2)>>2);
-		data2=strtok(NULL,enter);
-	}
-
-	/* save and free palette */
-	mWriteSetFileInDatFile(pal,res->size=100);
-	free(pal);
-
-	return 1;
-}
-
diff --git a/PR/src/lib/formats/plv.c b/PR/src/lib/formats/plv.c
deleted file mode 100644
index 08fdac6..0000000
--- a/PR/src/lib/formats/plv.c
+++ /dev/null
@@ -1,190 +0,0 @@
-/*  Princed V3 - Prince of Persia Level Editor for PC Version
-    Copyright (C) 2003 Princed Development Team
-
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program; if not, write to the Free Software
-    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-    The authors of this program may be contacted at http://forum.princed.com.ar
-*/
-
-/*
-plv.c: Princed Resources : PLV prince level files support
-\xaf\xaf\xaf\xaf\xaf
- Copyright 2003 Princed Development Team
-  Created: 29 Nov 2003
-
-  Author: Enrique Calot <ecalot.cod@princed.com.ar>
-  Version: 1.00 (2003-Nov-29)
-
- PLV file format:
-  Defined: 28 Nov 2003
-
-  Authors:
-   Brendon James <roomshaker@princed.com.ar>
-   Enrique Calot <ecalot.cod@princed.com.ar>
-  Version: 1.00 (2003-Nov-28)
-
-
- Note:
-  DO NOT remove this copyright notice
-*/
-
-/* Includes */
-#include "plv.h"
-#include "disk.h"
-#include "dat.h"
-#include "memory.h"
-#include <string.h>
-#include <time.h>
-
-/* Private function to get the currect date/time */
-char* getDate() {
-	/* Code taken from RDR 1.4.1a coded by Enrique Calot */
-
-	/* Declare variables */
-#ifdef PLV_FULL_FORMAT
-	static char weeks   []   = DATE_WEEKDAYS;
-	static char months  []   = DATE_MONTHS;
-#endif
-	static char formated [37];
-	time_t      datet;
-	struct tm*  date;
-
-	/* get GMT time from the system clock */
-	time(&datet);
-	date=gmtime(&datet);
-
-#ifdef PLV_FULL_FORMAT
-	/* Format: "Tue, 26 Nov 2002 22:16:39" */
-	sprintf(formated,"%s, %d %s %.4d %.2d:%.2d:%.2d",
-		weeks+4*(date->tm_wday),
-		date->tm_mday,
-		months+4*(date->tm_mon),
-		date->tm_year+1900,
-		date->tm_hour,
-		date->tm_min,
-		date->tm_sec
-	);
-#else
-	/* Format: "2002-11-26 22:16:39" */
-	sprintf(formated,"%.4d-%.2d-%.2d %.2d:%.2d:%.2d",
-		date->tm_year+1900,
-		date->tm_mon+1,
-		date->tm_mday,
-		date->tm_hour,
-		date->tm_min,
-		date->tm_sec
-	);
-#endif
-	return formated;
-}
-
-int mFormatExportPlv(const unsigned char* data, const char *vFileext,unsigned long int size,unsigned char level, const char* filename, const char* desc, const char* title, const char* vDatAuthor,int optionflag,const char* backupExtension) {
-	/* Plv files are saved as raw except you must ignore the checksum and add the plv constant file header */
-
-	/* Variables */
-	FILE* target;
-	int ok;
-	unsigned char sizeOfNow;
-	char* now;
-	const char* nullString="";
-	static const char* author=PLV_DEFAULT_AUTHOR;
-	unsigned long int block2size;
-	const unsigned long int numberOfFieldPairs=8;
-
-	/* Get current time */
-	now=getDate();
-	sizeOfNow=(unsigned char)(strlen(now)+1);
-
-	/* Ignore checksum */
-	/* size--; */
-
-	/* Validate null strings when no description is set */
-	if (desc==NULL) desc=nullString;
-	if (title==NULL) title=nullString;
-	if (vDatAuthor==NULL) vDatAuthor=author;
-
-	/* Writing file */
-
-	/* Safe open for writing mode */
-	ok=writeOpen(vFileext,&target,optionflag);
-
-	/* Write headers */
-	ok=ok&&fwrite(PLV_HEADER_A,PLV_HEADER_A_SIZE,1,target);
-	ok=ok&&fwrite(&level,1,1,target);
-	ok=ok&&fwrite(&numberOfFieldPairs,4,1,target);
-	ok=ok&&fwrite(&size,1,4,target);
-
-	/* Write block 1: raw data without ignoring checksum */
-	ok=ok&&fwrite(data,size,1,target);
-
-	/* Write footers */
-	block2size=(
-		sizeof(PLV_FOOT_EDITOR)+	strlen(vDatAuthor)+1+
-		sizeof(PLV_FOOT_TITLE)+	strlen(title)+1+
-		sizeof(PLV_FOOT_DESC)+	strlen(desc)+1+
-		sizeof(PLV_FOOT_TCREAT)+	sizeOfNow+
-		sizeof(PLV_FOOT_TMODIF)+	sizeOfNow+
-		sizeof(PLV_FOOT_ORIG_FILE)+	strlen(filename)+1
-	);
-
-	ok=ok&&fwrite(&block2size,4,1,target);
-
-	/* Write block 2 */
-	ok=ok&&fwrite(PLV_FOOT_EDITOR,sizeof(PLV_FOOT_EDITOR),1,target);
-	ok=ok&&fwrite(vDatAuthor,strlen(vDatAuthor)+1,1,target);
-	ok=ok&&fwrite(PLV_FOOT_TITLE,sizeof(PLV_FOOT_TITLE),1,target);
-	ok=ok&&fwrite(title,strlen(title)+1,1,target);
-	ok=ok&&fwrite(PLV_FOOT_DESC,sizeof(PLV_FOOT_DESC),1,target);
-	ok=ok&&fwrite(desc,strlen(desc)+1,1,target);
-	ok=ok&&fwrite(PLV_FOOT_TCREAT,sizeof(PLV_FOOT_TCREAT),1,target);
-	ok=ok&&fwrite(now,sizeOfNow,1,target);
-	ok=ok&&fwrite(PLV_FOOT_TMODIF,sizeof(PLV_FOOT_TMODIF),1,target);
-	ok=ok&&fwrite(now,sizeOfNow,1,target);
-	ok=ok&&fwrite(PLV_FOOT_ORIG_FILE,sizeof(PLV_FOOT_ORIG_FILE),1,target);
-	ok=ok&&fwrite(filename,strlen(filename)+1,1,target);
-
-	/* Close file and return */
-	ok=ok&&(!writeCloseOk(target,optionflag,backupExtension));
-	return ok;
-}
-
-int mFormatImportPlv(unsigned char* data, tResource *res) {
-	/* declare variables */
-	unsigned char* pos;
-	unsigned long int oldSize=res->size;
-
-	/* integrity check 1 */
-	if (oldSize<=PLV_HEADER_A_SIZE+1+PLV_HEADER_B_SIZE) return 0;
-	/* if (memcmp(data,PLV_HEADER_A,PLV_HEADER_A_SIZE)) return 0; */
-
-	/* jump to size */
-	pos=data+PLV_HEADER_A_SIZE+1+PLV_HEADER_B_SIZE;
-	/* read size and jump to data */
-	res->size=*(pos++);
-	res->size+=(*(pos++))<<8;
-	res->size+=(*(pos++))<<16;
-	res->size+=(*(pos++))<<24;
-
-	/* integrity check 2 */
-	if (oldSize<=PLV_HEADER_A_SIZE+1+PLV_HEADER_B_SIZE+res->size) return 0;
-
-	/* verify checksum */
-	if (!checkSum(pos,res->size)) return 0;
-
-	/* save data */
-	mWriteSetFileInDatFileIgnoreChecksum(pos,res->size--);
-
-	return 1;
-}
diff --git a/PR/src/lib/formats/wav.c b/PR/src/lib/formats/wav.c
deleted file mode 100644
index d5ec6fb..0000000
--- a/PR/src/lib/formats/wav.c
+++ /dev/null
@@ -1,75 +0,0 @@
-/*  Princed V3 - Prince of Persia Level Editor for PC Version
-    Copyright (C) 2003 Princed Development Team
-
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program; if not, write to the Free Software
-    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-    The authors of this program may be contacted at http://forum.princed.com.ar
-*/
-
-/*
-wav.c: Princed Resources : WAV files support
-\xaf\xaf\xaf\xaf\xaf
- Copyright 2003 Princed Development Team
-  Created: 24 Aug 2003
-
-  Author: Enrique Calot <ecalot.cod@princed.com.ar>
-  Version: 1.01 (2003-Oct-23)
-
- Note:
-  DO NOT remove this copyright notice
-*/
-
-/* Includes */
-#include "pr.h"
-#include "wav.h"
-#include "dat.h"
-#include "disk.h"
-
-int mFormatExportWav(const unsigned char* data, char *vFileext,unsigned long int size,int optionflag,const char* backupExtension) {
-	FILE*         target;
-	int ok;
-	unsigned char wav[]=WAVE_HEADER;
-
-	size-=2;
-	ok=writeOpen(vFileext,&target,optionflag);
-
-	wav[4]=(unsigned char)((size+36)&0xFF);
-	wav[5]=(unsigned char)(((size+36)>>8)&0xFF);
-	wav[6]=(unsigned char)(((size+36)>>16)&0xFF);
-	wav[7]=(unsigned char)(((size+36)>>24)&0xFF);
-
-	wav[40]=(unsigned char)((size)&0xFF);
-	wav[41]=(unsigned char)(((size)>>8)&0xFF);
-	wav[42]=(unsigned char)(((size)>>16)&0xFF);
-	wav[43]=(unsigned char)(((size)>>24)&0xFF);
-
-	ok=ok&&fwrite(wav,sizeof(wav),1,target);
-	ok=ok&&fwrite(data+2,size,1,target);
-	ok=ok&&(!writeCloseOk(target,optionflag,backupExtension));
-
-	return ok;
-}
-
-int mFormatImportWav(unsigned char* data, tResource *res) {
-	unsigned char wav[]=WAVE_HEADER;
-	int i=sizeof(wav);
-
-	if (res->size<=i) return 0;
-	res->size-=(--i);
-	while ((i==4||i==5||i==6||i==7||i==40||i==41||i==42||i==43||(data[i]==wav[i]))&&(i--));
-	data[sizeof(wav)-1]=1; /* First character must be a 0x01 (wav type in dat) */
-	if (i==-1) mWriteSetFileInDatFile(data+sizeof(wav)-1,res->size);
-	return 1;
-}
diff --git a/PR/src/lib/layers/autodetect.c b/PR/src/lib/layers/autodetect.c
deleted file mode 100644
index d116498..0000000
--- a/PR/src/lib/layers/autodetect.c
+++ /dev/null
@@ -1,443 +0,0 @@
-/*  Princed V3 - Prince of Persia Level Editor for PC Version
-    Copyright (C) 2003 Princed Development Team
-
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program; if not, write to the Free Software
-    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-    The authors of this program may be contacted at http://forum.princed.com.ar
-*/
-
-/*
-resources.c: Princed Resources : Resource Handler
-\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf
- Copyright 2003 Princed Development Team
-  Created: 24 Aug 2003
-
-  Author: Enrique Calot <ecalot.cod@princed.com.ar>
-  Version: 1.01 (2003-Oct-23)
-
- Note:
-  DO NOT remove this copyright notice
-*/
-
-/***************************************************************\
-|                  I M P L E M E N T A T I O N                  |
-\***************************************************************/
-
-/* Includes */
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include "pr.h"
-#include "xmlparse.h"
-#include "xmlsearch.h"
-#include "disk.h"
-#include "memory.h"
-#include "resources.h"
-#include "compress.h"
-
-extern FILE* outputStream;
-
-/***************************************************************\
-|                       Item Type Detector                      |
-\***************************************************************/
-
-int verifyLevelHeader(const unsigned char *array, int size) {
-	return (((size==2306)||(size==2305))&&!(array[1698]&0x0F)&&!(array[1700]&0x0F)&&!(array[1702]&0x0F));
-}
-
-int verifyImageHeader(const unsigned char *array, int size) {
-	unsigned char imageBitRate;
-	imageBitRate=((unsigned char)array[6]&0xF0);
-	return (size>7) && (!array[5]) && ((imageBitRate==0xB0));
-	/* return (size>7) && (!array[5]) && ((imageBitRate==0xB0)||(imageBitRate==0x00)); */
-}
-
-int verifyPaletteHeader(const unsigned char *array, int size) {
-	return ((size==101)&&(!array[2])&&(!array[3])&&(array[4]==0x10));
-}
-
-int verifyMidiHeader(const unsigned char *array, int size) {
-	return
-		(size>6) &&
-		(array[1]==0x02) &&
-		(array[2]=='M') &&
-		(array[3]=='T') &&
-		(array[4]=='h') &&
-		(array[5]=='d')
-	;
-}
-
-int verifyWaveHeader(const unsigned char *array, int size) {
-	return
-		(size>1)&&(array[1]==0x01)
-	;
-}
-
-int verifySpeakerHeader(const unsigned char *array, int size) {
-	return
-		(size>2)&&(array[1]==0x00) /* &&!(size%3) */
-	;
-}
-
-int verifyHeader(const unsigned char *array, int size) {
-	if (verifyLevelHeader  (array,size)) return RES_TYPE_LEVEL;
-	if (verifyMidiHeader   (array,size)) return RES_TYPE_MIDI;
-	if (verifyImageHeader  (array,size)) return RES_TYPE_IMAGE;
-	if (verifyPaletteHeader(array,size)) return RES_TYPE_PALETTE;
-	if (verifyWaveHeader   (array,size)) return RES_TYPE_WAVE;
-	if (verifySpeakerHeader(array,size)) return RES_TYPE_PCSPEAKER;
-	return RES_TYPE_BINARY;
-}
-
-const char* getExtDesc(int type) {
-	static const char* extarraydesc[]=RES_FILE_TYPES;
-	return extarraydesc[type];
-}
-
-/***************************************************************\
-|                Partial Resource List Functions                |
-\***************************************************************/
-
-static tResIdList partialList;
-
-int partialListActive() {
-	return partialList.count;
-}
-
-void parseGivenPath(char* path) {
-	/*
-		PRE:  partialList.list was not allocated
-		POST:
-		 partialList.count=0 and partialList.list=NULL if all resources
-		 path was trimed in the "@"
-	*/
-
-	int i;
-	int separator=0;
-	int resourceValue;
-	int j=0;
-	unsigned char n;
-
-	/* Check if the variable wasn't initialized before */
-	if (partialList.count!=0) return;
-	partialList.list=NULL;
-
-	/* Validates the NULL path */
-	if (path==NULL) return;
-
-	/* Locate the string separation */
-	while (path[separator]&&path[separator]!='@') separator++;
-
-	/* If no separation */
-	if (!path[separator]) return; /* There was no separator */
-
-	/* Count values, separate them with '\0' and alloc memory */
-	partialList.count=1;
-	path[separator]=0; /* Trim the path to the separator */
-	i=++separator;
-	while(path[i]) {
-		if (path[i]==',') {
-			partialList.count++;
-			path[i]=0;
-		}
-		i++;
-	}
-	partialList.list=(tResIdListItem*)malloc(sizeof(tResIdListItem)*partialList.count);
-
-	/* Parse values and save them in the list */
-	resourceValue=0;
-	for(i=separator;j!=partialList.count;i++) {
-		n=path[i];
-		if ((0x2F<n)&&(n<0x3A)) {
-			resourceValue=resourceValue*10+(n-'0');
-		} else {
-			if (n) {
-				partialList.list[j].idType=eString;
-				partialList.list[j].value=(char*)strallocandcopy(repairFolders(path+separator));
-				while (path[i]) i++;
-			} else {
-				partialList.list[j].idType=eValue;
-				partialList.list[j].value=(void*)resourceValue;
-			}
-			resourceValue=0;
-			separator=i+1;
-			j++;
-		}
-	}
-}
-
-int isInThePartialList(const char* vFile, int value) {
-	/*
-		Cases:
-			"path/path@"                    all files are false
-			"path/path"                     all files are true
-			"path/path@12file/jjj.bmp,777"  only file "12file/jjj.bmp" and id 777 are true
-			"path/path@1,2,3"               only ids 1, 2 and 3 are true
-	*/
-	int i;
-	char* file;
-
-	if (!partialList.count) return 1;
-	file=(char*)repairFolders(vFile);
-
-	for (i=0;i<partialList.count;i++) {
-		if (partialList.list[i].idType==eValue) {
-			if (value==(int)partialList.list[i].value) return 1;
-		} else {
-			if (file)
-				if (equalsIgnoreCase(file,(char*)partialList.list[i].value)) return 1;
-		}
-	}
-	return 0;
-}
-
-void freePartialList() {
-	int i;
-	for (i=0;i<partialList.count;i++) {
-		if (partialList.list[i].idType==eString)
-			free(partialList.list[i].value);
-	}
-	partialList.count=0;
-}
-
-/***************************************************************\
-|                       Checksum handling                       |
-\***************************************************************/
-
-int checkSum(unsigned char* data,int size) {
-	unsigned char  checksum = 1;
-
-	/* calculates the checksum */
-	while (size--) checksum+=*(data++);
-	return !checksum;
-}
-
-/***************************************************************\
-|                     Parsing resource file                     |
-\***************************************************************/
-
-/* Initializes the resource table */
-void emptyTable(tResource* r[]) {
-	int i=MAX_RES_COUNT;
-	while (i--) *(r++)=NULL;
-}
-
-/* Resources input xml tree. Private+abstract variable */
-static tTag* xmlStructure=NULL; /* Keeping the parsed file structure in memory will save a lot of time */
-
-int parseStructure(const char* vFile) {
-	static const char defaultXmlFile[]=RES_XML_RESOURC_XML;
-	int error=0;
-
-	/* Generate xml structure if doesn't exist */
-	if (xmlStructure==NULL)	{
-		/* Set default values */
-		if (vFile==NULL) vFile=defaultXmlFile;
-		xmlStructure=parseXmlFile(vFile,&error);
-	}
-	if (error) xmlStructure=NULL;
-	return error;
-}
-
-/* parse file */
-int parseFile(const char* vFile, const char* datFile, tResource* r[]) {
-	/* Declare error variable */
-	int error;
-	tPassWork pass;
-
-	/* Generate xml structure if doesn't exist */
-	if ((error=(parseStructure(vFile)))) return error;
-
-	/* Use the xml structure to Generate the resource structure of the file */
-	emptyTable(r);
-	pass.datFile=datFile;
-	pass.r=r;
-	workTree(xmlStructure,&pass,workTag);
-
-	/* All done */
-	return 0;
-}
-
-void freeParsedStructure() {
-	/* Free if exist */
-	if (xmlStructure!=NULL) freeTagStructure(xmlStructure);
-	/* Reinitializes the variable */
-	xmlStructure=NULL;
-}
-
-/***************************************************************\
-|                     Unknown.xml primitives                    |
-\***************************************************************/
-
-/* Resources output to xml functions. Private+abstract variable */
-static FILE* unknownXmlFile=NULL;
-
-void AddToUnknownXml(const char* vFiledatWithPath,unsigned short id,const char* ext,char type,const char* vDirExt,unsigned short pal,const char* vFiledat,int optionflag,int count) {
-	/* Open file if not open */
-	if (unknownXmlFile==NULL) {
-		char xmlFile[MAX_FILENAME_SIZE];
-		sprintf(xmlFile,RES_XML_UNKNOWN_PATH""RES_XML_UNKNOWN_XML,vDirExt,vFiledatWithPath);
-
-		/* Open file */
-		if (!writeOpen(xmlFile,&unknownXmlFile,optionflag)) return;
-
-		/* Save headers */
-		if (type==6) pal=id;
-		fprintf(unknownXmlFile,RES_XML_UNKNOWN_START,
-			vFiledat,vFiledatWithPath,pal
-		);
-	}
-
-	/* Write item */
-	fprintf(unknownXmlFile,RES_XML_UNKNOWN_ITEM,
-		id,getExtDesc(type),count,ext,getExtDesc(type),getExtDesc(type),count
-	); /* To the xml output */
-}
-
-static unsigned int typeCount[RES_TYPECOUNT]; /* initialized in 0 */
-
-void endUnknownXml(int optionflag, const char* backupExtension) {
-	if (unknownXmlFile!=NULL) {
-		int i;
-		fprintf(unknownXmlFile,RES_XML_UNKNOWN_END);
-		writeCloseOk(unknownXmlFile,optionflag,backupExtension);
-		unknownXmlFile=NULL;
-		for (i=0;i<RES_TYPECOUNT;i++) typeCount[i]=0;
-	}
-}
-
-/***************************************************************\
-|                   Resources extra functions                   |
-\***************************************************************/
-
-void getFileName(char* vFileext,const char* vDirExt,tResource* r,unsigned short id,const char* vFiledat, const char* vDatFileName,int optionflag, const char* backupExtension) {
-	static const char* extarray[]=RES_FILE_EXTENSIONS;
-	int pos;
-
-	if (r->path==NULL) {
-		pos=((r->type<RES_TYPECOUNT)&&(r->type>=0))?r->type:RES_TYPE_BINARY;
-		typeCount[pos]++;
-
-		/* set filename */
-		sprintf(vFileext,RES_XML_UNKNOWN_PATH""RES_XML_UNKNOWN_FILES,vDirExt,vDatFileName,getExtDesc(pos),typeCount[pos],extarray[pos]);
-		AddToUnknownXml(vDatFileName,id,extarray[pos],r->type,vDirExt,r->palette,vFiledat,optionflag,typeCount[pos]);
-	} else {
-		/* set filename */
-		sprintf(vFileext,"%s/%s",vDirExt,r->path);
-	}
-}
-
-/* Search files for the Import feature */
-int importDir(const char* directory, const char* vResFile, int pOption, const char* backupExtension,const char* vDatDirectory, FILE* output) {
-	/* Declare error variable */
-	int error=0;
-	char* datfile;
-	char* recursive;
-	int sizeOfPath;
-	int sizeOfFile;
-	int result;
-
-	/* Generate xml structure if doesn't exist */
-	if ((error=(parseStructure(vResFile)))) return error;
-
-	/* Use the xml structure to Generate the file list */
-	workTree(xmlStructure,NULL,addFileToList);
-
-	while(datfile=getFileFromList()) {
-		sizeOfPath=strlen(vDatDirectory);
-		sizeOfFile=strlen(datfile);
-
-		/* Generate full vDatDirectory/datfile path */
-		recursive=(char*)malloc(sizeOfPath+sizeOfFile+2);
-		memcpy(recursive,vDatDirectory,sizeOfPath);
-		recursive[sizeOfPath]=DIR_SEPARATOR;
-		memcpy(recursive+sizeOfPath+1,datfile,sizeOfFile+1);
-
-		/* Run program */
-		result=prMain(pOption, backupExtension,directory,vResFile,recursive,datfile,NULL,output);
-		/* Free memory */
-		free(datfile);
-		free(recursive);
-	}
-
-	/* All done */
-	return result;
-}
-
-int isntADatFile(const char* testFile, const char* vResFile) {
-	/*
-		Results:
-			0  Is a dat file
-			1  It isn't a dat file
-			-1 Parse error
-			-2 No memory
-			-3 Attribute not recognized
-			-4 File not found
-	*/
-
-	/* Declare result variable */
-	int result;
-	char* gottenFile;
-
-	/* Generate xml structure if doesn't exist */
-	if ((result=(parseStructure(vResFile)))) return result;
-
-	/* Use the xml structure to Generate the file list */
-	workTree(xmlStructure,NULL,addFileToList);
-	while((gottenFile=(getFileFromList()))) {
-		result=result||equalsIgnoreCase(gottenFile,testFile);
-		free(gottenFile);
-	}
-
-	/* All done */
-	return !result;
-}
-
-/***************************************************************\
-|                Resource tree browsing for DLL                 |
-\***************************************************************/
-
-#ifdef DLL
-
-tTag* resourceTreeGetRoot () {
-	return xmlStructure;
-}
-
-tTag* resourceTreeGetNext (tTag* whereAmI) {
-	return whereAmI->next;
-}
-
-tTag* resourceTreeGetChild(tTag* whereAmI) {
-	return whereAmI->child;
-}
-
-int   resourceTreeGetInfo (tTag* whereAmI,	char** tag, char** desc, char** path, char** file, char** itemtype, char** name, char** palette, char** type, char** value, char** version, char** number) {
-	if (whereAmI==NULL) return 0;
-	*tag=whereAmI->tag;
-	*desc=whereAmI->desc;
-	*path=whereAmI->path;
-	*file=whereAmI->file;
-	*itemtype=whereAmI->itemtype;
-	*name=whereAmI->name;
-	*palette=whereAmI->palette;
-	*type=whereAmI->type;
-	*value=whereAmI->value;
-	*version=whereAmI->version;
-	*number=whereAmI->number;
-	return 1;
-}
-
-#endif
-
diff --git a/PR/src/lib/layers/dat.c b/PR/src/lib/layers/dat.c
deleted file mode 100644
index 28b59cf..0000000
--- a/PR/src/lib/layers/dat.c
+++ /dev/null
@@ -1,243 +0,0 @@
-/*  Princed V3 - Prince of Persia Level Editor for PC Version
-    Copyright (C) 2003 Princed Development Team
-
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program; if not, write to the Free Software
-    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-    The authors of this program may be contacted at http://forum.princed.com.ar
-*/
-
-/*
-dat.c: Princed Resources : DAT library
-\xaf\xaf\xaf\xaf\xaf
- Copyright 2004 Princed Development Team
-  Created: 15 Mar 2004
-
-  Author: Enrique Calot <ecalot.cod@princed.com.ar>
-  Version: 1.00 (2004-Mar-15)
-
- Note:
-  DO NOT remove this copyright notice
-*/
-
-#include <stdio.h>
-#include <string.h>
-#include "pr.h"
-
-#include "resources.h"
-#include "disk.h"
-#include "memory.h"
-
-/***************************************************************\
-|                     DAT reading primitives                    |
-\***************************************************************/
-
-char               recordSize;
-int                ofk=0;
-int                pop1;
-unsigned char*     indexPointer;
-unsigned long  int indexOffset;
-unsigned long  int offset;
-unsigned short int indexSize;
-unsigned char*     readDatFile;
-int                readDatFileSize;
-
-void mReadCloseDatFile() {
-	free(readDatFile);
-}
-
-int mReadBeginDatFile(unsigned short int *numberOfItems,const char* vFiledat){
-	/*
-		Return Values:
-			0 Wrong Format or file not found
-			1 Ok
-	*/
-
-	int ok;
-	unsigned char* readDatFilePoint;
-
-	/* Open file */
-	readDatFileSize=mLoadFileArray(vFiledat,&readDatFile);
-	if (!readDatFileSize) return 0;
-	if (readDatFileSize<=6) {free(readDatFile);return 0;}
-
-	readDatFilePoint=readDatFile;
-
-	/* verify dat format */
-	indexOffset=array2long(readDatFilePoint);
-	readDatFilePoint+=4;
-	indexSize=array2short(readDatFilePoint);
-
-	if ((indexOffset>readDatFileSize)&&((indexOffset+indexSize)!=readDatFileSize)) {
-		free(readDatFile);
-		return 0; /* this is not a valid prince dat file */
-	}
-
-	indexPointer=readDatFile+indexOffset;
-	*numberOfItems=array2short(indexPointer);
-	indexPointer+=2;
-	pop1=(((*numberOfItems)*8+2)==indexSize);
-
-	if (!pop1) { /* verify if pop2 */
-		ofk=(*numberOfItems)*6+2+((*numberOfItems)-2)*13;
-		(*numberOfItems)=((indexSize-6-((*numberOfItems)*6)-(((*numberOfItems)-2)*13))/11);
-	} else {
-		ofk=0;
-	}
-	recordSize=pop1?8:11;
-
-	return 1;
-}
-
-int mReadGetFileInDatFile(int k,unsigned char* *data,unsigned long  int *size) {
-	int ok=1; /* TODO: rename mReadGet* for mRead* and mWriteSet for mWrite */
-	unsigned short int id;
-
-	/* for each archived file the index is read */
-	id=    (indexPointer[ofk+k*recordSize])+(indexPointer[ofk+k*recordSize+1]<<8);
-	offset=(indexPointer[ofk+k*recordSize+2])+(indexPointer[ofk+k*recordSize+3]<<8)+(indexPointer[ofk+k*recordSize+4]<<16)+(indexPointer[ofk+k*recordSize+5]<<24);
-	*size= (indexPointer[ofk+k*recordSize+6])+(indexPointer[ofk+k*recordSize+7]<<8)+1;
-	if ((!pop1)&&(!(indexPointer[ofk+k*recordSize+8]==0x40)&&(!indexPointer[ofk+k*recordSize+9])&&(!indexPointer[ofk+k*recordSize+10]))) return -1;
-	if (offset+indexSize>readDatFileSize) return -1;
-	*data=readDatFile+offset;
-	return ok?id:-1;
-}
-
-int mReadInitResource(tResource** res,const unsigned char* data,long size) {
-	if ((*res)==NULL) {
-		(*res)=(tResource*)malloc(sizeof(tResource));
-		if ((*res)==NULL) return -1; /* no memory */
-		(*res)->path=NULL;
-		(*res)->palAux=NULL;
-		(*res)->desc=NULL;
-		(*res)->name=NULL;
-		(*res)->palette=0;
-		(*res)->number=0;
-		(*res)->size=(unsigned short int)size;
-		(*res)->offset=(unsigned short)offset; /* TODO delete this line */
-		(*res)->type=verifyHeader(data,(unsigned short int)size);
-	} else { /* If resource type is invalid or 0, the type will be decided by PR */
-		if (!((*res)->type)) (*res)->type=verifyHeader(data,(unsigned short int)size);
-	}
-	return 0;
-}
-
-/***************************************************************\
-|                     DAT Writing primitives                    |
-\***************************************************************/
-
-FILE* writeDatFile;
-
-int mWriteBeginDatFile(const char* vFile, int optionflag) {
-	/*
-		Opens safely a dat file for writing mode and
-		reserves space for the headers
-
-		Return Values:
-			 1 Ok
-			 0 File couldn't be open
-
-	*/
-
-	if (writeOpen(vFile,&writeDatFile,optionflag|backup_flag)) {
-		fseek(writeDatFile,6,SEEK_SET);
-		return 1;
-	} else {
-		return 0;
-	}
-}
-
-void mWriteInitResource(tResource** res) {
-	if ((*res)==NULL) {
-		(*res)=(tResource*)malloc(sizeof(tResource));
-	}
-	(*res)->offset=(unsigned long)ftell(writeDatFile);
-}
-
-void mWriteSetFileInDatFile(unsigned char* data, int size) {
-	/*
-		Adds a data resource to a dat file keeping
-		abstractly the checksum ver	ifications
-	*/
-
-	/* Declare variables */
-	int            k        = size;
-	unsigned char  checksum = 0;
-	unsigned char* dataAux  = data;
-
-	/* calculates the checksum */
-	while (k--) checksum+=*(dataAux++);
-	checksum=~checksum;
-
-	/* writes the checksum and the data content */
-	fwrite(&checksum,1,1,writeDatFile);
-	fwrite(data,size,1,writeDatFile);
-}
-
-void mWriteSetFileInDatFileIgnoreChecksum(unsigned char* data, int size) {
-	fwrite(data,size,1,writeDatFile);
-}
-
-void mWriteCloseDatFile(tResource* r[],int dontSave,int optionflag, const char* backupExtension) {
-	/*
-		Closes a dat file filling the index and other structures
-	*/
-	unsigned short int id=1;
-	unsigned short int totalItems=0;
-	unsigned short int size2=2;
-	unsigned long  int size1=ftell(writeDatFile);
-
-	/* Write index */
-	fwrite(&totalItems,2,1,writeDatFile); /* Junk total items count to reserve 2 bytes */
-	for (;id!=MAX_RES_COUNT;id++) {
-		if (r[id]!=NULL) {
-			/* the file is in the archive, so i'll add it to the index */
-			totalItems++;
-			fwrite(&id,2,1,writeDatFile);
-			fwrite(&(r[id]->offset),4,1,writeDatFile);
-			fwrite(&(r[id]->size),2,1,writeDatFile);
-		}
-	}
-	size2+=totalItems<<3;
-	fseek(writeDatFile,size1,SEEK_SET);
-	fwrite(&totalItems,2,1,writeDatFile); /* Definitive total items count */
-
-	/* Write first 6 bytes header */
-	fseek(writeDatFile,0,SEEK_SET);
-	fwrite(&size1,4,1,writeDatFile);
-	fwrite(&size2,2,1,writeDatFile);
-
-	/* Closes the file and flushes the buffer */
-	writeClose(writeDatFile,dontSave,optionflag,backupExtension);
-}
-
-/***************************************************************\
-|                       DAT R/W primitives                      |
-\***************************************************************/
-
-int mRWBeginDatFile(const char* vFile, unsigned short int *numberOfItems, int optionflag) {
-	if (!mReadBeginDatFile(numberOfItems,vFile)) return -2;
-	if (!mWriteBeginDatFile(vFile,optionflag)) {
-		mReadCloseDatFile();
-		return -1;
-	}
-	return 0;
-}
-
-
-
-
-
-
-
diff --git a/PR/src/lib/layers/disk.c b/PR/src/lib/layers/disk.c
deleted file mode 100644
index bd51e42..0000000
--- a/PR/src/lib/layers/disk.c
+++ /dev/null
@@ -1,477 +0,0 @@
-/*  Princed V3 - Prince of Persia Level Editor for PC Version
-    Copyright (C) 2003 Princed Development Team
-
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program; if not, write to the Free Software
-    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-    The authors of this program may be contacted at http://forum.princed.com.ar
-*/
-
-/*
-disk.c: Princed Resources : Disk Access & File handling functions
-\xaf\xaf\xaf\xaf\xaf\xaf
- Copyright 2003 Princed Development Team
-  Created: 29 Oct 2003
-
-  Author: Enrique Calot <ecalot.cod@princed.com.ar>
-  Version: 1.00 (2003-Oct-29)
-
-  Modified by: Enrique Calot <ecalot.cod@princed.com.ar>
-  Version: 1.10 (2003-Dec-03)
-  Modified by: Santiago Zamora <drkzight@users.sourceforge.net>
-  Version: 1.20 (2004-Jan-06)
-
- Note:
-  DO NOT remove this copyright notice
-*/
-
-/* Defines */
-#include "memory.h"
-#include <string.h>
-#include "pr.h"
-#include "disk.h"
-#include "xmlparse.h" /* equalsIgnoreCase */
-
-#include <sys/types.h>
-#include <sys/stat.h>
-extern FILE* outputStream;
-#ifdef UNIX
-	#define defmkdir(a) mkdir (a,(mode_t)0755)
-	#include <dirent.h>
-	#include <termios.h>
-	/*#include <curses.h>*/
-	#include <unistd.h>
-	#include <fcntl.h>
-	#define osIndepGetCharacter() getchar()
-#else
-	#include <direct.h>
-	#include "direntwin.h"
-	#define defmkdir(a) mkdir (a)
-	#include <conio.h>
-	#define osIndepGetCharacter() getche()
-#endif
-
-/***************************************************************\
-|              Disk Access & File handling functions            |
-\***************************************************************/
-
-/* Repair folders */
-const char *repairFolders(const char* a) {
-	int i,k;
-	static char result[MAX_FILENAME_SIZE];
-
-	for (i=0,k=0;a[i]&&(k<MAX_FILENAME_SIZE);) {
-		if (isDirSep(a,i)) {
-			result[k]=DIR_SEPARATOR;
-			i++;
-			while (isDirSep(a,i)) i++;
-		} else {
-			result[k]=a[i];
-			i++;
-		}
-		k++;
-	}
-	result[k]=0;
-	return result;
-}
-
-
-/* Create base directory of a file */
-int makebase(const char* p) {
-	/*
-		Creates the base directory of the given file "p"
-		Returns 0 if created
-		Returns -1 if an error occurred
-
-		Note: if the base directory already exists it will return -1!
-	*/
-
-	/* Declare variables */
-	static char old[MAX_FILENAME_SIZE];
-	int i,a,equal=1;
-	int size;
-	char* aux;
-
-	/* Initialize variables */
-	size=(strlen(p)+1);
-	aux=(char*)malloc(size);
-
-	/* Make directories */
-	for (i=0;i<size;i++) {
-		aux[i]=0;
-		equal=equal&&(old[i]==p[i]);
-		if ((!equal)&&(p[i]==DIR_SEPARATOR)) a=defmkdir(aux);
-		old[i]=p[i];
-		aux[i]=p[i];
-	}
-
-	free(aux);
-	return a;
-}
-
-static tOpenFiles* openFilesList=NULL;
-
-void addFileToOpenFilesList(const char* fileName,int hasBackup) {
-	/*
-		Add a recently safe open file to the file pointer dynamic table
-		using the LIFO philosophy.
-	*/
-
-	tOpenFiles* newNode;
-
-	/* Create the new node and fill in the fields */
-	newNode=(tOpenFiles*)malloc(sizeof(tOpenFiles));
-	newNode->next=openFilesList;
-	newNode->name=strallocandcopy(fileName);
-	if (hasBackup) {
-		newNode->size=mLoadFileArray(fileName,&(newNode->content));
-	} else {
-		newNode->size=0;
-	}
-	openFilesList=newNode;
-}
-
-void addPointerToOpenFilesList(FILE* fp) { /* TODO: use a define */
-	openFilesList->file=fp;
-}
-
-int getFromOpenFilesList(FILE* fp, char** fileName, unsigned char** content, unsigned long int *size) {
-	tOpenFiles* currentNode;
-	tOpenFiles* priorNode=NULL;
-
-	/* Search using FILE* file as key */
-	if (openFilesList==NULL) return 0; /* Empty list */
-	currentNode=openFilesList;
-	while ((currentNode->file!=fp)&&(currentNode->next!=NULL)) {
-		priorNode=currentNode;
-		currentNode=currentNode->next;
-	}
-	if (currentNode->file!=fp) return 0; /* Not found */
-
-	/* Return results */
-	*fileName=currentNode->name;
-	*content=currentNode->content;
-	*size=currentNode->size;
-
-	/* free node and set prior pointer to the next */
-	if (priorNode==NULL) {
-		openFilesList=currentNode->next;
-	} else {
-		priorNode->next=currentNode->next;
-	}
-	free(currentNode);
-
-	return 1;
-}
-
-int writeClose(FILE* fp,int dontSave,int optionflag,const char* backupExtension) {
-	unsigned char* content;
-	char* fileName;
-	unsigned long int size;
-
-	if (getFromOpenFilesList(fp,&fileName,&content,&size)) {
-		if (dontSave) {
-			fclose(fp);
-			if (size) {
-				fp=fopen(fileName,"wb");
-				if (fp==NULL) return -1;
-				fwrite(content,1,size,fp);
-			} else {
-				remove(fileName);
-			}
-		} else {
-			/* File Existed before and we need to back it up */
-			if (hasFlag(backup_flag)) {
-				char aux[MAX_FILENAME_SIZE];
-				static const char defaultbackupExtension[]=DEFAULT_BACKUP_EXTENSION;
-				/* Set default values if there isn't */
-				if (backupExtension==NULL) backupExtension=defaultbackupExtension;
-				/* generate the file name */
-				sprintf(aux,"%s.%s",fileName, backupExtension);
-				fclose(fp);
-				fp=fopen(aux,"wb");
-				if (fp==NULL) return -2;
-				fwrite(content,1,size,fp);
-			}
-		}
-
-		free(fileName);
-		if (size) free(content);
-	}
-
-	return fclose(fp);
-}
-
-int writeOpen(const char* vFileext, FILE* *fp, int optionflag) {
-	/*
-		Opens vFileext for write access
-		 if the path doesn't exist it is created
-		 if the file doesn't exist it is created
-		 if the file does exist it is overwritten
-
-		Sets the file pointer and returns 1 if Ok or 0 if error
-
-		Returns
-		 0 if error
-		 1 if ok
-	*/
-	const char* file;
-	whatIs fileType;
-	static int all=0;
-	int result;
-
-#ifdef UNIX
-#ifndef IGNORE_TERM_CHANGE
-	/* This will eliminate the enter after the input */
-	struct termios term;
-	struct termios termOld;
-
-	tcgetattr (STDIN_FILENO, &term);
-	tcgetattr (STDIN_FILENO, &termOld); /* save original proprieties */
-	term.c_lflag &= ~(ICANON);
-	tcsetattr (STDIN_FILENO, TCSANOW, &term);
-#endif
-#endif
-
-	/* Create base directory and save file */
-	file=repairFolders(vFileext);
-
-	/* Verify if file already exists. */
-	fileType=isDir(vFileext);
-	if (fileType==eDirectory) return 0;
-
-	if (fileType==eFile) {
-		/* File exists. We need to ask */
-		if ((!(hasFlag(force_flag)))&&(!all)) {
-			char answer;
-			printf(PR_TEXT_DISK_REPLACE,getFileNameFromPath(file));
-			answer=osIndepGetCharacter();
-			printf("\n");
-			if (charToUpper(answer)==PR_DISK_REPLACE_NO)  return 0;
-			if (charToUpper(answer)==PR_DISK_REPLACE_ALL) all=1;
-		}
-	} else {
-		makebase(file);
-	}
-
-#ifdef UNIX
-#ifndef IGNORE_TERM_CHANGE
-	/* restoring previous terminal options */
-	term=termOld;
-	tcsetattr (STDIN_FILENO, TCSANOW, &termOld);
-#endif
-#endif
-	/*
-		If the file exists, we need to remember the old content in memory
-		if not, we need to know the name in case we need to delete it
-	*/
-
-	addFileToOpenFilesList(file,hasFlag(backup_flag));
-	if ((result=((*fp=fopen(file,"wb"))!=NULL))) addPointerToOpenFilesList(*fp);
-	return result;
-}
-
-
-int writeData(const unsigned char* data, int ignoreChars, char* vFileext, int size, int optionflag,const char* backupExtension) {
-	/*
-		Creates vFileext and saves data in it. In case the directory doesn't
-		exist it will be created.
-
-		Data is read from ignoreChars to size.
-		Example:
-			if data="123456789", ignoreChars=3, size=8
-			saved file will contain "45678"
-
-		Returns
-		 0 if error
-		 1 if ok
-	*/
-
-	/* Declare variables */
-	FILE* target;
-	char  ok;
-
-	/* Verify parameters */
-	size-=ignoreChars;
-	if (size<=0) return 0;
-
-	/* Save file */
-	ok=writeOpen(vFileext,&target,optionflag);
-	ok=ok&&fwrite(data+ignoreChars,size,1,target);
-	ok=ok&&(!writeCloseOk(target,optionflag,backupExtension));
-	return ok;
-}
-
-int mLoadFileArray(const char* vFile,unsigned char** array) {
-	/*
-		Using the string in vFile, it opens the file and returns the
-		number of bytes	in it and the content of the file in array.
-		In case the file couldn't be open or memory allocated returns 0.
-	*/
-
-	/* declare variables */
-	FILE *fp;
-	int  aux;
-
-	/* Open the file */
-	if ((fp=fopen(repairFolders(vFile),"rb"))==NULL) {
-		return 0;
-	} else {
-		/* get file size */
-		fseek(fp,0,SEEK_END);
-		aux=ftell(fp);
-		if ( !aux || (aux>SIZE_OF_FILE) || ( ((*array=(unsigned char*)malloc(sizeof(char)*aux))==NULL) ) ) {
-			/* if the file was null or bigger than the max size or couldn't allocate the file in memory */
-			fclose(fp);
-			return 0;
-		} else {
-			/* if the file was successfully open */
-			fseek(fp,0,SEEK_SET);
-			aux=fread (*array,1,aux,fp);
-			fclose(fp);
-			return aux;
-		}
-	}
-}
-
-#ifdef PR_FUTURE_CODE
-int mDiskVealidateFileHeader(unsigned char* text, int size, FILE* fp) {
-	/*
-		Validates if the file contains the following text in the stream.
-		1 if it does
-		0 if error or doesn't
-
-		Moves the file pointer to the next position
-	*/
-
-	/* Declare variables */
-	int i;
-	unsigned char* readText;
-
-	/* Reserves memory to allocate the read bytes */
-	readText=getMemory(size);
-	if (readText==NULL) return 0; /* memory error, abort */
-
-	/* Read the file and move the file pointer */
-	if (!fread(readText,size,1,fp)) {
-		free(readText);
-		return 0;
-	}
-
-	/* Make the binary compare */
-	for (i=0;(i<size)&&(readText[i]==text[i]);i++);
-
-	/* Frees memory and returns the result */
-	free(readText);
-	return (i==size); /* 0 if the compare for was stopped before end reached */
-}
-#endif
-
-const char* getFileNameFromPath(const char* path) {
-	/*
-		If you give a path you get the filename,
-		if you give a filename, you get the same filename
-	*/
-	int size;
-	size=strlen(path);
-	while (size) {
-		if (isDirSep(path,size)) {
-			return path+size+1;
-		}
-		size--;
-	}
-	return path;
-}
-
-whatIs isDir(const char *path) {
-	/*
-		eDirectory if path is a directory
-		eNotFound if path isn't a directory or doesn't exist
-		eFile if it is a file
-	*/
-	struct stat buf;
-
-	if(stat(path,&buf)==-1) return eNotFound;
-	return (S_IFDIR&buf.st_mode)?eDirectory:eFile;
-}
-
-#ifndef IGNORERECURSIVEFUNCTIONS
-
-int recurseDirectory(const char* path,int optionflag, const char* extension,const char* dirName,const char* resFile, const char* datfilename,const char* datAuthor,FILE* output) {
-	/*
-		Search for all .dat files in the directory
-		if recursive flag is set search over the subdirectories
-		if verbose flag is set shows some messages in the screen
-		when .dat files are found it runs prMain form each of them
-	*/
-
-	/* Declare variables */
-	char*          recursive;
-	struct dirent* directoryStructure;
-	DIR*           dir;
-
-	/* Opens directory */
-	if ((dir = opendir(path))==NULL) {
-		return 0;
-	}
-
-	/* Shows some messages */
-	if ((hasFlag(recursive_flag))&&(hasFlag(verbose_flag))) { /* Only recourse if recursive and verbose flags are set */
-		fprintf(outputStream,PR_TEXT_DISK_PROCESSING,path);
-	}
-
-	/* Main loop: while there are still more files left */
-	while ((directoryStructure = readdir(dir))!=NULL) {
-		if /* Don't look over the system directories */
-			(
-				strcmp(directoryStructure->d_name,".")&&
-				strcmp(directoryStructure->d_name,"..")
-		) {
-			/* Declare variables */
-			int sizeOfPath=strlen(path);
-			int sizeOfFile=strlen(directoryStructure->d_name);
-
-			/* Generate recursive path */
-			recursive=(char*)malloc(sizeOfPath+2+sizeOfFile);
-			memcpy(recursive,path,sizeOfPath);
-			recursive[sizeOfPath]=DIR_SEPARATOR;
-			memcpy(recursive+sizeOfPath+1,directoryStructure->d_name,sizeOfFile+1);
-
-			/*
-				If recursive path is a directory and recursive flag is set recourse into it
-				if recursive path is a directory and recursive flag wasn't set, just ignore
-				if recursive path is not a directory and is a dat file, do prMain
-				if recursive path is not a directory and is not a dat file, ignore
-			*/
-			if (isDir(recursive)==eDirectory) {
-				if (hasFlag(recursive_flag)) { /* Only recourse if recursive flag is set */
-					recurseDirectory(recursive,optionflag,extension,dirName,resFile,datfilename,datAuthor,output);
-				}
-			} else {
-				char aux[]=".dat";
-				if (sizeOfFile>4) {
-					if (equalsIgnoreCase(aux,directoryStructure->d_name+sizeOfFile-4)) {
-						prMain(optionflag,extension,dirName,resFile,recursive,directoryStructure->d_name,datAuthor,output);
-					}
-				}
-			}
-			/* Free all allocated memory */
-			free(recursive);
-		}
-	}
-	return 1;
-}
-
-#endif
-
diff --git a/PR/src/lib/layers/idlist.c b/PR/src/lib/layers/idlist.c
deleted file mode 100644
index d116498..0000000
--- a/PR/src/lib/layers/idlist.c
+++ /dev/null
@@ -1,443 +0,0 @@
-/*  Princed V3 - Prince of Persia Level Editor for PC Version
-    Copyright (C) 2003 Princed Development Team
-
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program; if not, write to the Free Software
-    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-    The authors of this program may be contacted at http://forum.princed.com.ar
-*/
-
-/*
-resources.c: Princed Resources : Resource Handler
-\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf
- Copyright 2003 Princed Development Team
-  Created: 24 Aug 2003
-
-  Author: Enrique Calot <ecalot.cod@princed.com.ar>
-  Version: 1.01 (2003-Oct-23)
-
- Note:
-  DO NOT remove this copyright notice
-*/
-
-/***************************************************************\
-|                  I M P L E M E N T A T I O N                  |
-\***************************************************************/
-
-/* Includes */
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include "pr.h"
-#include "xmlparse.h"
-#include "xmlsearch.h"
-#include "disk.h"
-#include "memory.h"
-#include "resources.h"
-#include "compress.h"
-
-extern FILE* outputStream;
-
-/***************************************************************\
-|                       Item Type Detector                      |
-\***************************************************************/
-
-int verifyLevelHeader(const unsigned char *array, int size) {
-	return (((size==2306)||(size==2305))&&!(array[1698]&0x0F)&&!(array[1700]&0x0F)&&!(array[1702]&0x0F));
-}
-
-int verifyImageHeader(const unsigned char *array, int size) {
-	unsigned char imageBitRate;
-	imageBitRate=((unsigned char)array[6]&0xF0);
-	return (size>7) && (!array[5]) && ((imageBitRate==0xB0));
-	/* return (size>7) && (!array[5]) && ((imageBitRate==0xB0)||(imageBitRate==0x00)); */
-}
-
-int verifyPaletteHeader(const unsigned char *array, int size) {
-	return ((size==101)&&(!array[2])&&(!array[3])&&(array[4]==0x10));
-}
-
-int verifyMidiHeader(const unsigned char *array, int size) {
-	return
-		(size>6) &&
-		(array[1]==0x02) &&
-		(array[2]=='M') &&
-		(array[3]=='T') &&
-		(array[4]=='h') &&
-		(array[5]=='d')
-	;
-}
-
-int verifyWaveHeader(const unsigned char *array, int size) {
-	return
-		(size>1)&&(array[1]==0x01)
-	;
-}
-
-int verifySpeakerHeader(const unsigned char *array, int size) {
-	return
-		(size>2)&&(array[1]==0x00) /* &&!(size%3) */
-	;
-}
-
-int verifyHeader(const unsigned char *array, int size) {
-	if (verifyLevelHeader  (array,size)) return RES_TYPE_LEVEL;
-	if (verifyMidiHeader   (array,size)) return RES_TYPE_MIDI;
-	if (verifyImageHeader  (array,size)) return RES_TYPE_IMAGE;
-	if (verifyPaletteHeader(array,size)) return RES_TYPE_PALETTE;
-	if (verifyWaveHeader   (array,size)) return RES_TYPE_WAVE;
-	if (verifySpeakerHeader(array,size)) return RES_TYPE_PCSPEAKER;
-	return RES_TYPE_BINARY;
-}
-
-const char* getExtDesc(int type) {
-	static const char* extarraydesc[]=RES_FILE_TYPES;
-	return extarraydesc[type];
-}
-
-/***************************************************************\
-|                Partial Resource List Functions                |
-\***************************************************************/
-
-static tResIdList partialList;
-
-int partialListActive() {
-	return partialList.count;
-}
-
-void parseGivenPath(char* path) {
-	/*
-		PRE:  partialList.list was not allocated
-		POST:
-		 partialList.count=0 and partialList.list=NULL if all resources
-		 path was trimed in the "@"
-	*/
-
-	int i;
-	int separator=0;
-	int resourceValue;
-	int j=0;
-	unsigned char n;
-
-	/* Check if the variable wasn't initialized before */
-	if (partialList.count!=0) return;
-	partialList.list=NULL;
-
-	/* Validates the NULL path */
-	if (path==NULL) return;
-
-	/* Locate the string separation */
-	while (path[separator]&&path[separator]!='@') separator++;
-
-	/* If no separation */
-	if (!path[separator]) return; /* There was no separator */
-
-	/* Count values, separate them with '\0' and alloc memory */
-	partialList.count=1;
-	path[separator]=0; /* Trim the path to the separator */
-	i=++separator;
-	while(path[i]) {
-		if (path[i]==',') {
-			partialList.count++;
-			path[i]=0;
-		}
-		i++;
-	}
-	partialList.list=(tResIdListItem*)malloc(sizeof(tResIdListItem)*partialList.count);
-
-	/* Parse values and save them in the list */
-	resourceValue=0;
-	for(i=separator;j!=partialList.count;i++) {
-		n=path[i];
-		if ((0x2F<n)&&(n<0x3A)) {
-			resourceValue=resourceValue*10+(n-'0');
-		} else {
-			if (n) {
-				partialList.list[j].idType=eString;
-				partialList.list[j].value=(char*)strallocandcopy(repairFolders(path+separator));
-				while (path[i]) i++;
-			} else {
-				partialList.list[j].idType=eValue;
-				partialList.list[j].value=(void*)resourceValue;
-			}
-			resourceValue=0;
-			separator=i+1;
-			j++;
-		}
-	}
-}
-
-int isInThePartialList(const char* vFile, int value) {
-	/*
-		Cases:
-			"path/path@"                    all files are false
-			"path/path"                     all files are true
-			"path/path@12file/jjj.bmp,777"  only file "12file/jjj.bmp" and id 777 are true
-			"path/path@1,2,3"               only ids 1, 2 and 3 are true
-	*/
-	int i;
-	char* file;
-
-	if (!partialList.count) return 1;
-	file=(char*)repairFolders(vFile);
-
-	for (i=0;i<partialList.count;i++) {
-		if (partialList.list[i].idType==eValue) {
-			if (value==(int)partialList.list[i].value) return 1;
-		} else {
-			if (file)
-				if (equalsIgnoreCase(file,(char*)partialList.list[i].value)) return 1;
-		}
-	}
-	return 0;
-}
-
-void freePartialList() {
-	int i;
-	for (i=0;i<partialList.count;i++) {
-		if (partialList.list[i].idType==eString)
-			free(partialList.list[i].value);
-	}
-	partialList.count=0;
-}
-
-/***************************************************************\
-|                       Checksum handling                       |
-\***************************************************************/
-
-int checkSum(unsigned char* data,int size) {
-	unsigned char  checksum = 1;
-
-	/* calculates the checksum */
-	while (size--) checksum+=*(data++);
-	return !checksum;
-}
-
-/***************************************************************\
-|                     Parsing resource file                     |
-\***************************************************************/
-
-/* Initializes the resource table */
-void emptyTable(tResource* r[]) {
-	int i=MAX_RES_COUNT;
-	while (i--) *(r++)=NULL;
-}
-
-/* Resources input xml tree. Private+abstract variable */
-static tTag* xmlStructure=NULL; /* Keeping the parsed file structure in memory will save a lot of time */
-
-int parseStructure(const char* vFile) {
-	static const char defaultXmlFile[]=RES_XML_RESOURC_XML;
-	int error=0;
-
-	/* Generate xml structure if doesn't exist */
-	if (xmlStructure==NULL)	{
-		/* Set default values */
-		if (vFile==NULL) vFile=defaultXmlFile;
-		xmlStructure=parseXmlFile(vFile,&error);
-	}
-	if (error) xmlStructure=NULL;
-	return error;
-}
-
-/* parse file */
-int parseFile(const char* vFile, const char* datFile, tResource* r[]) {
-	/* Declare error variable */
-	int error;
-	tPassWork pass;
-
-	/* Generate xml structure if doesn't exist */
-	if ((error=(parseStructure(vFile)))) return error;
-
-	/* Use the xml structure to Generate the resource structure of the file */
-	emptyTable(r);
-	pass.datFile=datFile;
-	pass.r=r;
-	workTree(xmlStructure,&pass,workTag);
-
-	/* All done */
-	return 0;
-}
-
-void freeParsedStructure() {
-	/* Free if exist */
-	if (xmlStructure!=NULL) freeTagStructure(xmlStructure);
-	/* Reinitializes the variable */
-	xmlStructure=NULL;
-}
-
-/***************************************************************\
-|                     Unknown.xml primitives                    |
-\***************************************************************/
-
-/* Resources output to xml functions. Private+abstract variable */
-static FILE* unknownXmlFile=NULL;
-
-void AddToUnknownXml(const char* vFiledatWithPath,unsigned short id,const char* ext,char type,const char* vDirExt,unsigned short pal,const char* vFiledat,int optionflag,int count) {
-	/* Open file if not open */
-	if (unknownXmlFile==NULL) {
-		char xmlFile[MAX_FILENAME_SIZE];
-		sprintf(xmlFile,RES_XML_UNKNOWN_PATH""RES_XML_UNKNOWN_XML,vDirExt,vFiledatWithPath);
-
-		/* Open file */
-		if (!writeOpen(xmlFile,&unknownXmlFile,optionflag)) return;
-
-		/* Save headers */
-		if (type==6) pal=id;
-		fprintf(unknownXmlFile,RES_XML_UNKNOWN_START,
-			vFiledat,vFiledatWithPath,pal
-		);
-	}
-
-	/* Write item */
-	fprintf(unknownXmlFile,RES_XML_UNKNOWN_ITEM,
-		id,getExtDesc(type),count,ext,getExtDesc(type),getExtDesc(type),count
-	); /* To the xml output */
-}
-
-static unsigned int typeCount[RES_TYPECOUNT]; /* initialized in 0 */
-
-void endUnknownXml(int optionflag, const char* backupExtension) {
-	if (unknownXmlFile!=NULL) {
-		int i;
-		fprintf(unknownXmlFile,RES_XML_UNKNOWN_END);
-		writeCloseOk(unknownXmlFile,optionflag,backupExtension);
-		unknownXmlFile=NULL;
-		for (i=0;i<RES_TYPECOUNT;i++) typeCount[i]=0;
-	}
-}
-
-/***************************************************************\
-|                   Resources extra functions                   |
-\***************************************************************/
-
-void getFileName(char* vFileext,const char* vDirExt,tResource* r,unsigned short id,const char* vFiledat, const char* vDatFileName,int optionflag, const char* backupExtension) {
-	static const char* extarray[]=RES_FILE_EXTENSIONS;
-	int pos;
-
-	if (r->path==NULL) {
-		pos=((r->type<RES_TYPECOUNT)&&(r->type>=0))?r->type:RES_TYPE_BINARY;
-		typeCount[pos]++;
-
-		/* set filename */
-		sprintf(vFileext,RES_XML_UNKNOWN_PATH""RES_XML_UNKNOWN_FILES,vDirExt,vDatFileName,getExtDesc(pos),typeCount[pos],extarray[pos]);
-		AddToUnknownXml(vDatFileName,id,extarray[pos],r->type,vDirExt,r->palette,vFiledat,optionflag,typeCount[pos]);
-	} else {
-		/* set filename */
-		sprintf(vFileext,"%s/%s",vDirExt,r->path);
-	}
-}
-
-/* Search files for the Import feature */
-int importDir(const char* directory, const char* vResFile, int pOption, const char* backupExtension,const char* vDatDirectory, FILE* output) {
-	/* Declare error variable */
-	int error=0;
-	char* datfile;
-	char* recursive;
-	int sizeOfPath;
-	int sizeOfFile;
-	int result;
-
-	/* Generate xml structure if doesn't exist */
-	if ((error=(parseStructure(vResFile)))) return error;
-
-	/* Use the xml structure to Generate the file list */
-	workTree(xmlStructure,NULL,addFileToList);
-
-	while(datfile=getFileFromList()) {
-		sizeOfPath=strlen(vDatDirectory);
-		sizeOfFile=strlen(datfile);
-
-		/* Generate full vDatDirectory/datfile path */
-		recursive=(char*)malloc(sizeOfPath+sizeOfFile+2);
-		memcpy(recursive,vDatDirectory,sizeOfPath);
-		recursive[sizeOfPath]=DIR_SEPARATOR;
-		memcpy(recursive+sizeOfPath+1,datfile,sizeOfFile+1);
-
-		/* Run program */
-		result=prMain(pOption, backupExtension,directory,vResFile,recursive,datfile,NULL,output);
-		/* Free memory */
-		free(datfile);
-		free(recursive);
-	}
-
-	/* All done */
-	return result;
-}
-
-int isntADatFile(const char* testFile, const char* vResFile) {
-	/*
-		Results:
-			0  Is a dat file
-			1  It isn't a dat file
-			-1 Parse error
-			-2 No memory
-			-3 Attribute not recognized
-			-4 File not found
-	*/
-
-	/* Declare result variable */
-	int result;
-	char* gottenFile;
-
-	/* Generate xml structure if doesn't exist */
-	if ((result=(parseStructure(vResFile)))) return result;
-
-	/* Use the xml structure to Generate the file list */
-	workTree(xmlStructure,NULL,addFileToList);
-	while((gottenFile=(getFileFromList()))) {
-		result=result||equalsIgnoreCase(gottenFile,testFile);
-		free(gottenFile);
-	}
-
-	/* All done */
-	return !result;
-}
-
-/***************************************************************\
-|                Resource tree browsing for DLL                 |
-\***************************************************************/
-
-#ifdef DLL
-
-tTag* resourceTreeGetRoot () {
-	return xmlStructure;
-}
-
-tTag* resourceTreeGetNext (tTag* whereAmI) {
-	return whereAmI->next;
-}
-
-tTag* resourceTreeGetChild(tTag* whereAmI) {
-	return whereAmI->child;
-}
-
-int   resourceTreeGetInfo (tTag* whereAmI,	char** tag, char** desc, char** path, char** file, char** itemtype, char** name, char** palette, char** type, char** value, char** version, char** number) {
-	if (whereAmI==NULL) return 0;
-	*tag=whereAmI->tag;
-	*desc=whereAmI->desc;
-	*path=whereAmI->path;
-	*file=whereAmI->file;
-	*itemtype=whereAmI->itemtype;
-	*name=whereAmI->name;
-	*palette=whereAmI->palette;
-	*type=whereAmI->type;
-	*value=whereAmI->value;
-	*version=whereAmI->version;
-	*number=whereAmI->number;
-	return 1;
-}
-
-#endif
-
diff --git a/PR/src/lib/layers/memory.c b/PR/src/lib/layers/memory.c
deleted file mode 100644
index ce89ee0..0000000
--- a/PR/src/lib/layers/memory.c
+++ /dev/null
@@ -1,45 +0,0 @@
-/*  Princed V3 - Prince of Persia Level Editor for PC Version
-    Copyright (C) 2003 Princed Development Team
-
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program; if not, write to the Free Software
-    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-    The authors of this program may be contacted at http://forum.princed.com.ar
-*/
-
-/*
-memory.c: Princed Resources : Memory handling
-\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf
- Copyright 2003 Princed Development Team
-  Created: 20 Dec 2003
-
-  Author: Enrique Calot <ecalot.cod@princed.com.ar>
-  Version: 1.01 (2004-Feb-13)
-
- Note:
-  DO NOT remove this copyright notice
-*/
-
-#include "memory.h"
-#include <string.h>
-
-char* strallocandcopy(const char* text) {
-	int size;
-	char* aux;
-	if (text==NULL) return NULL;
-	size=strlen(text)+1;
-	aux=(char*)malloc(size);
-	if (aux) memcpy(aux,text,size);
-	return aux;
-}
diff --git a/PR/src/lib/object/image/image16.c b/PR/src/lib/object/image/image16.c
deleted file mode 100644
index 1b2680e..0000000
--- a/PR/src/lib/object/image/image16.c
+++ /dev/null
@@ -1,325 +0,0 @@
-/*  Princed V3 - Prince of Persia Level Editor for PC Version
-    Copyright (C) 2003 Princed Development Team
-
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program; if not, write to the Free Software
-    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-    The authors of this program may be contacted at http://forum.princed.com.ar
-*/
-
-/*
-compress.c: Princed Resources : Image Compression Library
-\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf
- Copyright 2003, 2004 Princed Development Team
-  Created: 24 Aug 2003
-
-  Author: Enrique Calot <ecalot.cod@princed.com.ar>
-  Version: 1.01 (2003-Oct-23)
-  Version: 2.00 (2004-Mar-07)
-
- Note:
-  DO NOT remove this copyright notice
-*/
-
-/***************************************************************\
-|                  I M P L E M E N T A T I O N                  |
-\***************************************************************/
-
-#include <stdio.h>
-#include <string.h>
-#include "compress.h"
-#include "memory.h"
-#include "pr.h"
-
-/***************************************************************\
-|                        Image transpose                        |
-\***************************************************************/
-
-/* Determines where the transposed byte must be saved */
-int transpose(int x,int w,int h) {
-	return ((x%h)*(w))+(int)(x/h);
-}
-
-void transposeImage(tImage* image,int size) {
-	unsigned char* outputaux=getMemory(size);
-	int cursor=0;
-
-	while (cursor<size) {outputaux[transpose(cursor,image->widthInBytes,image->height)]=image->pix[cursor];cursor++;}
-	free(image->pix);
-	image->pix=outputaux;
-}
-
-void antiTransposeImage(tImage* image,int size) {
-	unsigned char* outputaux=getMemory(size);
-	int cursor=0;
-
-	while (cursor<size) {outputaux[cursor]=image->pix[transpose(cursor,image->widthInBytes,image->height)];cursor++;}
-	free(image->pix);
-	image->pix=outputaux;
-}
-
-/***************************************************************\
-|                    Uncompression algorithms                   |
-\***************************************************************/
-
-/* LZG expansion algorithm sub function */
-unsigned char popBit(unsigned char *byte) {
-	unsigned char bit=(unsigned char)((*byte)&1);
-	(*byte)>>=1;
-	return bit;
-}
-
-/* Expands LZ Groody algorithm. This is the core of PR */
-int expandLzg(const unsigned char* array, int arraySize, tImage* image, int imageSize) {
-	char k;
-	int location,h,cursor=0,pos=0;
-	unsigned char maskbyte,rep;
-
-	if ((image->pix=getMemory(/*imageSize*/MAX_MOD_SIZE_IN_LZG))==NULL) return COMPRESS_RESULT_FATAL; /* reserve memory */
-	for(location=0;location<MAX_MOD_SIZE_IN_LZG;image->pix[location]=0,location++); /* clean output garbage */
-
-	/* main loop */
-	while (cursor<imageSize) {
-		maskbyte=array[pos++];
-		for (k=8;k&&(cursor<imageSize);k--) {
-			if (popBit(&maskbyte)) {
-				image->pix[cursor++]=array[pos++];
-			} else {
-				location=66+(((rep=array[pos])&3)<<8)+(unsigned char)array[pos+1];pos+=2;
-				rep=(unsigned char)((rep>>2)+3);
-				while (rep--) { /* Be careful in big images */
-					h=cursor/MAX_MXD_SIZE_IN_LZG-((location%MAX_MXD_SIZE_IN_LZG)>(cursor%MAX_MXD_SIZE_IN_LZG));
-					image->pix[cursor++]=image->pix[((h<0)?0:h)*MAX_MXD_SIZE_IN_LZG+(location++)%MAX_MXD_SIZE_IN_LZG];
-/*
-					h=((cursor-(location&0x3FF))&(~0x3FF));
-					image->pix[cursor]=image->pix[((h<0)?0:h)+(location&0x3FF)];
-					cursor++;location++;
-*/
-				}
-			}
-		}
-	}
-	return ((pos==arraySize)&(cursor==imageSize))-1; /* WARNING or SUCCESS */
-}
-
-/* Expands RLE algorithm */
-int expandRle(const unsigned char* array, int arraySize, tImage* image, int imageSize) {
-	int cursor=0;
-	register signed char rep;
-	int pos=0;
-
-	if ((image->pix=getMemory(imageSize+128))==NULL) return COMPRESS_RESULT_FATAL; /* reserve memory */
-
-	/* main loop */
-	while (cursor<imageSize) {
-		rep=(signed char)(array[pos++]);
-		if (rep<0) {
-			/* Negative */
-			while (rep++) image->pix[cursor++]=array[pos];
-			pos++;
-		} else {
-			/* Positive */
-			rep=~rep;
-			while (rep++) image->pix[cursor++]=array[pos++];
-		}
-	}
-	return ((pos==arraySize)&(cursor==imageSize))-1; /* WARNING or SUCCESS */
-}
-
-/***************************************************************\
-|                    Compression algorithms                     |
-\***************************************************************/
-
-/* Compress using the Run Length Encoding algorithm */
-void compressRle(unsigned char* data,tImage* img,int *dataSize) {
-	/* Declare pointers */
-	unsigned char* cursorData  = data;
-	char*          counter;
-	unsigned char* cursorPix   = img->pix;
-	unsigned char* imgEnd      = img->pix+(*dataSize);
-
-	while (cursorPix<imgEnd) {
-		/* Step 1: Create counter */
-		*(counter=(char*)(cursorData++))=-1;
-
-		/* Step 2: Look and copy the string until a repeated byte is found */
-		while (
-			(cursorPix<imgEnd)&&
-			(
-				(*cursorPix!=*(cursorPix+1))||
-				(
-					/*(*cursorPix==*(cursorPix+1))&&*/
-					((cursorPix+1)<imgEnd)&&
-					(*cursorPix!=*(cursorPix+2))
-				)
-			)&&
-			((*counter)!=127)
-		) {
-			*(cursorData)=*(cursorPix);
-			(*counter)++;
-			cursorPix++;
-			cursorData++;
-		}
-
-		/* Step 3: If there was a repeated string, let's ignore it and add the cursor with the repetitions */
-		if (*counter==-1) {
-			while ((cursorPix+1<imgEnd)&&(*cursorPix==(*(cursorPix+1)))&&((*counter)!=-128)) {
-				cursorPix++;
-				(*counter)--;
-			}
-
-			*(cursorData)=*(cursorPix); /* Print repeated char */
-			cursorPix++;
-			cursorData++;
-		}
-	}
-
-	*(cursorData++)=0;
-	*(cursorData++)=*(cursorPix);
-	*dataSize=(int)((long int)cursorData-(long int)data)-2; /* Note: casted to long for portability with 64 bits architectures */
-}
-
-/***************************************************************\
-|               Main compress and expand graphics               |
-\***************************************************************/
-
-/*
-		Header info:
-		 1 byte  - checksum           char checksum
-		 2 bytes - height             short int height
-		 2 bytes - width              short int width
-		 1 byte  - 00                 (char)0
-		 1 byte  - compression type   unsigned char compressionType
-*/
-
-/* Expands an array into an image */
-int mExpandGraphic(const unsigned char* data,tImage *image, int dataSizeInBytes) {
-	/*
-		Reads data and extracts tImage
-		returns the next image address or -1 in case of error
-	*/
-
-	int imageSizeInBytes;
-	int result;
-
-	data++;
-	image->height=((unsigned char)data[0])+((unsigned char)data[1]<<8);data+=2;
-	image->width =((unsigned char)data[0])+((unsigned char)data[1]<<8);data+=2;
-
-	if (*(data++)) return -1; /* Verify format */
-	image->type=(unsigned char)(*(data++));
-	dataSizeInBytes-=7;
-
-	if (image->type&0xB0) {
-		image->widthInBytes=(image->width+1)/2;
-	} else {
-		image->widthInBytes=(image->width+7)/8;
-	}
-	imageSizeInBytes=image->widthInBytes*image->height;
-
-	switch (getAlgor(image->type)) {
-		case COMPRESS_RAW: /* No Compression Algorithm */
-			if ((image->pix=getMemory(imageSizeInBytes))==NULL) return COMPRESS_RESULT_FATAL;
-			memcpy(image->pix,data,imageSizeInBytes);
-			result=COMPRESS_RESULT_SUCCESS;
-			break;
-		case COMPRESS_RLE_LR: /* RLE Left to Right Compression Algorithm */
-			result=expandRle(data,dataSizeInBytes,image,imageSizeInBytes);
-			break;
-		case COMPRESS_RLE_UD: /* RLE Up to Down Compression Algorithm */
-			result=expandRle(data,dataSizeInBytes,image,imageSizeInBytes);
-			if (result==COMPRESS_RESULT_FATAL) return COMPRESS_RESULT_FATAL;
-			transposeImage(image,imageSizeInBytes);
-			break;
-		case COMPRESS_LZG_LR: /* LZ Groody Left to Right Compression Algorithm */
-			result=expandLzg(data,dataSizeInBytes,image,imageSizeInBytes);
-			break;
-		case COMPRESS_LZG_UD: /* LZ Groody Up to Down Compression Algorithm */
-			result=expandLzg(data,dataSizeInBytes,image,imageSizeInBytes);
-			if (result==COMPRESS_RESULT_FATAL) return COMPRESS_RESULT_FATAL;
-			transposeImage(image,imageSizeInBytes);
-			break;
-		default:
-			result=COMPRESS_RESULT_FATAL;
-			break;
-	}
-	return result; /* Ok */
-}
-
-/* Compress an image into binary data */
-int mCompressGraphic(unsigned char* data,tImage* image, int* dataSizeInBytes) {
-	/* Declare variables */
-	unsigned char* compressed     [COMPRESS_WORKING_ALGORITHMS];
-	int            compressedSize [COMPRESS_WORKING_ALGORITHMS];
-	int            algorithm;
-	int            i;
-	int            imageSizeInBytes;
-
-	/* Initialize variables */
-	imageSizeInBytes=image->widthInBytes*image->height;
-	for (i=0;i<COMPRESS_WORKING_ALGORITHMS;i++) compressedSize[i]=imageSizeInBytes;
-
-	/*
-		Perform all compressions
-	*/
-
-	/* COMPRESS_RAW */
-	compressed[COMPRESS_RAW]=getMemory(compressedSize[COMPRESS_RAW]);
-	memcpy(compressed[COMPRESS_RAW],image->pix,compressedSize[COMPRESS_RAW]);
-
-	/* COMPRESS_RLE_LR */
-	compressed[COMPRESS_RLE_LR]=getMemory(10*imageSizeInBytes+50); /* This will reserve 10*(image size)+50 bytes, to allocate the compressed file */
-	compressRle(compressed[COMPRESS_RLE_LR],image,&(compressedSize[COMPRESS_RLE_LR]));
-
-	/* COMPRESS_RLE_UD */
-	compressed[COMPRESS_RLE_UD]=getMemory(10*imageSizeInBytes+50); /* This will reserve 10*(image size)+50 bytes, to allocate the compressed file */
-	antiTransposeImage(image,imageSizeInBytes);
-	compressRle(compressed[COMPRESS_RLE_UD],image,&(compressedSize[COMPRESS_RLE_UD]));
-
-	/*
-		Process results
-	*/
-
-	/* Select the best compression (find minimum) */
-	*dataSizeInBytes=compressedSize[COMPRESS_RAW];
-	algorithm=COMPRESS_RAW;
-	for (i=COMPRESS_RLE_LR;i<COMPRESS_WORKING_ALGORITHMS;i++) {
-		if ((*dataSizeInBytes)>compressedSize[i]) {
-			(*dataSizeInBytes)=compressedSize[i];
-			algorithm=i;
-		}
-	}
-
-	/* Copy the best algorithm in the compressed data */
-	memcpy(data+6,compressed[algorithm],*dataSizeInBytes);
-	(*dataSizeInBytes)+=6;
-
-	/*
-		Write header
-	*/
-
-	/* (16 bits)height (Intel short int format) */
-	data[0]=image->height;
-	data[1]=image->height>>8;
-	/* (16 bits)width (Intel short int format) */
-	data[2]=image->width;
-	data[3]=image->width>>8;
-	/* (8 bits)00000000+(4 bits)palette type+(4 bits)algorithm */
-	data[4]=0;
-	data[5]=image->type|algorithm;
-
-	/* Free all compression attempts */
-	for (i=COMPRESS_RAW;i<COMPRESS_WORKING_ALGORITHMS;i++) free(compressed[i]);
-	return 1;
-}
diff --git a/PR/src/lib/object/image/image2.c b/PR/src/lib/object/image/image2.c
deleted file mode 100644
index 1b2680e..0000000
--- a/PR/src/lib/object/image/image2.c
+++ /dev/null
@@ -1,325 +0,0 @@
-/*  Princed V3 - Prince of Persia Level Editor for PC Version
-    Copyright (C) 2003 Princed Development Team
-
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program; if not, write to the Free Software
-    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-    The authors of this program may be contacted at http://forum.princed.com.ar
-*/
-
-/*
-compress.c: Princed Resources : Image Compression Library
-\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf
- Copyright 2003, 2004 Princed Development Team
-  Created: 24 Aug 2003
-
-  Author: Enrique Calot <ecalot.cod@princed.com.ar>
-  Version: 1.01 (2003-Oct-23)
-  Version: 2.00 (2004-Mar-07)
-
- Note:
-  DO NOT remove this copyright notice
-*/
-
-/***************************************************************\
-|                  I M P L E M E N T A T I O N                  |
-\***************************************************************/
-
-#include <stdio.h>
-#include <string.h>
-#include "compress.h"
-#include "memory.h"
-#include "pr.h"
-
-/***************************************************************\
-|                        Image transpose                        |
-\***************************************************************/
-
-/* Determines where the transposed byte must be saved */
-int transpose(int x,int w,int h) {
-	return ((x%h)*(w))+(int)(x/h);
-}
-
-void transposeImage(tImage* image,int size) {
-	unsigned char* outputaux=getMemory(size);
-	int cursor=0;
-
-	while (cursor<size) {outputaux[transpose(cursor,image->widthInBytes,image->height)]=image->pix[cursor];cursor++;}
-	free(image->pix);
-	image->pix=outputaux;
-}
-
-void antiTransposeImage(tImage* image,int size) {
-	unsigned char* outputaux=getMemory(size);
-	int cursor=0;
-
-	while (cursor<size) {outputaux[cursor]=image->pix[transpose(cursor,image->widthInBytes,image->height)];cursor++;}
-	free(image->pix);
-	image->pix=outputaux;
-}
-
-/***************************************************************\
-|                    Uncompression algorithms                   |
-\***************************************************************/
-
-/* LZG expansion algorithm sub function */
-unsigned char popBit(unsigned char *byte) {
-	unsigned char bit=(unsigned char)((*byte)&1);
-	(*byte)>>=1;
-	return bit;
-}
-
-/* Expands LZ Groody algorithm. This is the core of PR */
-int expandLzg(const unsigned char* array, int arraySize, tImage* image, int imageSize) {
-	char k;
-	int location,h,cursor=0,pos=0;
-	unsigned char maskbyte,rep;
-
-	if ((image->pix=getMemory(/*imageSize*/MAX_MOD_SIZE_IN_LZG))==NULL) return COMPRESS_RESULT_FATAL; /* reserve memory */
-	for(location=0;location<MAX_MOD_SIZE_IN_LZG;image->pix[location]=0,location++); /* clean output garbage */
-
-	/* main loop */
-	while (cursor<imageSize) {
-		maskbyte=array[pos++];
-		for (k=8;k&&(cursor<imageSize);k--) {
-			if (popBit(&maskbyte)) {
-				image->pix[cursor++]=array[pos++];
-			} else {
-				location=66+(((rep=array[pos])&3)<<8)+(unsigned char)array[pos+1];pos+=2;
-				rep=(unsigned char)((rep>>2)+3);
-				while (rep--) { /* Be careful in big images */
-					h=cursor/MAX_MXD_SIZE_IN_LZG-((location%MAX_MXD_SIZE_IN_LZG)>(cursor%MAX_MXD_SIZE_IN_LZG));
-					image->pix[cursor++]=image->pix[((h<0)?0:h)*MAX_MXD_SIZE_IN_LZG+(location++)%MAX_MXD_SIZE_IN_LZG];
-/*
-					h=((cursor-(location&0x3FF))&(~0x3FF));
-					image->pix[cursor]=image->pix[((h<0)?0:h)+(location&0x3FF)];
-					cursor++;location++;
-*/
-				}
-			}
-		}
-	}
-	return ((pos==arraySize)&(cursor==imageSize))-1; /* WARNING or SUCCESS */
-}
-
-/* Expands RLE algorithm */
-int expandRle(const unsigned char* array, int arraySize, tImage* image, int imageSize) {
-	int cursor=0;
-	register signed char rep;
-	int pos=0;
-
-	if ((image->pix=getMemory(imageSize+128))==NULL) return COMPRESS_RESULT_FATAL; /* reserve memory */
-
-	/* main loop */
-	while (cursor<imageSize) {
-		rep=(signed char)(array[pos++]);
-		if (rep<0) {
-			/* Negative */
-			while (rep++) image->pix[cursor++]=array[pos];
-			pos++;
-		} else {
-			/* Positive */
-			rep=~rep;
-			while (rep++) image->pix[cursor++]=array[pos++];
-		}
-	}
-	return ((pos==arraySize)&(cursor==imageSize))-1; /* WARNING or SUCCESS */
-}
-
-/***************************************************************\
-|                    Compression algorithms                     |
-\***************************************************************/
-
-/* Compress using the Run Length Encoding algorithm */
-void compressRle(unsigned char* data,tImage* img,int *dataSize) {
-	/* Declare pointers */
-	unsigned char* cursorData  = data;
-	char*          counter;
-	unsigned char* cursorPix   = img->pix;
-	unsigned char* imgEnd      = img->pix+(*dataSize);
-
-	while (cursorPix<imgEnd) {
-		/* Step 1: Create counter */
-		*(counter=(char*)(cursorData++))=-1;
-
-		/* Step 2: Look and copy the string until a repeated byte is found */
-		while (
-			(cursorPix<imgEnd)&&
-			(
-				(*cursorPix!=*(cursorPix+1))||
-				(
-					/*(*cursorPix==*(cursorPix+1))&&*/
-					((cursorPix+1)<imgEnd)&&
-					(*cursorPix!=*(cursorPix+2))
-				)
-			)&&
-			((*counter)!=127)
-		) {
-			*(cursorData)=*(cursorPix);
-			(*counter)++;
-			cursorPix++;
-			cursorData++;
-		}
-
-		/* Step 3: If there was a repeated string, let's ignore it and add the cursor with the repetitions */
-		if (*counter==-1) {
-			while ((cursorPix+1<imgEnd)&&(*cursorPix==(*(cursorPix+1)))&&((*counter)!=-128)) {
-				cursorPix++;
-				(*counter)--;
-			}
-
-			*(cursorData)=*(cursorPix); /* Print repeated char */
-			cursorPix++;
-			cursorData++;
-		}
-	}
-
-	*(cursorData++)=0;
-	*(cursorData++)=*(cursorPix);
-	*dataSize=(int)((long int)cursorData-(long int)data)-2; /* Note: casted to long for portability with 64 bits architectures */
-}
-
-/***************************************************************\
-|               Main compress and expand graphics               |
-\***************************************************************/
-
-/*
-		Header info:
-		 1 byte  - checksum           char checksum
-		 2 bytes - height             short int height
-		 2 bytes - width              short int width
-		 1 byte  - 00                 (char)0
-		 1 byte  - compression type   unsigned char compressionType
-*/
-
-/* Expands an array into an image */
-int mExpandGraphic(const unsigned char* data,tImage *image, int dataSizeInBytes) {
-	/*
-		Reads data and extracts tImage
-		returns the next image address or -1 in case of error
-	*/
-
-	int imageSizeInBytes;
-	int result;
-
-	data++;
-	image->height=((unsigned char)data[0])+((unsigned char)data[1]<<8);data+=2;
-	image->width =((unsigned char)data[0])+((unsigned char)data[1]<<8);data+=2;
-
-	if (*(data++)) return -1; /* Verify format */
-	image->type=(unsigned char)(*(data++));
-	dataSizeInBytes-=7;
-
-	if (image->type&0xB0) {
-		image->widthInBytes=(image->width+1)/2;
-	} else {
-		image->widthInBytes=(image->width+7)/8;
-	}
-	imageSizeInBytes=image->widthInBytes*image->height;
-
-	switch (getAlgor(image->type)) {
-		case COMPRESS_RAW: /* No Compression Algorithm */
-			if ((image->pix=getMemory(imageSizeInBytes))==NULL) return COMPRESS_RESULT_FATAL;
-			memcpy(image->pix,data,imageSizeInBytes);
-			result=COMPRESS_RESULT_SUCCESS;
-			break;
-		case COMPRESS_RLE_LR: /* RLE Left to Right Compression Algorithm */
-			result=expandRle(data,dataSizeInBytes,image,imageSizeInBytes);
-			break;
-		case COMPRESS_RLE_UD: /* RLE Up to Down Compression Algorithm */
-			result=expandRle(data,dataSizeInBytes,image,imageSizeInBytes);
-			if (result==COMPRESS_RESULT_FATAL) return COMPRESS_RESULT_FATAL;
-			transposeImage(image,imageSizeInBytes);
-			break;
-		case COMPRESS_LZG_LR: /* LZ Groody Left to Right Compression Algorithm */
-			result=expandLzg(data,dataSizeInBytes,image,imageSizeInBytes);
-			break;
-		case COMPRESS_LZG_UD: /* LZ Groody Up to Down Compression Algorithm */
-			result=expandLzg(data,dataSizeInBytes,image,imageSizeInBytes);
-			if (result==COMPRESS_RESULT_FATAL) return COMPRESS_RESULT_FATAL;
-			transposeImage(image,imageSizeInBytes);
-			break;
-		default:
-			result=COMPRESS_RESULT_FATAL;
-			break;
-	}
-	return result; /* Ok */
-}
-
-/* Compress an image into binary data */
-int mCompressGraphic(unsigned char* data,tImage* image, int* dataSizeInBytes) {
-	/* Declare variables */
-	unsigned char* compressed     [COMPRESS_WORKING_ALGORITHMS];
-	int            compressedSize [COMPRESS_WORKING_ALGORITHMS];
-	int            algorithm;
-	int            i;
-	int            imageSizeInBytes;
-
-	/* Initialize variables */
-	imageSizeInBytes=image->widthInBytes*image->height;
-	for (i=0;i<COMPRESS_WORKING_ALGORITHMS;i++) compressedSize[i]=imageSizeInBytes;
-
-	/*
-		Perform all compressions
-	*/
-
-	/* COMPRESS_RAW */
-	compressed[COMPRESS_RAW]=getMemory(compressedSize[COMPRESS_RAW]);
-	memcpy(compressed[COMPRESS_RAW],image->pix,compressedSize[COMPRESS_RAW]);
-
-	/* COMPRESS_RLE_LR */
-	compressed[COMPRESS_RLE_LR]=getMemory(10*imageSizeInBytes+50); /* This will reserve 10*(image size)+50 bytes, to allocate the compressed file */
-	compressRle(compressed[COMPRESS_RLE_LR],image,&(compressedSize[COMPRESS_RLE_LR]));
-
-	/* COMPRESS_RLE_UD */
-	compressed[COMPRESS_RLE_UD]=getMemory(10*imageSizeInBytes+50); /* This will reserve 10*(image size)+50 bytes, to allocate the compressed file */
-	antiTransposeImage(image,imageSizeInBytes);
-	compressRle(compressed[COMPRESS_RLE_UD],image,&(compressedSize[COMPRESS_RLE_UD]));
-
-	/*
-		Process results
-	*/
-
-	/* Select the best compression (find minimum) */
-	*dataSizeInBytes=compressedSize[COMPRESS_RAW];
-	algorithm=COMPRESS_RAW;
-	for (i=COMPRESS_RLE_LR;i<COMPRESS_WORKING_ALGORITHMS;i++) {
-		if ((*dataSizeInBytes)>compressedSize[i]) {
-			(*dataSizeInBytes)=compressedSize[i];
-			algorithm=i;
-		}
-	}
-
-	/* Copy the best algorithm in the compressed data */
-	memcpy(data+6,compressed[algorithm],*dataSizeInBytes);
-	(*dataSizeInBytes)+=6;
-
-	/*
-		Write header
-	*/
-
-	/* (16 bits)height (Intel short int format) */
-	data[0]=image->height;
-	data[1]=image->height>>8;
-	/* (16 bits)width (Intel short int format) */
-	data[2]=image->width;
-	data[3]=image->width>>8;
-	/* (8 bits)00000000+(4 bits)palette type+(4 bits)algorithm */
-	data[4]=0;
-	data[5]=image->type|algorithm;
-
-	/* Free all compression attempts */
-	for (i=COMPRESS_RAW;i<COMPRESS_WORKING_ALGORITHMS;i++) free(compressed[i]);
-	return 1;
-}
diff --git a/PR/src/lib/object/image/image256.c b/PR/src/lib/object/image/image256.c
deleted file mode 100644
index 1b2680e..0000000
--- a/PR/src/lib/object/image/image256.c
+++ /dev/null
@@ -1,325 +0,0 @@
-/*  Princed V3 - Prince of Persia Level Editor for PC Version
-    Copyright (C) 2003 Princed Development Team
-
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program; if not, write to the Free Software
-    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-    The authors of this program may be contacted at http://forum.princed.com.ar
-*/
-
-/*
-compress.c: Princed Resources : Image Compression Library
-\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf
- Copyright 2003, 2004 Princed Development Team
-  Created: 24 Aug 2003
-
-  Author: Enrique Calot <ecalot.cod@princed.com.ar>
-  Version: 1.01 (2003-Oct-23)
-  Version: 2.00 (2004-Mar-07)
-
- Note:
-  DO NOT remove this copyright notice
-*/
-
-/***************************************************************\
-|                  I M P L E M E N T A T I O N                  |
-\***************************************************************/
-
-#include <stdio.h>
-#include <string.h>
-#include "compress.h"
-#include "memory.h"
-#include "pr.h"
-
-/***************************************************************\
-|                        Image transpose                        |
-\***************************************************************/
-
-/* Determines where the transposed byte must be saved */
-int transpose(int x,int w,int h) {
-	return ((x%h)*(w))+(int)(x/h);
-}
-
-void transposeImage(tImage* image,int size) {
-	unsigned char* outputaux=getMemory(size);
-	int cursor=0;
-
-	while (cursor<size) {outputaux[transpose(cursor,image->widthInBytes,image->height)]=image->pix[cursor];cursor++;}
-	free(image->pix);
-	image->pix=outputaux;
-}
-
-void antiTransposeImage(tImage* image,int size) {
-	unsigned char* outputaux=getMemory(size);
-	int cursor=0;
-
-	while (cursor<size) {outputaux[cursor]=image->pix[transpose(cursor,image->widthInBytes,image->height)];cursor++;}
-	free(image->pix);
-	image->pix=outputaux;
-}
-
-/***************************************************************\
-|                    Uncompression algorithms                   |
-\***************************************************************/
-
-/* LZG expansion algorithm sub function */
-unsigned char popBit(unsigned char *byte) {
-	unsigned char bit=(unsigned char)((*byte)&1);
-	(*byte)>>=1;
-	return bit;
-}
-
-/* Expands LZ Groody algorithm. This is the core of PR */
-int expandLzg(const unsigned char* array, int arraySize, tImage* image, int imageSize) {
-	char k;
-	int location,h,cursor=0,pos=0;
-	unsigned char maskbyte,rep;
-
-	if ((image->pix=getMemory(/*imageSize*/MAX_MOD_SIZE_IN_LZG))==NULL) return COMPRESS_RESULT_FATAL; /* reserve memory */
-	for(location=0;location<MAX_MOD_SIZE_IN_LZG;image->pix[location]=0,location++); /* clean output garbage */
-
-	/* main loop */
-	while (cursor<imageSize) {
-		maskbyte=array[pos++];
-		for (k=8;k&&(cursor<imageSize);k--) {
-			if (popBit(&maskbyte)) {
-				image->pix[cursor++]=array[pos++];
-			} else {
-				location=66+(((rep=array[pos])&3)<<8)+(unsigned char)array[pos+1];pos+=2;
-				rep=(unsigned char)((rep>>2)+3);
-				while (rep--) { /* Be careful in big images */
-					h=cursor/MAX_MXD_SIZE_IN_LZG-((location%MAX_MXD_SIZE_IN_LZG)>(cursor%MAX_MXD_SIZE_IN_LZG));
-					image->pix[cursor++]=image->pix[((h<0)?0:h)*MAX_MXD_SIZE_IN_LZG+(location++)%MAX_MXD_SIZE_IN_LZG];
-/*
-					h=((cursor-(location&0x3FF))&(~0x3FF));
-					image->pix[cursor]=image->pix[((h<0)?0:h)+(location&0x3FF)];
-					cursor++;location++;
-*/
-				}
-			}
-		}
-	}
-	return ((pos==arraySize)&(cursor==imageSize))-1; /* WARNING or SUCCESS */
-}
-
-/* Expands RLE algorithm */
-int expandRle(const unsigned char* array, int arraySize, tImage* image, int imageSize) {
-	int cursor=0;
-	register signed char rep;
-	int pos=0;
-
-	if ((image->pix=getMemory(imageSize+128))==NULL) return COMPRESS_RESULT_FATAL; /* reserve memory */
-
-	/* main loop */
-	while (cursor<imageSize) {
-		rep=(signed char)(array[pos++]);
-		if (rep<0) {
-			/* Negative */
-			while (rep++) image->pix[cursor++]=array[pos];
-			pos++;
-		} else {
-			/* Positive */
-			rep=~rep;
-			while (rep++) image->pix[cursor++]=array[pos++];
-		}
-	}
-	return ((pos==arraySize)&(cursor==imageSize))-1; /* WARNING or SUCCESS */
-}
-
-/***************************************************************\
-|                    Compression algorithms                     |
-\***************************************************************/
-
-/* Compress using the Run Length Encoding algorithm */
-void compressRle(unsigned char* data,tImage* img,int *dataSize) {
-	/* Declare pointers */
-	unsigned char* cursorData  = data;
-	char*          counter;
-	unsigned char* cursorPix   = img->pix;
-	unsigned char* imgEnd      = img->pix+(*dataSize);
-
-	while (cursorPix<imgEnd) {
-		/* Step 1: Create counter */
-		*(counter=(char*)(cursorData++))=-1;
-
-		/* Step 2: Look and copy the string until a repeated byte is found */
-		while (
-			(cursorPix<imgEnd)&&
-			(
-				(*cursorPix!=*(cursorPix+1))||
-				(
-					/*(*cursorPix==*(cursorPix+1))&&*/
-					((cursorPix+1)<imgEnd)&&
-					(*cursorPix!=*(cursorPix+2))
-				)
-			)&&
-			((*counter)!=127)
-		) {
-			*(cursorData)=*(cursorPix);
-			(*counter)++;
-			cursorPix++;
-			cursorData++;
-		}
-
-		/* Step 3: If there was a repeated string, let's ignore it and add the cursor with the repetitions */
-		if (*counter==-1) {
-			while ((cursorPix+1<imgEnd)&&(*cursorPix==(*(cursorPix+1)))&&((*counter)!=-128)) {
-				cursorPix++;
-				(*counter)--;
-			}
-
-			*(cursorData)=*(cursorPix); /* Print repeated char */
-			cursorPix++;
-			cursorData++;
-		}
-	}
-
-	*(cursorData++)=0;
-	*(cursorData++)=*(cursorPix);
-	*dataSize=(int)((long int)cursorData-(long int)data)-2; /* Note: casted to long for portability with 64 bits architectures */
-}
-
-/***************************************************************\
-|               Main compress and expand graphics               |
-\***************************************************************/
-
-/*
-		Header info:
-		 1 byte  - checksum           char checksum
-		 2 bytes - height             short int height
-		 2 bytes - width              short int width
-		 1 byte  - 00                 (char)0
-		 1 byte  - compression type   unsigned char compressionType
-*/
-
-/* Expands an array into an image */
-int mExpandGraphic(const unsigned char* data,tImage *image, int dataSizeInBytes) {
-	/*
-		Reads data and extracts tImage
-		returns the next image address or -1 in case of error
-	*/
-
-	int imageSizeInBytes;
-	int result;
-
-	data++;
-	image->height=((unsigned char)data[0])+((unsigned char)data[1]<<8);data+=2;
-	image->width =((unsigned char)data[0])+((unsigned char)data[1]<<8);data+=2;
-
-	if (*(data++)) return -1; /* Verify format */
-	image->type=(unsigned char)(*(data++));
-	dataSizeInBytes-=7;
-
-	if (image->type&0xB0) {
-		image->widthInBytes=(image->width+1)/2;
-	} else {
-		image->widthInBytes=(image->width+7)/8;
-	}
-	imageSizeInBytes=image->widthInBytes*image->height;
-
-	switch (getAlgor(image->type)) {
-		case COMPRESS_RAW: /* No Compression Algorithm */
-			if ((image->pix=getMemory(imageSizeInBytes))==NULL) return COMPRESS_RESULT_FATAL;
-			memcpy(image->pix,data,imageSizeInBytes);
-			result=COMPRESS_RESULT_SUCCESS;
-			break;
-		case COMPRESS_RLE_LR: /* RLE Left to Right Compression Algorithm */
-			result=expandRle(data,dataSizeInBytes,image,imageSizeInBytes);
-			break;
-		case COMPRESS_RLE_UD: /* RLE Up to Down Compression Algorithm */
-			result=expandRle(data,dataSizeInBytes,image,imageSizeInBytes);
-			if (result==COMPRESS_RESULT_FATAL) return COMPRESS_RESULT_FATAL;
-			transposeImage(image,imageSizeInBytes);
-			break;
-		case COMPRESS_LZG_LR: /* LZ Groody Left to Right Compression Algorithm */
-			result=expandLzg(data,dataSizeInBytes,image,imageSizeInBytes);
-			break;
-		case COMPRESS_LZG_UD: /* LZ Groody Up to Down Compression Algorithm */
-			result=expandLzg(data,dataSizeInBytes,image,imageSizeInBytes);
-			if (result==COMPRESS_RESULT_FATAL) return COMPRESS_RESULT_FATAL;
-			transposeImage(image,imageSizeInBytes);
-			break;
-		default:
-			result=COMPRESS_RESULT_FATAL;
-			break;
-	}
-	return result; /* Ok */
-}
-
-/* Compress an image into binary data */
-int mCompressGraphic(unsigned char* data,tImage* image, int* dataSizeInBytes) {
-	/* Declare variables */
-	unsigned char* compressed     [COMPRESS_WORKING_ALGORITHMS];
-	int            compressedSize [COMPRESS_WORKING_ALGORITHMS];
-	int            algorithm;
-	int            i;
-	int            imageSizeInBytes;
-
-	/* Initialize variables */
-	imageSizeInBytes=image->widthInBytes*image->height;
-	for (i=0;i<COMPRESS_WORKING_ALGORITHMS;i++) compressedSize[i]=imageSizeInBytes;
-
-	/*
-		Perform all compressions
-	*/
-
-	/* COMPRESS_RAW */
-	compressed[COMPRESS_RAW]=getMemory(compressedSize[COMPRESS_RAW]);
-	memcpy(compressed[COMPRESS_RAW],image->pix,compressedSize[COMPRESS_RAW]);
-
-	/* COMPRESS_RLE_LR */
-	compressed[COMPRESS_RLE_LR]=getMemory(10*imageSizeInBytes+50); /* This will reserve 10*(image size)+50 bytes, to allocate the compressed file */
-	compressRle(compressed[COMPRESS_RLE_LR],image,&(compressedSize[COMPRESS_RLE_LR]));
-
-	/* COMPRESS_RLE_UD */
-	compressed[COMPRESS_RLE_UD]=getMemory(10*imageSizeInBytes+50); /* This will reserve 10*(image size)+50 bytes, to allocate the compressed file */
-	antiTransposeImage(image,imageSizeInBytes);
-	compressRle(compressed[COMPRESS_RLE_UD],image,&(compressedSize[COMPRESS_RLE_UD]));
-
-	/*
-		Process results
-	*/
-
-	/* Select the best compression (find minimum) */
-	*dataSizeInBytes=compressedSize[COMPRESS_RAW];
-	algorithm=COMPRESS_RAW;
-	for (i=COMPRESS_RLE_LR;i<COMPRESS_WORKING_ALGORITHMS;i++) {
-		if ((*dataSizeInBytes)>compressedSize[i]) {
-			(*dataSizeInBytes)=compressedSize[i];
-			algorithm=i;
-		}
-	}
-
-	/* Copy the best algorithm in the compressed data */
-	memcpy(data+6,compressed[algorithm],*dataSizeInBytes);
-	(*dataSizeInBytes)+=6;
-
-	/*
-		Write header
-	*/
-
-	/* (16 bits)height (Intel short int format) */
-	data[0]=image->height;
-	data[1]=image->height>>8;
-	/* (16 bits)width (Intel short int format) */
-	data[2]=image->width;
-	data[3]=image->width>>8;
-	/* (8 bits)00000000+(4 bits)palette type+(4 bits)algorithm */
-	data[4]=0;
-	data[5]=image->type|algorithm;
-
-	/* Free all compression attempts */
-	for (i=COMPRESS_RAW;i<COMPRESS_WORKING_ALGORITHMS;i++) free(compressed[i]);
-	return 1;
-}
diff --git a/PR/src/lib/object/image/image_common.c b/PR/src/lib/object/image/image_common.c
deleted file mode 100644
index 1b2680e..0000000
--- a/PR/src/lib/object/image/image_common.c
+++ /dev/null
@@ -1,325 +0,0 @@
-/*  Princed V3 - Prince of Persia Level Editor for PC Version
-    Copyright (C) 2003 Princed Development Team
-
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program; if not, write to the Free Software
-    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-    The authors of this program may be contacted at http://forum.princed.com.ar
-*/
-
-/*
-compress.c: Princed Resources : Image Compression Library
-\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf
- Copyright 2003, 2004 Princed Development Team
-  Created: 24 Aug 2003
-
-  Author: Enrique Calot <ecalot.cod@princed.com.ar>
-  Version: 1.01 (2003-Oct-23)
-  Version: 2.00 (2004-Mar-07)
-
- Note:
-  DO NOT remove this copyright notice
-*/
-
-/***************************************************************\
-|                  I M P L E M E N T A T I O N                  |
-\***************************************************************/
-
-#include <stdio.h>
-#include <string.h>
-#include "compress.h"
-#include "memory.h"
-#include "pr.h"
-
-/***************************************************************\
-|                        Image transpose                        |
-\***************************************************************/
-
-/* Determines where the transposed byte must be saved */
-int transpose(int x,int w,int h) {
-	return ((x%h)*(w))+(int)(x/h);
-}
-
-void transposeImage(tImage* image,int size) {
-	unsigned char* outputaux=getMemory(size);
-	int cursor=0;
-
-	while (cursor<size) {outputaux[transpose(cursor,image->widthInBytes,image->height)]=image->pix[cursor];cursor++;}
-	free(image->pix);
-	image->pix=outputaux;
-}
-
-void antiTransposeImage(tImage* image,int size) {
-	unsigned char* outputaux=getMemory(size);
-	int cursor=0;
-
-	while (cursor<size) {outputaux[cursor]=image->pix[transpose(cursor,image->widthInBytes,image->height)];cursor++;}
-	free(image->pix);
-	image->pix=outputaux;
-}
-
-/***************************************************************\
-|                    Uncompression algorithms                   |
-\***************************************************************/
-
-/* LZG expansion algorithm sub function */
-unsigned char popBit(unsigned char *byte) {
-	unsigned char bit=(unsigned char)((*byte)&1);
-	(*byte)>>=1;
-	return bit;
-}
-
-/* Expands LZ Groody algorithm. This is the core of PR */
-int expandLzg(const unsigned char* array, int arraySize, tImage* image, int imageSize) {
-	char k;
-	int location,h,cursor=0,pos=0;
-	unsigned char maskbyte,rep;
-
-	if ((image->pix=getMemory(/*imageSize*/MAX_MOD_SIZE_IN_LZG))==NULL) return COMPRESS_RESULT_FATAL; /* reserve memory */
-	for(location=0;location<MAX_MOD_SIZE_IN_LZG;image->pix[location]=0,location++); /* clean output garbage */
-
-	/* main loop */
-	while (cursor<imageSize) {
-		maskbyte=array[pos++];
-		for (k=8;k&&(cursor<imageSize);k--) {
-			if (popBit(&maskbyte)) {
-				image->pix[cursor++]=array[pos++];
-			} else {
-				location=66+(((rep=array[pos])&3)<<8)+(unsigned char)array[pos+1];pos+=2;
-				rep=(unsigned char)((rep>>2)+3);
-				while (rep--) { /* Be careful in big images */
-					h=cursor/MAX_MXD_SIZE_IN_LZG-((location%MAX_MXD_SIZE_IN_LZG)>(cursor%MAX_MXD_SIZE_IN_LZG));
-					image->pix[cursor++]=image->pix[((h<0)?0:h)*MAX_MXD_SIZE_IN_LZG+(location++)%MAX_MXD_SIZE_IN_LZG];
-/*
-					h=((cursor-(location&0x3FF))&(~0x3FF));
-					image->pix[cursor]=image->pix[((h<0)?0:h)+(location&0x3FF)];
-					cursor++;location++;
-*/
-				}
-			}
-		}
-	}
-	return ((pos==arraySize)&(cursor==imageSize))-1; /* WARNING or SUCCESS */
-}
-
-/* Expands RLE algorithm */
-int expandRle(const unsigned char* array, int arraySize, tImage* image, int imageSize) {
-	int cursor=0;
-	register signed char rep;
-	int pos=0;
-
-	if ((image->pix=getMemory(imageSize+128))==NULL) return COMPRESS_RESULT_FATAL; /* reserve memory */
-
-	/* main loop */
-	while (cursor<imageSize) {
-		rep=(signed char)(array[pos++]);
-		if (rep<0) {
-			/* Negative */
-			while (rep++) image->pix[cursor++]=array[pos];
-			pos++;
-		} else {
-			/* Positive */
-			rep=~rep;
-			while (rep++) image->pix[cursor++]=array[pos++];
-		}
-	}
-	return ((pos==arraySize)&(cursor==imageSize))-1; /* WARNING or SUCCESS */
-}
-
-/***************************************************************\
-|                    Compression algorithms                     |
-\***************************************************************/
-
-/* Compress using the Run Length Encoding algorithm */
-void compressRle(unsigned char* data,tImage* img,int *dataSize) {
-	/* Declare pointers */
-	unsigned char* cursorData  = data;
-	char*          counter;
-	unsigned char* cursorPix   = img->pix;
-	unsigned char* imgEnd      = img->pix+(*dataSize);
-
-	while (cursorPix<imgEnd) {
-		/* Step 1: Create counter */
-		*(counter=(char*)(cursorData++))=-1;
-
-		/* Step 2: Look and copy the string until a repeated byte is found */
-		while (
-			(cursorPix<imgEnd)&&
-			(
-				(*cursorPix!=*(cursorPix+1))||
-				(
-					/*(*cursorPix==*(cursorPix+1))&&*/
-					((cursorPix+1)<imgEnd)&&
-					(*cursorPix!=*(cursorPix+2))
-				)
-			)&&
-			((*counter)!=127)
-		) {
-			*(cursorData)=*(cursorPix);
-			(*counter)++;
-			cursorPix++;
-			cursorData++;
-		}
-
-		/* Step 3: If there was a repeated string, let's ignore it and add the cursor with the repetitions */
-		if (*counter==-1) {
-			while ((cursorPix+1<imgEnd)&&(*cursorPix==(*(cursorPix+1)))&&((*counter)!=-128)) {
-				cursorPix++;
-				(*counter)--;
-			}
-
-			*(cursorData)=*(cursorPix); /* Print repeated char */
-			cursorPix++;
-			cursorData++;
-		}
-	}
-
-	*(cursorData++)=0;
-	*(cursorData++)=*(cursorPix);
-	*dataSize=(int)((long int)cursorData-(long int)data)-2; /* Note: casted to long for portability with 64 bits architectures */
-}
-
-/***************************************************************\
-|               Main compress and expand graphics               |
-\***************************************************************/
-
-/*
-		Header info:
-		 1 byte  - checksum           char checksum
-		 2 bytes - height             short int height
-		 2 bytes - width              short int width
-		 1 byte  - 00                 (char)0
-		 1 byte  - compression type   unsigned char compressionType
-*/
-
-/* Expands an array into an image */
-int mExpandGraphic(const unsigned char* data,tImage *image, int dataSizeInBytes) {
-	/*
-		Reads data and extracts tImage
-		returns the next image address or -1 in case of error
-	*/
-
-	int imageSizeInBytes;
-	int result;
-
-	data++;
-	image->height=((unsigned char)data[0])+((unsigned char)data[1]<<8);data+=2;
-	image->width =((unsigned char)data[0])+((unsigned char)data[1]<<8);data+=2;
-
-	if (*(data++)) return -1; /* Verify format */
-	image->type=(unsigned char)(*(data++));
-	dataSizeInBytes-=7;
-
-	if (image->type&0xB0) {
-		image->widthInBytes=(image->width+1)/2;
-	} else {
-		image->widthInBytes=(image->width+7)/8;
-	}
-	imageSizeInBytes=image->widthInBytes*image->height;
-
-	switch (getAlgor(image->type)) {
-		case COMPRESS_RAW: /* No Compression Algorithm */
-			if ((image->pix=getMemory(imageSizeInBytes))==NULL) return COMPRESS_RESULT_FATAL;
-			memcpy(image->pix,data,imageSizeInBytes);
-			result=COMPRESS_RESULT_SUCCESS;
-			break;
-		case COMPRESS_RLE_LR: /* RLE Left to Right Compression Algorithm */
-			result=expandRle(data,dataSizeInBytes,image,imageSizeInBytes);
-			break;
-		case COMPRESS_RLE_UD: /* RLE Up to Down Compression Algorithm */
-			result=expandRle(data,dataSizeInBytes,image,imageSizeInBytes);
-			if (result==COMPRESS_RESULT_FATAL) return COMPRESS_RESULT_FATAL;
-			transposeImage(image,imageSizeInBytes);
-			break;
-		case COMPRESS_LZG_LR: /* LZ Groody Left to Right Compression Algorithm */
-			result=expandLzg(data,dataSizeInBytes,image,imageSizeInBytes);
-			break;
-		case COMPRESS_LZG_UD: /* LZ Groody Up to Down Compression Algorithm */
-			result=expandLzg(data,dataSizeInBytes,image,imageSizeInBytes);
-			if (result==COMPRESS_RESULT_FATAL) return COMPRESS_RESULT_FATAL;
-			transposeImage(image,imageSizeInBytes);
-			break;
-		default:
-			result=COMPRESS_RESULT_FATAL;
-			break;
-	}
-	return result; /* Ok */
-}
-
-/* Compress an image into binary data */
-int mCompressGraphic(unsigned char* data,tImage* image, int* dataSizeInBytes) {
-	/* Declare variables */
-	unsigned char* compressed     [COMPRESS_WORKING_ALGORITHMS];
-	int            compressedSize [COMPRESS_WORKING_ALGORITHMS];
-	int            algorithm;
-	int            i;
-	int            imageSizeInBytes;
-
-	/* Initialize variables */
-	imageSizeInBytes=image->widthInBytes*image->height;
-	for (i=0;i<COMPRESS_WORKING_ALGORITHMS;i++) compressedSize[i]=imageSizeInBytes;
-
-	/*
-		Perform all compressions
-	*/
-
-	/* COMPRESS_RAW */
-	compressed[COMPRESS_RAW]=getMemory(compressedSize[COMPRESS_RAW]);
-	memcpy(compressed[COMPRESS_RAW],image->pix,compressedSize[COMPRESS_RAW]);
-
-	/* COMPRESS_RLE_LR */
-	compressed[COMPRESS_RLE_LR]=getMemory(10*imageSizeInBytes+50); /* This will reserve 10*(image size)+50 bytes, to allocate the compressed file */
-	compressRle(compressed[COMPRESS_RLE_LR],image,&(compressedSize[COMPRESS_RLE_LR]));
-
-	/* COMPRESS_RLE_UD */
-	compressed[COMPRESS_RLE_UD]=getMemory(10*imageSizeInBytes+50); /* This will reserve 10*(image size)+50 bytes, to allocate the compressed file */
-	antiTransposeImage(image,imageSizeInBytes);
-	compressRle(compressed[COMPRESS_RLE_UD],image,&(compressedSize[COMPRESS_RLE_UD]));
-
-	/*
-		Process results
-	*/
-
-	/* Select the best compression (find minimum) */
-	*dataSizeInBytes=compressedSize[COMPRESS_RAW];
-	algorithm=COMPRESS_RAW;
-	for (i=COMPRESS_RLE_LR;i<COMPRESS_WORKING_ALGORITHMS;i++) {
-		if ((*dataSizeInBytes)>compressedSize[i]) {
-			(*dataSizeInBytes)=compressedSize[i];
-			algorithm=i;
-		}
-	}
-
-	/* Copy the best algorithm in the compressed data */
-	memcpy(data+6,compressed[algorithm],*dataSizeInBytes);
-	(*dataSizeInBytes)+=6;
-
-	/*
-		Write header
-	*/
-
-	/* (16 bits)height (Intel short int format) */
-	data[0]=image->height;
-	data[1]=image->height>>8;
-	/* (16 bits)width (Intel short int format) */
-	data[2]=image->width;
-	data[3]=image->width>>8;
-	/* (8 bits)00000000+(4 bits)palette type+(4 bits)algorithm */
-	data[4]=0;
-	data[5]=image->type|algorithm;
-
-	/* Free all compression attempts */
-	for (i=COMPRESS_RAW;i<COMPRESS_WORKING_ALGORITHMS;i++) free(compressed[i]);
-	return 1;
-}
diff --git a/PR/src/lib/pr.c b/PR/src/lib/pr.c
deleted file mode 100644
index 2390b8a..0000000
--- a/PR/src/lib/pr.c
+++ /dev/null
@@ -1,489 +0,0 @@
-/*  Princed V3 - Prince of Persia Level Editor for PC Version
-    Copyright (C) 2003 Princed Development Team
-
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program; if not, write to the Free Software
-    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-    The authors of this program may be contacted at http://forum.princed.com.ar
-*/
-
-/*
-pr.c: Main source file for Princed Resources
-\xaf\xaf\xaf\xaf
-	Princed Resources editor
-	(c) Copyright 2003, Princed Development Team
-
-	Authors
-	 Coding & main routines
-	  Enrique Calot
-	  Santiago Zamora
-
-	 Graphic compression algorithms
-	  Tammo Jan Dijkema
-	  Enrique Calot
-
-	 Graphic format development
-	  Tammo Jan Dijkema
-	  Anke Balderer
-
-	 MID Sound format development
-	  Christian Lundheim
-
-	 Resources.xml edition
-	  Steven Fayers
-
- Note:
-  DO NOT remove this copyright notice
-*/
-
-/* Headers */
-#include <stdio.h>
-#include <string.h>
-
-#include "pr.h"
-
-#include "compress.h"
-
-#include "extract.h"
-#include "compile.h"
-#include "tasks.h"
-
-#include "memory.h"    /* getMemory, free */
-#include "disk.h"      /* getFileNameFromPath */
-
-#ifndef DLL
- #ifdef UNIX
-  #include <unistd.h>
-  #ifndef LINUX
-   #include "getopt.h"
-  #endif
- #else
-  #include "getopt.h"
- #endif
-#endif
-
-/***************************************************************\
-|                      Main working functions                   |
-\***************************************************************/
-
-FILE* outputStream=NULL;
-
-#ifdef DLL
-void prSetOutput(FILE* output) {
-	outputStream=output;
-}
-#endif
-
-#ifdef DLL
-int prExportDat(const char* vDatFile, const char* vDirName, const char* vResFile) {
-	outputStream=stdout;
-	return prExportDatOpt(vDatFile,vDirName,vResFile,export_flag,NULL,NULL,NULL);
-}
-#endif
-
-int prExportDatOpt(const char* vDatFile, const char* vDirName, const char* vResFile,int opt,const char* vDatFileName,const char* datAuthor, const char* backupExtension) {
-	/*
-		Arguments:
-			char* vDatFile        - full Path to the dat file;
-			                        if file use it, if directory, perform it for
-			                        all files
-			char* vDirName        - full Path to the extracting folder
-			                        (doesn't need to exist)
-			char* vResFile        - full Path to the resources XML file
-			                        NULL is the default file resources.xml
-			char opt              - program options, see below
-			char* vDatFileName    - name of the file to be extracted
-			                        NULL means predict it from vDatFile
-			const char* datAuthor - Author's name when extracting PLV's,
-			                        NULL is default
-			const char* backupExtension
-			                      - If backup_flag is set, the string to attach
-			                        to the backup files
-
-		Options:
-			unknown_flag   - generate the unknown file without performing
-                       any extraction
-			raw_flag       - uses raw format
-			verbose_flag   - explain what is being done
-			recursive_flag - searches for all dat files (only if vDatFile
-			                 is not a dat file and vDatFileName is NULL)
-			force_flag     - default option, you cannot disable it,
-			                 so please make a backup of your files
-			backup_flag    - backup your files
-
-
-		Return values:
-			00 Ok
-			-1 Error accessing the file DAT
-			-2 Memory error in extraction
-			-3 Invalid DAT file
-			-4 XML Parse error
-			-5 Memory error in parsing
-			-6 XML Attribute not recognized
-			-7 XML File not found
-	*/
-
-	/* Declare variables */
-	tResource* r[MAX_RES_COUNT];
-	int a;
-	const char* aux;
-	char* currentDatFileName;
-	char* currentDatFile;
-
-	currentDatFile=strallocandcopy(vDatFileName);
-
-	parseGivenPath(currentDatFile);
-
-	if (vDatFileName==NULL) { /* if no special dat file was specified, a path parsed will be used */
-		aux=getFileNameFromPath(vDatFile);
-	} else {
-		aux=currentDatFile;
-	}
-	currentDatFileName=strallocandcopy(aux);
-
-	/* Parse XML and export the file */
-	a=parseFile(vResFile,currentDatFileName,r);
-	if (a<0) {
-		/* parsing errors */
-		a-=3;
-	} else {
-		/* exporting errors/no errors */
-		a=extract(vDatFile,vDirName,r,opt,currentDatFileName,datAuthor,backupExtension);
-	}
-	free(currentDatFileName);
-	free(currentDatFile);
-	freePartialList();
-
-	return a;
-}
-
-#ifdef DLL
-int prImportDat(const char* vDatFile, const char* vDirName, const char* vResFile) {
-	outputStream=stdout;
-	return prImportDatOpt(vDatFile,vDirName,vResFile,0,NULL,NULL);
-}
-#endif
-
-int prImportDatOpt(const char* vDatFile, const char* vDirName, const char* vResFile,int opt,const char* vDatFileName, const char* backupExtension) {
-	/*
-		Arguments:
-			char* vDatFile        - full Path to the dat file;
-			                        if file use it, if directory, perform it for
-			                        all files
-			char* vDirName        - full Path to the extracting folder
-			                        (doesn't need to exist)
-			char* vResFile        - full Path to the resources XML file
-			                        (resources.xml by default)
-			char opt              - program options, see below
-			char *vDatFileName    - name of the file to be extracted
-			                        NULL means predict it from vDatFile
-			const char* backupExtension
-			                      - If backup_flag is set, the string to attach
-			                        to the backup files
-
-		Options:
-			raw_flag       - uses raw format
-			verbose_flag   - explain what is being done
-			recursive_flag - searches for all dat files (only if vDatFile
-			                 is not a dat file and vDatFileName is NULL)
-			force_flag     - If not set and the file exists it will prompt
-			                 for action
-			backup_flag    - backup your files
-
-
-		Return values:
-			-1 DAT File couldn't be open for writing
-			-2 DAT file not found or invalid in partial importation
-			-3 XML Parse error
-			-4 No memory
-			-5 XML Attribute not recognized
-			-6 XML File not found
-			00 File successfully imported
-			positive number: number of missing files
-	*/
-
-	/* Declare variables */
-	tResource* r[MAX_RES_COUNT];
-	int a;
-	const char* aux;
-	char* currentDatFileName;
-
-	if (vDatFileName==NULL) { /* if no special dat file was specified, a path parsed will be used */
-		aux=getFileNameFromPath(vDatFile);
-	} else {
-		aux=vDatFileName;
-	}
-	currentDatFileName=strallocandcopy(aux);
-
-	/* Parse XML and import files */
-	a=parseFile(vResFile,currentDatFileName,r);
-	if (a<0) {
-		/* parsing errors */
-		a-=2;
-	} else {
-		/* importing errors/no errors */
-		a=compile (vDatFile, vDirName,r,opt,currentDatFileName,backupExtension);
-	}
-	free(currentDatFileName);
-	return a;
-}
-
-/***************************************************************\
-|                     M A I N   P R O G R A M                   |
-\***************************************************************/
-
-void syntax() {
-	fprintf(outputStream,PARSING_HELP_BEGIN);
-	fprintf(outputStream,PARSING_HELP_PART1);
-	fprintf(outputStream,PARSING_HELP_PART2);
-	fprintf(outputStream,PARSING_HELP_PART3);
-}
-
-int prMain(int optionflag, const char* extension,const char* dirName,const char* resFile,const char* datfile, const char* datfilename,const char* datAuthor,FILE* output) {
-
-	/* declare variables */
-	int returnValue;
-
-	outputStream=output;
-
-	/* do selected tasks */
-	if (hasFlag(export_flag)) { /* Export file */
-		char* array[]=PR_TEXT_EXPORT_ARRAY;
-		fprintf(output,PR_TEXT_TASK_EXTRACT,datfile,dirName);
-		returnValue=prExportDatOpt(datfile,dirName,resFile,optionflag,datfilename,datAuthor,extension);
-		fprintf(output,PR_TEXT_RESULT,array[-returnValue],returnValue);
-	}	else if (hasFlag(classify_flag)) { /* Classify file */
-		char* array[]=PR_TEXT_CLASSIFY_ARRAY;
-		fprintf(output,PR_TEXT_TASK_CLASSIFY,datfile);
-		returnValue=prVerifyDatType(datfile);
-		if (hasFlag(cgi_flag)) {
-			fprintf(output,PR_CGI_TEXT2,returnValue);
-		} else {
-			fprintf(output,PR_TEXT_RESULT,array[2+returnValue],returnValue);
-		}
-	}	else if (hasFlag(import_flag)) { /* Import file */
-		char* array[]=PR_TEXT_IMPORT_ARRAY;
-		fprintf(output,PR_TEXT_TASK_COMPILE,datfile,dirName);
-		returnValue=prImportDatOpt(datfile,dirName,resFile,optionflag,datfilename,extension);
-		if (returnValue<=0) {
-			fprintf(output,PR_TEXT_RESULT,array[-returnValue],returnValue);
-		} else {
-			fprintf(output,PR_TEXT_RESULT_ERR,returnValue);
-		}
-	} else {
-		syntax();
-		returnValue=-1;
-	}
-
-	return returnValue;
-}
-
-#ifndef DLL
-
-/***************************************************************\
-|             Standard executable specific functions            |
-\***************************************************************/
-
-int prStart(int optionflag, const char* extension,const char* dirName,const char* resFile,const char* datfile, const char* datfilename,const char* datAuthor,FILE* output) {
-	int result=1;
-	whatIs selectedFile;
-	outputStream=output;
-
-	/* Show about or cgi stuff */
-	if (hasFlag(cgi_flag)) {
-		fprintf(output,PR_CGI_TEXT1);
-	} else {
-		fprintf(output,PR_ABOUT);
-	}
-
-	/* Show version screen if requested */
-	if (hasFlag(version_flag)) {
-		fprintf(output,PARSING_ABOUT);
-		return -1;
-	}
-
-	/* If bad syntax or help screen requested */
-	if (hasFlag(help_flag)) {
-		syntax();
-		return -1;
-	}
-
-	/* Perform tasks depending on the argument */
-	if (hasFlag(import_flag)) {
-		/* We have to import something, let's see what the parameters are */
-		if (datfile==NULL) {
-			/* no files? let's use the whole current directory */
-			fprintf(output,PR_TEXT_IMPORTING_CURRENT);
-			importDir(dirName,resFile,optionflag,extension,".",output);
-		} else if ((selectedFile=isDir(datfile))!=eFile) {
-			fprintf(output,PR_TEXT_IMPORTING_GIVEN);
-			if ((selectedFile==eDirectory)||(isntADatFile(getFileNameFromPath(datfile),resFile))) {
-				/* it's a directory or doesn't exist (but it's not a dat file) */
-				importDir(dirName,resFile,optionflag,extension,datfile,output);
-			} else {
-				/* it doesn't exist but it's a dat file */
-				result=prMain(optionflag,extension,dirName,resFile,datfile,datfilename,datAuthor,output);
-			}
-		} else { /* it's only one existent file */
-			result=prMain(optionflag,extension,dirName,resFile,datfile,datfilename,datAuthor,output);
-		}
-	} else {
-		/* We have to export/classify something, perhaps we'll need to use somerecursive functions */
-		if (datfile==NULL) {
-			/* If nothing, let's use the current dir and check for all the files there */
-			fprintf(output,PR_TEXT_SCANNING_CURRENT);
-			recurseDirectory(".",optionflag,extension,dirName,resFile,datfilename,datAuthor,output);
-		} else if ((selectedFile=isDir(datfile))==eDirectory) {
-			/* If it's a directory, let's check for all the files there */
-			fprintf(output,PR_TEXT_SCANNING_GIVEN);
-			recurseDirectory(datfile,optionflag,extension,dirName,resFile,datfilename,datAuthor,output);
-		} else if (selectedFile==eNotFound) {
-			/* If the file doesn't exist, print an error and exit */
-			fprintf(output,PR_TEXT_FILE_NOT_FOUND,datfile);
-			result=0;
-		} else {
-			/* If it is a file, just do the tasks for it */
-			result=prMain(optionflag,extension,dirName,resFile,datfile,datfilename,datAuthor,output);
-		}
-	}
-
-	freeParsedStructure();
-	return result;
-}
-
-/***************************************************************\
-|      Standard executable command line parsing function        |
-\***************************************************************/
-
-int main (int argc, char **argv) {
-	/* declare variables */
-	char  dirName[MAX_FILENAME_SIZE]=".";
-	char* datAuthor  =NULL;
-	char* datFileName=NULL;
-	char* datFilePath=NULL;
-	char* extension  =NULL;
-	char* resFile    =NULL;
-	int   c;
-	int   optionflag=0;
-
-	/* Parse command line options */
-	do {
-		static struct option long_options[] = PARSING_OPTIONS;
-		int junk = 0;
-
-		c = getopt_long(argc,argv,PARSING_CHARS,long_options,&junk);
-		switch (c) {
-				case 'c':
-				case 'i':
-					if (hasFlag(classify_flag|export_flag)) setFlag(help_flag);
-					setFlag(import_flag);
-					if (optarg) strncpy(dirName,optarg,MAX_FILENAME_SIZE);
-					break;
-				case 'g':
-					setFlag(cgi_flag); /* if cgi, a classify must be performed */
-				case 'd':
-					if (hasFlag(import_flag|export_flag)) setFlag(help_flag);
-					setFlag(classify_flag);
-					break;
-				case 'x':
-				case 'e':
-					if (hasFlag(classify_flag|import_flag)) setFlag(help_flag);
-					setFlag(export_flag);
-					if (optarg) strncpy(dirName,optarg,MAX_FILENAME_SIZE);
-					break;
-				case 'b':
-					setFlag(backup_flag);
-					freeAllocation(extension);
-					extension=strallocandcopy(optarg);
-					break;
-				case 'f':
-					setFlag(force_flag);
-					break;
-				case 's':
-					freeAllocation(resFile);
-					resFile=strallocandcopy(optarg);
-					break;
-				case 'r':
-#ifndef PR_IGNORE_RAW_OPTION
-					setFlag(raw_flag);
-					break;
-#endif
-				case 'R':
-					setFlag(recursive_flag);
-					break;
-				case 't':
-					freeAllocation(datFileName);
-					datFileName=strallocandcopy(optarg);
-					break;
-				case 'a':
-					freeAllocation(datAuthor);
-					datAuthor=strallocandcopy(optarg);
-					break;
-				case 'v':
-					setFlag(verbose_flag);
-					break;
-				case 2:
-					setFlag(unknown_flag);
-				case -1:
-					break;
-				case 1:
-					setFlag(version_flag);
-				default:
-					setFlag(help_flag);
-		}
-	} while (c!=-1);
-
-	if (optind < argc) {
-		int size;
-		datFilePath=strallocandcopy(argv[optind]);
-		/* Erase the last "/" if exists. TODO: send to parseGivenPath  */
-		size=strlen(datFilePath);
-		if (size>0) {
-			size--;
-			if (isDirSep(datFilePath,size)) datFilePath[size]=0;
-		}
-	}
-
-	/* At least one of these options must be selected, if not, the user needs help! */
-	if (!(hasFlag(import_flag|export_flag|classify_flag))) setFlag(help_flag);
-
-	parseGivenPath(datFilePath);
-
-	/* Run main program */
-	prStart(optionflag,extension,dirName,resFile,datFilePath,datFileName,datAuthor,stdout);
-
-	/* Free memory and exit */
-	freePartialList();
-	freeAllocation(datAuthor);
-	freeAllocation(datFileName);
-	freeAllocation(datFilePath);
-	freeAllocation(extension);
-	freeAllocation(resFile);
-
-	return 0;
-}
-
-#endif
-
-/***************************************************************\
-|              Main Library start dummy function                |
-\***************************************************************/
-
-#ifdef SO
-/* When compiling in Unix SO libraries */
-void start() {}
-#endif
-
-
-
diff --git a/PR/src/lib/xml/parse.c b/PR/src/lib/xml/parse.c
deleted file mode 100644
index f64c207..0000000
--- a/PR/src/lib/xml/parse.c
+++ /dev/null
@@ -1,502 +0,0 @@
-/*  Princed V3 - Prince of Persia Level Editor for PC Version
-    Copyright (C) 2003 Princed Development Team
-
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program; if not, write to the Free Software
-    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-    The authors of this program may be contacted at http://forum.princed.com.ar
-*/
-
-/*
-xmlparse.c: Princed Resources : xml parsing functions
-\xaf\xaf\xaf\xaf\xaf
- Copyright 2003 Princed Development Team
-  Created: 23 Oct 2003
-
-  Author: Enrique Calot <ecalot.cod@princed.com.ar>
-  Version: 1.01 (2003-Oct-25)
-
- Note:
-  DO NOT remove this copyright notice
-*/
-
-/***************************************************************\
-|                  I M P L E M E N T A T I O N                  |
-\***************************************************************/
-
-/* Includes */
-#include "xmlparse.h"
-#include "disk.h"
-#include "memory.h"
-#include "pr.h"
-#include <string.h>
-#include <stdio.h> /* Included only for XML specific attribute code */
-#include <stdlib.h>
-
-extern FILE* outputStream;
-
-/****************************************************************\
-|                   Tag Tree Handling Functions                  |
-\****************************************************************/
-
-/* private defines */
-#define IsSpace(c) ((c==' ')||(c==9))||(c=='\n')||(c=='\r')
-#define IsChar(c) ((('a'<=c)&&(c<='z'))||(('A'<=c)&&(c<='Z'))||(c=='_')||(c=='-')||(c=='?'))
-
-#define Separate while (IsSpace(*i)) i++
-#define NextWord(i) while (IsChar(*(i))) (i)++
-
-#define FillAttr(a,b) if (equalsIgnoreCase(attr,b)) { freeAllocation(a); (a)=(val); return 1;}
-
-#define TotalInheritance(attribute) \
-		if ((tag->attribute==NULL)&&(father->attribute!=NULL)) {\
-			x=strlen(father->attribute)+1;\
-			tag->attribute=(char*)malloc(x);\
-			memcpy(tag->attribute,father->attribute,x);\
-		}
-
-
-#define ParseError return -1
-
-tTag* getTagStructure() {
-	/* initializes */
-	tTag* t;
-	t=(tTag*)malloc(sizeof(tTag));
-	if (t==NULL) return NULL;
-
-	t->child=NULL;
-	t->next=NULL;
-	t->tag=NULL;
-	t->desc=NULL;
-	t->path=NULL;
-	t->file=NULL;
-	t->itemtype=NULL;
-	t->name=NULL;
-	t->palette=NULL;
-	t->type=NULL;
-	t->value=NULL;
-	t->version=NULL;
-	t->number=NULL;
-
-	return t;
-}
-
-void freeTagStructure(tTag* t) {
-	if (t==NULL) return;
-	freeTagStructure(t->child);
-	freeTagStructure(t->next);
-	freeAllocation(t->tag);
-	freeAllocation(t->desc);
-	freeAllocation(t->path);
-	freeAllocation(t->file);
-	freeAllocation(t->itemtype);
-	freeAllocation(t->name);
-	freeAllocation(t->palette);
-	freeAllocation(t->type);
-	freeAllocation(t->value);
-	freeAllocation(t->version);
-	freeAllocation(t->number);
-	free(t);
-}
-
-int attribFill(char* attr,char* val, tTag* t) {
-	/*
-		0: attribute mismatch
-		1: ok
-	*/
-
-	if (equalsIgnoreCase(attr,"?")) {
-		free(val);
-		return 1;
-	}
-
-	FillAttr(t->desc,"desc");
-	FillAttr(t->path,"external"); /* external is a path alias for old compatibilities */
-	FillAttr(t->path,"path");
-	FillAttr(t->file,"file");
-	FillAttr(t->itemtype,"itemtype");
-	FillAttr(t->name,"name");
-	FillAttr(t->name,"title"); /* title is a name alias */
-	FillAttr(t->palette,"palette");
-	FillAttr(t->type,"type");
-	FillAttr(t->value,"value");
-	FillAttr(t->version,"version");
-	FillAttr(t->number,"levelnumber"); /* levelnumber is a number alias */
-	FillAttr(t->number,"number");
-
-	return 0;
-}
-
-/****************************************************************\
-|                     Other Modules Functions                    |
-\****************************************************************/
-
-/* Taken from parser.c */
-
-int equalsIgnoreCase(const char s1[],const char s2[]) {
-	int i=0;
-	for (;((s1[i]&0xDF)==(s2[i]&0xDF))&&s1[i];i++);
-	return !(s1[i]||s2[i]);
-}
-
-/****************************************************************\
-|                       XML Parsing Functions                    |
-\****************************************************************/
-
-/* Parse text functions */
-int parseNext(char** pString, tTag* tag) {
-	/*
-	  -3 Attribute not recognized
-	  -2 No memory
-		-1 Parse error
-		0  if continue
-		1  if tag end
-		2  if end
-	*/
-
-	char* start;
-	char* attribute;
-	char* value;
-	char aux[MAX_VALUE_SIZE];
-	int size;
-	char* i=*pString;
-
-	Separate;
-
-	if (*i=='>') {
-		*pString=i+1;
-		return 2;
-	}
-	if (*i=='/') {
-		i++;
-		Separate;
-		if (*i=='>') {
-			*pString=i+1;
-			return 1;
-		} else {
-			ParseError;
-		}
-	}
-
-	start=i;
-	NextWord(i);
-	if (start==i) ParseError;
-	if (*i==0)    ParseError;
-
-	if (!(IsSpace(*i)||(*i=='=')||(*i=='>'))) ParseError;
-
-	size=(long int)i-(long int)start; /* Note: casted to long for portability with 64 bits architectures */
-	attribute=(char*)malloc(1+size);
-	if (attribute==NULL) return -2;
-	memcpy(attribute,start,size);
-	attribute[size]=0;
-
-	if (*i=='=') {
-		int k=0;
-		/* It's a text attribute */
-		i++;
-		if (*i!='"') ParseError;
-		i++;
-		/* Parse until the next " */
-		for(start=i; (k<MAX_VALUE_SIZE)&&(*i!='"')&&(*i!=0) ;i++) {
-			aux[k]=*i;
-			if (aux[k]=='\\') {
-				i++;
-				switch (*i) {
-					case 'n':
-						aux[k]='\n';
-						break;
-					case 'r':
-						aux[k]='\r';
-						break;
-					case 't':
-						aux[k]='\t';
-						break;
-					default:
-						aux[k]=*i;
-						break;
-				}
-			}
-			k++;
-		}
-		if ((*i)!='"') {
-			free(attribute);
-			ParseError;
-		}
-		i++;
-		value=(char*)malloc(k+1);
-		if (value==NULL) {
-			free(attribute);
-			return -2;
-		}
-		memcpy(value,aux,k);
-		value[k]=0;
-	} else {
-		/* It's a boolean attribute, I'll define it */
-		value=(char*)malloc(1);
-		if (value==NULL) {
-			free(attribute);
-			return -2;
-		}
-		value[0]=0;
-	}
-
-	if (!(attribFill(attribute,value,tag))) {
-		free(attribute);
-		return -3;
-	}
-	free(attribute);
-	*pString=i;
-	return 0;
-}
-
-int getNextTag(char** pString, char** value) {
-	/*
-	  -2 No memory
-		-1 Parse error
-		0  if next item is a tag
-		1  if it was a text
-		2  if next item closes a tag
-		3  End of document
-		4  if there was no text
-	*/
-	char* i=*pString;
-	int   result;
-	char* start;
-	int   size;
-
-	Separate;
-
-	if (*i=='<') {
-		/* it is a tag */
-		i++;
-		Separate;
-		if (*i=='/') {
-			result=2;
-			i++;
-		} else {
-			if ((*i=='!')||(*i=='?')) {
-				while ((*i)&&((*i)!='>')) i++;
-				if (!(*i)) ParseError;
-				i++;
-				if (!(*i)) return 3;
-				result=getNextTag(&i,value);
-				*pString=i;
-				return result;
-			} else {
-				result=0;
-			}
-		}
-		start=i;
-		NextWord(i);
-		if (start==i) ParseError;
-		if (*i==0)    ParseError;
-		i++;
-
-		size=(int)((long int)i-(long int)start); /* Note: casted to long for portability with 64 bits architectures */
-		*value=(char*)malloc(size);
-		if (*value==NULL) return -2;
-		memcpy(*value,start,size-1);
-		(*value)[size-1]=0;
-		*pString=i-(!result);
-		return result;
-	}
-	start=i;
-	while ((*i)&&((*i)!='<')) i++;
-	if (!(*i)) return 3;
-	if (start==i) return 4;
-	size=(int)((long int)i-(long int)start); /* Note: casted to long for portability with 64 bits architectures */
-	*value=(char*)malloc(1+size);
-	if (*value==NULL) return -2;
-	memcpy(*value,start,size);
-	(*value)[size]=0;
-	*pString=i;
-	return 1;
-}
-
-/* Parse Tree functions */
-tTag* makeTree(char** p,char* name, int* error,tTag* father) {
-	/* *error
-		-3 Attribute not recognized
-	  -2 No memory
-		-1 Parse error
-		0  if next item is a tag
-	*/
-
-	tTag* tag;
-	tTag* children=NULL;
-	char* value;
-	int result;
-
-	tag=getTagStructure();
-	tag->tag=name;
-
-	while (!((*error)=parseNext(p, tag)));
-
-	if ((*error)<0) return NULL; /* Fatal error */
-	/*	(*error)
-			1  if tag end
-			2  if end
-	*/
-	if ((*error)==1) {
-		*error=0; /* No errors, end of the tag in the same tag <tag /> */
-		return tag;
-	}
-
-	/* In case there are some empty attributes, they may be inherited */
-	/* BEGIN specific xml tag inheritance */
-	{
-		int x;
-		char* str;
-
-		TotalInheritance(palette);
-		TotalInheritance(itemtype);
-		TotalInheritance(file);
-		/* PartialConcatInheritance(tag->path,father->path,tag->value); */
-		if ((tag->value==NULL)||(tag->path!=NULL)) {
-			/* Make sure paths do exist */
-			if (father->path==NULL) {father->path=(char*)malloc(1);*(father->path)=0;}
-			if (tag->path==NULL) {tag->path=(char*)malloc(1);*(tag->path)=0;}
-
-			/* Create new variable */
-			x=strlen(father->path)+strlen(tag->path)+2;
-			str=(char*)malloc(x);
-			if (str==NULL) {*error=2;return NULL;}
-
-			/* Set variable and destroy old variables */
-			sprintf(str,"%s/%s",father->path,tag->path);
-			free(tag->path);
-			if ((*(father->path))==0) free(father->path);
-			tag->path=str;
-			memcpy(tag->path,str,x);
-		}
-	}
-	/* END specific xml tag inheritance */
-	/* Parse Child tags */
-	while (1) {
-		(*error)=getNextTag(p, &value);
-		if ((*error)<0) return NULL; /* Fatal error */
-		/*	(*error)
-				0  if next item is a tag
-				1  if it was a text
-				2  if next item closes a tag
-				3  End of document
-				4  if there was no text
-		*/
-		result=(*error);
-		switch (result) {
-			case 0:
-				if (children==NULL) {
-					tag->child=makeTree(p,value,error,tag);
-					children=tag->child;
-				} else {
-					children->next=makeTree(p,value,error,tag);
-					children=children->next;
-				}
-				if (*error) return NULL;
-				/* Add error handling */
-				break;
-			case 1:
-				freeAllocation(tag->name);
-				tag->name=value;
-				break;
-			case 2:
-				/* "no errors" or "a wrong tag is closed" */
-				*error=-(!(equalsIgnoreCase(value,tag->tag)));
-				free(value);
-				return tag;
-			case 3:
-				*error=-1; /* this tag wasn't closed */
-				return tag;
-				break;
-		}
-	}
-	return NULL;
-}
-
-#ifdef IGNOREVERIFYDATTYPES
-
-void showTag(int n,tTag* t) {
-	int a;
-	tTag* children;
-
-	for(a=0;a<n;a++) fprintf (outputStream,"  ");
-	if (t!=NULL) {
-		fprintf(outputStream,"%s (%s@%s)\n",t->tag,t->file,t->value);
-		children=t->child;
-
-		while (children!=NULL) {
-			showTag(n+1,children);
-			children=children->next;
-		}
-	} else {
-		fprintf(outputStream,"None\n");
-	}
-}
-
-#endif
-
-tTag* parseXmlFile(const char* vFile,int* error) {
-	/* error may take the following values:
-		-1 Parse error
-		-2 No memory
-		-3 Attribute not recognized
-		-4 File not found
-		0  no errors
-	*/
-	char* p;
-	char* l;
-	char* value=NULL;
-	tTag* tag;
-	tTag* father;
-
-	if (!mLoadFileArray(vFile,(unsigned char**)(&l))) {
-		*error=-4; /* File not open */
-		return NULL;
-	}
-	p=l;
-
-	*error=getNextTag(&p, &value);
-	if ((*error)<0) {
-		free(l);
-		return NULL; /* Fatal error will stop the execusion of the parsing */
-	}
-
-	father=getTagStructure();
-	tag=makeTree(&p,value,error,father);
-
-	if (*error) {
-		freeTagStructure(tag);
-		free(l);
-		free(father);
-		return NULL;
-	}
-	*error=getNextTag(&p, &value);
-	free(l);
-	if (*error<0) {
-		freeTagStructure(tag);
-		free(father);
-		return NULL; /* Fatal error will stop the execusion of the parsing */
-	}
-	if (*error==3) {
-		*error=0;
-		free(father);
-		return tag;
-	} else {
-		freeTagStructure(tag);
-		free(father);
-		*error=-1;
-		return NULL;
-	}
-}
diff --git a/PR/src/lib/xml/search.c b/PR/src/lib/xml/search.c
deleted file mode 100644
index 2d378da..0000000
--- a/PR/src/lib/xml/search.c
+++ /dev/null
@@ -1,241 +0,0 @@
-/*  Princed V3 - Prince of Persia Level Editor for PC Version
-    Copyright (C) 2003 Princed Development Team
-
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program; if not, write to the Free Software
-    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-    The authors of this program may be contacted at http://forum.princed.com.ar
-*/
-
-/*
-xmlsearch.c: Princed Resources : specific xml handling functions
-\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf
- Copyright 2003 Princed Development Team
-  Created: 23 Oct 2003
-
-  Author: Enrique Calot <ecalot.cod@princed.com.ar>
-  Version: 1.01 (2003-Oct-25)
-
- Note:
-  DO NOT remove this copyright notice
-*/
-
-/***************************************************************\
-|                  I M P L E M E N T A T I O N                  |
-\***************************************************************/
-#include <stdio.h> /* only on debugging purposes */
-
-/* Includes */
-#include "pr.h"
-#include "xmlparse.h"
-#include "resources.h"
-#include "xmlsearch.h"
-#include "memory.h"
-#include <string.h>
-
-/****************************************************************\
-|                   Tag Tree Searching Functions                 |
-\****************************************************************/
-
-#define ptoi(p) ((p!=NULL)?atoi(p):0)
-
-#define keepStringAttribute(attribute) r[id]->attribute=strallocandcopy(t->attribute)
-#define keepIntAttribute(attribute,type) r[id]->attribute=(type)ptoi(t->attribute);
-
-void workTag(const tTag* t,void* pass) {
-	/*
-		If the tag matches, it is converted to resource and added to the array
-	*/
-
-	/* Declare variables */
-	unsigned short id;
-	const char* datFile=((tPassWork*)pass)->datFile;
-	tResource** r=((tPassWork*)pass)->r;
-
-	/* Skipping conditions */
-	if (!equalsIgnoreCase(t->file,datFile))   return; /* If it doesn't belong to the given dat file */
-	if (!(id=(unsigned short)ptoi(t->value))) return; /* If there was not id or id contained wrong values */
-	if (!equalsIgnoreCase(t->tag,"item"))     return; /* If the tag isn't an item */
-
-	/* Process tag and copy values to resource */
-	/* Create Resource */
-	if (r[id]!=NULL) return;
-	r[id]=(tResource*)malloc(sizeof(tResource));
-	if (r[id]==NULL) return;
-
-	/* Get string itemtype and convert into the itemtypeId */
-	r[id]->type=0;
-#ifndef IGNORERESOURCEFUNCTIONS
-	if (t->itemtype!=NULL) { /* NULL tells the extractor that the type must be auto detected */
-		int i=RES_TYPECOUNT;
-		while((!r[id]->type)&&(i--))
-			if (equalsIgnoreCase(t->itemtype,getExtDesc(i)))
-				r[id]->type=i;
-		/* If error it returns 0 and the verifyHeader will try to detect the type */
-	}
-#endif
-
-	/* Copy palette, number, title, desc and path */
-	keepIntAttribute(palette,unsigned short);  /* Transforms the char* palette into a short ID value, if 0 or error no palette is needed */
-	keepIntAttribute(number,unsigned char);    /* Transforms the char* levelnumer/number attribute into a char value, if error, demo level is used */
-	keepStringAttribute(name);  /* only for plv */
-	keepStringAttribute(desc);  /* only for plv */
-	keepStringAttribute(path);
-}
-
-void workTree(const tTag* t,void* pass, void (*function)(const tTag*,void*)) {
-	/*
-		Runs the given function for each matching tag
-	*/
-	tTag* children;
-
-	if (t!=NULL) {
-		if (t->file!=NULL) (*function)(t,pass);
-		children=t->child;
-
-		while (children!=NULL) {
-			workTree(children,pass,function);
-			children=children->next;
-		}
-	}
-}
-
-/****************************************************************\
-|                       File List Primitives                     |
-\****************************************************************/
-
-static tListNode* list=NULL;
-
-void addFileToList(const tTag* t,void* junk) {
-	/*
-		Adds the file to the list only once
-	*/
-	tListNode* node=list;
-
-	/* Verify if the file exists */
-	while (node) {
-		if (equalsIgnoreCase(node->file,t->file)) /* If file was in the list, do nothing */
-			return;
-		node=node->next;
-	}
-	/* Add new node */
-	node=(tListNode*)malloc(sizeof(tListNode));
-
-	/* Use LIFO because its more probable to get a file with the same name */
-	node->file=strallocandcopy(t->file);
-	node->next=list;
-	list=node;
-}
-
-char* getFileFromList() {
-	/*
-		Returns and removes one random file from the list
-	*/
-	char* result;
-	tListNode* aux;
-	if (list) {
-		/* Remember node values */
-		aux=list;
-		result=list->file;
-		/* move one position */
-		list=list->next;
-		/* free node */
-		free(aux);
-
-		return result;
-	} else {
-		return NULL;
-	}
-}
-
-/****************************************************************\
-|                       Compare two XML files                    |
-\****************************************************************/
-
-#ifdef DO_NOT_IGNORE_COMPARATION
-
-static int compareStatisticsOk=0;
-static int compareStatisticsTotals=0;
-static int compareStatisticsWarnings=0;
-extern FILE* outputStream;
-
-const tTag* searchTree(const tTag* t,const char* datFile, const char* id) {
-	/* tTag*
-		tag pointer if found
-		NULL if not found
-	*/
-	tTag* children;
-	const tTag* result;
-
-	if (t!=NULL) {
-		if (((t->file)!=NULL)&&((t->value)!=NULL)) {
-			if ((equalsIgnoreCase(t->file,datFile))&&(equalsIgnoreCase(t->value,id))) return t;
-		}
-		children=t->child;
-
-		while (children!=NULL) {
-			if (NULL!=(result=searchTree(children,datFile,id))) {
-				return result;
-			}
-			children=children->next;
-		}
-	}
-	return NULL;
-}
-
-void compareXmlFileForTag(const tTag* tag,void* pass) {
-	const tTag* modified;
-	const tTag* result;
-
-	modified=((tPassCompare*)pass)->tag;
-
-	if ((tag->file)&&(tag->value)) {
-		result=searchTree(modified,tag->file,tag->value);
-		if (!result) {
-			fprintf(outputStream,"Error: Item not found: '%s@%s'\n",tag->value,tag->file);
-			fprintf(outputStream,"-> <item value=\"%s\" path=\"%s\" itemtype=\"%s\" palette=\"%s\">%s</item>\n",
-				tag->value,
-				tag->path,
-				tag->itemtype,
-				tag->palette,
-				tag->desc
-			);
-		} else {
-			fprintf(outputStream,"Item found: '%s@%s' %s\n",tag->value,tag->file,result->file);
-			if (!equalsIgnoreCase(tag->itemtype,result->itemtype)) {
-				compareStatisticsWarnings++;
-				fprintf(outputStream,"Warning: Type mismatch in '%s@%s' (%s!=%s)\n",tag->value,tag->file,tag->itemtype,result->itemtype);
-			}
-			compareStatisticsOk++;
-		}
-		compareStatisticsTotals++;
-	}
-}
-
-void compareXmlFile(tTag* modified,tTag* original) {
-	tPassCompare pass;
-	pass.tag=modified;
-
-	workTree(original,&pass,compareXmlFileForTag);
-	fprintf(outputStream,"Statistics:\n Totals: %d\n Working: %d (%5.2f%%)\n Warnings: %d\n Missing: %d (%5.2f%%)\n",
-		compareStatisticsTotals,
-		compareStatisticsOk,(float)(100*(float)compareStatisticsOk/compareStatisticsTotals),
-		compareStatisticsWarnings,
-		compareStatisticsTotals-compareStatisticsOk,(float)(100*(float)(compareStatisticsTotals-compareStatisticsOk)/compareStatisticsTotals)
-	);
-}
-
-#endif
-
-
diff --git a/PR/src/lib/xml/tree.c b/PR/src/lib/xml/tree.c
deleted file mode 100644
index d116498..0000000
--- a/PR/src/lib/xml/tree.c
+++ /dev/null
@@ -1,443 +0,0 @@
-/*  Princed V3 - Prince of Persia Level Editor for PC Version
-    Copyright (C) 2003 Princed Development Team
-
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program; if not, write to the Free Software
-    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-    The authors of this program may be contacted at http://forum.princed.com.ar
-*/
-
-/*
-resources.c: Princed Resources : Resource Handler
-\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf
- Copyright 2003 Princed Development Team
-  Created: 24 Aug 2003
-
-  Author: Enrique Calot <ecalot.cod@princed.com.ar>
-  Version: 1.01 (2003-Oct-23)
-
- Note:
-  DO NOT remove this copyright notice
-*/
-
-/***************************************************************\
-|                  I M P L E M E N T A T I O N                  |
-\***************************************************************/
-
-/* Includes */
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include "pr.h"
-#include "xmlparse.h"
-#include "xmlsearch.h"
-#include "disk.h"
-#include "memory.h"
-#include "resources.h"
-#include "compress.h"
-
-extern FILE* outputStream;
-
-/***************************************************************\
-|                       Item Type Detector                      |
-\***************************************************************/
-
-int verifyLevelHeader(const unsigned char *array, int size) {
-	return (((size==2306)||(size==2305))&&!(array[1698]&0x0F)&&!(array[1700]&0x0F)&&!(array[1702]&0x0F));
-}
-
-int verifyImageHeader(const unsigned char *array, int size) {
-	unsigned char imageBitRate;
-	imageBitRate=((unsigned char)array[6]&0xF0);
-	return (size>7) && (!array[5]) && ((imageBitRate==0xB0));
-	/* return (size>7) && (!array[5]) && ((imageBitRate==0xB0)||(imageBitRate==0x00)); */
-}
-
-int verifyPaletteHeader(const unsigned char *array, int size) {
-	return ((size==101)&&(!array[2])&&(!array[3])&&(array[4]==0x10));
-}
-
-int verifyMidiHeader(const unsigned char *array, int size) {
-	return
-		(size>6) &&
-		(array[1]==0x02) &&
-		(array[2]=='M') &&
-		(array[3]=='T') &&
-		(array[4]=='h') &&
-		(array[5]=='d')
-	;
-}
-
-int verifyWaveHeader(const unsigned char *array, int size) {
-	return
-		(size>1)&&(array[1]==0x01)
-	;
-}
-
-int verifySpeakerHeader(const unsigned char *array, int size) {
-	return
-		(size>2)&&(array[1]==0x00) /* &&!(size%3) */
-	;
-}
-
-int verifyHeader(const unsigned char *array, int size) {
-	if (verifyLevelHeader  (array,size)) return RES_TYPE_LEVEL;
-	if (verifyMidiHeader   (array,size)) return RES_TYPE_MIDI;
-	if (verifyImageHeader  (array,size)) return RES_TYPE_IMAGE;
-	if (verifyPaletteHeader(array,size)) return RES_TYPE_PALETTE;
-	if (verifyWaveHeader   (array,size)) return RES_TYPE_WAVE;
-	if (verifySpeakerHeader(array,size)) return RES_TYPE_PCSPEAKER;
-	return RES_TYPE_BINARY;
-}
-
-const char* getExtDesc(int type) {
-	static const char* extarraydesc[]=RES_FILE_TYPES;
-	return extarraydesc[type];
-}
-
-/***************************************************************\
-|                Partial Resource List Functions                |
-\***************************************************************/
-
-static tResIdList partialList;
-
-int partialListActive() {
-	return partialList.count;
-}
-
-void parseGivenPath(char* path) {
-	/*
-		PRE:  partialList.list was not allocated
-		POST:
-		 partialList.count=0 and partialList.list=NULL if all resources
-		 path was trimed in the "@"
-	*/
-
-	int i;
-	int separator=0;
-	int resourceValue;
-	int j=0;
-	unsigned char n;
-
-	/* Check if the variable wasn't initialized before */
-	if (partialList.count!=0) return;
-	partialList.list=NULL;
-
-	/* Validates the NULL path */
-	if (path==NULL) return;
-
-	/* Locate the string separation */
-	while (path[separator]&&path[separator]!='@') separator++;
-
-	/* If no separation */
-	if (!path[separator]) return; /* There was no separator */
-
-	/* Count values, separate them with '\0' and alloc memory */
-	partialList.count=1;
-	path[separator]=0; /* Trim the path to the separator */
-	i=++separator;
-	while(path[i]) {
-		if (path[i]==',') {
-			partialList.count++;
-			path[i]=0;
-		}
-		i++;
-	}
-	partialList.list=(tResIdListItem*)malloc(sizeof(tResIdListItem)*partialList.count);
-
-	/* Parse values and save them in the list */
-	resourceValue=0;
-	for(i=separator;j!=partialList.count;i++) {
-		n=path[i];
-		if ((0x2F<n)&&(n<0x3A)) {
-			resourceValue=resourceValue*10+(n-'0');
-		} else {
-			if (n) {
-				partialList.list[j].idType=eString;
-				partialList.list[j].value=(char*)strallocandcopy(repairFolders(path+separator));
-				while (path[i]) i++;
-			} else {
-				partialList.list[j].idType=eValue;
-				partialList.list[j].value=(void*)resourceValue;
-			}
-			resourceValue=0;
-			separator=i+1;
-			j++;
-		}
-	}
-}
-
-int isInThePartialList(const char* vFile, int value) {
-	/*
-		Cases:
-			"path/path@"                    all files are false
-			"path/path"                     all files are true
-			"path/path@12file/jjj.bmp,777"  only file "12file/jjj.bmp" and id 777 are true
-			"path/path@1,2,3"               only ids 1, 2 and 3 are true
-	*/
-	int i;
-	char* file;
-
-	if (!partialList.count) return 1;
-	file=(char*)repairFolders(vFile);
-
-	for (i=0;i<partialList.count;i++) {
-		if (partialList.list[i].idType==eValue) {
-			if (value==(int)partialList.list[i].value) return 1;
-		} else {
-			if (file)
-				if (equalsIgnoreCase(file,(char*)partialList.list[i].value)) return 1;
-		}
-	}
-	return 0;
-}
-
-void freePartialList() {
-	int i;
-	for (i=0;i<partialList.count;i++) {
-		if (partialList.list[i].idType==eString)
-			free(partialList.list[i].value);
-	}
-	partialList.count=0;
-}
-
-/***************************************************************\
-|                       Checksum handling                       |
-\***************************************************************/
-
-int checkSum(unsigned char* data,int size) {
-	unsigned char  checksum = 1;
-
-	/* calculates the checksum */
-	while (size--) checksum+=*(data++);
-	return !checksum;
-}
-
-/***************************************************************\
-|                     Parsing resource file                     |
-\***************************************************************/
-
-/* Initializes the resource table */
-void emptyTable(tResource* r[]) {
-	int i=MAX_RES_COUNT;
-	while (i--) *(r++)=NULL;
-}
-
-/* Resources input xml tree. Private+abstract variable */
-static tTag* xmlStructure=NULL; /* Keeping the parsed file structure in memory will save a lot of time */
-
-int parseStructure(const char* vFile) {
-	static const char defaultXmlFile[]=RES_XML_RESOURC_XML;
-	int error=0;
-
-	/* Generate xml structure if doesn't exist */
-	if (xmlStructure==NULL)	{
-		/* Set default values */
-		if (vFile==NULL) vFile=defaultXmlFile;
-		xmlStructure=parseXmlFile(vFile,&error);
-	}
-	if (error) xmlStructure=NULL;
-	return error;
-}
-
-/* parse file */
-int parseFile(const char* vFile, const char* datFile, tResource* r[]) {
-	/* Declare error variable */
-	int error;
-	tPassWork pass;
-
-	/* Generate xml structure if doesn't exist */
-	if ((error=(parseStructure(vFile)))) return error;
-
-	/* Use the xml structure to Generate the resource structure of the file */
-	emptyTable(r);
-	pass.datFile=datFile;
-	pass.r=r;
-	workTree(xmlStructure,&pass,workTag);
-
-	/* All done */
-	return 0;
-}
-
-void freeParsedStructure() {
-	/* Free if exist */
-	if (xmlStructure!=NULL) freeTagStructure(xmlStructure);
-	/* Reinitializes the variable */
-	xmlStructure=NULL;
-}
-
-/***************************************************************\
-|                     Unknown.xml primitives                    |
-\***************************************************************/
-
-/* Resources output to xml functions. Private+abstract variable */
-static FILE* unknownXmlFile=NULL;
-
-void AddToUnknownXml(const char* vFiledatWithPath,unsigned short id,const char* ext,char type,const char* vDirExt,unsigned short pal,const char* vFiledat,int optionflag,int count) {
-	/* Open file if not open */
-	if (unknownXmlFile==NULL) {
-		char xmlFile[MAX_FILENAME_SIZE];
-		sprintf(xmlFile,RES_XML_UNKNOWN_PATH""RES_XML_UNKNOWN_XML,vDirExt,vFiledatWithPath);
-
-		/* Open file */
-		if (!writeOpen(xmlFile,&unknownXmlFile,optionflag)) return;
-
-		/* Save headers */
-		if (type==6) pal=id;
-		fprintf(unknownXmlFile,RES_XML_UNKNOWN_START,
-			vFiledat,vFiledatWithPath,pal
-		);
-	}
-
-	/* Write item */
-	fprintf(unknownXmlFile,RES_XML_UNKNOWN_ITEM,
-		id,getExtDesc(type),count,ext,getExtDesc(type),getExtDesc(type),count
-	); /* To the xml output */
-}
-
-static unsigned int typeCount[RES_TYPECOUNT]; /* initialized in 0 */
-
-void endUnknownXml(int optionflag, const char* backupExtension) {
-	if (unknownXmlFile!=NULL) {
-		int i;
-		fprintf(unknownXmlFile,RES_XML_UNKNOWN_END);
-		writeCloseOk(unknownXmlFile,optionflag,backupExtension);
-		unknownXmlFile=NULL;
-		for (i=0;i<RES_TYPECOUNT;i++) typeCount[i]=0;
-	}
-}
-
-/***************************************************************\
-|                   Resources extra functions                   |
-\***************************************************************/
-
-void getFileName(char* vFileext,const char* vDirExt,tResource* r,unsigned short id,const char* vFiledat, const char* vDatFileName,int optionflag, const char* backupExtension) {
-	static const char* extarray[]=RES_FILE_EXTENSIONS;
-	int pos;
-
-	if (r->path==NULL) {
-		pos=((r->type<RES_TYPECOUNT)&&(r->type>=0))?r->type:RES_TYPE_BINARY;
-		typeCount[pos]++;
-
-		/* set filename */
-		sprintf(vFileext,RES_XML_UNKNOWN_PATH""RES_XML_UNKNOWN_FILES,vDirExt,vDatFileName,getExtDesc(pos),typeCount[pos],extarray[pos]);
-		AddToUnknownXml(vDatFileName,id,extarray[pos],r->type,vDirExt,r->palette,vFiledat,optionflag,typeCount[pos]);
-	} else {
-		/* set filename */
-		sprintf(vFileext,"%s/%s",vDirExt,r->path);
-	}
-}
-
-/* Search files for the Import feature */
-int importDir(const char* directory, const char* vResFile, int pOption, const char* backupExtension,const char* vDatDirectory, FILE* output) {
-	/* Declare error variable */
-	int error=0;
-	char* datfile;
-	char* recursive;
-	int sizeOfPath;
-	int sizeOfFile;
-	int result;
-
-	/* Generate xml structure if doesn't exist */
-	if ((error=(parseStructure(vResFile)))) return error;
-
-	/* Use the xml structure to Generate the file list */
-	workTree(xmlStructure,NULL,addFileToList);
-
-	while(datfile=getFileFromList()) {
-		sizeOfPath=strlen(vDatDirectory);
-		sizeOfFile=strlen(datfile);
-
-		/* Generate full vDatDirectory/datfile path */
-		recursive=(char*)malloc(sizeOfPath+sizeOfFile+2);
-		memcpy(recursive,vDatDirectory,sizeOfPath);
-		recursive[sizeOfPath]=DIR_SEPARATOR;
-		memcpy(recursive+sizeOfPath+1,datfile,sizeOfFile+1);
-
-		/* Run program */
-		result=prMain(pOption, backupExtension,directory,vResFile,recursive,datfile,NULL,output);
-		/* Free memory */
-		free(datfile);
-		free(recursive);
-	}
-
-	/* All done */
-	return result;
-}
-
-int isntADatFile(const char* testFile, const char* vResFile) {
-	/*
-		Results:
-			0  Is a dat file
-			1  It isn't a dat file
-			-1 Parse error
-			-2 No memory
-			-3 Attribute not recognized
-			-4 File not found
-	*/
-
-	/* Declare result variable */
-	int result;
-	char* gottenFile;
-
-	/* Generate xml structure if doesn't exist */
-	if ((result=(parseStructure(vResFile)))) return result;
-
-	/* Use the xml structure to Generate the file list */
-	workTree(xmlStructure,NULL,addFileToList);
-	while((gottenFile=(getFileFromList()))) {
-		result=result||equalsIgnoreCase(gottenFile,testFile);
-		free(gottenFile);
-	}
-
-	/* All done */
-	return !result;
-}
-
-/***************************************************************\
-|                Resource tree browsing for DLL                 |
-\***************************************************************/
-
-#ifdef DLL
-
-tTag* resourceTreeGetRoot () {
-	return xmlStructure;
-}
-
-tTag* resourceTreeGetNext (tTag* whereAmI) {
-	return whereAmI->next;
-}
-
-tTag* resourceTreeGetChild(tTag* whereAmI) {
-	return whereAmI->child;
-}
-
-int   resourceTreeGetInfo (tTag* whereAmI,	char** tag, char** desc, char** path, char** file, char** itemtype, char** name, char** palette, char** type, char** value, char** version, char** number) {
-	if (whereAmI==NULL) return 0;
-	*tag=whereAmI->tag;
-	*desc=whereAmI->desc;
-	*path=whereAmI->path;
-	*file=whereAmI->file;
-	*itemtype=whereAmI->itemtype;
-	*name=whereAmI->name;
-	*palette=whereAmI->palette;
-	*type=whereAmI->type;
-	*value=whereAmI->value;
-	*version=whereAmI->version;
-	*number=whereAmI->number;
-	return 1;
-}
-
-#endif
-
diff --git a/PR/src/lib/xml/unknown.c b/PR/src/lib/xml/unknown.c
deleted file mode 100644
index d116498..0000000
--- a/PR/src/lib/xml/unknown.c
+++ /dev/null
@@ -1,443 +0,0 @@
-/*  Princed V3 - Prince of Persia Level Editor for PC Version
-    Copyright (C) 2003 Princed Development Team
-
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program; if not, write to the Free Software
-    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-    The authors of this program may be contacted at http://forum.princed.com.ar
-*/
-
-/*
-resources.c: Princed Resources : Resource Handler
-\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf
- Copyright 2003 Princed Development Team
-  Created: 24 Aug 2003
-
-  Author: Enrique Calot <ecalot.cod@princed.com.ar>
-  Version: 1.01 (2003-Oct-23)
-
- Note:
-  DO NOT remove this copyright notice
-*/
-
-/***************************************************************\
-|                  I M P L E M E N T A T I O N                  |
-\***************************************************************/
-
-/* Includes */
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include "pr.h"
-#include "xmlparse.h"
-#include "xmlsearch.h"
-#include "disk.h"
-#include "memory.h"
-#include "resources.h"
-#include "compress.h"
-
-extern FILE* outputStream;
-
-/***************************************************************\
-|                       Item Type Detector                      |
-\***************************************************************/
-
-int verifyLevelHeader(const unsigned char *array, int size) {
-	return (((size==2306)||(size==2305))&&!(array[1698]&0x0F)&&!(array[1700]&0x0F)&&!(array[1702]&0x0F));
-}
-
-int verifyImageHeader(const unsigned char *array, int size) {
-	unsigned char imageBitRate;
-	imageBitRate=((unsigned char)array[6]&0xF0);
-	return (size>7) && (!array[5]) && ((imageBitRate==0xB0));
-	/* return (size>7) && (!array[5]) && ((imageBitRate==0xB0)||(imageBitRate==0x00)); */
-}
-
-int verifyPaletteHeader(const unsigned char *array, int size) {
-	return ((size==101)&&(!array[2])&&(!array[3])&&(array[4]==0x10));
-}
-
-int verifyMidiHeader(const unsigned char *array, int size) {
-	return
-		(size>6) &&
-		(array[1]==0x02) &&
-		(array[2]=='M') &&
-		(array[3]=='T') &&
-		(array[4]=='h') &&
-		(array[5]=='d')
-	;
-}
-
-int verifyWaveHeader(const unsigned char *array, int size) {
-	return
-		(size>1)&&(array[1]==0x01)
-	;
-}
-
-int verifySpeakerHeader(const unsigned char *array, int size) {
-	return
-		(size>2)&&(array[1]==0x00) /* &&!(size%3) */
-	;
-}
-
-int verifyHeader(const unsigned char *array, int size) {
-	if (verifyLevelHeader  (array,size)) return RES_TYPE_LEVEL;
-	if (verifyMidiHeader   (array,size)) return RES_TYPE_MIDI;
-	if (verifyImageHeader  (array,size)) return RES_TYPE_IMAGE;
-	if (verifyPaletteHeader(array,size)) return RES_TYPE_PALETTE;
-	if (verifyWaveHeader   (array,size)) return RES_TYPE_WAVE;
-	if (verifySpeakerHeader(array,size)) return RES_TYPE_PCSPEAKER;
-	return RES_TYPE_BINARY;
-}
-
-const char* getExtDesc(int type) {
-	static const char* extarraydesc[]=RES_FILE_TYPES;
-	return extarraydesc[type];
-}
-
-/***************************************************************\
-|                Partial Resource List Functions                |
-\***************************************************************/
-
-static tResIdList partialList;
-
-int partialListActive() {
-	return partialList.count;
-}
-
-void parseGivenPath(char* path) {
-	/*
-		PRE:  partialList.list was not allocated
-		POST:
-		 partialList.count=0 and partialList.list=NULL if all resources
-		 path was trimed in the "@"
-	*/
-
-	int i;
-	int separator=0;
-	int resourceValue;
-	int j=0;
-	unsigned char n;
-
-	/* Check if the variable wasn't initialized before */
-	if (partialList.count!=0) return;
-	partialList.list=NULL;
-
-	/* Validates the NULL path */
-	if (path==NULL) return;
-
-	/* Locate the string separation */
-	while (path[separator]&&path[separator]!='@') separator++;
-
-	/* If no separation */
-	if (!path[separator]) return; /* There was no separator */
-
-	/* Count values, separate them with '\0' and alloc memory */
-	partialList.count=1;
-	path[separator]=0; /* Trim the path to the separator */
-	i=++separator;
-	while(path[i]) {
-		if (path[i]==',') {
-			partialList.count++;
-			path[i]=0;
-		}
-		i++;
-	}
-	partialList.list=(tResIdListItem*)malloc(sizeof(tResIdListItem)*partialList.count);
-
-	/* Parse values and save them in the list */
-	resourceValue=0;
-	for(i=separator;j!=partialList.count;i++) {
-		n=path[i];
-		if ((0x2F<n)&&(n<0x3A)) {
-			resourceValue=resourceValue*10+(n-'0');
-		} else {
-			if (n) {
-				partialList.list[j].idType=eString;
-				partialList.list[j].value=(char*)strallocandcopy(repairFolders(path+separator));
-				while (path[i]) i++;
-			} else {
-				partialList.list[j].idType=eValue;
-				partialList.list[j].value=(void*)resourceValue;
-			}
-			resourceValue=0;
-			separator=i+1;
-			j++;
-		}
-	}
-}
-
-int isInThePartialList(const char* vFile, int value) {
-	/*
-		Cases:
-			"path/path@"                    all files are false
-			"path/path"                     all files are true
-			"path/path@12file/jjj.bmp,777"  only file "12file/jjj.bmp" and id 777 are true
-			"path/path@1,2,3"               only ids 1, 2 and 3 are true
-	*/
-	int i;
-	char* file;
-
-	if (!partialList.count) return 1;
-	file=(char*)repairFolders(vFile);
-
-	for (i=0;i<partialList.count;i++) {
-		if (partialList.list[i].idType==eValue) {
-			if (value==(int)partialList.list[i].value) return 1;
-		} else {
-			if (file)
-				if (equalsIgnoreCase(file,(char*)partialList.list[i].value)) return 1;
-		}
-	}
-	return 0;
-}
-
-void freePartialList() {
-	int i;
-	for (i=0;i<partialList.count;i++) {
-		if (partialList.list[i].idType==eString)
-			free(partialList.list[i].value);
-	}
-	partialList.count=0;
-}
-
-/***************************************************************\
-|                       Checksum handling                       |
-\***************************************************************/
-
-int checkSum(unsigned char* data,int size) {
-	unsigned char  checksum = 1;
-
-	/* calculates the checksum */
-	while (size--) checksum+=*(data++);
-	return !checksum;
-}
-
-/***************************************************************\
-|                     Parsing resource file                     |
-\***************************************************************/
-
-/* Initializes the resource table */
-void emptyTable(tResource* r[]) {
-	int i=MAX_RES_COUNT;
-	while (i--) *(r++)=NULL;
-}
-
-/* Resources input xml tree. Private+abstract variable */
-static tTag* xmlStructure=NULL; /* Keeping the parsed file structure in memory will save a lot of time */
-
-int parseStructure(const char* vFile) {
-	static const char defaultXmlFile[]=RES_XML_RESOURC_XML;
-	int error=0;
-
-	/* Generate xml structure if doesn't exist */
-	if (xmlStructure==NULL)	{
-		/* Set default values */
-		if (vFile==NULL) vFile=defaultXmlFile;
-		xmlStructure=parseXmlFile(vFile,&error);
-	}
-	if (error) xmlStructure=NULL;
-	return error;
-}
-
-/* parse file */
-int parseFile(const char* vFile, const char* datFile, tResource* r[]) {
-	/* Declare error variable */
-	int error;
-	tPassWork pass;
-
-	/* Generate xml structure if doesn't exist */
-	if ((error=(parseStructure(vFile)))) return error;
-
-	/* Use the xml structure to Generate the resource structure of the file */
-	emptyTable(r);
-	pass.datFile=datFile;
-	pass.r=r;
-	workTree(xmlStructure,&pass,workTag);
-
-	/* All done */
-	return 0;
-}
-
-void freeParsedStructure() {
-	/* Free if exist */
-	if (xmlStructure!=NULL) freeTagStructure(xmlStructure);
-	/* Reinitializes the variable */
-	xmlStructure=NULL;
-}
-
-/***************************************************************\
-|                     Unknown.xml primitives                    |
-\***************************************************************/
-
-/* Resources output to xml functions. Private+abstract variable */
-static FILE* unknownXmlFile=NULL;
-
-void AddToUnknownXml(const char* vFiledatWithPath,unsigned short id,const char* ext,char type,const char* vDirExt,unsigned short pal,const char* vFiledat,int optionflag,int count) {
-	/* Open file if not open */
-	if (unknownXmlFile==NULL) {
-		char xmlFile[MAX_FILENAME_SIZE];
-		sprintf(xmlFile,RES_XML_UNKNOWN_PATH""RES_XML_UNKNOWN_XML,vDirExt,vFiledatWithPath);
-
-		/* Open file */
-		if (!writeOpen(xmlFile,&unknownXmlFile,optionflag)) return;
-
-		/* Save headers */
-		if (type==6) pal=id;
-		fprintf(unknownXmlFile,RES_XML_UNKNOWN_START,
-			vFiledat,vFiledatWithPath,pal
-		);
-	}
-
-	/* Write item */
-	fprintf(unknownXmlFile,RES_XML_UNKNOWN_ITEM,
-		id,getExtDesc(type),count,ext,getExtDesc(type),getExtDesc(type),count
-	); /* To the xml output */
-}
-
-static unsigned int typeCount[RES_TYPECOUNT]; /* initialized in 0 */
-
-void endUnknownXml(int optionflag, const char* backupExtension) {
-	if (unknownXmlFile!=NULL) {
-		int i;
-		fprintf(unknownXmlFile,RES_XML_UNKNOWN_END);
-		writeCloseOk(unknownXmlFile,optionflag,backupExtension);
-		unknownXmlFile=NULL;
-		for (i=0;i<RES_TYPECOUNT;i++) typeCount[i]=0;
-	}
-}
-
-/***************************************************************\
-|                   Resources extra functions                   |
-\***************************************************************/
-
-void getFileName(char* vFileext,const char* vDirExt,tResource* r,unsigned short id,const char* vFiledat, const char* vDatFileName,int optionflag, const char* backupExtension) {
-	static const char* extarray[]=RES_FILE_EXTENSIONS;
-	int pos;
-
-	if (r->path==NULL) {
-		pos=((r->type<RES_TYPECOUNT)&&(r->type>=0))?r->type:RES_TYPE_BINARY;
-		typeCount[pos]++;
-
-		/* set filename */
-		sprintf(vFileext,RES_XML_UNKNOWN_PATH""RES_XML_UNKNOWN_FILES,vDirExt,vDatFileName,getExtDesc(pos),typeCount[pos],extarray[pos]);
-		AddToUnknownXml(vDatFileName,id,extarray[pos],r->type,vDirExt,r->palette,vFiledat,optionflag,typeCount[pos]);
-	} else {
-		/* set filename */
-		sprintf(vFileext,"%s/%s",vDirExt,r->path);
-	}
-}
-
-/* Search files for the Import feature */
-int importDir(const char* directory, const char* vResFile, int pOption, const char* backupExtension,const char* vDatDirectory, FILE* output) {
-	/* Declare error variable */
-	int error=0;
-	char* datfile;
-	char* recursive;
-	int sizeOfPath;
-	int sizeOfFile;
-	int result;
-
-	/* Generate xml structure if doesn't exist */
-	if ((error=(parseStructure(vResFile)))) return error;
-
-	/* Use the xml structure to Generate the file list */
-	workTree(xmlStructure,NULL,addFileToList);
-
-	while(datfile=getFileFromList()) {
-		sizeOfPath=strlen(vDatDirectory);
-		sizeOfFile=strlen(datfile);
-
-		/* Generate full vDatDirectory/datfile path */
-		recursive=(char*)malloc(sizeOfPath+sizeOfFile+2);
-		memcpy(recursive,vDatDirectory,sizeOfPath);
-		recursive[sizeOfPath]=DIR_SEPARATOR;
-		memcpy(recursive+sizeOfPath+1,datfile,sizeOfFile+1);
-
-		/* Run program */
-		result=prMain(pOption, backupExtension,directory,vResFile,recursive,datfile,NULL,output);
-		/* Free memory */
-		free(datfile);
-		free(recursive);
-	}
-
-	/* All done */
-	return result;
-}
-
-int isntADatFile(const char* testFile, const char* vResFile) {
-	/*
-		Results:
-			0  Is a dat file
-			1  It isn't a dat file
-			-1 Parse error
-			-2 No memory
-			-3 Attribute not recognized
-			-4 File not found
-	*/
-
-	/* Declare result variable */
-	int result;
-	char* gottenFile;
-
-	/* Generate xml structure if doesn't exist */
-	if ((result=(parseStructure(vResFile)))) return result;
-
-	/* Use the xml structure to Generate the file list */
-	workTree(xmlStructure,NULL,addFileToList);
-	while((gottenFile=(getFileFromList()))) {
-		result=result||equalsIgnoreCase(gottenFile,testFile);
-		free(gottenFile);
-	}
-
-	/* All done */
-	return !result;
-}
-
-/***************************************************************\
-|                Resource tree browsing for DLL                 |
-\***************************************************************/
-
-#ifdef DLL
-
-tTag* resourceTreeGetRoot () {
-	return xmlStructure;
-}
-
-tTag* resourceTreeGetNext (tTag* whereAmI) {
-	return whereAmI->next;
-}
-
-tTag* resourceTreeGetChild(tTag* whereAmI) {
-	return whereAmI->child;
-}
-
-int   resourceTreeGetInfo (tTag* whereAmI,	char** tag, char** desc, char** path, char** file, char** itemtype, char** name, char** palette, char** type, char** value, char** version, char** number) {
-	if (whereAmI==NULL) return 0;
-	*tag=whereAmI->tag;
-	*desc=whereAmI->desc;
-	*path=whereAmI->path;
-	*file=whereAmI->file;
-	*itemtype=whereAmI->itemtype;
-	*name=whereAmI->name;
-	*palette=whereAmI->palette;
-	*type=whereAmI->type;
-	*value=whereAmI->value;
-	*version=whereAmI->version;
-	*number=whereAmI->number;
-	return 1;
-}
-
-#endif
-
diff --git a/PR/src/ports/dirent.c b/PR/src/ports/dirent.c
deleted file mode 100644
index f7c51bb..0000000
--- a/PR/src/ports/dirent.c
+++ /dev/null
@@ -1,145 +0,0 @@
-/*
-
-    Implementation of POSIX directory browsing functions and types for Win32.
-
-    Author:  Kevlin Henney (kevlin@acm.org, kevlin@curbralan.com)
-    History: Created March 1997. Updated June 2003.
-    Rights:  See end of file.
-
-*/
-
-#include "direntwin.h"
-#include <errno.h>
-#include <io.h> /* _findfirst and _findnext set errno iff they return -1 */
-#include <stdlib.h>
-#include <string.h>
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-
-struct DIR
-{
-    long                handle; /* -1 for failed rewind */
-    struct _finddata_t  info;
-    struct dirent       result; /* d_name null iff first time */
-    char                *name;  /* null-terminated char string */
-};
-
-DIR *opendir(const char *name)
-{
-    DIR *dir = 0;
-
-    if(name && name[0])
-    {
-        size_t base_length = strlen(name);
-        const char *all = /* search pattern must end with suitable wildcard */
-            strchr("/\\", name[base_length - 1]) ? "*" : "/*";
-
-        if((dir = (DIR *) malloc(sizeof *dir)) != 0 &&
-           (dir->name = (char *) malloc(base_length + strlen(all) + 1)) != 0)
-        {
-            strcat(strcpy(dir->name, name), all);
-
-            if((dir->handle = (long) _findfirst(dir->name, &dir->info)) != -1)
-            {
-                dir->result.d_name = 0;
-            }
-            else /* rollback */
-            {
-                free(dir->name);
-                free(dir);
-                dir = 0;
-            }
-        }
-        else /* rollback */
-        {
-            free(dir);
-            dir   = 0;
-            errno = ENOMEM;
-        }
-    }
-    else
-    {
-        errno = EINVAL;
-    }
-
-    return dir;
-}
-
-int closedir(DIR *dir)
-{
-    int result = -1;
-
-    if(dir)
-    {
-        if(dir->handle != -1)
-        {
-            result = _findclose(dir->handle);
-        }
-
-        free(dir->name);
-        free(dir);
-    }
-
-    if(result == -1) /* map all errors to EBADF */
-    {
-        errno = EBADF;
-    }
-
-    return result;
-}
-
-struct dirent *readdir(DIR *dir)
-{
-    struct dirent *result = 0;
-
-    if(dir && dir->handle != -1)
-    {
-        if(!dir->result.d_name || _findnext(dir->handle, &dir->info) != -1)
-        {
-            result         = &dir->result;
-            result->d_name = dir->info.name;
-        }
-    }
-    else
-    {
-        errno = EBADF;
-    }
-
-    return result;
-}
-
-void rewinddir(DIR *dir)
-{
-    if(dir && dir->handle != -1)
-    {
-        _findclose(dir->handle);
-        dir->handle = (long) _findfirst(dir->name, &dir->info);
-        dir->result.d_name = 0;
-    }
-    else
-    {
-        errno = EBADF;
-    }
-}
-
-#ifdef __cplusplus
-}
-#endif
-
-/*
-
-    Copyright Kevlin Henney, 1997, 2003. All rights reserved.
-
-    Permission to use, copy, modify, and distribute this software and its
-    documentation for any purpose is hereby granted without fee, provided
-    that this copyright and permissions notice appear in all copies and
-    derivatives.
-    
-    This software is supplied "as is" without express or implied warranty.
-
-    But that said, if there are any problems please get in touch.
-
-*/
diff --git a/PR/src/ports/getopt.c b/PR/src/ports/getopt.c
deleted file mode 100644
index 4335e32..0000000
--- a/PR/src/ports/getopt.c
+++ /dev/null
@@ -1,758 +0,0 @@
-/* Getopt for GNU.
-   NOTE: getopt is now part of the C library, so if you don't know what
-   "Keep this file name-space clean" means, talk to roland@gnu.ai.mit.edu
-   before changing it!
-
-   Copyright (C) 1987, 88, 89, 90, 91, 92, 93, 94, 95
-   	Free Software Foundation, Inc.
-
-   This program is free software; you can redistribute it and/or modify it
-   under the terms of the GNU General Public License as published by the
-   Free Software Foundation; either version 2, or (at your option) any
-   later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
-
-/* This tells Alpha OSF/1 not to define a getopt prototype in <stdio.h>.
-   Ditto for AIX 3.2 and <stdlib.h>.  */
-#ifndef _NO_PROTO
-#define _NO_PROTO
-#endif
-
-#if !defined (__STDC__) || !__STDC__
-/* This is a separate conditional since some stdc systems
-   reject `defined (const)'.  */
-#ifndef const
-#define const
-#endif
-#endif
-
-#include <stdio.h>
-#include <string.h>
-
-/* Comment out all this code if we are using the GNU C Library, and are not
-   actually compiling the library itself.  This code is part of the GNU C
-   Library, but also included in many other GNU distributions.  Compiling
-   and linking in this code is a waste when using the GNU C library
-   (especially if it is a shared library).  Rather than having every GNU
-   program understand `configure --with-gnu-libc' and omit the object files,
-   it is simpler to just do this in the source for each such file.  */
-
-#if defined (_LIBC) || !defined (__GNU_LIBRARY__)
-
-
-/* This needs to come after some library #include
-   to get __GNU_LIBRARY__ defined.  */
-#ifdef	__GNU_LIBRARY__
-/* Don't include stdlib.h for non-GNU C libraries because some of them
-   contain conflicting prototypes for getopt.  */
-#include <stdlib.h>
-#endif	/* GNU C library.  */
-
-/* This is for other GNU distributions with internationalized messages.
-   The GNU C Library itself does not yet support such messages.  */
-#define gettext(msgid) (msgid)
-
-/* This version of `getopt' appears to the caller like standard Unix `getopt'
-   but it behaves differently for the user, since it allows the user
-   to intersperse the options with the other arguments.
-
-   As `getopt' works, it permutes the elements of ARGV so that,
-   when it is done, all the options precede everything else.  Thus
-   all application programs are extended to handle flexible argument order.
-
-   Setting the environment variable POSIXLY_CORRECT disables permutation.
-   Then the behavior is completely standard.
-
-   GNU application programs can use a third alternative mode in which
-   they can distinguish the relative order of options and other arguments.  */
-
-#include "getopt.h"
-
-/* For communication from `getopt' to the caller.
-   When `getopt' finds an option that takes an argument,
-   the argument value is returned here.
-   Also, when `ordering' is RETURN_IN_ORDER,
-   each non-option ARGV-element is returned here.  */
-
-char *optarg = NULL;
-
-/* Index in ARGV of the next element to be scanned.
-   This is used for communication to and from the caller
-   and for communication between successive calls to `getopt'.
-
-   On entry to `getopt', zero means this is the first call; initialize.
-
-   When `getopt' returns EOF, this is the index of the first of the
-   non-option elements that the caller should itself scan.
-
-   Otherwise, `optind' communicates from one call to the next
-   how much of ARGV has been scanned so far.  */
-
-/* XXX 1003.2 says this must be 1 before any call.  */
-int optind = 0;
-
-/* The next char to be scanned in the option-element
-   in which the last option character we returned was found.
-   This allows us to pick up the scan where we left off.
-
-   If this is zero, or a null string, it means resume the scan
-   by advancing to the next ARGV-element.  */
-
-static char *nextchar;
-
-/* Callers store zero here to inhibit the error message
-   for unrecognized options.  */
-
-int opterr = 1;
-
-/* Set to an option character which was unrecognized.
-   This must be initialized on some systems to avoid linking in the
-   system's own getopt implementation.  */
-
-int optopt = '?';
-
-/* Describe how to deal with options that follow non-option ARGV-elements.
-
-   If the caller did not specify anything,
-   the default is REQUIRE_ORDER if the environment variable
-   POSIXLY_CORRECT is defined, PERMUTE otherwise.
-
-   REQUIRE_ORDER means don't recognize them as options;
-   stop option processing when the first non-option is seen.
-   This is what Unix does.
-   This mode of operation is selected by either setting the environment
-   variable POSIXLY_CORRECT, or using `+' as the first character
-   of the list of option characters.
-
-   PERMUTE is the default.  We permute the contents of ARGV as we scan,
-   so that eventually all the non-options are at the end.  This allows options
-   to be given in any order, even with programs that were not written to
-   expect this.
-
-   RETURN_IN_ORDER is an option available to programs that were written
-   to expect options and other ARGV-elements in any order and that care about
-   the ordering of the two.  We describe each non-option ARGV-element
-   as if it were the argument of an option with character code 1.
-   Using `-' as the first character of the list of option characters
-   selects this mode of operation.
-
-   The special argument `--' forces an end of option-scanning regardless
-   of the value of `ordering'.  In the case of RETURN_IN_ORDER, only
-   `--' can cause `getopt' to return EOF with `optind' != ARGC.  */
-
-static enum
-{
-  REQUIRE_ORDER, PERMUTE, RETURN_IN_ORDER
-} ordering;
-
-/* Value of POSIXLY_CORRECT environment variable.  */
-static char *posixly_correct;
-
-#ifdef	__GNU_LIBRARY__
-/* We want to avoid inclusion of string.h with non-GNU libraries
-   because there are many ways it can cause trouble.
-   On some systems, it contains special magic macros that don't work
-   in GCC.  */
-#include <string.h>
-#define	my_index	strchr
-#else
-
-/* Avoid depending on library functions or files
-   whose names are inconsistent.  */
-
-#ifndef _WIN32
-char *getenv ();
-#endif
-
-static char *
-my_index (str, chr)
-     const char *str;
-     int chr;
-{
-  while (*str)
-    {
-      if (*str == chr)
-	return (char *) str;
-      str++;
-    }
-  return 0;
-}
-
-/* If using GCC, we can safely declare strlen this way.
-   If not using GCC, it is ok not to declare it.  */
-#ifdef __GNUC__
-/* Note that Motorola Delta 68k R3V7 comes with GCC but not stddef.h.
-   That was relevant to code that was here before.  */
-#if !defined (__STDC__) || !__STDC__
-/* gcc with -traditional declares the built-in strlen to return int,
-   and has done so at least since version 2.4.5. -- rms.  */
-extern int strlen (const char *);
-#endif /* not __STDC__ */
-#endif /* __GNUC__ */
-
-#endif /* not __GNU_LIBRARY__ */
-
-/* Handle permutation of arguments.  */
-
-/* Describe the part of ARGV that contains non-options that have
-   been skipped.  `first_nonopt' is the index in ARGV of the first of them;
-   `last_nonopt' is the index after the last of them.  */
-
-static int first_nonopt;
-static int last_nonopt;
-
-/* Exchange two adjacent subsequences of ARGV.
-   One subsequence is elements [first_nonopt,last_nonopt)
-   which contains all the non-options that have been skipped so far.
-   The other is elements [last_nonopt,optind), which contains all
-   the options processed since those non-options were skipped.
-
-   `first_nonopt' and `last_nonopt' are relocated so that they describe
-   the new indices of the non-options in ARGV after they are moved.  */
-
-static void
-exchange (argv)
-     char **argv;
-{
-  int bottom = first_nonopt;
-  int middle = last_nonopt;
-  int top = optind;
-  char *tem;
-
-  /* Exchange the shorter segment with the far end of the longer segment.
-     That puts the shorter segment into the right place.
-     It leaves the longer segment in the right place overall,
-     but it consists of two parts that need to be swapped next.  */
-
-  while (top > middle && middle > bottom)
-    {
-      if (top - middle > middle - bottom)
-	{
-	  /* Bottom segment is the short one.  */
-	  int len = middle - bottom;
-	  register int i;
-
-	  /* Swap it with the top part of the top segment.  */
-	  for (i = 0; i < len; i++)
-	    {
-	      tem = argv[bottom + i];
-	      argv[bottom + i] = argv[top - (middle - bottom) + i];
-	      argv[top - (middle - bottom) + i] = tem;
-	    }
-	  /* Exclude the moved bottom segment from further swapping.  */
-	  top -= len;
-	}
-      else
-	{
-	  /* Top segment is the short one.  */
-	  int len = top - middle;
-	  register int i;
-
-	  /* Swap it with the bottom part of the bottom segment.  */
-	  for (i = 0; i < len; i++)
-	    {
-	      tem = argv[bottom + i];
-	      argv[bottom + i] = argv[middle + i];
-	      argv[middle + i] = tem;
-	    }
-	  /* Exclude the moved top segment from further swapping.  */
-	  bottom += len;
-	}
-    }
-
-  /* Update records for the slots the non-options now occupy.  */
-
-  first_nonopt += (optind - last_nonopt);
-  last_nonopt = optind;
-}
-
-/* Initialize the internal data when the first call is made.  */
-
-static const char *
-_getopt_initialize (optstring)
-     const char *optstring;
-{
-  /* Start processing options with ARGV-element 1 (since ARGV-element 0
-     is the program name); the sequence of previously skipped
-     non-option ARGV-elements is empty.  */
-
-  first_nonopt = last_nonopt = optind = 1;
-
-  nextchar = NULL;
-
-  posixly_correct = "permute";/* getenv ("POSIXLY_CORRECT"); */
-
-  /* Determine how to handle the ordering of options and nonoptions.  */
-
-  if (optstring[0] == '-')
-    {
-      ordering = RETURN_IN_ORDER;
-      ++optstring;
-    }
-  else if (optstring[0] == '+')
-    {
-      ordering = REQUIRE_ORDER;
-      ++optstring;
-    }
-  else if (posixly_correct != NULL)
-    ordering = REQUIRE_ORDER;
-  else
-    ordering = PERMUTE;
-
-  return optstring;
-}
-
-/* Scan elements of ARGV (whose length is ARGC) for option characters
-   given in OPTSTRING.
-
-   If an element of ARGV starts with '-', and is not exactly "-" or "--",
-   then it is an option element.  The characters of this element
-   (aside from the initial '-') are option characters.  If `getopt'
-   is called repeatedly, it returns successively each of the option characters
-   from each of the option elements.
-
-   If `getopt' finds another option character, it returns that character,
-   updating `optind' and `nextchar' so that the next call to `getopt' can
-   resume the scan with the following option character or ARGV-element.
-
-   If there are no more option characters, `getopt' returns `EOF'.
-   Then `optind' is the index in ARGV of the first ARGV-element
-   that is not an option.  (The ARGV-elements have been permuted
-   so that those that are not options now come last.)
-
-   OPTSTRING is a string containing the legitimate option characters.
-   If an option character is seen that is not listed in OPTSTRING,
-   return '?' after printing an error message.  If you set `opterr' to
-   zero, the error message is suppressed but we still return '?'.
-
-   If a char in OPTSTRING is followed by a colon, that means it wants an arg,
-   so the following text in the same ARGV-element, or the text of the following
-   ARGV-element, is returned in `optarg'.  Two colons mean an option that
-   wants an optional arg; if there is text in the current ARGV-element,
-   it is returned in `optarg', otherwise `optarg' is set to zero.
-
-   If OPTSTRING starts with `-' or `+', it requests different methods of
-   handling the non-option ARGV-elements.
-   See the comments about RETURN_IN_ORDER and REQUIRE_ORDER, above.
-
-   Long-named options begin with `--' instead of `-'.
-   Their names may be abbreviated as long as the abbreviation is unique
-   or is an exact match for some defined option.  If they have an
-   argument, it follows the option name in the same ARGV-element, separated
-   from the option name by a `=', or else the in next ARGV-element.
-   When `getopt' finds a long-named option, it returns 0 if that option's
-   `flag' field is nonzero, the value of the option's `val' field
-   if the `flag' field is zero.
-
-   The elements of ARGV aren't really const, because we permute them.
-   But we pretend they're const in the prototype to be compatible
-   with other systems.
-
-   LONGOPTS is a vector of `struct option' terminated by an
-   element containing a name which is zero.
-
-   LONGIND returns the index in LONGOPT of the long-named option found.
-   It is only valid when a long-named option has been found by the most
-   recent call.
-
-   If LONG_ONLY is nonzero, '-' as well as '--' can introduce
-   long-named options.  */
-
-int
-_getopt_internal (argc, argv, optstring, longopts, longind, long_only)
-     int argc;
-     char *const *argv;
-     const char *optstring;
-     const struct option *longopts;
-     int *longind;
-     int long_only;
-{
-  optarg = NULL;
-
-  if (optind == 0)
-    {
-      optstring = _getopt_initialize (optstring);
-      optind = 1;		/* Don't scan ARGV[0], the program name.  */
-    }
-
-  if (nextchar == NULL || *nextchar == '\0')
-    {
-      /* Advance to the next ARGV-element.  */
-
-      if (ordering == PERMUTE)
-	{
-	  /* If we have just processed some options following some non-options,
-	     exchange them so that the options come first.  */
-
-	  if (first_nonopt != last_nonopt && last_nonopt != optind)
-	    exchange ((char **) argv);
-	  else if (last_nonopt != optind)
-	    first_nonopt = optind;
-
-	  /* Skip any additional non-options
-	     and extend the range of non-options previously skipped.  */
-
-	  while (optind < argc
-		 && (argv[optind][0] != '-' || argv[optind][1] == '\0'))
-	    optind++;
-	  last_nonopt = optind;
-	}
-
-      /* The special ARGV-element `--' means premature end of options.
-	 Skip it like a null option,
-	 then exchange with previous non-options as if it were an option,
-	 then skip everything else like a non-option.  */
-
-      if (optind != argc && !strcmp (argv[optind], "--"))
-	{
-	  optind++;
-
-	  if (first_nonopt != last_nonopt && last_nonopt != optind)
-	    exchange ((char **) argv);
-	  else if (first_nonopt == last_nonopt)
-	    first_nonopt = optind;
-	  last_nonopt = argc;
-
-	  optind = argc;
-	}
-
-      /* If we have done all the ARGV-elements, stop the scan
-	 and back over any non-options that we skipped and permuted.  */
-
-      if (optind == argc)
-	{
-	  /* Set the next-arg-index to point at the non-options
-	     that we previously skipped, so the caller will digest them.  */
-	  if (first_nonopt != last_nonopt)
-	    optind = first_nonopt;
-	  return EOF;
-	}
-
-      /* If we have come to a non-option and did not permute it,
-	 either stop the scan or describe it to the caller and pass it by.  */
-
-      if ((argv[optind][0] != '-' || argv[optind][1] == '\0'))
-	{
-	  if (ordering == REQUIRE_ORDER)
-	    return EOF;
-	  optarg = argv[optind++];
-	  return 1;
-	}
-
-      /* We have found another option-ARGV-element.
-	 Skip the initial punctuation.  */
-
-      nextchar = (argv[optind] + 1
-		  + (longopts != NULL && argv[optind][1] == '-'));
-    }
-
-  /* Decode the current option-ARGV-element.  */
-
-  /* Check whether the ARGV-element is a long option.
-
-     If long_only and the ARGV-element has the form "-f", where f is
-     a valid short option, don't consider it an abbreviated form of
-     a long option that starts with f.  Otherwise there would be no
-     way to give the -f short option.
-
-     On the other hand, if there's a long option "fubar" and
-     the ARGV-element is "-fu", do consider that an abbreviation of
-     the long option, just like "--fu", and not "-f" with arg "u".
-
-     This distinction seems to be the most useful approach.  */
-
-  if (longopts != NULL
-      && (argv[optind][1] == '-'
-	  || (long_only && (argv[optind][2] || !my_index (optstring, argv[optind][1])))))
-    {
-      char *nameend;
-      const struct option *p;
-      const struct option *pfound = NULL;
-      int exact = 0;
-      int ambig = 0;
-      int indfound = 0;
-      int option_index;
-
-      for (nameend = nextchar; *nameend && *nameend != '='; nameend++)
-	/* Do nothing.  */ ;
-
-      /* Test all long options for either exact match
-	 or abbreviated matches.  */
-      for (p = longopts, option_index = 0; p->name; p++, option_index++)
-	if (!strncmp (p->name, nextchar, nameend - nextchar))
-	  {
-	    if ((nameend - nextchar) == (signed)strlen (p->name))
-	      {
-		/* Exact match found.  */
-		pfound = p;
-		indfound = option_index;
-		exact = 1;
-		break;
-	      }
-	    else if (pfound == NULL)
-	      {
-		/* First nonexact match found.  */
-		pfound = p;
-		indfound = option_index;
-	      }
-	    else
-	      /* Second or later nonexact match found.  */
-	      ambig = 1;
-	  }
-
-      if (ambig && !exact)
-	{
-	  if (opterr)
-	    fprintf (stderr, gettext ("%s: option `%s' is ambiguous\n"),
-		     "pr", argv[optind]);
-	  nextchar += strlen (nextchar);
-	  optind++;
-	  return '?';
-	}
-
-      if (pfound != NULL)
-	{
-	  option_index = indfound;
-	  optind++;
-	  if (*nameend)
-	    {
-	      /* Don't test has_arg with >, because some C compilers don't
-		 allow it to be used on enums.  */
-	      if (pfound->has_arg)
-		optarg = nameend + 1;
-	      else
-		{
-		  if (opterr) {
-		   if (argv[optind - 1][1] == '-') {
-		    /* --option */
-		    fprintf (stderr,
-		     gettext ("%s: option `--%s' doesn't allow an argument\n"),
-		     "pr", pfound->name);
-		   } else {
-		    /* +option or -option */
-		    fprintf (stderr,
-		     gettext ("%s: option `%c%s' doesn't allow an argument\n"),
-		     "pr", argv[optind - 1][0], pfound->name);
-		   }
-		  }
-		  nextchar += strlen (nextchar);
-		  return '?';
-		}
-	    }
-	  else if (pfound->has_arg == 1)
-	    {
-	      if (optind < argc)
-		optarg = argv[optind++];
-	      else
-		{
-		  if (opterr)
-		    fprintf (stderr,
-			   gettext ("%s: option `%s' requires an argument\n"),
-			   "pr", argv[optind - 1]);
-		  nextchar += strlen (nextchar);
-		  return optstring[0] == ':' ? ':' : '?';
-		}
-	    }
-	  nextchar += strlen (nextchar);
-	  if (longind != NULL)
-	    *longind = option_index;
-	  if (pfound->flag)
-	    {
-	      *(pfound->flag) = pfound->val;
-	      return 0;
-	    }
-	  return pfound->val;
-	}
-
-      /* Can't find it as a long option.  If this is not getopt_long_only,
-	 or the option starts with '--' or is not a valid short
-	 option, then it's an error.
-	 Otherwise interpret it as a short option.  */
-      if (!long_only || argv[optind][1] == '-'
-	  || my_index (optstring, *nextchar) == NULL)
-	{
-	  if (opterr)
-	    {
-	      if (argv[optind][1] == '-')
-		/* --option */
-		fprintf (stderr, gettext ("%s: unrecognized option `--%s'\n"),
-			 "pr", nextchar);
-	      else
-		/* +option or -option */
-		fprintf (stderr, gettext ("%s: unrecognized option `%c%s'\n"),
-			 "pr", argv[optind][0], nextchar);
-	    }
-	  nextchar = (char *) "";
-	  optind++;
-	  return '?';
-	}
-    }
-
-  /* Look at and handle the next short option-character.  */
-
-  {
-    char c = *nextchar++;
-    char *temp = my_index (optstring, c);
-
-    /* Increment `optind' when we start to process its last character.  */
-    if (*nextchar == '\0')
-      ++optind;
-
-    if (temp == NULL || c == ':')
-      {
-	if (opterr)
-	  {
-	    if (posixly_correct)
-	      /* 1003.2 specifies the format of this message.  */
-	      fprintf (stderr, gettext ("%s: illegal option -- %c\n"),
-		       "pr", c);
-	    else
-	      fprintf (stderr, gettext ("%s: invalid option -- %c\n"),
-		       "pr", c);
-	  }
-	optopt = c;
-	return '?';
-      }
-    if (temp[1] == ':')
-      {
-	if (temp[2] == ':')
-	  {
-	    /* This is an option that accepts an argument optionally.  */
-	    if (*nextchar != '\0')
-	      {
-		optarg = nextchar;
-		optind++;
-	      }
-	    else
-	      optarg = NULL;
-	    nextchar = NULL;
-	  }
-	else
-	  {
-	    /* This is an option that requires an argument.  */
-	    if (*nextchar != '\0')
-	      {
-		optarg = nextchar;
-		/* If we end this ARGV-element by taking the rest as an arg,
-		   we must advance to the next element now.  */
-		optind++;
-	      }
-	    else if (optind == argc)
-	      {
-		if (opterr)
-		  {
-		    /* 1003.2 specifies the format of this message.  */
-		    fprintf (stderr,
-			   gettext ("%s: option requires an argument -- %c\n"),
-			   "pr", c);
-		  }
-		optopt = c;
-		if (optstring[0] == ':')
-		  c = ':';
-		else
-		  c = '?';
-	      }
-	    else
-	      /* We already incremented `optind' once;
-		 increment it again when taking next ARGV-elt as argument.  */
-	      optarg = argv[optind++];
-	    nextchar = NULL;
-	  }
-      }
-    return c;
-  }
-}
-
-int
-getopt (argc, argv, optstring)
-     int argc;
-     char *const *argv;
-     const char *optstring;
-{
-  return _getopt_internal (argc, argv, optstring,
-			   (const struct option *) 0,
-			   (int *) 0,
-			   0);
-}
-
-#endif	/* _LIBC or not __GNU_LIBRARY__.  */
-
-#ifdef TEST
-
-/* Compile with -DTEST to make an executable for use in testing
-   the above definition of `getopt'.  */
-
-int
-main (argc, argv)
-     int argc;
-     char **argv;
-{
-  int c;
-  int digit_optind = 0;
-
-  while (1)
-    {
-      int this_option_optind = optind ? optind : 1;
-
-      c = getopt (argc, argv, "abc:d:0123456789");
-      if (c == EOF)
-	break;
-
-      switch (c)
-	{
-	case '0':
-	case '1':
-	case '2':
-	case '3':
-	case '4':
-	case '5':
-	case '6':
-	case '7':
-	case '8':
-	case '9':
-	  if (digit_optind != 0 && digit_optind != this_option_optind)
-	    printf ("digits occur in two different argv-elements.\n");
-	  digit_optind = this_option_optind;
-	  printf ("option %c\n", c);
-	  break;
-
-	case 'a':
-	  printf ("option a\n");
-	  break;
-
-	case 'b':
-	  printf ("option b\n");
-	  break;
-
-	case 'c':
-	  printf ("option c with value `%s'\n", optarg);
-	  break;
-
-	case '?':
-	  break;
-
-	default:
-	  printf ("?? getopt returned character code 0%o ??\n", c);
-	}
-    }
-
-  if (optind < argc)
-    {
-      printf ("non-option ARGV-elements: ");
-      while (optind < argc)
-	printf ("%s ", argv[optind++]);
-      printf ("\n");
-    }
-
-  exit (0);
-}
-
-#endif /* TEST */
diff --git a/PR/src/ports/getopt1.c b/PR/src/ports/getopt1.c
deleted file mode 100644
index 332974b..0000000
--- a/PR/src/ports/getopt1.c
+++ /dev/null
@@ -1,179 +0,0 @@
-/* getopt_long and getopt_long_only entry points for GNU getopt.
-   Copyright (C) 1987, 88, 89, 90, 91, 92, 1993, 1994
-	Free Software Foundation, Inc.
-
-   This program is free software; you can redistribute it and/or modify it
-   under the terms of the GNU General Public License as published by the
-   Free Software Foundation; either version 2, or (at your option) any
-   later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
-
-
-#include "getopt.h"
-
-#if !defined (__STDC__) || !__STDC__
-/* This is a separate conditional since some stdc systems
-   reject `defined (const)'.  */
-#ifndef const
-#define const
-#endif
-#endif
-
-#include <stdio.h>
-
-/* Comment out all this code if we are using the GNU C Library, and are not
-   actually compiling the library itself.  This code is part of the GNU C
-   Library, but also included in many other GNU distributions.  Compiling
-   and linking in this code is a waste when using the GNU C library
-   (especially if it is a shared library).  Rather than having every GNU
-   program understand `configure --with-gnu-libc' and omit the object files,
-   it is simpler to just do this in the source for each such file.  */
-
-#if defined (_LIBC) || !defined (__GNU_LIBRARY__)
-
-
-/* This needs to come after some library #include
-   to get __GNU_LIBRARY__ defined.  */
-#ifdef __GNU_LIBRARY__
-#include <stdlib.h>
-#else
-#ifndef _WIN32
-char *getenv ();
-#endif
-#endif
-
-#ifndef	NULL
-#define NULL 0
-#endif
-
-int
-getopt_long (argc, argv, options, long_options, opt_index)
-     int argc;
-     char *const *argv;
-     const char *options;
-     const struct option *long_options;
-     int *opt_index;
-{
-  return _getopt_internal (argc, argv, options, long_options, opt_index, 0);
-}
-
-/* Like getopt_long, but '-' as well as '--' can indicate a long option.
-   If an option that starts with '-' (not '--') doesn't match a long option,
-   but does match a short option, it is parsed as a short option
-   instead.  */
-
-int
-getopt_long_only (argc, argv, options, long_options, opt_index)
-     int argc;
-     char *const *argv;
-     const char *options;
-     const struct option *long_options;
-     int *opt_index;
-{
-  return _getopt_internal (argc, argv, options, long_options, opt_index, 1);
-}
-
-
-#endif	/* _LIBC or not __GNU_LIBRARY__.  */
-
-#ifdef TEST
-
-#include <stdio.h>
-
-int
-main (argc, argv)
-     int argc;
-     char **argv;
-{
-  int c;
-  int digit_optind = 0;
-
-  while (1)
-    {
-      int this_option_optind = optind ? optind : 1;
-      int option_index = 0;
-      static struct option long_options[] =
-      {
-	{"add", 1, 0, 0},
-	{"append", 0, 0, 0},
-	{"delete", 1, 0, 0},
-	{"verbose", 0, 0, 0},
-	{"create", 0, 0, 0},
-	{"file", 1, 0, 0},
-	{0, 0, 0, 0}
-      };
-
-      c = getopt_long (argc, argv, "abc:d:0123456789",
-		       long_options, &option_index);
-      if (c == EOF)
-	break;
-
-      switch (c)
-	{
-	case 0:
-	  printf ("option %s", long_options[option_index].name);
-	  if (optarg)
-	    printf (" with arg %s", optarg);
-	  printf ("\n");
-	  break;
-
-	case '0':
-	case '1':
-	case '2':
-	case '3':
-	case '4':
-	case '5':
-	case '6':
-	case '7':
-	case '8':
-	case '9':
-	  if (digit_optind != 0 && digit_optind != this_option_optind)
-	    printf ("digits occur in two different argv-elements.\n");
-	  digit_optind = this_option_optind;
-	  printf ("option %c\n", c);
-	  break;
-
-	case 'a':
-	  printf ("option a\n");
-	  break;
-
-	case 'b':
-	  printf ("option b\n");
-	  break;
-
-	case 'c':
-	  printf ("option c with value `%s'\n", optarg);
-	  break;
-
-	case 'd':
-	  printf ("option d with value `%s'\n", optarg);
-	  break;
-
-	case '?':
-	  break;
-
-	default:
-	  printf ("?? getopt returned character code 0%o ??\n", c);
-	}
-    }
-
-  if (optind < argc)
-    {
-      printf ("non-option ARGV-elements: ");
-      while (optind < argc)
-	printf ("%s ", argv[optind++]);
-      printf ("\n");
-    }
-
-  exit (0);
-}
-
-#endif /* TEST */
diff --git a/PR/src/ports/winfiles/pr.def b/PR/src/ports/winfiles/pr.def
deleted file mode 100644
index 3eb69d7..0000000
--- a/PR/src/ports/winfiles/pr.def
+++ /dev/null
@@ -1,14 +0,0 @@
-EXPORTS
-prExportDat
-prExportDatOpt
-prImportDat
-prImportDatOpt
-prVerifyDatType
-prSetOutput
-parseFile
-parseStructure
-resourceTreeGetChild
-resourceTreeGetInfo
-resourceTreeGetNext
-resourceTreeGetRoot
-freeParsedStructure
diff --git a/PR/src/ports/winfiles/pr.dll b/PR/src/ports/winfiles/pr.dll
deleted file mode 100644
index 9461272..0000000
Binary files a/PR/src/ports/winfiles/pr.dll and /dev/null differ
diff --git a/PR/src/ports/winfiles/pr.exe b/PR/src/ports/winfiles/pr.exe
deleted file mode 100755
index c081677..0000000
Binary files a/PR/src/ports/winfiles/pr.exe and /dev/null differ
diff --git a/PR/src/ports/winfiles/pr.exp b/PR/src/ports/winfiles/pr.exp
deleted file mode 100644
index 58057bb..0000000
--- a/PR/src/ports/winfiles/pr.exp
+++ /dev/null
@@ -1,14 +0,0 @@
-pr.dll
-_freeParsedStructure		_freeParsedStructure
-_parseFile		_parseFile
-_parseStructure		_parseStructure
-_prExportDat		_prExportDat
-_prExportDatOpt		_prExportDatOpt
-_prImportDat		_prImportDat
-_prImportDatOpt		_prImportDatOpt
-_prSetOutput		_prSetOutput
-_prVerifyDatType		_prVerifyDatType
-_resourceTreeGetChild		_resourceTreeGetChild
-_resourceTreeGetInfo		_resourceTreeGetInfo
-_resourceTreeGetNext		_resourceTreeGetNext
-_resourceTreeGetRoot		_resourceTreeGetRoot
diff --git a/PR/src/ports/winfiles/pr.lib b/PR/src/ports/winfiles/pr.lib
deleted file mode 100644
index 6c733f8..0000000
Binary files a/PR/src/ports/winfiles/pr.lib and /dev/null differ
diff --git a/PR/src/pr.dsp b/PR/src/pr.dsp
deleted file mode 100644
index ec88ec0..0000000
--- a/PR/src/pr.dsp
+++ /dev/null
@@ -1,650 +0,0 @@
-# Microsoft Developer Studio Project File - Name="tasks" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=tasks - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE 
-!MESSAGE NMAKE /f "pr.mak".
-!MESSAGE 
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE 
-!MESSAGE NMAKE /f "pr.mak" CFG="tasks - Win32 Debug"
-!MESSAGE 
-!MESSAGE Possible choices for configuration are:
-!MESSAGE 
-!MESSAGE "tasks - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "tasks - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE "tasks - Win32 Dynamic Link Library" (based on "Win32 (x86) Console Application")
-!MESSAGE 
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF  "$(CFG)" == "tasks - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /W2 /GX /O2 /I "include\\" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /FR /YX /c
-# ADD BASE RSC /l 0x2c0a /d "NDEBUG"
-# ADD RSC /l 0x2c0a /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /out:"bin/pr.exe"
-# SUBTRACT LINK32 /pdb:none
-# Begin Special Build Tool
-SOURCE="$(InputPath)"
-PostBuild_Cmds=del winbins\pr.exe	copy bin\pr.exe winbins\pr.exe >nul	scripts\upx.exe winbins\pr.exe
-# End Special Build Tool
-
-!ELSEIF  "$(CFG)" == "tasks - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /W4 /Gm /GX /ZI /Od /I "include\\" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /GZ /c
-# ADD BASE RSC /l 0x2c0a /d "_DEBUG"
-# ADD RSC /l 0x2c0a /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-
-!ELSEIF  "$(CFG)" == "tasks - Win32 Dynamic Link Library"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "tasks___Win32_Dynamic_Link_Library"
-# PROP BASE Intermediate_Dir "tasks___Win32_Dynamic_Link_Library"
-# PROP BASE Ignore_Export_Lib 0
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Dll"
-# PROP Intermediate_Dir "Dll"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /I "include\\" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /FR /YX /c
-# ADD CPP /nologo /W3 /GX /O2 /I "include\\" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "DLL" /FR /YX /c
-# ADD BASE RSC /l 0x2c0a /d "NDEBUG"
-# ADD RSC /l 0x2c0a /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /out:"bin/pr.exe"
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /dll /machine:I386 /def:"winbins/pr.def" /out:"winbins/pr.dll" /implib:"winbins/pr.lib"
-# SUBTRACT LINK32 /pdb:none
-# Begin Special Build Tool
-SOURCE="$(InputPath)"
-PostBuild_Cmds=scripts\upx.exe winbins\pr.dll
-# End Special Build Tool
-
-!ENDIF 
-
-# Begin Target
-
-# Name "tasks - Win32 Release"
-# Name "tasks - Win32 Debug"
-# Name "tasks - Win32 Dynamic Link Library"
-# Begin Group "src"
-
-# PROP Default_Filter ""
-# Begin Group "formats"
-
-# PROP Default_Filter ""
-# Begin Source File
-
-SOURCE=.\formats\bmp.c
-DEP_CPP_BMP_C=\
-	".\include\bmp.h"\
-	".\include\compress.h"\
-	".\include\dat.h"\
-	".\include\disk.h"\
-	".\include\english.h"\
-	".\include\pr.h"\
-	".\include\resources.h"\
-	".\include\xmlparse.h"\
-	
-
-!IF  "$(CFG)" == "tasks - Win32 Release"
-
-!ELSEIF  "$(CFG)" == "tasks - Win32 Debug"
-
-!ELSEIF  "$(CFG)" == "tasks - Win32 Dynamic Link Library"
-
-!ENDIF 
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\formats\mid.c
-DEP_CPP_MID_C=\
-	".\include\dat.h"\
-	".\include\disk.h"\
-	".\include\english.h"\
-	".\include\mid.h"\
-	".\include\pr.h"\
-	".\include\resources.h"\
-	".\include\xmlparse.h"\
-	
-
-!IF  "$(CFG)" == "tasks - Win32 Release"
-
-!ELSEIF  "$(CFG)" == "tasks - Win32 Debug"
-
-!ELSEIF  "$(CFG)" == "tasks - Win32 Dynamic Link Library"
-
-!ENDIF 
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\formats\pal.c
-DEP_CPP_PAL_C=\
-	".\include\compress.h"\
-	".\include\dat.h"\
-	".\include\disk.h"\
-	".\include\english.h"\
-	".\include\pal.h"\
-	".\include\pr.h"\
-	".\include\resources.h"\
-	".\include\xmlparse.h"\
-	
-
-!IF  "$(CFG)" == "tasks - Win32 Release"
-
-!ELSEIF  "$(CFG)" == "tasks - Win32 Debug"
-
-!ELSEIF  "$(CFG)" == "tasks - Win32 Dynamic Link Library"
-
-!ENDIF 
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\formats\plv.c
-DEP_CPP_PLV_C=\
-	".\include\dat.h"\
-	".\include\disk.h"\
-	".\include\english.h"\
-	".\include\plv.h"\
-	".\include\pr.h"\
-	".\include\resources.h"\
-	".\include\xmlparse.h"\
-	
-
-!IF  "$(CFG)" == "tasks - Win32 Release"
-
-!ELSEIF  "$(CFG)" == "tasks - Win32 Debug"
-
-!ELSEIF  "$(CFG)" == "tasks - Win32 Dynamic Link Library"
-
-!ENDIF 
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\formats\wav.c
-DEP_CPP_WAV_C=\
-	".\include\dat.h"\
-	".\include\disk.h"\
-	".\include\english.h"\
-	".\include\pr.h"\
-	".\include\resources.h"\
-	".\include\wav.h"\
-	".\include\xmlparse.h"\
-	
-
-!IF  "$(CFG)" == "tasks - Win32 Release"
-
-!ELSEIF  "$(CFG)" == "tasks - Win32 Debug"
-
-!ELSEIF  "$(CFG)" == "tasks - Win32 Dynamic Link Library"
-
-!ENDIF 
-
-# End Source File
-# End Group
-# Begin Group "ports"
-
-# PROP Default_Filter ""
-# Begin Source File
-
-SOURCE=.\ports\dirent.c
-DEP_CPP_DIREN=\
-	".\include\direntwin.h"\
-	
-
-!IF  "$(CFG)" == "tasks - Win32 Release"
-
-!ELSEIF  "$(CFG)" == "tasks - Win32 Debug"
-
-!ELSEIF  "$(CFG)" == "tasks - Win32 Dynamic Link Library"
-
-!ENDIF 
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\ports\getopt.c
-DEP_CPP_GETOP=\
-	".\include\getopt.h"\
-	
-
-!IF  "$(CFG)" == "tasks - Win32 Release"
-
-!ELSEIF  "$(CFG)" == "tasks - Win32 Debug"
-
-!ELSEIF  "$(CFG)" == "tasks - Win32 Dynamic Link Library"
-
-!ENDIF 
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\ports\getopt1.c
-DEP_CPP_GETOPT=\
-	".\include\getopt.h"\
-	
-
-!IF  "$(CFG)" == "tasks - Win32 Release"
-
-!ELSEIF  "$(CFG)" == "tasks - Win32 Debug"
-
-!ELSEIF  "$(CFG)" == "tasks - Win32 Dynamic Link Library"
-
-!ENDIF 
-
-# End Source File
-# End Group
-# Begin Source File
-
-SOURCE=.\compile.c
-DEP_CPP_COMPI=\
-	".\include\bmp.h"\
-	".\include\compile.h"\
-	".\include\compress.h"\
-	".\include\dat.h"\
-	".\include\disk.h"\
-	".\include\english.h"\
-	".\include\mid.h"\
-	".\include\pal.h"\
-	".\include\plv.h"\
-	".\include\pr.h"\
-	".\include\resources.h"\
-	".\include\wav.h"\
-	".\include\xmlparse.h"\
-	
-
-!IF  "$(CFG)" == "tasks - Win32 Release"
-
-!ELSEIF  "$(CFG)" == "tasks - Win32 Debug"
-
-!ELSEIF  "$(CFG)" == "tasks - Win32 Dynamic Link Library"
-
-!ENDIF 
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\compress.c
-DEP_CPP_COMPR=\
-	".\include\compress.h"\
-	".\include\english.h"\
-	".\include\pr.h"\
-	
-
-!IF  "$(CFG)" == "tasks - Win32 Release"
-
-!ELSEIF  "$(CFG)" == "tasks - Win32 Debug"
-
-!ELSEIF  "$(CFG)" == "tasks - Win32 Dynamic Link Library"
-
-!ENDIF 
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\dat.c
-DEP_CPP_DAT_C=\
-	".\include\disk.h"\
-	".\include\english.h"\
-	".\include\pr.h"\
-	".\include\resources.h"\
-	".\include\xmlparse.h"\
-	
-
-!IF  "$(CFG)" == "tasks - Win32 Release"
-
-!ELSEIF  "$(CFG)" == "tasks - Win32 Debug"
-
-!ELSEIF  "$(CFG)" == "tasks - Win32 Dynamic Link Library"
-
-!ENDIF 
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\disk.c
-DEP_CPP_DISK_=\
-	".\include\direntwin.h"\
-	".\include\disk.h"\
-	".\include\english.h"\
-	".\include\pr.h"\
-	".\include\xmlparse.h"\
-	
-
-!IF  "$(CFG)" == "tasks - Win32 Release"
-
-!ELSEIF  "$(CFG)" == "tasks - Win32 Debug"
-
-!ELSEIF  "$(CFG)" == "tasks - Win32 Dynamic Link Library"
-
-!ENDIF 
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\extract.c
-DEP_CPP_EXTRA=\
-	".\include\bmp.h"\
-	".\include\compress.h"\
-	".\include\dat.h"\
-	".\include\disk.h"\
-	".\include\english.h"\
-	".\include\extract.h"\
-	".\include\mid.h"\
-	".\include\pal.h"\
-	".\include\plv.h"\
-	".\include\pr.h"\
-	".\include\resources.h"\
-	".\include\wav.h"\
-	".\include\xmlparse.h"\
-	
-
-!IF  "$(CFG)" == "tasks - Win32 Release"
-
-!ELSEIF  "$(CFG)" == "tasks - Win32 Debug"
-
-!ELSEIF  "$(CFG)" == "tasks - Win32 Dynamic Link Library"
-
-!ENDIF 
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\memory.c
-
-!IF  "$(CFG)" == "tasks - Win32 Release"
-
-!ELSEIF  "$(CFG)" == "tasks - Win32 Debug"
-
-!ELSEIF  "$(CFG)" == "tasks - Win32 Dynamic Link Library"
-
-!ENDIF 
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\pr.c
-DEP_CPP_PR_C1a=\
-	".\include\compile.h"\
-	".\include\compress.h"\
-	".\include\disk.h"\
-	".\include\english.h"\
-	".\include\extract.h"\
-	".\include\getopt.h"\
-	".\include\pr.h"\
-	".\include\resources.h"\
-	".\include\tasks.h"\
-	".\include\xmlparse.h"\
-	
-
-!IF  "$(CFG)" == "tasks - Win32 Release"
-
-!ELSEIF  "$(CFG)" == "tasks - Win32 Debug"
-
-!ELSEIF  "$(CFG)" == "tasks - Win32 Dynamic Link Library"
-
-!ENDIF 
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\resources.c
-DEP_CPP_RESOU=\
-	".\include\compress.h"\
-	".\include\disk.h"\
-	".\include\english.h"\
-	".\include\pr.h"\
-	".\include\resources.h"\
-	".\include\xmlparse.h"\
-	".\include\xmlsearch.h"\
-	
-
-!IF  "$(CFG)" == "tasks - Win32 Release"
-
-!ELSEIF  "$(CFG)" == "tasks - Win32 Debug"
-
-!ELSEIF  "$(CFG)" == "tasks - Win32 Dynamic Link Library"
-
-!ENDIF 
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\tasks.c
-DEP_CPP_TASKS=\
-	".\include\dat.h"\
-	".\include\english.h"\
-	".\include\pr.h"\
-	".\include\resources.h"\
-	".\include\tasks.h"\
-	".\include\xmlparse.h"\
-	".\include\xmlsearch.h"\
-	
-
-!IF  "$(CFG)" == "tasks - Win32 Release"
-
-!ELSEIF  "$(CFG)" == "tasks - Win32 Debug"
-
-!ELSEIF  "$(CFG)" == "tasks - Win32 Dynamic Link Library"
-
-!ENDIF 
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\xmlparse.c
-DEP_CPP_XMLPA=\
-	".\include\disk.h"\
-	".\include\english.h"\
-	".\include\pr.h"\
-	".\include\xmlparse.h"\
-	
-
-!IF  "$(CFG)" == "tasks - Win32 Release"
-
-!ELSEIF  "$(CFG)" == "tasks - Win32 Debug"
-
-!ELSEIF  "$(CFG)" == "tasks - Win32 Dynamic Link Library"
-
-!ENDIF 
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\xmlsearch.c
-DEP_CPP_XMLSE=\
-	".\include\english.h"\
-	".\include\pr.h"\
-	".\include\resources.h"\
-	".\include\xmlparse.h"\
-	".\include\xmlsearch.h"\
-	
-
-!IF  "$(CFG)" == "tasks - Win32 Release"
-
-!ELSEIF  "$(CFG)" == "tasks - Win32 Debug"
-
-!ELSEIF  "$(CFG)" == "tasks - Win32 Dynamic Link Library"
-
-!ENDIF 
-
-# End Source File
-# End Group
-# Begin Group "include"
-
-# PROP Default_Filter ""
-# Begin Group "include formats"
-
-# PROP Default_Filter ""
-# Begin Source File
-
-SOURCE=.\include\bmp.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\mid.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\pal.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\plv.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\wav.h
-# End Source File
-# End Group
-# Begin Group "include ports"
-
-# PROP Default_Filter ""
-# Begin Source File
-
-SOURCE=.\include\direntwin.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\getopt.h
-# End Source File
-# End Group
-# Begin Source File
-
-SOURCE=.\include\compile.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\compress.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\disk.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\extract.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\memory.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\pr.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\resources.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\tasks.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\xml.h
-# End Source File
-# Begin Source File
-
-SOURCE=include\xmlsearch.h
-# End Source File
-# End Group
-# Begin Group "Text Files"
-
-# PROP Default_Filter "*.txt"
-# Begin Source File
-
-SOURCE=..\changelog.txt
-# End Source File
-# Begin Source File
-
-SOURCE=..\gpl.txt
-# End Source File
-# Begin Source File
-
-SOURCE=..\readme.coders.txt
-# End Source File
-# Begin Source File
-
-SOURCE=..\readme.txt
-# End Source File
-# End Group
-# Begin Group "Other Files"
-
-# PROP Default_Filter ""
-# Begin Source File
-
-SOURCE=.\Makefile
-# End Source File
-# Begin Source File
-
-SOURCE=.\Makefile.lcc
-# End Source File
-# Begin Source File
-
-SOURCE=.\bin\resources.sample.xml
-# End Source File
-# Begin Source File
-
-SOURCE=.\bin\resources.xml
-# End Source File
-# End Group
-# End Target
-# End Project
diff --git a/PR/src/pr.dsw b/PR/src/pr.dsw
deleted file mode 100644
index a66b4b0..0000000
--- a/PR/src/pr.dsw
+++ /dev/null
@@ -1,29 +0,0 @@
-Microsoft Developer Studio Workspace File, Format Version 6.00
-# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
-
-###############################################################################
-
-Project: "pr"=.\pr.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Global:
-
-Package=<5>
-{{{
-}}}
-
-Package=<3>
-{{{
-}}}
-
-###############################################################################
-
diff --git a/pv3/ChildFrm.cpp b/pv3/ChildFrm.cpp
deleted file mode 100644
index 6346f18..0000000
--- a/pv3/ChildFrm.cpp
+++ /dev/null
@@ -1,88 +0,0 @@
-// ChildFrm.cpp : implementation of the CChildFrame class
-//
-
-#include "stdafx.h"
-#include "Princed V3.h"
-#include "Princed V3Doc.h"
-#include "Princed V3View.h"
-
-#include "ChildFrm.h"
-
-#ifdef _DEBUG
-#define new DEBUG_NEW
-#undef THIS_FILE
-static char THIS_FILE[] = __FILE__;
-#endif
-
-/////////////////////////////////////////////////////////////////////////////
-// CChildFrame
-
-IMPLEMENT_DYNCREATE(CChildFrame, CMDIChildWnd)
-
-BEGIN_MESSAGE_MAP(CChildFrame, CMDIChildWnd)
-	//{{AFX_MSG_MAP(CChildFrame)
-		// NOTE - the ClassWizard will add and remove mapping macros here.
-		//    DO NOT EDIT what you see in these blocks of generated code !
-	//}}AFX_MSG_MAP
-END_MESSAGE_MAP()
-
-/////////////////////////////////////////////////////////////////////////////
-// CChildFrame construction/destruction
-
-CChildFrame::CChildFrame()
-{
-	// TODO: add member initialization code here
-	
-}
-
-CChildFrame::~CChildFrame()
-{
-}
-
-BOOL CChildFrame::PreCreateWindow(CREATESTRUCT& cs)
-{
-	cs.style=WS_OVERLAPPED|WS_CAPTION|FWS_ADDTOTITLE|WS_THICKFRAME|WS_MAXIMIZE|
-		WS_SYSMENU|WS_MINIMIZEBOX|WS_MAXIMIZEBOX|WS_CHILD|WS_VISIBLE;
-	return CMDIChildWnd::PreCreateWindow(cs);
-}
-
-
-
-/////////////////////////////////////////////////////////////////////////////
-// CChildFrame diagnostics
-
-#ifdef _DEBUG
-void CChildFrame::AssertValid() const
-{
-	CMDIChildWnd::AssertValid();
-}
-
-void CChildFrame::Dump(CDumpContext& dc) const
-{
-	CMDIChildWnd::Dump(dc);
-}
-
-#endif //_DEBUG
-
-/////////////////////////////////////////////////////////////////////////////
-// CChildFrame message handlers
-
-LRESULT CChildFrame::DefWindowProc(UINT message, WPARAM wParam, LPARAM lParam) 
-{
-	switch(message) {
-	case WM_SETTEXT:
-		{
-			CString t; TCHAR pt[10]; int x;
-			CPrincedV3Doc *pDoc=(DYNAMIC_DOWNCAST(CPrincedV3View, GetActiveView()))->GetDocument();
-			x=pDoc->GetLevel();
-			if(x!=-1) {
-				wsprintf(pt, _T(" #%d"), pDoc->GetLevel());
-				t=reinterpret_cast<LPCTSTR>(lParam); t+=pt;
-				return CMDIChildWnd::DefWindowProc(message, wParam,
-					reinterpret_cast<LPARAM>((LPCTSTR)t));
-			}
-		}
-	}
-	
-	return CMDIChildWnd::DefWindowProc(message, wParam, lParam);
-}
diff --git a/pv3/ChildFrm.h b/pv3/ChildFrm.h
deleted file mode 100644
index 5167dce..0000000
--- a/pv3/ChildFrm.h
+++ /dev/null
@@ -1,56 +0,0 @@
-// ChildFrm.h : interface of the CChildFrame class
-//
-/////////////////////////////////////////////////////////////////////////////
-
-#if !defined(AFX_CHILDFRM_H__B98D158B_6AA8_11D7_8A8E_00104B7CC0FF__INCLUDED_)
-#define AFX_CHILDFRM_H__B98D158B_6AA8_11D7_8A8E_00104B7CC0FF__INCLUDED_
-
-#if _MSC_VER > 1000
-#pragma once
-#endif // _MSC_VER > 1000
-
-
-class CChildFrame : public CMDIChildWnd
-{
-	DECLARE_DYNCREATE(CChildFrame)
-public:
-	CChildFrame();
-
-// Attributes
-public:
-
-// Operations
-public:
-
-// Overrides
-	// ClassWizard generated virtual function overrides
-	//{{AFX_VIRTUAL(CChildFrame)
-	public:
-	virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
-	protected:
-	virtual LRESULT DefWindowProc(UINT message, WPARAM wParam, LPARAM lParam);
-	//}}AFX_VIRTUAL
-
-// Implementation
-public:
-	virtual ~CChildFrame();
-#ifdef _DEBUG
-	virtual void AssertValid() const;
-	virtual void Dump(CDumpContext& dc) const;
-#endif
-
-// Generated message map functions
-protected:
-	//{{AFX_MSG(CChildFrame)
-		// NOTE - the ClassWizard will add and remove member functions here.
-		//    DO NOT EDIT what you see in these blocks of generated code!
-	//}}AFX_MSG
-	DECLARE_MESSAGE_MAP()
-};
-
-/////////////////////////////////////////////////////////////////////////////
-
-//{{AFX_INSERT_LOCATION}}
-// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
-
-#endif // !defined(AFX_CHILDFRM_H__B98D158B_6AA8_11D7_8A8E_00104B7CC0FF__INCLUDED_)
diff --git a/pv3/MainFrm.cpp b/pv3/MainFrm.cpp
deleted file mode 100644
index 7547f85..0000000
--- a/pv3/MainFrm.cpp
+++ /dev/null
@@ -1,109 +0,0 @@
-// MainFrm.cpp : implementation of the CMainFrame class
-//
-
-#include "stdafx.h"
-#include "Princed V3.h"
-
-#include "MainFrm.h"
-
-#ifdef _DEBUG
-#define new DEBUG_NEW
-#undef THIS_FILE
-static char THIS_FILE[] = __FILE__;
-#endif
-
-/////////////////////////////////////////////////////////////////////////////
-// CMainFrame
-
-IMPLEMENT_DYNAMIC(CMainFrame, CMDIFrameWnd)
-
-BEGIN_MESSAGE_MAP(CMainFrame, CMDIFrameWnd)
-	//{{AFX_MSG_MAP(CMainFrame)
-	ON_WM_CREATE()
-	ON_COMMAND(ID_WINDOW_CLOSEALL, OnWindowCloseall)
-	//}}AFX_MSG_MAP
-END_MESSAGE_MAP()
-
-static UINT indicators[] =
-{
-	ID_SEPARATOR,           // status line indicator
-	ID_INDICATOR_CAPS,
-	ID_INDICATOR_NUM,
-	ID_INDICATOR_SCRL,
-};
-
-/////////////////////////////////////////////////////////////////////////////
-// CMainFrame construction/destruction
-
-CMainFrame::CMainFrame()
-{
-	// TODO: add member initialization code here
-	
-}
-
-CMainFrame::~CMainFrame()
-{
-}
-
-int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
-{
-	if (CMDIFrameWnd::OnCreate(lpCreateStruct) == -1)
-		return -1;
-	
-	if(!m_wndToolBar.Create(this) || !m_wndToolBar.LoadToolBar(IDR_MAINFRAME)) {
-		TRACE0("Failed to create toolbar\n"); return -1;  // fail to create
-	}
-	if (!m_wndStatusBar.Create(this) ||
-		!m_wndStatusBar.SetIndicators(indicators, sizeof(indicators)/sizeof(UINT))) {
-		TRACE0("Failed to create status bar\n"); return -1; // fail to create
-	}
-	DragAcceptFiles();
-
-	// TODO: Delete these three lines if you don't want the toolbar to
-	//  be dockable
-	EnableDocking(CBRS_ALIGN_ANY);
-	m_wndToolBar.SetBorders(1,3,3,3);
-	m_wndToolBar.SetBarStyle(m_wndToolBar.GetBarStyle() |
-		CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC| CBRS_GRIPPER);
-	m_wndToolBar.ModifyStyle(0, TBSTYLE_FLAT); 
-	m_wndToolBar.EnableDocking(CBRS_ALIGN_ANY);
-	DockControlBar(&m_wndToolBar);
-
-	return 0;
-}
-
-BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
-{
-	if( !CMDIFrameWnd::PreCreateWindow(cs) )
-		return FALSE;
-	// TODO: Modify the Window class or styles here by modifying
-	//  the CREATESTRUCT cs
-
-	return TRUE;
-}
-
-/////////////////////////////////////////////////////////////////////////////
-// CMainFrame diagnostics
-
-#ifdef _DEBUG
-void CMainFrame::AssertValid() const
-{
-	CMDIFrameWnd::AssertValid();
-}
-
-void CMainFrame::Dump(CDumpContext& dc) const
-{
-	CMDIFrameWnd::Dump(dc);
-}
-
-#endif //_DEBUG
-
-/////////////////////////////////////////////////////////////////////////////
-// CMainFrame message handlers
-
-void CMainFrame::OnWindowCloseall() 
-{
-	CWnd *pWnd=GetActiveFrame(), *tt;
-	if(pWnd==this) return; //there are no child windows
-	for(;pWnd;pWnd=tt) { tt=pWnd->GetNextWindow(); pWnd->SendMessage(WM_CLOSE); }
-}
diff --git a/pv3/MainFrm.h b/pv3/MainFrm.h
deleted file mode 100644
index ab95d13..0000000
--- a/pv3/MainFrm.h
+++ /dev/null
@@ -1,58 +0,0 @@
-// MainFrm.h : interface of the CMainFrame class
-//
-/////////////////////////////////////////////////////////////////////////////
-
-#if !defined(AFX_MAINFRM_H__B98D1589_6AA8_11D7_8A8E_00104B7CC0FF__INCLUDED_)
-#define AFX_MAINFRM_H__B98D1589_6AA8_11D7_8A8E_00104B7CC0FF__INCLUDED_
-
-#if _MSC_VER > 1000
-#pragma once
-#endif // _MSC_VER > 1000
-
-class CMainFrame : public CMDIFrameWnd
-{
-	DECLARE_DYNAMIC(CMainFrame)
-public:
-	CMainFrame();
-
-// Attributes
-public:
-	void SetStatusText(LPCTSTR tex) { m_wndStatusBar.SetPaneText(0, tex); }
-
-// Operations
-public:
-
-// Overrides
-	// ClassWizard generated virtual function overrides
-	//{{AFX_VIRTUAL(CMainFrame)
-	public:
-	virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
-	//}}AFX_VIRTUAL
-
-// Implementation
-public:
-	virtual ~CMainFrame();
-#ifdef _DEBUG
-	virtual void AssertValid() const;
-	virtual void Dump(CDumpContext& dc) const;
-#endif
-
-protected:  // control bar embedded members
-	CStatusBar m_wndStatusBar;
-	CToolBar m_wndToolBar;
-
-// Generated message map functions
-protected:
-	//{{AFX_MSG(CMainFrame)
-	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
-	afx_msg void OnWindowCloseall();
-	//}}AFX_MSG
-	DECLARE_MESSAGE_MAP()
-};
-
-/////////////////////////////////////////////////////////////////////////////
-
-//{{AFX_INSERT_LOCATION}}
-// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
-
-#endif // !defined(AFX_MAINFRM_H__B98D1589_6AA8_11D7_8A8E_00104B7CC0FF__INCLUDED_)
diff --git a/pv3/MyDialog.cpp b/pv3/MyDialog.cpp
deleted file mode 100644
index 45965fc..0000000
--- a/pv3/MyDialog.cpp
+++ /dev/null
@@ -1,244 +0,0 @@
-// MyDialog.cpp : implementation file
-// System font-censitive dialog class
-
-#include "stdafx.h"
-#include "MyDialog.h"
-
-#ifdef _DEBUG
-#define new DEBUG_NEW
-#undef THIS_FILE
-static char THIS_FILE[] = __FILE__;
-#endif
-
-/////////////////////////////////////////////////////////////////////////////
-// CMyDialog dialog
-
-
-/////////////////////////////////////////////////////////////////////////////
-// CMyDialog message handlers
-
-#include <afxpriv.h>
-#define DELETE_EXCEPTION(e) do { e->Delete(); } while (0)
-int CMyDialog::DoModal() 
-{
-	// can be constructed with a resource template or InitModalIndirect
-	ASSERT(m_lpszTemplateName != NULL || m_hDialogTemplate != NULL ||
-		m_lpDialogTemplate != NULL);
-
-	// load resource as necessary
-	LPCDLGTEMPLATE lpDialogTemplate = m_lpDialogTemplate;
-	HGLOBAL hDialogTemplate = m_hDialogTemplate;
-	HINSTANCE hInst = AfxGetResourceHandle();
-	if (m_lpszTemplateName != NULL)
-	{
-		hInst = AfxFindResourceHandle(m_lpszTemplateName, RT_DIALOG);
-		HRSRC hResource = ::FindResource(hInst, m_lpszTemplateName, RT_DIALOG);
-		hDialogTemplate = LoadResource(hInst, hResource);
-	}
-	if (hDialogTemplate != NULL)
-		lpDialogTemplate = (LPCDLGTEMPLATE)LockResource(hDialogTemplate);
-
-	// return -1 in case of failure to load the dialog template resource
-	if (lpDialogTemplate == NULL)
-		return -1;
-
-	// disable parent (before creating dialog)
-	HWND hWndParent = PreModal();
-	AfxUnhookWindowCreate();
-	BOOL bEnableParent = FALSE;
-	if (hWndParent != NULL && ::IsWindowEnabled(hWndParent))
-	{
-		::EnableWindow(hWndParent, FALSE);
-		bEnableParent = TRUE;
-	}
-
-	TRY
-	{
-		// create modeless dialog
-		AfxHookWindowCreate(this);
-		if (MyCreateDlgIndirect(lpDialogTemplate,
-						CWnd::FromHandle(hWndParent), hInst))
-		{
-			if (m_nFlags & WF_CONTINUEMODAL)
-			{
-				// enter modal loop
-				DWORD dwFlags = MLF_SHOWONIDLE;
-				if (GetStyle() & DS_NOIDLEMSG)
-					dwFlags |= MLF_NOIDLEMSG;
-				VERIFY(RunModalLoop(dwFlags) == m_nModalResult);
-			}
-
-			// hide the window before enabling the parent, etc.
-			if (m_hWnd != NULL)
-				SetWindowPos(NULL, 0, 0, 0, 0, SWP_HIDEWINDOW|
-					SWP_NOSIZE|SWP_NOMOVE|SWP_NOACTIVATE|SWP_NOZORDER);
-		}
-	}
-	CATCH_ALL(e)
-	{
-		DELETE_EXCEPTION(e);
-		m_nModalResult = -1;
-	}
-	END_CATCH_ALL
-
-	if (bEnableParent)
-		::EnableWindow(hWndParent, TRUE);
-	if (hWndParent != NULL && ::GetActiveWindow() == m_hWnd)
-		::SetActiveWindow(hWndParent);
-
-	// destroy modal window
-	DestroyWindow();
-	PostModal();
-
-	// unlock/free resources as necessary
-	if (m_lpszTemplateName != NULL || m_hDialogTemplate != NULL)
-		UnlockResource(hDialogTemplate);
-	if (m_lpszTemplateName != NULL)
-		FreeResource(hDialogTemplate);
-
-	return m_nModalResult;
-}
-
-#include <AFXIMPL.H>
-#include <OCCIMPL.H>
-BOOL CMyDialog::MyCreateDlgIndirect(LPCDLGTEMPLATE lpDialogTemplate,
-	CWnd* pParentWnd, HINSTANCE hInst)
-{
-	ASSERT(lpDialogTemplate != NULL);
-	if (pParentWnd != NULL)
-		ASSERT_VALID(pParentWnd);
-
-	if (hInst == NULL)
-		hInst = AfxGetInstanceHandle();
-
-#ifndef _AFX_NO_OCC_SUPPORT
-	_AFX_OCC_DIALOG_INFO occDialogInfo;
-	COccManager* pOccManager = afxOccManager;
-#endif
-
-	HGLOBAL hTemplate = NULL;
-
-	HWND hWnd = NULL;
-#ifdef _DEBUG
-	DWORD dwError = 0;
-#endif
-
-	TRY
-	{
-		VERIFY(AfxDeferRegisterClass(AFX_WNDCOMMCTLS_REG));
-		AfxDeferRegisterClass(AFX_WNDCOMMCTLSNEW_REG);
-
-#ifndef _AFX_NO_OCC_SUPPORT
-		// separately create OLE controls in the dialog template
-		if (pOccManager != NULL)
-		{
-			if (!SetOccDialogInfo(&occDialogInfo))
-				return FALSE;
-
-			lpDialogTemplate = pOccManager->PreCreateDialog(&occDialogInfo,
-				lpDialogTemplate);
-		}
-
-		if (lpDialogTemplate == NULL)
-			return FALSE;
-#endif //!_AFX_NO_OCC_SUPPORT
-
-		// If no font specified, set the system font.
-		CString strFace;
-		WORD wSize = 0;
-		BOOL bSetSysFont = !CDialogTemplate::GetFont(lpDialogTemplate, strFace,
-			wSize);
-
-		// On DBCS systems, also change "MS Sans Serif" or "Helv" to system font.
-		if ((!bSetSysFont) && GetSystemMetrics(SM_DBCSENABLED))
-		{
-			bSetSysFont = (strFace == _T("MS Shell Dlg") ||
-				strFace == _T("MS Sans Serif") || strFace == _T("Helv"));
-			if (bSetSysFont && (wSize == 8))
-				wSize = 0;
-		}
-
-		if (bSetSysFont)
-		{
-			LOGFONT lg; int x; HDC hDC=::GetDC(NULL);
-			//::GetObject(::GetStockObject(DEFAULT_GUI_FONT), sizeof(lg), &lg);
-			::SystemParametersInfo(SPI_GETICONTITLELOGFONT, sizeof(lg), &lg, SPIF_UPDATEINIFILE);
-			CDialogTemplate dlgTemp(lpDialogTemplate);
-			x=MulDiv(abs(lg.lfHeight), 72, ::GetDeviceCaps(hDC, LOGPIXELSY));
-			dlgTemp.SetFont(lg.lfFaceName, x);
-			hTemplate = dlgTemp.Detach(); ::ReleaseDC(NULL, hDC);
-		}
-
-		if (hTemplate != NULL)
-			lpDialogTemplate = (DLGTEMPLATE*)GlobalLock(hTemplate);
-
-		// setup for modal loop and creation
-		m_nModalResult = -1;
-		m_nFlags |= WF_CONTINUEMODAL;
-
-		// create modeless dialog
-		AfxHookWindowCreate(this);
-		hWnd = ::CreateDialogIndirect(hInst, lpDialogTemplate,
-			pParentWnd->GetSafeHwnd(), AfxDlgProc);
-#ifdef _DEBUG
-		dwError = ::GetLastError();
-#endif
-	}
-	CATCH_ALL(e)
-	{
-		DELETE_EXCEPTION(e);
-		m_nModalResult = -1;
-	}
-	END_CATCH_ALL
-
-#ifndef _AFX_NO_OCC_SUPPORT
-	if (pOccManager != NULL)
-	{
-		pOccManager->PostCreateDialog(&occDialogInfo);
-		if (hWnd != NULL)
-			SetOccDialogInfo(NULL);
-	}
-#endif //!_AFX_NO_OCC_SUPPORT
-
-	if (!AfxUnhookWindowCreate())
-		PostNcDestroy();        // cleanup if Create fails too soon
-
-	// handle EndDialog calls during OnInitDialog
-	if (hWnd != NULL && !(m_nFlags & WF_CONTINUEMODAL))
-	{
-		::DestroyWindow(hWnd);
-		hWnd = NULL;
-	}
-
-	if (hTemplate != NULL)
-	{
-		GlobalUnlock(hTemplate);
-		GlobalFree(hTemplate);
-	}
-
-	// help with error diagnosis (only if WM_INITDIALOG didn't EndDialog())
-	if (hWnd == NULL)
-	{
-#ifdef _DEBUG
-#ifndef _AFX_NO_OCC_SUPPORT
-		if (m_nFlags & WF_CONTINUEMODAL)
-		{
-			if (afxOccManager == NULL)
-			{
-				TRACE0(">>> If this dialog has OLE controls:\n");
-				TRACE0(">>> AfxEnableControlContainer has not been called yet.\n");
-				TRACE0(">>> You should call it in your app's InitInstance function.\n");
-			}
-			else if (dwError != 0)
-			{
-				TRACE1("Warning: Dialog creation failed!  GetLastError returns 0x%8.8X\n", dwError);
-			}
-		}
-#endif //!_AFX_NO_OCC_SUPPORT
-#endif //_DEBUG
-		return FALSE;
-	}
-
-	ASSERT(hWnd == m_hWnd);
-	return TRUE;
-}
diff --git a/pv3/MyDialog.h b/pv3/MyDialog.h
deleted file mode 100644
index 1d72dac..0000000
--- a/pv3/MyDialog.h
+++ /dev/null
@@ -1,46 +0,0 @@
-#if !defined(AFX_MYDIALOG_H__95397FE7_7038_4655_95B1_9BBAA2390A38__INCLUDED_)
-#define AFX_MYDIALOG_H__95397FE7_7038_4655_95B1_9BBAA2390A38__INCLUDED_
-
-#if _MSC_VER > 1000
-#pragma once
-#endif // _MSC_VER > 1000
-// MyDialog.h : header file
-//
-
-/////////////////////////////////////////////////////////////////////////////
-// CMyDialog dialog
-
-class CMyDialog : public CDialog
-{
-// Construction
-public:
-	CMyDialog(LPCTSTR lpszTemp, CWnd* pParentWnd = NULL): CDialog(lpszTemp, pParentWnd)
-	{
-	}
-	CMyDialog(UINT nIDTemplate, CWnd* pParentWnd = NULL): CDialog(nIDTemplate, pParentWnd)
-	{
-	}
-
-// Overrides
-	// ClassWizard generated virtual function overrides
-	//{{AFX_VIRTUAL(CMyDialog)
-	public:
-	virtual int DoModal();
-	protected:
-	//}}AFX_VIRTUAL
-
-// Implementation
-protected:
-	BOOL MyCreateDlgIndirect(LPCDLGTEMPLATE lpDialogTemplate,
-		CWnd* pParentWnd, HINSTANCE hInst);
-
-	// Generated message map functions
-	//{{AFX_MSG(CMyDialog)
-		// NOTE: the ClassWizard will add member functions here
-	//}}AFX_MSG
-};
-
-//{{AFX_INSERT_LOCATION}}
-// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
-
-#endif // !defined(AFX_MYDIALOG_H__95397FE7_7038_4655_95B1_9BBAA2390A38__INCLUDED_)
diff --git a/pv3/Princed V3.aps b/pv3/Princed V3.aps
deleted file mode 100644
index 5eccb8c..0000000
Binary files a/pv3/Princed V3.aps and /dev/null differ
diff --git a/pv3/Princed V3.clw b/pv3/Princed V3.clw
deleted file mode 100644
index 7dce712..0000000
--- a/pv3/Princed V3.clw	
+++ /dev/null
@@ -1,504 +0,0 @@
-; CLW file contains information for the MFC ClassWizard
-
-[General Info]
-Version=1
-LastClass=CAboutDlg
-LastTemplate=CDialog
-NewFileInclude1=#include "stdafx.h"
-NewFileInclude2=#include "Princed V3.h"
-LastPage=0
-
-ClassCount=7
-Class1=CPrincedV3App
-Class2=CPrincedV3Doc
-Class3=CPrincedV3View
-Class4=CMainFrame
-
-ResourceCount=11
-Resource1=IDD_ABOUTBOX
-Resource2=IDR_MAINFRAME
-Resource3=IDR_PRINCETYPE
-Class5=CChildFrame
-Class6=CAboutDlg
-Resource4=IDR_TOOLPAL (English (U.S.))
-Resource5=IDD_EDIT_SAV
-Resource6=IDD_DIALOG1
-Class7=cSelectLevelWindow
-Resource7=IDD_DIALOG_SELECT_LEVEL (English (U.S.))
-Resource8=IDD_EDIT_SAV (English (U.S.))
-Resource9=IDD_ABOUTBOX (English (U.S.))
-Resource10=IDR_PRINCETYPE (English (U.S.))
-Resource11=IDR_MAINFRAME (English (U.S.))
-
-[CLS:CPrincedV3App]
-Type=0
-HeaderFile=Princed V3.h
-ImplementationFile=Princed V3.cpp
-Filter=N
-LastObject=CPrincedV3App
-BaseClass=CWinApp
-VirtualFilter=AC
-
-[CLS:CPrincedV3Doc]
-Type=0
-HeaderFile=Princed V3Doc.h
-ImplementationFile=Princed V3Doc.cpp
-Filter=N
-LastObject=CPrincedV3Doc
-BaseClass=CDocument
-VirtualFilter=DC
-
-[CLS:CPrincedV3View]
-Type=0
-HeaderFile=Princed V3View.h
-ImplementationFile=Princed V3View.cpp
-Filter=C
-LastObject=CPrincedV3View
-BaseClass=CScrollView
-VirtualFilter=VWC
-
-
-[CLS:CMainFrame]
-Type=0
-HeaderFile=MainFrm.h
-ImplementationFile=MainFrm.cpp
-Filter=T
-LastObject=CMainFrame
-BaseClass=CMDIFrameWnd
-VirtualFilter=fWC
-
-
-[CLS:CChildFrame]
-Type=0
-HeaderFile=ChildFrm.h
-ImplementationFile=ChildFrm.cpp
-Filter=M
-LastObject=CChildFrame
-BaseClass=CMDIChildWnd
-VirtualFilter=mfWC
-
-
-[CLS:CAboutDlg]
-Type=0
-HeaderFile=Princed V3.cpp
-ImplementationFile=Princed V3.cpp
-Filter=D
-LastObject=CAboutDlg
-BaseClass=CMyDialog
-VirtualFilter=dWC
-
-[DLG:IDD_ABOUTBOX]
-Type=1
-ControlCount=4
-Control1=IDC_STATIC,static,1342177283
-Control2=IDC_STATIC,static,1342308352
-Control3=IDC_STATIC,static,1342308352
-Control4=IDOK,button,1342373889
-Class=CAboutDlg
-
-[MNU:IDR_MAINFRAME]
-Type=1
-Class=CMainFrame
-Command1=ID_FILE_NEW
-Command2=ID_FILE_OPEN
-Command3=ID_FILE_PRINT_SETUP
-Command4=ID_FILE_MRU_FILE1
-Command5=ID_APP_EXIT
-Command6=ID_VIEW_TOOLBAR
-Command7=ID_VIEW_STATUS_BAR
-CommandCount=8
-Command8=ID_APP_ABOUT
-
-[TB:IDR_MAINFRAME]
-Type=1
-Class=CMainFrame
-Command1=ID_FILE_NEW
-Command2=ID_FILE_OPEN
-Command3=ID_FILE_SAVE
-Command4=ID_EDIT_CUT
-Command5=ID_EDIT_COPY
-Command6=ID_EDIT_PASTE
-Command7=ID_FILE_PRINT
-CommandCount=8
-Command8=ID_APP_ABOUT
-
-[MNU:IDR_PRINCETYPE]
-Type=1
-Class=CPrincedV3View
-Command1=ID_FILE_NEW
-Command2=ID_FILE_OPEN
-Command3=ID_FILE_CLOSE
-Command4=ID_FILE_SAVE
-Command5=ID_FILE_SAVE_AS
-Command6=ID_FILE_PRINT
-Command7=ID_FILE_PRINT_PREVIEW
-Command8=ID_FILE_PRINT_SETUP
-Command9=ID_FILE_MRU_FILE1
-Command10=ID_APP_EXIT
-Command11=ID_EDIT_UNDO
-Command12=ID_EDIT_CUT
-Command13=ID_EDIT_COPY
-Command14=ID_EDIT_PASTE
-CommandCount=21
-Command15=ID_VIEW_TOOLBAR
-Command16=ID_VIEW_STATUS_BAR
-Command17=ID_WINDOW_NEW
-Command18=ID_WINDOW_CASCADE
-Command19=ID_WINDOW_TILE_HORZ
-Command20=ID_WINDOW_ARRANGE
-Command21=ID_APP_ABOUT
-
-[ACL:IDR_MAINFRAME]
-Type=1
-Class=CMainFrame
-Command1=ID_FILE_NEW
-Command2=ID_FILE_OPEN
-Command3=ID_FILE_SAVE
-Command4=ID_FILE_PRINT
-Command5=ID_EDIT_UNDO
-Command6=ID_EDIT_CUT
-Command7=ID_EDIT_COPY
-Command8=ID_EDIT_PASTE
-Command9=ID_EDIT_UNDO
-Command10=ID_EDIT_CUT
-Command11=ID_EDIT_COPY
-Command12=ID_EDIT_PASTE
-CommandCount=14
-Command13=ID_NEXT_PANE
-Command14=ID_PREV_PANE
-
-
-[MNU:IDR_MAINFRAME (English (U.S.))]
-Type=1
-Class=?
-Command1=ID_FILE_NEW
-Command2=ID_FILE_OPEN
-Command3=ID_FILE_CLOSE
-Command4=ID_FILE_SAVE
-Command5=ID_FILE_SAVE_AS
-Command6=ID_FILE_SAVEALL
-Command7=ID_FILE_COMPILEDAT
-Command8=ID_FILE_UNCOMPILEDAT
-Command9=ID_FILE_PUBLISHDAT
-Command10=ID_FILE_EXPORTTOIMAGE
-Command11=ID_FILE_EXPORTTOTEXT
-Command12=ID_FILE_EXPORTTOHTML
-Command13=ID_FILE_SEARCHFILES
-Command14=ID_FILE_PREFERENCES
-Command15=ID_FILE_MRU_FILE1
-Command16=ID_APP_EXIT
-Command17=ID_VIEW_TOOLBAR
-Command18=ID_VIEW_STATUS_BAR
-Command19=ID_VIEW_MAPTOOLS
-Command20=ID_VIEW_TOOLOPTIONSWINDOW
-Command21=ID_VIEW_LEVELPROPERTRIES
-Command22=ID_VIEW_OPENLEVELS
-Command23=ID_VIEW_READERSCREENMENU
-Command24=ID_VIEW_TOGGLEGRID
-Command25=ID_VIEW_TOGGLERULERS
-Command26=ID_VIEW_IN
-Command27=ID_VIEW_ZOOM_OUT
-Command28=ID_VIEW_ZOOM_FITSCREENTOWINDOW
-Command29=ID_VIEW_ZOOM_200
-Command30=ID_VIEW_ZOOM_100
-Command31=ID_VIEW_ZOOM_50
-Command32=ID_VIEW_ZOOM_25
-Command33=ID_VIEW_ZOOM_FITLEVELTOWINDOW
-Command34=ID_DEBUG_RUNLEVELFROMDEGUBPOSITION
-Command35=ID_DEBUG_RUNLEVELFROMSTARTPOSITION
-Command36=ID_DEBUG_REFRESHRUNNINGLEVE
-Command37=ID_DEBUG_RUNDATFILE
-Command38=ID_DEBUG_STOPRUNNING
-Command39=ID_DEBUG_EXECUTEPRINCEOFPERSIA
-Command40=ID_ADDONS_EDITHALLOFFAME
-Command41=ID_ADDONS_EDITSAVEDGAME
-Command42=ID_ADDONS_EDITGRAPHICS
-Command43=ID_ADDONS_EDITPRINCEEXE
-Command44=ID_HELP_HELPTOPICS
-Command45=ID_HELP_INDEX
-Command46=ID_HELP_LICENSE
-Command47=ID_HELP_FREQUENTLYASKEDQUESTIONS
-Command48=ID_HELP_PRINCEDHOMEPAGE
-Command49=ID_APP_ABOUT
-CommandCount=49
-
-[MNU:IDR_PRINCETYPE (English (U.S.))]
-Type=1
-Class=CPrincedV3View
-Command1=ID_FILE_NEW
-Command2=ID_FILE_OPEN
-Command3=ID_FILE_CLOSE
-Command4=ID_FILE_SAVE
-Command5=ID_FILE_SAVE_AS
-Command6=ID_FILE_SAVEALL
-Command7=ID_FILE_COMPILEDAT
-Command8=ID_FILE_UNCOMPILEDAT
-Command9=ID_FILE_PUBLISHDAT
-Command10=ID_FILE_EXPORTTOIMAGE
-Command11=ID_FILE_EXPORTTOTEXT
-Command12=ID_FILE_EXPORTTOHTML
-Command13=ID_FILE_SEARCHFILES
-Command14=ID_FILE_PREFERENCES
-Command15=ID_FILE_MRU_FILE1
-Command16=ID_APP_EXIT
-Command17=ID_EDIT_UNDO
-Command18=ID_EDIT_REDO
-Command19=ID_EDIT_CUT
-Command20=ID_EDIT_COPY
-Command21=ID_EDIT_PASTE
-Command22=ID_EDIT_CLEARSELECTION
-Command23=ID_VIEW_TOOLBAR
-Command24=ID_VIEW_STATUS_BAR
-Command25=ID_VIEW_MAPTOOLS
-Command26=ID_VIEW_TOOLOPTIONSWINDOW
-Command27=ID_VIEW_LEVELPROPERTRIES
-Command28=ID_VIEW_OPENLEVELS
-Command29=ID_VIEW_READERSCREENMENU
-Command30=ID_VIEW_ASPALACE
-Command31=ID_VIEW_ASDUNGEON
-Command32=ID_VIEW_TOGGLEGRID
-Command33=ID_VIEW_TOGGLERULERS
-Command34=ID_VIEW_ZOOM_IN
-Command35=ID_VIEW_ZOOM_OUT
-Command36=ID_VIEW_ZOOM_FITSCREENTOWINDOW
-Command37=ID_VIEW_ZOOM_200
-Command38=ID_VIEW_ZOOM_100
-Command39=ID_VIEW_ZOOM_50
-Command40=ID_VIEW_ZOOM_25
-Command41=ID_VIEW_ZOOM_FITLEVELTOWINDOW
-Command42=ID_MAPTOOLS_WALL
-Command43=ID_MAPTOOLS_CLEAR
-Command44=ID_MAPTOOLS_OBJECTS_POSSION
-Command45=ID_MAPTOOLS_WALKABLE_BALDOZACONESQUELETO
-Command46=ID_MAPTOOLS_SWORD
-Command47=ID_MAPTOOLS_OBJECTS_STARTPOSITION
-Command48=ID_MAPTOOLS_OBJECTS_DEBUGPOSITION
-Command49=ID_MAPTOOLS_OBJECTS_GUARDS
-Command50=ID_MAPTOOLS_BACKGROUND_LIGHT
-Command51=ID_MAPTOOLS_BACKGROUND_BRICKS
-Command52=ID_MAPTOOLS_BACKGROUND_WINDOW
-Command53=ID_MAPTOOLS_BACKGROUND_BIGWINDOW
-Command54=ID_MAPTOOLS_BACKGROUND_COLUMN
-Command55=ID_MAPTOOLS_BACKGROUND_BIGCOLUMN
-Command56=ID_MAPTOOLS_BACKGROUND_RANDOM
-Command57=ID_MAPTOOLS_WALKABLE_NORMAL
-Command58=ID_MAPTOOLS_WALKABLE_BALDOZAROTA
-Command59=ID_MAPTOOLS_WALKABLE_BALDOZAFLOJA
-Command60=ID_MAPTOOLS_WALKABLE_BALDOZAAPRETABLE
-Command61=ID_MAPTOOLS_WALKABLE_DOORCLOSER
-Command62=ID_MAPTOOLS_WALKABLE_PINCHES
-Command63=ID_MAPTOOLS_WALKABLE_RANDOM
-Command64=ID_MAPTOOLS_GATES_DOOR
-Command65=ID_MAPTOOLS_GATES_PUERTASIERRA
-Command66=ID_MAPTOOLS_GATES_LEVELGATE
-Command67=ID_MAPTOOLS_ARRASTRAR
-Command68=ID_MAPTOOLS_SELECT
-Command69=ID_MAPTOOLS_ZOOM
-Command70=ID_MAPTOOLS_DROPPER
-Command71=ID_DEBUG_RUNLEVELFROMDEGUBPOSITION
-Command72=ID_DEBUG_RUNLEVELFROMSTARTPOSITION
-Command73=ID_DEBUG_REFRESHRUNNINGLEVE
-Command74=ID_DEBUG_RUNDATFILE
-Command75=ID_DEBUG_STOPRUNNING
-Command76=ID_DEBUG_EXECUTEPRINCEOFPERSIA
-Command77=ID_ADDONS_EDITHALLOFFAME
-Command78=ID_ADDONS_EDITSAVEDGAME
-Command79=ID_ADDONS_EDITGRAPHICS
-Command80=ID_ADDONS_EDITPRINCEEXE
-Command81=ID_WINDOW_FITTOLEVEL
-Command82=ID_WINDOW_TILE_HORZ
-Command83=ID_WINDOW_TILE_VERT
-Command84=ID_WINDOW_CASCADE
-Command85=ID_WINDOW_ARRANGE
-Command86=ID_WINDOW_CLOSEALL
-Command87=ID_HELP_HELPTOPICS
-Command88=ID_HELP_INDEX
-Command89=ID_HELP_LICENSE
-Command90=ID_HELP_FREQUENTLYASKEDQUESTIONS
-Command91=ID_HELP_PRINCEDHOMEPAGE
-Command92=ID_APP_ABOUT
-CommandCount=92
-
-[TB:IDR_MAINFRAME (English (U.S.))]
-Type=1
-Class=?
-Command1=ID_FILE_NEW
-Command2=ID_FILE_OPEN
-Command3=ID_FILE_SAVE
-Command4=ID_EDIT_CUT
-Command5=ID_EDIT_COPY
-Command6=ID_EDIT_PASTE
-Command7=ID_FILE_PRINT
-Command8=ID_APP_ABOUT
-CommandCount=8
-
-[ACL:IDR_MAINFRAME (English (U.S.))]
-Type=1
-Class=?
-Command1=ID_ADDONS_EDITHALLOFFAME
-Command2=ID_ADDONS_EDITSAVEDGAME
-Command3=ID_ADDONS_EDITGRAPHICS
-Command4=ID_ADDONS_EDITPRINCEEXE
-Command5=ID_VIEW_STATUS_BAR
-Command6=ID_DEBUG_REFRESHRUNNINGLEVE
-Command7=ID_MAPTOOLS_WALKABLE_BALDOZAROTA
-Command8=ID_MAPTOOLS_BACKGROUND_RANDOM
-Command9=ID_MAPTOOLS_BACKGROUND_BRICKS
-Command10=ID_MAPTOOLS_WALKABLE_DOORCLOSER
-Command11=ID_EDIT_COPY
-Command12=ID_MAPTOOLS_BACKGROUND_BIGCOLUMN
-Command13=ID_MAPTOOLS_BACKGROUND_COLUMN
-Command14=ID_MAPTOOLS_GATES_DOOR
-Command15=ID_FILE_COMPILEDAT
-Command16=ID_MAPTOOLS_DROPPER
-Command17=ID_ADDONS_EDITPRINCEEXE
-Command18=ID_MAPTOOLS_WALKABLE_NORMAL
-Command19=ID_FILE_SEARCHFILES
-Command20=ID_ADDONS_EDITHALLOFFAME
-Command21=ID_MAPTOOLS_OBJECTS_GUARDS
-Command22=ID_VIEW_TOGGLEGRID
-Command23=ID_MAPTOOLS_GATES_PUERTASIERRA
-Command24=ID_FILE_EXPORTTOHTML
-Command25=ID_MAPTOOLS_ARRASTRAR
-Command26=ID_MAPTOOLS_BACKGROUND_BIGWINDOW
-Command27=ID_MAPTOOLS_OBJECTS_DEBUGPOSITION
-Command28=ID_FILE_EXPORTTOIMAGE
-Command29=ID_MAPTOOLS_BACKGROUND_WINDOW
-Command30=ID_MAPTOOLS_WALKABLE_BALDOZACONESQUELETO
-Command31=ID_ADDONS_EDITGRAPHICS
-Command32=ID_MAPTOOLS_WALKABLE_BALDOZAFLOJA
-Command33=ID_VIEW_OPENLEVELS
-Command34=ID_VIEW_TOOLOPTIONSWINDOW
-Command35=ID_MAPTOOLS_OBJECTS_STARTPOSITION
-Command36=ID_FILE_NEW
-Command37=ID_MAPTOOLS_WALKABLE_BALDOZAAPRETABLE
-Command38=ID_FILE_OPEN
-Command39=ID_MAPTOOLS_OBJECTS_POSSION
-Command40=ID_FILE_PUBLISHDAT
-Command41=ID_MAPTOOLS_WALKABLE_RANDOM
-Command42=ID_APP_EXIT
-Command43=ID_MAPTOOLS_SWORD
-Command44=ID_VIEW_TOGGLERULERS
-Command45=ID_MAPTOOLS_CLEAR
-Command46=ID_FILE_SAVE
-Command47=ID_MAPTOOLS_SELECT
-Command48=ID_MAPTOOLS_WALKABLE_PINCHES
-Command49=ID_MAPTOOLS_GATES_LEVELGATE
-Command50=ID_FILE_EXPORTTOTEXT
-Command51=ID_VIEW_TOOLBAR
-Command52=ID_MAPTOOLS_BACKGROUND_LIGHT
-Command53=ID_FILE_UNCOMPILEDAT
-Command54=ID_EDIT_PASTE
-Command55=ID_VIEW_ZOOM_IN
-Command56=ID_EDIT_UNDO
-Command57=ID_EDIT_CLEARSELECTION
-Command58=ID_EDIT_CUT
-Command59=ID_VIEW_ZOOM_FITSCREENTOWINDOW
-Command60=ID_HELP_HELPTOPICS
-Command61=ID_HELP_INDEX
-Command62=ID_HELP_PRINCEDHOMEPAGE
-Command63=ID_DEBUG_EXECUTEPRINCEOFPERSIA
-Command64=ID_VIEW_LEVELPROPERTRIES
-Command65=ID_WINDOW_CLOSEALL
-Command66=ID_DEBUG_RUNLEVELFROMDEGUBPOSITION
-Command67=ID_DEBUG_RUNLEVELFROMSTARTPOSITION
-Command68=ID_NEXT_PANE
-Command69=ID_WINDOW_FITTOLEVEL
-Command70=ID_PREV_PANE
-Command71=ID_FILE_PREFERENCES
-Command72=ID_DEBUG_RUNDATFILE
-Command73=ID_DEBUG_STOPRUNNING
-Command74=ID_EDIT_COPY
-Command75=ID_EDIT_PASTE
-Command76=ID_VIEW_ZOOM_FITLEVELTOWINDOW
-Command77=ID_VIEW_ZOOM_OUT
-Command78=ID_MAPTOOLS_WALL
-Command79=ID_EDIT_CUT
-Command80=ID_EDIT_REDO
-Command81=ID_EDIT_UNDO
-Command82=ID_MAPTOOLS_ZOOM
-CommandCount=82
-
-[DLG:IDD_ABOUTBOX (English (U.S.))]
-Type=1
-Class=CAboutDlg
-ControlCount=7
-Control1=IDC_STATIC,static,1342177294
-Control2=IDC_STATIC,static,1342308480
-Control3=IDC_STATIC,static,1342308352
-Control4=IDOK,button,1342373889
-Control5=IDC_STATIC,static,1342308352
-Control6=IDC_STATIC,static,1342308352
-Control7=IDC_EDIT2,edit,1352730628
-
-[DLG:IDD_DIALOG_SELECT_LEVEL (English (U.S.))]
-Type=1
-Class=cSelectLevelWindow
-ControlCount=4
-Control1=IDOK,button,1342242817
-Control2=IDCANCEL,button,1342242816
-Control3=IDC_COMBO1,combobox,1344340226
-Control4=IDC_STATIC,static,1342308352
-
-[CLS:cSelectLevelWindow]
-Type=0
-HeaderFile=cSelectLevelWindow.h
-ImplementationFile=cSelectLevelWindow.cpp
-BaseClass=CDialog
-Filter=D
-LastObject=cSelectLevelWindow
-VirtualFilter=dWC
-
-[DLG:IDD_EDIT_SAV]
-Type=1
-Class=?
-ControlCount=10
-Control1=IDCANCEL,button,1342242816
-Control2=IDC_STATIC,static,1342308352
-Control3=IDC_EDIT1,edit,1350631552
-Control4=IDC_BROWSE,button,1342242816
-Control5=IDC_STATIC,static,1342177296
-Control6=IDC_OPEN,button,1342242816
-Control7=IDC_SAVE,button,1342242816
-Control8=IDC_STATIC,static,1342308352
-Control9=IDC_LEVEL,edit,1350631552
-Control10=IDC_SPIN1,msctls_updown32,1342177312
-
-[TB:IDR_TOOLPAL (English (U.S.))]
-Type=1
-Class=?
-Command1=ID_TOOL_SELECTION
-Command2=ID_BUTTON32903
-Command3=ID_BUTTON32904
-CommandCount=3
-
-[DLG:IDD_EDIT_SAV (English (U.S.))]
-Type=1
-Class=?
-ControlCount=15
-Control1=IDCANCEL,button,1342242816
-Control2=IDC_STATIC,static,1342308352
-Control3=IDC_EDIT1,edit,1350631552
-Control4=IDC_BROWSE,button,1342242816
-Control5=IDC_STATIC,static,1342177296
-Control6=IDC_OPEN,button,1342242816
-Control7=IDC_SAVE,button,1342242816
-Control8=IDC_STATIC,static,1342308352
-Control9=IDC_COMBO1,combobox,1344340226
-Control10=IDC_STATIC,static,1342308352
-Control11=IDC_EDIT2,edit,1350631552
-Control12=IDC_SPIN1,msctls_updown32,1342177312
-Control13=IDC_STATIC,static,1342308352
-Control14=IDC_BUTTON1,button,1342242816
-Control15=IDC_EDIT3,edit,1350631552
-
-[DLG:IDD_DIALOG1]
-Type=1
-Class=?
-ControlCount=5
-Control1=IDC_BUTTON1,button,1342177280
-Control2=IDC_BUTTON2,button,1342177280
-Control3=IDC_BUTTON3,button,1342177280
-Control4=IDC_STATIC,button,1342177287
-Control5=IDC_BUTTON4,button,1342177280
-
diff --git a/pv3/Princed V3.cpp b/pv3/Princed V3.cpp
deleted file mode 100644
index b79a9e3..0000000
--- a/pv3/Princed V3.cpp	
+++ /dev/null
@@ -1,207 +0,0 @@
-// Princed V3.cpp : Defines the class behaviors for the application.
-//
-
-#include "stdafx.h"
-#include "Princed V3.h"
-
-#include "MainFrm.h"
-#include "ChildFrm.h"
-#include "maps.h"
-#include "Princed V3Doc.h"
-#include "Princed V3View.h"
-
-#ifdef _DEBUG
-#define new DEBUG_NEW
-#undef THIS_FILE
-static char THIS_FILE[] = __FILE__;
-#endif
-
-/////////////////////////////////////////////////////////////////////////////
-// CPrincedV3App
-
-BEGIN_MESSAGE_MAP(CPrincedV3App, CWinApp)
-	//{{AFX_MSG_MAP(CPrincedV3App)
-	ON_COMMAND(ID_APP_ABOUT, OnAppAbout)
-	ON_COMMAND(ID_FILE_EXPORTTOIMAGE, OnFileExporttoimage)
-	ON_COMMAND(ID_HELP_PRINCEDHOMEPAGE, OnHelpPrincedhomepage)
-	ON_COMMAND(ID_ADDONS_EDITSAVEDGAME, OnAddonsEditsavedgame)
-	//}}AFX_MSG_MAP
-	// Standard file based document commands
-	ON_COMMAND(ID_FILE_NEW, CWinApp::OnFileNew)
-	ON_COMMAND(ID_FILE_OPEN, CWinApp::OnFileOpen)
-	// Standard print setup command
-	//ON_COMMAND(ID_FILE_PRINT_SETUP, CWinApp::OnFilePrintSetup)
-END_MESSAGE_MAP()
-
-/////////////////////////////////////////////////////////////////////////////
-// CPrincedV3App construction
-
-CPrincedV3App::CPrincedV3App()
-{
-	// TODO: add construction code here,
-	// Place all significant initialization in InitInstance
-}
-
-/////////////////////////////////////////////////////////////////////////////
-// The one and only CPrincedV3App object
-
-CPrincedV3App theApp;
-
-/////////////////////////////////////////////////////////////////////////////
-// CPrincedV3App initialization
-
-BOOL CPrincedV3App::InitInstance()
-{
-	if (!AfxSocketInit()) {
-		AfxMessageBox(IDP_SOCKETS_INIT_FAILED);
-		return FALSE;
-	}
-	AfxEnableControlContainer();
-
-	// Standard initialization
-	// If you are not using these features and wish to reduce the size
-	//  of your final executable, you should remove from the following
-	//  the specific initialization routines you do not need.
-
-#ifdef _AFXDLL
-	Enable3dControls();			// Call this when using MFC in a shared DLL
-#else
-	Enable3dControlsStatic();	// Call this when linking to MFC statically
-#endif
-
-	// Change the registry key under which our settings are stored.
-	// TODO: You should modify this string to be something appropriate
-	// such as the name of your company or organization.
-	SetRegistryKey(_T("Princed Development Team-Princed V3"));
-	LoadStdProfileSettings(6);  // Load standard INI file options (including MRU)
-
-	// Register the application's document templates.  Document templates
-	//  serve as the connection between documents, frame windows and views.
-
-	CMultiDocTemplate* pDocTemplate;
-	pDocTemplate = new CMultiDocTemplate(
-		IDR_PRINCETYPE,
-		RUNTIME_CLASS(CPrincedV3Doc),
-		RUNTIME_CLASS(CChildFrame), // custom MDI child frame
-		RUNTIME_CLASS(CPrincedV3View));
-	AddDocTemplate(pDocTemplate);
-
-	// create main MDI Frame window
-	CMainFrame* pMainFrame = new CMainFrame;
-	if (!pMainFrame->LoadFrame(IDR_MAINFRAME)) return FALSE;
-	m_pMainWnd = pMainFrame;
-
-	// Parse command line for standard shell commands, DDE, file open
-	CCommandLineInfo cmdInfo; ParseCommandLine(cmdInfo);
-
-	// Dispatch commands specified on the command line
-	if(!ProcessShellCommand(cmdInfo)) return FALSE;
-
-	// The main window has been initialized, so show and update it.
-	pMainFrame->ShowWindow(m_nCmdShow); pMainFrame->UpdateWindow();
-
-	return TRUE;
-}
-
-
-/////////////////////////////////////////////////////////////////////////////
-// CAboutDlg dialog used for App About
-
-#include "MyDialog.h"
-class CAboutDlg : public CMyDialog
-{
-public:
-	CAboutDlg();
-
-// Dialog Data
-	//{{AFX_DATA(CAboutDlg)
-	enum { IDD = IDD_ABOUTBOX };
-	//}}AFX_DATA
-
-	// ClassWizard generated virtual function overrides
-	//{{AFX_VIRTUAL(CAboutDlg)
-	protected:
-	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
-	//}}AFX_VIRTUAL
-
-// Implementation
-protected:
-	//{{AFX_MSG(CAboutDlg)
-	virtual BOOL OnInitDialog();
-	//}}AFX_MSG
-	DECLARE_MESSAGE_MAP()
-};
-
-CAboutDlg::CAboutDlg() : CMyDialog(CAboutDlg::IDD)
-{
-	//{{AFX_DATA_INIT(CAboutDlg)
-	//}}AFX_DATA_INIT
-}
-
-void CAboutDlg::DoDataExchange(CDataExchange* pDX)
-{
-	CMyDialog::DoDataExchange(pDX);
-	//{{AFX_DATA_MAP(CAboutDlg)
-	//}}AFX_DATA_MAP
-}
-
-BEGIN_MESSAGE_MAP(CAboutDlg, CMyDialog)
-	//{{AFX_MSG_MAP(CAboutDlg)
-	//}}AFX_MSG_MAP
-END_MESSAGE_MAP()
-
-// App command to run the dialog
-void CPrincedV3App::OnAppAbout()
-{
-	CAboutDlg aboutDlg;aboutDlg.DoModal();
-}
-
-/////////////////////////////////////////////////////////////////////////////
-// CPrincedV3App message handlers
-
-
-void CPrincedV3App::OnFileExporttoimage() 
-{
-	// TODO: Add your command handler code here
-	/*
-	cConfig c;
-	char* valor;
-	c.getSetting("pop1 path",valor);
-	msgBox(valor);
-	*/
-}
-
-void msgBox(char *text) {
- AfxMessageBox(_T(text),MB_OK,MB_ICONINFORMATION);
-}
-
-//Open Princed's official homepage
-void CPrincedV3App::OnHelpPrincedhomepage() 
-{
-	CWaitCursor cur; CString hp; hp.LoadString(IDS_PRINCED_HOMEPAGE);
-	::ShellExecute(*AfxGetMainWnd(), _T("open"), hp, NULL, NULL, SW_SHOW);
-}
-
-BOOL CPrincedV3App::OnIdle(LONG lCount) 
-{
-	CPrincedV3View *pView=DYNAMIC_DOWNCAST(CPrincedV3View, CWnd::GetFocus());
-	if(pView) return pView->HandleKey(); else return CWinApp::OnIdle(lCount);
-}
-
-void CPrincedV3App::OnAddonsEditsavedgame() 
-{
-	CDialog dlg(IDD_EDIT_SAV); dlg.DoModal();
-}
-
-BOOL CAboutDlg::OnInitDialog() 
-{
-	CMyDialog::OnInitDialog();
-	
-	// TODO: Add extra initialization here
-	//void SetWindowText( LPCTSTR lpszString );
-
-
-
-	return TRUE;  // return TRUE unless you set the focus to a control
-	              // EXCEPTION: OCX Property Pages should return FALSE
-}
diff --git a/pv3/Princed V3.dsp b/pv3/Princed V3.dsp
deleted file mode 100644
index 9cdfd5f..0000000
--- a/pv3/Princed V3.dsp	
+++ /dev/null
@@ -1,294 +0,0 @@
-# Microsoft Developer Studio Project File - Name="Princed V3" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Application" 0x0101
-
-CFG=Princed V3 - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE 
-!MESSAGE NMAKE /f "Princed V3.mak".
-!MESSAGE 
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE 
-!MESSAGE NMAKE /f "Princed V3.mak" CFG="Princed V3 - Win32 Debug"
-!MESSAGE 
-!MESSAGE Possible choices for configuration are:
-!MESSAGE 
-!MESSAGE "Princed V3 - Win32 Release" (based on "Win32 (x86) Application")
-!MESSAGE "Princed V3 - Win32 Debug" (based on "Win32 (x86) Application")
-!MESSAGE 
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-MTL=midl.exe
-RSC=rc.exe
-
-!IF  "$(CFG)" == "Princed V3 - Win32 Release"
-
-# PROP BASE Use_MFC 6
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 6
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c
-# ADD CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /FD /c
-# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-# ADD BASE RSC /l 0x2c0a /d "NDEBUG" /d "_AFXDLL"
-# ADD RSC /l 0x2c0a /d "NDEBUG" /d "_AFXDLL"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386
-# ADD LINK32 /nologo /subsystem:windows /machine:I386
-
-!ELSEIF  "$(CFG)" == "Princed V3 - Win32 Debug"
-
-# PROP BASE Use_MFC 6
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 6
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /GZ /c
-# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /FR /Yu"stdafx.h" /FD /GZ /c
-# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
-# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
-# ADD BASE RSC /l 0x2c0a /d "_DEBUG" /d "_AFXDLL"
-# ADD RSC /l 0x2c0a /d "_DEBUG" /d "_AFXDLL"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
-
-!ENDIF 
-
-# Begin Target
-
-# Name "Princed V3 - Win32 Release"
-# Name "Princed V3 - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=.\ChildFrm.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\conf.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\cSelectLevelWindow.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\MainFrm.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\maps.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\MyDialog.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=".\Princed V3.cpp"
-# End Source File
-# Begin Source File
-
-SOURCE=".\Princed V3.rc"
-# End Source File
-# Begin Source File
-
-SOURCE=".\Princed V3Doc.cpp"
-# End Source File
-# Begin Source File
-
-SOURCE=".\Princed V3View.cpp"
-# End Source File
-# Begin Source File
-
-SOURCE=.\process.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\RegisterWIN32.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\StdAfx.cpp
-# ADD CPP /Yc"stdafx.h"
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# Begin Source File
-
-SOURCE=.\ChildFrm.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\cSelectLevelWindow.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\MainFrm.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\maps.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\MyDialog.h
-# End Source File
-# Begin Source File
-
-SOURCE=".\Princed V3.h"
-# End Source File
-# Begin Source File
-
-SOURCE=".\Princed V3Doc.h"
-# End Source File
-# Begin Source File
-
-SOURCE=".\Princed V3View.h"
-# End Source File
-# Begin Source File
-
-SOURCE=.\RegisterWIN32.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Resource.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\StdAfx.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\structures.h
-# End Source File
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# Begin Source File
-
-SOURCE=.\res\32x32.ped.ico
-# End Source File
-# Begin Source File
-
-SOURCE=.\res\about_pi.bmp
-# End Source File
-# Begin Source File
-
-SOURCE=.\res\backmask.bmp
-# End Source File
-# Begin Source File
-
-SOURCE=.\res\backs.bmp
-# End Source File
-# Begin Source File
-
-SOURCE=.\res\bitmap1.bmp
-# End Source File
-# Begin Source File
-
-SOURCE=.\res\dropper.cur
-# End Source File
-# Begin Source File
-
-SOURCE=.\res\elemmask.bmp
-# End Source File
-# Begin Source File
-
-SOURCE=.\res\elemp.bmp
-# End Source File
-# Begin Source File
-
-SOURCE=.\res\elempmask.bmp
-# End Source File
-# Begin Source File
-
-SOURCE=.\res\elems.bmp
-# End Source File
-# Begin Source File
-
-SOURCE=.\res\guard.bmp
-# End Source File
-# Begin Source File
-
-SOURCE=.\res\guardmask.bmp
-# End Source File
-# Begin Source File
-
-SOURCE=.\res\hand.cur
-# End Source File
-# Begin Source File
-
-SOURCE=.\res\palette.bmp
-# End Source File
-# Begin Source File
-
-SOURCE=".\res\Princed V3.ico"
-# End Source File
-# Begin Source File
-
-SOURCE=".\res\Princed V3.rc2"
-# End Source File
-# Begin Source File
-
-SOURCE=".\res\Princed V3Doc.ico"
-# End Source File
-# Begin Source File
-
-SOURCE="..\..\..\..\..\kkx\princed\menu\princed3\icons & cursors\princed.ico"
-# End Source File
-# Begin Source File
-
-SOURCE=.\res\princed.ico
-# End Source File
-# Begin Source File
-
-SOURCE=.\res\Toolbar.bmp
-# End Source File
-# Begin Source File
-
-SOURCE=.\res\zoomer.cur
-# End Source File
-# End Group
-# Begin Source File
-
-SOURCE=.\res\manifest.txt
-# End Source File
-# Begin Source File
-
-SOURCE=.\ReadMe.txt
-# End Source File
-# End Target
-# End Project
diff --git a/pv3/Princed V3.dsw b/pv3/Princed V3.dsw
deleted file mode 100644
index 73f42ce..0000000
--- a/pv3/Princed V3.dsw	
+++ /dev/null
@@ -1,29 +0,0 @@
-Microsoft Developer Studio Workspace File, Format Version 6.00
-# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
-
-###############################################################################
-
-Project: "Princed V3"=".\Princed V3.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Global:
-
-Package=<5>
-{{{
-}}}
-
-Package=<3>
-{{{
-}}}
-
-###############################################################################
-
diff --git a/pv3/Princed V3.h b/pv3/Princed V3.h
deleted file mode 100644
index a65228a..0000000
--- a/pv3/Princed V3.h	
+++ /dev/null
@@ -1,55 +0,0 @@
-// Princed V3.h : main header file for the PRINCED V3 application
-//
-
-#if !defined(AFX_PRINCEDV3_H__B98D1585_6AA8_11D7_8A8E_00104B7CC0FF__INCLUDED_)
-#define AFX_PRINCEDV3_H__B98D1585_6AA8_11D7_8A8E_00104B7CC0FF__INCLUDED_
-
-#if _MSC_VER > 1000
-#pragma once
-#endif // _MSC_VER > 1000
-
-#ifndef __AFXWIN_H__
-	#error include 'stdafx.h' before including this file for PCH
-#endif
-
-#include "resource.h"       // main symbols
-
-/////////////////////////////////////////////////////////////////////////////
-// CPrincedV3App:
-// See Princed V3.cpp for the implementation of this class
-//
-
-class CPrincedV3App : public CWinApp
-{
-public:
-	CPrincedV3App();
-
-// Overrides
-	// ClassWizard generated virtual function overrides
-	//{{AFX_VIRTUAL(CPrincedV3App)
-	public:
-	virtual BOOL InitInstance();
-	virtual BOOL OnIdle(LONG lCount);
-	//}}AFX_VIRTUAL
-
-// Implementation
-	//{{AFX_MSG(CPrincedV3App)
-	afx_msg void OnAppAbout();
-	afx_msg void OnFileExporttoimage();
-	afx_msg void OnHelpPrincedhomepage();
-	afx_msg void OnAddonsEditsavedgame();
-	//}}AFX_MSG
-	DECLARE_MESSAGE_MAP()
-};
-
-void msgBox(char *text);
-
-/////////////////////////////////////////////////////////////////////////////
-
-//{{AFX_INSERT_LOCATION}}
-// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
-
-#endif // !defined(AFX_PRINCEDV3_H__B98D1585_6AA8_11D7_8A8E_00104B7CC0FF__INCLUDED_)
-
-
-
diff --git a/pv3/Princed V3.ncb b/pv3/Princed V3.ncb
deleted file mode 100644
index 954d053..0000000
--- a/pv3/Princed V3.ncb	
+++ /dev/null
@@ -1 +0,0 @@
-Microsoft C/C++ program database 2.00
diff --git a/pv3/Princed V3.opt b/pv3/Princed V3.opt
deleted file mode 100644
index 8266bd9..0000000
Binary files a/pv3/Princed V3.opt and /dev/null differ
diff --git a/pv3/Princed V3.rc b/pv3/Princed V3.rc
deleted file mode 100644
index 8d916a6..0000000
--- a/pv3/Princed V3.rc	
+++ /dev/null
@@ -1,885 +0,0 @@
-//Microsoft Developer Studio generated resource script.
-//
-#include "resource.h"
-
-#define APSTUDIO_READONLY_SYMBOLS
-/////////////////////////////////////////////////////////////////////////////
-//
-// Generated from the TEXTINCLUDE 2 resource.
-//
-#include "afxres.h"
-
-/////////////////////////////////////////////////////////////////////////////
-#undef APSTUDIO_READONLY_SYMBOLS
-
-/////////////////////////////////////////////////////////////////////////////
-// English (U.S.) resources
-
-#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
-#ifdef _WIN32
-LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
-#pragma code_page(1252)
-#endif //_WIN32
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Bitmap
-//
-
-IDB_ELEMMASK            BITMAP  DISCARDABLE     "res\\elemmask.bmp"
-IDB_ELEMS               BITMAP  DISCARDABLE     "res\\elems.bmp"
-IDB_GUARD               BITMAP  DISCARDABLE     "res\\guard.bmp"
-IDB_GUARDMASK           BITMAP  DISCARDABLE     "res\\guardmask.bmp"
-IDB_BACKMASK            BITMAP  DISCARDABLE     "res\\backmask.bmp"
-IDB_BACKS               BITMAP  DISCARDABLE     "res\\backs.bmp"
-IDB_ELEMPMASK           BITMAP  DISCARDABLE     "res\\elempmask.bmp"
-IDB_ELEMP               BITMAP  DISCARDABLE     "res\\elemp.bmp"
-IDR_MAINFRAME           BITMAP  MOVEABLE PURE   "res\\Toolbar.bmp"
-IDR_TOOLPAL             BITMAP  DISCARDABLE     "res\\palette.bmp"
-IDB_ABOUT_PIC           BITMAP  DISCARDABLE     "res\\about_pi.bmp"
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// 24
-//
-
-1                       24      DISCARDABLE     "res\\manifest.txt"
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Dialog
-//
-
-IDD_EDIT_SAV DIALOG DISCARDABLE  0, 0, 265, 127
-STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
-CAPTION "Edit Saved Game"
-FONT 8, "MS Sans Serif"
-BEGIN
-    PUSHBUTTON      "Close",IDCANCEL,219,102,39,12
-    LTEXT           "&File Name:",IDC_STATIC,7,15,34,8
-    EDITTEXT        IDC_EDIT1,64,13,194,12,ES_AUTOHSCROLL
-    PUSHBUTTON      "&Browse...",IDC_BROWSE,216,28,42,12
-    CONTROL         "",IDC_STATIC,"Static",SS_ETCHEDHORZ,7,45,251,1
-    PUSHBUTTON      "&Open",IDC_OPEN,114,28,42,12
-    PUSHBUTTON      "&Save",IDC_SAVE,166,28,40,12
-    LTEXT           "&Level:",IDC_STATIC,7,60,20,8
-    COMBOBOX        IDC_COMBO1,64,58,108,14,CBS_DROPDOWN | CBS_SORT | 
-                    WS_VSCROLL | WS_TABSTOP
-    LTEXT           "L&ives:",IDC_STATIC,7,80,21,8
-    EDITTEXT        IDC_EDIT2,64,78,96,13,ES_AUTOHSCROLL
-    CONTROL         "Spin1",IDC_SPIN1,"msctls_updown32",UDS_ARROWKEYS,160,78,
-                    12,13
-    LTEXT           "&Remining time:",IDC_STATIC,7,102,50,8
-    PUSHBUTTON      "&New",IDC_BUTTON1,64,28,41,12
-    EDITTEXT        IDC_EDIT3,63,103,108,12,ES_AUTOHSCROLL
-END
-
-IDD_ABOUTBOX DIALOGEX 0, 0, 262, 169
-STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
-CAPTION "About Princed V3"
-FONT 8, "MS Sans Serif"
-BEGIN
-    CONTROL         158,IDC_STATIC,"Static",SS_BITMAP,7,7,63,154,
-                    WS_EX_CLIENTEDGE
-    LTEXT           "Princed V3 Release 1",IDC_STATIC,75,7,119,8,SS_NOPREFIX
-    LTEXT           "Copyright (C) 2003 - Princed V3 Development Team",
-                    IDC_STATIC,75,17,180,8
-    DEFPUSHBUTTON   "OK",IDOK,205,147,50,14,WS_GROUP
-    LTEXT           "Some enhaced GUI elements are Copyright \xa9 1998 Kirk Stowell. This program is freeware, you may share and distribute it. However you must read and respect the program license provided in the package where you have installed this program.",
-                    IDC_STATIC,75,100,180,40
-    LTEXT           "Visit our homepage for newer versions:\r http://www.princed.com.ar",
-                    IDC_STATIC,75,82,128,16
-    EDITTEXT        IDC_EDIT2,75,28,180,49,ES_MULTILINE | ES_READONLY | 
-                    WS_VSCROLL
-END
-
-IDD_DIALOG_SELECT_LEVEL DIALOG DISCARDABLE  0, 0, 229, 57
-STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
-CAPTION "Select level"
-FONT 8, "MS Sans Serif"
-BEGIN
-    DEFPUSHBUTTON   "OK",IDOK,172,7,50,14
-    PUSHBUTTON      "Cancel",IDCANCEL,172,24,50,14
-    COMBOBOX        IDC_COMBO1,13,19,151,112,CBS_DROPDOWN | CBS_SORT | 
-                    WS_VSCROLL | WS_TABSTOP
-    LTEXT           "Select the number of the level you want to edit",
-                    IDC_STATIC,14,7,152,9
-END
-
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// DESIGNINFO
-//
-
-#ifdef APSTUDIO_INVOKED
-GUIDELINES DESIGNINFO DISCARDABLE 
-BEGIN
-    IDD_EDIT_SAV, DIALOG
-    BEGIN
-        LEFTMARGIN, 7
-        RIGHTMARGIN, 258
-        TOPMARGIN, 7
-        BOTTOMMARGIN, 120
-    END
-
-    IDD_ABOUTBOX, DIALOG
-    BEGIN
-        LEFTMARGIN, 7
-        RIGHTMARGIN, 255
-        TOPMARGIN, 7
-        BOTTOMMARGIN, 161
-    END
-
-    IDD_DIALOG_SELECT_LEVEL, DIALOG
-    BEGIN
-        LEFTMARGIN, 7
-        RIGHTMARGIN, 222
-        TOPMARGIN, 7
-        BOTTOMMARGIN, 50
-    END
-END
-#endif    // APSTUDIO_INVOKED
-
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Cursor
-//
-
-IDC_HANDPALM            CURSOR  DISCARDABLE     "res\\hand.cur"
-IDC_ZOOMTOOL            CURSOR  DISCARDABLE     "res\\zoomer.cur"
-IDC_DROPPER             CURSOR  DISCARDABLE     "res\\dropper.cur"
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Toolbar
-//
-
-IDR_MAINFRAME TOOLBAR DISCARDABLE  16, 15
-BEGIN
-    BUTTON      ID_FILE_NEW
-    BUTTON      ID_FILE_OPEN
-    BUTTON      ID_FILE_SAVE
-    SEPARATOR
-    BUTTON      ID_EDIT_CUT
-    BUTTON      ID_EDIT_COPY
-    BUTTON      ID_EDIT_PASTE
-    SEPARATOR
-    BUTTON      ID_FILE_PRINT
-    SEPARATOR
-    BUTTON      ID_APP_ABOUT
-END
-
-IDR_TOOLPAL TOOLBAR DISCARDABLE  24, 24
-BEGIN
-    BUTTON      ID_TOOL_SELECTION
-    SEPARATOR
-    BUTTON      ID_BUTTON32903
-    BUTTON      ID_BUTTON32904
-END
-
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Menu
-//
-
-IDR_MAINFRAME MENU PRELOAD DISCARDABLE 
-BEGIN
-    POPUP "&File"
-    BEGIN
-        MENUITEM "&New...\tCtrl+N",             ID_FILE_NEW
-        MENUITEM "&Open...\tCtrl+O",            ID_FILE_OPEN
-        MENUITEM "&Close",                      ID_FILE_CLOSE
-        MENUITEM "&Save\tCtrl+S",               ID_FILE_SAVE
-        MENUITEM "Save &As...",                 ID_FILE_SAVE_AS
-        MENUITEM "Save All",                    ID_FILE_SAVEALL
-        MENUITEM SEPARATOR
-        MENUITEM "Compile DAT...",              ID_FILE_COMPILEDAT
-        MENUITEM "Uncompile DAT...",            ID_FILE_UNCOMPILEDAT
-        MENUITEM "Publish DAT...",              ID_FILE_PUBLISHDAT
-        MENUITEM SEPARATOR
-        MENUITEM "Export to Image...",          ID_FILE_EXPORTTOIMAGE
-        MENUITEM "Export to Text...",           ID_FILE_EXPORTTOTEXT
-        MENUITEM "Export to HTML...",           ID_FILE_EXPORTTOHTML
-        MENUITEM SEPARATOR
-        MENUITEM "Search Files...",             ID_FILE_SEARCHFILES
-        MENUITEM "Preferences...",              ID_FILE_PREFERENCES
-        MENUITEM SEPARATOR
-        MENUITEM "Recent File",                 ID_FILE_MRU_FILE1, GRAYED
-        MENUITEM SEPARATOR
-        MENUITEM "E&xit",                       ID_APP_EXIT
-    END
-    POPUP "&View"
-    BEGIN
-        MENUITEM "Main &Toolbar",               ID_VIEW_TOOLBAR
-        MENUITEM "&Status Bar",                 ID_VIEW_STATUS_BAR
-        MENUITEM "Map Tools",                   ID_VIEW_MAPTOOLS
-        MENUITEM "Tool Options Window",         ID_VIEW_TOOLOPTIONSWINDOW
-        MENUITEM "Level Properties...",         ID_VIEW_LEVELPROPERTRIES
-        MENUITEM "Open Levels",                 ID_VIEW_OPENLEVELS
-        MENUITEM "Screen reader menu",          ID_VIEW_READERSCREENMENU
-        MENUITEM SEPARATOR
-        MENUITEM "Toggle Grid",                 ID_VIEW_TOGGLEGRID
-        MENUITEM "Toggle &Rulers",              ID_VIEW_TOGGLERULERS
-        MENUITEM SEPARATOR
-        POPUP "Zoom"
-        BEGIN
-            MENUITEM "In\t+",                       ID_VIEW_IN
-            MENUITEM "Out\t-",                      ID_VIEW_ZOOM_OUT
-            MENUITEM SEPARATOR
-            MENUITEM "Fit screen to window",        ID_VIEW_ZOOM_FITSCREENTOWINDOW
-
-            MENUITEM "200%",                        ID_VIEW_ZOOM_200
-            MENUITEM "100%",                        ID_VIEW_ZOOM_100
-            MENUITEM "50%",                         ID_VIEW_ZOOM_50
-            MENUITEM "25%",                         ID_VIEW_ZOOM_25
-            MENUITEM "Fit level to window",         ID_VIEW_ZOOM_FITLEVELTOWINDOW
-
-        END
-    END
-    POPUP "Debug"
-    BEGIN
-        MENUITEM "Run level from &degub position", 
-                                                ID_DEBUG_RUNLEVELFROMDEGUBPOSITION
-
-        MENUITEM "Run level from &start position", 
-                                                ID_DEBUG_RUNLEVELFROMSTARTPOSITION
-
-        MENUITEM "&Refresh running level",      ID_DEBUG_REFRESHRUNNINGLEVE
-        MENUITEM "Run DAT &file...",            ID_DEBUG_RUNDATFILE
-        MENUITEM "S&top running",               ID_DEBUG_STOPRUNNING
-        MENUITEM SEPARATOR
-        MENUITEM "Execute &Prince of Persia",   ID_DEBUG_EXECUTEPRINCEOFPERSIA
-
-    END
-    POPUP "Addons"
-    BEGIN
-        MENUITEM "Edit &Hall of Fame",          ID_ADDONS_EDITHALLOFFAME
-        MENUITEM "Edit &saved game",            ID_ADDONS_EDITSAVEDGAME
-        MENUITEM "Edit &graphics",              ID_ADDONS_EDITGRAPHICS
-        , GRAYED
-        MENUITEM "Edit &Prince.exe",            ID_ADDONS_EDITPRINCEEXE
-    END
-    POPUP "&Help"
-    BEGIN
-        MENUITEM "Help topics",                 ID_HELP_HELPTOPICS
-        MENUITEM SEPARATOR
-        MENUITEM "Index",                       ID_HELP_INDEX
-        MENUITEM "License",                     ID_HELP_LICENSE
-        MENUITEM "Frequently asked questions",  ID_HELP_FREQUENTLYASKEDQUESTIONS
-
-        MENUITEM SEPARATOR
-        MENUITEM "Princed Home Page",           ID_HELP_PRINCEDHOMEPAGE
-        MENUITEM SEPARATOR
-        MENUITEM "&About Princed V3...",        ID_APP_ABOUT
-    END
-END
-
-IDR_PRINCETYPE MENU PRELOAD DISCARDABLE 
-BEGIN
-    POPUP "&File"
-    BEGIN
-        MENUITEM "&New...\tCtrl+N",             ID_FILE_NEW
-        MENUITEM "&Open...\tCtrl+O",            ID_FILE_OPEN
-        MENUITEM "&Close",                      ID_FILE_CLOSE
-        MENUITEM "&Save\tCtrl+S",               ID_FILE_SAVE
-        MENUITEM "Save &As...\tF11",            ID_FILE_SAVE_AS
-        MENUITEM "Save All\tCtrl+Alt+S",        ID_FILE_SAVEALL
-        MENUITEM SEPARATOR
-        MENUITEM "Compile DAT...\tCtrl+D",      ID_FILE_COMPILEDAT
-        MENUITEM "Uncompile DAT...\tCtrl+U",    ID_FILE_UNCOMPILEDAT
-        MENUITEM "Publish DAT...\tCtrl+P",      ID_FILE_PUBLISHDAT
-        MENUITEM SEPARATOR
-        MENUITEM "Export to Image...\tCtrl+I",  ID_FILE_EXPORTTOIMAGE
-        MENUITEM "Export to Text...\tCtrl+T",   ID_FILE_EXPORTTOTEXT
-        MENUITEM "Export to HTML...\tCtrl+H",   ID_FILE_EXPORTTOHTML
-        MENUITEM SEPARATOR
-        MENUITEM "Search Files...\tCtrl+F",     ID_FILE_SEARCHFILES
-        MENUITEM "Preferences...\tF8",          ID_FILE_PREFERENCES
-        MENUITEM SEPARATOR
-        MENUITEM "Recent File",                 ID_FILE_MRU_FILE1, GRAYED
-        MENUITEM SEPARATOR
-        MENUITEM "E&xit\tCtrl+Q",               ID_APP_EXIT
-    END
-    POPUP "&Edit"
-    BEGIN
-        MENUITEM "&Undo\tCtrl+Z",               ID_EDIT_UNDO
-        MENUITEM "Redo\tCtrl+Y",                ID_EDIT_REDO
-        MENUITEM SEPARATOR
-        MENUITEM "Cu&t Selection\tCtrl+X",      ID_EDIT_CUT
-        MENUITEM "&Copy Selection\tCtrl+C",     ID_EDIT_COPY
-        MENUITEM "&Paste\tCtrl+V",              ID_EDIT_PASTE
-        MENUITEM "Clear Selection\tDel",        ID_EDIT_CLEARSELECTION
-    END
-    POPUP "&View"
-    BEGIN
-        MENUITEM "Main &Toolbar\tAlt+T",        ID_VIEW_TOOLBAR
-        MENUITEM "&Status Bar\tAlt+1",          ID_VIEW_STATUS_BAR
-        MENUITEM "Map Tools\tAlt+M",            ID_VIEW_MAPTOOLS
-        MENUITEM "Tool Options Window\tAlt+O",  ID_VIEW_TOOLOPTIONSWINDOW
-        MENUITEM "Level Properties...\tCtrl+F4", ID_VIEW_LEVELPROPERTRIES
-        MENUITEM "Open Levels\tAlt+L",          ID_VIEW_OPENLEVELS
-        MENUITEM "Screen reader menu",          ID_VIEW_READERSCREENMENU
-        MENUITEM SEPARATOR
-        MENUITEM "Palace",                      ID_VIEW_ASPALACE
-        MENUITEM "Dungeon",                     ID_VIEW_ASDUNGEON
-        MENUITEM SEPARATOR
-        MENUITEM "Toggle Grid\tAlt+G",          ID_VIEW_TOGGLEGRID
-        MENUITEM "Toggle &Rulers\tAlt+R",       ID_VIEW_TOGGLERULERS
-        MENUITEM SEPARATOR
-        POPUP "Zoom"
-        BEGIN
-            MENUITEM "In\t+",                       ID_VIEW_ZOOM_IN
-            MENUITEM "Out\t-",                      ID_VIEW_ZOOM_OUT
-            MENUITEM SEPARATOR
-            MENUITEM "Fit screen to window\t/",     ID_VIEW_ZOOM_FITSCREENTOWINDOW
-
-            MENUITEM "200%",                        ID_VIEW_ZOOM_200
-            MENUITEM "100%",                        ID_VIEW_ZOOM_100
-            MENUITEM "50%",                         ID_VIEW_ZOOM_50
-            MENUITEM "25%",                         ID_VIEW_ZOOM_25
-            MENUITEM "Fit level to window\t*",      ID_VIEW_ZOOM_FITLEVELTOWINDOW
-
-        END
-    END
-    POPUP "Map &tools"
-    BEGIN
-        MENUITEM "&Wall\tW",                    ID_MAPTOOLS_WALL
-        MENUITEM "&Space\tS",                   ID_MAPTOOLS_CLEAR
-        POPUP "&Objects"
-        BEGIN
-            MENUITEM "&Potion\tP",                  ID_MAPTOOLS_OBJECTS_POSSION
-
-            MENUITEM "&Skeleton\tK",                ID_MAPTOOLS_WALKABLE_BALDOZACONESQUELETO
-
-            MENUITEM "S&word\tR",                   ID_MAPTOOLS_SWORD
-            MENUITEM "S&tart Position\tN",          ID_MAPTOOLS_OBJECTS_STARTPOSITION
-
-            MENUITEM "&Debug Position\tI",          ID_MAPTOOLS_OBJECTS_DEBUGPOSITION
-
-            MENUITEM "&Guard\tG",                   ID_MAPTOOLS_OBJECTS_GUARDS
-
-        END
-        POPUP "&Background"
-        BEGIN
-            MENUITEM "&Torch\tCtrl+Shift+T",        ID_MAPTOOLS_BACKGROUND_LIGHT
-
-            MENUITEM "&Bricks\tCtrl+Shift+B",       ID_MAPTOOLS_BACKGROUND_BRICKS
-
-            MENUITEM "&Window\tCtrl+Alt+I",         ID_MAPTOOLS_BACKGROUND_WINDOW
-
-            MENUITEM "Big W&indow\tCtrl+Alt+H",     ID_MAPTOOLS_BACKGROUND_BIGWINDOW
-
-            MENUITEM "&Column\tCtrl+Shift+C",       ID_MAPTOOLS_BACKGROUND_COLUMN
-
-            MENUITEM "Big C&olumn\tCtrl+Alt+C",     ID_MAPTOOLS_BACKGROUND_BIGCOLUMN
-
-            MENUITEM SEPARATOR
-            MENUITEM "Random\tAlt+B",               ID_MAPTOOLS_BACKGROUND_RANDOM
-
-        END
-        POPUP "&Panel"
-        BEGIN
-            MENUITEM "Normal &Floor\tF",            ID_MAPTOOLS_WALKABLE_NORMAL
-
-            MENUITEM "&Broken Floor\tB",            ID_MAPTOOLS_WALKABLE_BALDOZAROTA
-
-            MENUITEM "&Loose Floor\tL",             ID_MAPTOOLS_WALKABLE_BALDOZAFLOJA
-
-            MENUITEM "&Door Opener\tO",             ID_MAPTOOLS_WALKABLE_BALDOZAAPRETABLE
-
-            MENUITEM "Door &Closer\tC",             ID_MAPTOOLS_WALKABLE_DOORCLOSER
-
-            MENUITEM "&Spikes\tCtrl+Shift+S",       ID_MAPTOOLS_WALKABLE_PINCHES
-
-            MENUITEM SEPARATOR
-            MENUITEM "Random\tAlt+P",               ID_MAPTOOLS_WALKABLE_RANDOM
-
-        END
-        POPUP "&Gates"
-        BEGIN
-            MENUITEM "Door\tD",                     ID_MAPTOOLS_GATES_DOOR
-            MENUITEM "Chopper\tH",                  ID_MAPTOOLS_GATES_PUERTASIERRA
-
-            MENUITEM "Level Gate\tT",               ID_MAPTOOLS_GATES_LEVELGATE
-
-        END
-        MENUITEM SEPARATOR
-        MENUITEM "&Hand\tAlt+H",                ID_MAPTOOLS_ARRASTRAR
-        MENUITEM "Sele&ct\tAlt+S",              ID_MAPTOOLS_SELECT
-        MENUITEM "&Zoom\tAlt+Z",                ID_MAPTOOLS_ZOOM
-        MENUITEM "&Dropper\tAlt+D",             ID_MAPTOOLS_DROPPER
-    END
-    POPUP "Debug"
-    BEGIN
-        MENUITEM "Run level from &debug position\tF5", 
-                                                ID_DEBUG_RUNLEVELFROMDEGUBPOSITION
-
-        MENUITEM "Run level from &start position\tCtrl+F5", 
-                                                ID_DEBUG_RUNLEVELFROMSTARTPOSITION
-
-        MENUITEM "&Refresh running level\tCtrl+A", 
-                                                ID_DEBUG_REFRESHRUNNINGLEVE
-        MENUITEM "Run DAT &file...\tF9",        ID_DEBUG_RUNDATFILE
-        MENUITEM "S&top running\tCtrl+F9",      ID_DEBUG_STOPRUNNING
-        MENUITEM SEPARATOR
-        MENUITEM "Execute &Prince of Persia\tF10", 
-                                                ID_DEBUG_EXECUTEPRINCEOFPERSIA
-
-    END
-    POPUP "Addons"
-    BEGIN
-        MENUITEM "Edit &Hall of Fame\tCtrl+1",  ID_ADDONS_EDITHALLOFFAME
-        MENUITEM "Edit &saved game\tCtrl+2",    ID_ADDONS_EDITSAVEDGAME
-        MENUITEM "Edit &graphics\tCtrl+3",      ID_ADDONS_EDITGRAPHICS
-        , GRAYED
-        MENUITEM "Edit &Prince.exe\tCtrl+4",    ID_ADDONS_EDITPRINCEEXE
-    END
-    POPUP "&Window"
-    BEGIN
-        MENUITEM "Fit to &level\tCtrl+F6",      ID_WINDOW_FITTOLEVEL
-        MENUITEM "Tile &Horizontally",          ID_WINDOW_TILE_HORZ
-        MENUITEM "Tile &Vertically",            ID_WINDOW_TILE_VERT
-        MENUITEM "&Cascade",                    ID_WINDOW_CASCADE
-        MENUITEM "&Arrange Icons",              ID_WINDOW_ARRANGE
-        MENUITEM "Close all\tCtrl+Shift+F4",    ID_WINDOW_CLOSEALL
-    END
-    POPUP "&Help"
-    BEGIN
-        MENUITEM "Help topics\tF1",             ID_HELP_HELPTOPICS
-        MENUITEM SEPARATOR
-        MENUITEM "Index\tCtrl+F1",              ID_HELP_INDEX
-        MENUITEM "License",                     ID_HELP_LICENSE
-        MENUITEM "Frequently asked questions",  ID_HELP_FREQUENTLYASKEDQUESTIONS
-
-        MENUITEM SEPARATOR
-        MENUITEM "Princed Home Page\tCtrl+Alt+F1", ID_HELP_PRINCEDHOMEPAGE
-        MENUITEM SEPARATOR
-        MENUITEM "&About Princed V3...",        ID_APP_ABOUT
-    END
-END
-
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Accelerator
-//
-
-IDR_MAINFRAME ACCELERATORS PRELOAD MOVEABLE PURE 
-BEGIN
-    "1",            ID_ADDONS_EDITHALLOFFAME, VIRTKEY, CONTROL, NOINVERT
-    "2",            ID_ADDONS_EDITSAVEDGAME, VIRTKEY, CONTROL, NOINVERT
-    "3",            ID_ADDONS_EDITGRAPHICS, VIRTKEY, CONTROL, NOINVERT
-    "4",            ID_ADDONS_EDITPRINCEEXE, VIRTKEY, CONTROL, NOINVERT
-    "5",            ID_VIEW_STATUS_BAR,     VIRTKEY, ALT, NOINVERT
-    "A",            ID_DEBUG_REFRESHRUNNINGLEVE, VIRTKEY, CONTROL, NOINVERT
-    "B",            ID_MAPTOOLS_WALKABLE_BALDOZAROTA, VIRTKEY, NOINVERT
-    "B",            ID_MAPTOOLS_BACKGROUND_RANDOM, VIRTKEY, ALT, NOINVERT
-    "B",            ID_MAPTOOLS_BACKGROUND_BRICKS, VIRTKEY, SHIFT, CONTROL, 
-                                                    NOINVERT
-    "C",            ID_MAPTOOLS_WALKABLE_DOORCLOSER, VIRTKEY, NOINVERT
-    "C",            ID_EDIT_COPY,           VIRTKEY, CONTROL, NOINVERT
-    "C",            ID_MAPTOOLS_BACKGROUND_BIGCOLUMN, VIRTKEY, CONTROL, ALT, 
-                                                    NOINVERT
-    "C",            ID_MAPTOOLS_BACKGROUND_COLUMN, VIRTKEY, SHIFT, CONTROL, 
-                                                    NOINVERT
-    "D",            ID_MAPTOOLS_GATES_DOOR, VIRTKEY, NOINVERT
-    "D",            ID_FILE_COMPILEDAT,     VIRTKEY, CONTROL, NOINVERT
-    "D",            ID_MAPTOOLS_DROPPER,    VIRTKEY, ALT, NOINVERT
-    "E",            ID_ADDONS_EDITPRINCEEXE, VIRTKEY, ALT, NOINVERT
-    "F",            ID_MAPTOOLS_WALKABLE_NORMAL, VIRTKEY, NOINVERT
-    "F",            ID_FILE_SEARCHFILES,    VIRTKEY, CONTROL, NOINVERT
-    "F",            ID_ADDONS_EDITHALLOFFAME, VIRTKEY, ALT, NOINVERT
-    "G",            ID_MAPTOOLS_OBJECTS_GUARDS, VIRTKEY, NOINVERT
-    "G",            ID_VIEW_TOGGLEGRID,     VIRTKEY, ALT, NOINVERT
-    "H",            ID_MAPTOOLS_GATES_PUERTASIERRA, VIRTKEY, NOINVERT
-    "H",            ID_FILE_EXPORTTOHTML,   VIRTKEY, CONTROL, NOINVERT
-    "H",            ID_MAPTOOLS_ARRASTRAR,  VIRTKEY, ALT, NOINVERT
-    "H",            ID_MAPTOOLS_BACKGROUND_BIGWINDOW, VIRTKEY, CONTROL, ALT, 
-                                                    NOINVERT
-    "I",            ID_MAPTOOLS_OBJECTS_DEBUGPOSITION, VIRTKEY, NOINVERT
-    "I",            ID_FILE_EXPORTTOIMAGE,  VIRTKEY, CONTROL, NOINVERT
-    "I",            ID_MAPTOOLS_BACKGROUND_WINDOW, VIRTKEY, CONTROL, ALT, 
-                                                    NOINVERT
-    "K",            ID_MAPTOOLS_WALKABLE_BALDOZACONESQUELETO, VIRTKEY, 
-                                                    NOINVERT
-    "K",            ID_ADDONS_EDITGRAPHICS, VIRTKEY, ALT, NOINVERT
-    "L",            ID_MAPTOOLS_WALKABLE_BALDOZAFLOJA, VIRTKEY, NOINVERT
-    "L",            ID_VIEW_OPENLEVELS,     VIRTKEY, ALT, NOINVERT
-    "M",            ID_VIEW_TOOLOPTIONSWINDOW, VIRTKEY, ALT, NOINVERT
-    "N",            ID_MAPTOOLS_OBJECTS_STARTPOSITION, VIRTKEY, NOINVERT
-    "N",            ID_FILE_NEW,            VIRTKEY, CONTROL, NOINVERT
-    "O",            ID_MAPTOOLS_WALKABLE_BALDOZAAPRETABLE, VIRTKEY, NOINVERT
-    "O",            ID_FILE_OPEN,           VIRTKEY, CONTROL, NOINVERT
-    "P",            ID_MAPTOOLS_OBJECTS_POSSION, VIRTKEY, NOINVERT
-    "P",            ID_FILE_PUBLISHDAT,     VIRTKEY, CONTROL, NOINVERT
-    "P",            ID_MAPTOOLS_WALKABLE_RANDOM, VIRTKEY, ALT, NOINVERT
-    "Q",            ID_APP_EXIT,            VIRTKEY, CONTROL, NOINVERT
-    "R",            ID_MAPTOOLS_SWORD,      VIRTKEY, NOINVERT
-    "R",            ID_VIEW_TOGGLERULERS,   VIRTKEY, ALT, NOINVERT
-    "S",            ID_MAPTOOLS_CLEAR,      VIRTKEY, NOINVERT
-    "S",            ID_FILE_SAVE,           VIRTKEY, CONTROL, NOINVERT
-    "S",            ID_MAPTOOLS_SELECT,     VIRTKEY, ALT, NOINVERT
-    "S",            ID_MAPTOOLS_WALKABLE_PINCHES, VIRTKEY, SHIFT, CONTROL, 
-                                                    NOINVERT
-    "T",            ID_MAPTOOLS_GATES_LEVELGATE, VIRTKEY, NOINVERT
-    "T",            ID_FILE_EXPORTTOTEXT,   VIRTKEY, CONTROL, NOINVERT
-    "T",            ID_VIEW_TOOLBAR,        VIRTKEY, ALT, NOINVERT
-    "T",            ID_MAPTOOLS_BACKGROUND_LIGHT, VIRTKEY, SHIFT, CONTROL, 
-                                                    NOINVERT
-    "U",            ID_FILE_UNCOMPILEDAT,   VIRTKEY, CONTROL, NOINVERT
-    "V",            ID_EDIT_PASTE,          VIRTKEY, CONTROL, NOINVERT
-    VK_ADD,         ID_VIEW_ZOOM_IN,        VIRTKEY, NOINVERT
-    VK_BACK,        ID_EDIT_UNDO,           VIRTKEY, ALT, NOINVERT
-    VK_DELETE,      ID_EDIT_CLEARSELECTION, VIRTKEY, NOINVERT
-    VK_DELETE,      ID_EDIT_CUT,            VIRTKEY, SHIFT, NOINVERT
-    VK_DIVIDE,      ID_VIEW_ZOOM_FITSCREENTOWINDOW, VIRTKEY, NOINVERT
-    VK_F1,          ID_HELP_HELPTOPICS,     VIRTKEY, NOINVERT
-    VK_F1,          ID_HELP_INDEX,          VIRTKEY, CONTROL, NOINVERT
-    VK_F1,          ID_HELP_PRINCEDHOMEPAGE, VIRTKEY, CONTROL, ALT, NOINVERT
-    VK_F10,         ID_DEBUG_EXECUTEPRINCEOFPERSIA, VIRTKEY, NOINVERT
-    VK_F4,          ID_VIEW_LEVELPROPERTRIES, VIRTKEY, CONTROL, NOINVERT
-    VK_F4,          ID_WINDOW_CLOSEALL,     VIRTKEY, CONTROL, ALT, NOINVERT
-    VK_F5,          ID_DEBUG_RUNLEVELFROMDEGUBPOSITION, VIRTKEY, NOINVERT
-    VK_F5,          ID_DEBUG_RUNLEVELFROMSTARTPOSITION, VIRTKEY, CONTROL, 
-                                                    NOINVERT
-    VK_F6,          ID_NEXT_PANE,           VIRTKEY, NOINVERT
-    VK_F6,          ID_WINDOW_FITTOLEVEL,   VIRTKEY, CONTROL, NOINVERT
-    VK_F6,          ID_PREV_PANE,           VIRTKEY, SHIFT, NOINVERT
-    VK_F8,          ID_FILE_PREFERENCES,    VIRTKEY, NOINVERT
-    VK_F9,          ID_DEBUG_RUNDATFILE,    VIRTKEY, NOINVERT
-    VK_F9,          ID_DEBUG_STOPRUNNING,   VIRTKEY, CONTROL, NOINVERT
-    VK_INSERT,      ID_EDIT_COPY,           VIRTKEY, CONTROL, NOINVERT
-    VK_INSERT,      ID_EDIT_PASTE,          VIRTKEY, SHIFT, NOINVERT
-    VK_MULTIPLY,    ID_VIEW_ZOOM_FITLEVELTOWINDOW, VIRTKEY, NOINVERT
-    VK_SUBTRACT,    ID_VIEW_ZOOM_OUT,       VIRTKEY, NOINVERT
-    "W",            ID_MAPTOOLS_WALL,       VIRTKEY, NOINVERT
-    "X",            ID_EDIT_CUT,            VIRTKEY, CONTROL, NOINVERT
-    "Y",            ID_EDIT_REDO,           VIRTKEY, CONTROL, NOINVERT
-    "Z",            ID_EDIT_UNDO,           VIRTKEY, CONTROL, NOINVERT
-    "Z",            ID_MAPTOOLS_ZOOM,       VIRTKEY, ALT, NOINVERT
-END
-
-
-#ifndef _MAC
-/////////////////////////////////////////////////////////////////////////////
-//
-// Version
-//
-
-VS_VERSION_INFO VERSIONINFO
- FILEVERSION 1,0,0,1
- PRODUCTVERSION 3,0,1,0
- FILEFLAGSMASK 0x3fL
-#ifdef _DEBUG
- FILEFLAGS 0x1L
-#else
- FILEFLAGS 0x0L
-#endif
- FILEOS 0x4L
- FILETYPE 0x1L
- FILESUBTYPE 0x0L
-BEGIN
-    BLOCK "StringFileInfo"
-    BEGIN
-        BLOCK "040904b0"
-        BEGIN
-            VALUE "Comments", "To get the latest version visit our homepage: http://www.princed.com.ar\0"
-            VALUE "CompanyName", "Princed Development Team\0"
-            VALUE "FileDescription", "Princed V3\0"
-            VALUE "FileVersion", "3, 0, 1\0"
-            VALUE "InternalName", "Princed V3\0"
-            VALUE "LegalCopyright", "Copyright (C) 2003 - Princed Development Team\0"
-            VALUE "LegalTrademarks", "\0"
-            VALUE "OriginalFilename", "Princed V3.EXE\0"
-            VALUE "PrivateBuild", "\0"
-            VALUE "ProductName", "Princed V3 Application\0"
-            VALUE "ProductVersion", "3, 0, 1\0"
-            VALUE "SpecialBuild", "\0"
-        END
-    END
-    BLOCK "VarFileInfo"
-    BEGIN
-        VALUE "Translation", 0x409, 1200
-    END
-END
-
-#endif    // !_MAC
-
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Dialog Info
-//
-
-IDD_DIALOG_SELECT_LEVEL DLGINIT
-BEGIN
-    IDC_COMBO1, 0x403, 5, 0
-0x6544, 0x6f6d, "\000" 
-    IDC_COMBO1, 0x403, 8, 0
-0x654c, 0x6576, 0x206c, 0x0031, 
-    IDC_COMBO1, 0x403, 8, 0
-0x654c, 0x6576, 0x206c, 0x0032, 
-    IDC_COMBO1, 0x403, 8, 0
-0x654c, 0x6576, 0x206c, 0x0032, 
-    IDC_COMBO1, 0x403, 8, 0
-0x654c, 0x6576, 0x206c, 0x0033, 
-    IDC_COMBO1, 0x403, 9, 0
-0x654c, 0x6576, 0x206c, 0x3231, "\000" 
-    IDC_COMBO1, 0x403, 10, 0
-0x654c, 0x6576, 0x206c, 0x3231, 0x0063, 
-    IDC_COMBO1, 0x403, 18, 0
-0x654c, 0x6576, 0x206c, 0x3331, 0x5020, 0x6972, 0x636e, 0x7365, 0x0073, 
-
-    IDC_COMBO1, 0x403, 7, 0
-0x6f50, 0x6974, 0x6e6f, "\000" 
-    0
-END
-
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// String Table
-//
-
-STRINGTABLE DISCARDABLE 
-BEGIN
-    IDP_SOCKETS_INIT_FAILED "Windows sockets initialization failed."
-END
-
-STRINGTABLE PRELOAD DISCARDABLE 
-BEGIN
-    IDR_MAINFRAME           "Princed V3"
-    IDR_PRINCETYPE          "\nPrince\nPrince\nPrince of Persia Map data (*.dat; *.ped)\nped\nPrincedV3.Document\nPrince Document"
-END
-
-STRINGTABLE PRELOAD DISCARDABLE 
-BEGIN
-    AFX_IDS_APP_TITLE       "Princed V3"
-    AFX_IDS_IDLEMESSAGE     "Ready"
-END
-
-STRINGTABLE DISCARDABLE 
-BEGIN
-    ID_INDICATOR_EXT        "EXT"
-    ID_INDICATOR_CAPS       "CAP"
-    ID_INDICATOR_NUM        "NUM"
-    ID_INDICATOR_SCRL       "SCRL"
-    ID_INDICATOR_OVR        "OVR"
-    ID_INDICATOR_REC        "REC"
-END
-
-STRINGTABLE DISCARDABLE 
-BEGIN
-    ID_FILE_NEW             "Create a new document\nNew"
-    ID_FILE_OPEN            "Open an existing document\nOpen"
-    ID_FILE_CLOSE           "Close the active document\nClose"
-    ID_FILE_SAVE            "Save the active document\nSave"
-    ID_FILE_SAVE_AS         "Save the active document with a new name\nSave As"
-    ID_FILE_PAGE_SETUP      "Change the printing options\nPage Setup"
-    ID_FILE_PRINT_SETUP     "Change the printer and printing options\nPrint Setup"
-    ID_FILE_PRINT           "Print the active document\nPrint"
-    ID_FILE_PRINT_PREVIEW   "Display full pages\nPrint Preview"
-END
-
-STRINGTABLE DISCARDABLE 
-BEGIN
-    ID_APP_ABOUT            "Display program information, version number and copyright\nAbout"
-    ID_APP_EXIT             "Quit the application; prompts to save documents\nExit"
-END
-
-STRINGTABLE DISCARDABLE 
-BEGIN
-    ID_FILE_MRU_FILE1       "Open this document"
-    ID_FILE_MRU_FILE2       "Open this document"
-    ID_FILE_MRU_FILE3       "Open this document"
-    ID_FILE_MRU_FILE4       "Open this document"
-    ID_FILE_MRU_FILE5       "Open this document"
-    ID_FILE_MRU_FILE6       "Open this document"
-    ID_FILE_MRU_FILE7       "Open this document"
-    ID_FILE_MRU_FILE8       "Open this document"
-    ID_FILE_MRU_FILE9       "Open this document"
-    ID_FILE_MRU_FILE10      "Open this document"
-    ID_FILE_MRU_FILE11      "Open this document"
-    ID_FILE_MRU_FILE12      "Open this document"
-    ID_FILE_MRU_FILE13      "Open this document"
-    ID_FILE_MRU_FILE14      "Open this document"
-    ID_FILE_MRU_FILE15      "Open this document"
-    ID_FILE_MRU_FILE16      "Open this document"
-END
-
-STRINGTABLE DISCARDABLE 
-BEGIN
-    ID_NEXT_PANE            "Switch to the next window pane\nNext Pane"
-    ID_PREV_PANE            "Switch back to the previous window pane\nPrevious Pane"
-END
-
-STRINGTABLE DISCARDABLE 
-BEGIN
-    ID_WINDOW_NEW           "Open another window for the active document\nNew Window"
-    ID_WINDOW_ARRANGE       "Arrange icons at the bottom of the window\nArrange Icons"
-    ID_WINDOW_CASCADE       "Arrange windows so they overlap\nCascade Windows"
-    ID_WINDOW_TILE_HORZ     "Arrange windows as non-overlapping tiles\nTile Windows"
-    ID_WINDOW_TILE_VERT     "Arrange windows as non-overlapping tiles\nTile Windows"
-    ID_WINDOW_SPLIT         "Split the active window into panes\nSplit"
-END
-
-STRINGTABLE DISCARDABLE 
-BEGIN
-    ID_EDIT_CLEAR           "Erase the selection\nErase"
-    ID_EDIT_CLEAR_ALL       "Erase everything\nErase All"
-    ID_EDIT_COPY            "Copy the selection and put it on the Clipboard\nCopy"
-    ID_EDIT_CUT             "Cut the selection and put it on the Clipboard\nCut"
-    ID_EDIT_FIND            "Find the specified text\nFind"
-    ID_EDIT_PASTE           "Insert Clipboard contents\nPaste"
-    ID_EDIT_REPEAT          "Repeat the last action\nRepeat"
-    ID_EDIT_REPLACE         "Replace specific text with different text\nReplace"
-    ID_EDIT_SELECT_ALL      "Select the entire document\nSelect All"
-    ID_EDIT_UNDO            "Undo the last action\nUndo"
-    ID_EDIT_REDO            "Redo the previously undone action\nRedo"
-END
-
-STRINGTABLE DISCARDABLE 
-BEGIN
-    ID_VIEW_TOOLBAR         "Show or hide the toolbar\nToggle ToolBar"
-    ID_VIEW_STATUS_BAR      "Show or hide the status bar\nToggle StatusBar"
-END
-
-STRINGTABLE DISCARDABLE 
-BEGIN
-    AFX_IDS_SCSIZE          "Change the window size"
-    AFX_IDS_SCMOVE          "Change the window position"
-    AFX_IDS_SCMINIMIZE      "Reduce the window to an icon"
-    AFX_IDS_SCMAXIMIZE      "Enlarge the window to full size"
-    AFX_IDS_SCNEXTWINDOW    "Switch to the next document window"
-    AFX_IDS_SCPREVWINDOW    "Switch to the previous document window"
-    AFX_IDS_SCCLOSE         "Close the active window and prompts to save the documents"
-END
-
-STRINGTABLE DISCARDABLE 
-BEGIN
-    AFX_IDS_SCRESTORE       "Restore the window to normal size"
-    AFX_IDS_SCTASKLIST      "Activate Task List"
-    AFX_IDS_MDICHILD        "Activate this window"
-END
-
-STRINGTABLE DISCARDABLE 
-BEGIN
-    AFX_IDS_PREVIEW_CLOSE   "Close print preview mode\nCancel Preview"
-    IDS_PRINCED_HOMEPAGE    "http://www.princed.com.ar"
-    IDS_WALL_NAMES          "Space\nFloor\nSpike\nColumn\nDoor\n0x05\nDoor Closer\nCarpet Wall\nBig Column Bottom\nBig Column Top\nPotion\nLoose Floor\nCarpet Wall Space\n0x0d\nBroken Floor\nDoor Opener\nExit Gate Left\nExit Gate Right\nChopper\nFloor with Torch\nWall\nSkeleton\nSword\nStar Window Left\nStar Window Right\nArch Column\nArch Down\nSmall Arch\nBig Arch Left\nBig Arch Right\nBroken Floor with Torch\n0x1f"
-    IDS_ABOUT_TEXT          "testing"
-END
-
-STRINGTABLE DISCARDABLE 
-BEGIN
-    ID_MAPTOOLS_CLEAR       "Inserts a space"
-    ID_MAPTOOLS_OBJECTS_POSSION 
-                            "Places a floor with a potion (one of five types)"
-    ID_MAPTOOLS_WALL        "Inserts a wall"
-END
-
-STRINGTABLE DISCARDABLE 
-BEGIN
-    ID_MAPTOOLS_WALKABLE_BALDOZACONESQUELETO 
-                            "Places a floor with a skeleton: not available in palace mode"
-    ID_MAPTOOLS_SWORD       "Places a floor with a sword"
-END
-
-STRINGTABLE DISCARDABLE 
-BEGIN
-    ID_FILE_SAVEALL         "Saves all document\nSave All"
-    ID_VIEW_MAPTOOLS        "Show or hide the map tools bar\nMap Tools"
-END
-
-#endif    // English (U.S.) resources
-/////////////////////////////////////////////////////////////////////////////
-
-
-/////////////////////////////////////////////////////////////////////////////
-// Spanish (Castilian) (unknown sub-lang: 0xB) resources
-
-#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ESS)
-#ifdef _WIN32
-LANGUAGE LANG_SPANISH, 0xB
-#pragma code_page(1252)
-#endif //_WIN32
-
-#ifdef APSTUDIO_INVOKED
-/////////////////////////////////////////////////////////////////////////////
-//
-// TEXTINCLUDE
-//
-
-1 TEXTINCLUDE DISCARDABLE 
-BEGIN
-    "resource.h\0"
-END
-
-2 TEXTINCLUDE DISCARDABLE 
-BEGIN
-    "#include ""afxres.h""\r\n"
-    "\0"
-END
-
-3 TEXTINCLUDE DISCARDABLE 
-BEGIN
-    "#define _AFX_NO_SPLITTER_RESOURCES\r\n"
-    "#define _AFX_NO_OLE_RESOURCES\r\n"
-    "#define _AFX_NO_TRACKER_RESOURCES\r\n"
-    "#define _AFX_NO_PROPERTY_RESOURCES\r\n"
-    "\r\n"
-    "#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)\r\n"
-    "#ifdef _WIN32\r\n"
-    "LANGUAGE 9, 1\r\n"
-    "#pragma code_page(1252)\r\n"
-    "#endif //_WIN32\r\n"
-    "#include ""res\\Princed V3.rc2""  // non-Microsoft Visual C++ edited resources\r\n"
-    "#include ""afxres.rc""         // Standard components\r\n"
-    "#include ""afxprint.rc""       // printing/print preview resources\r\n"
-    "#endif\r\n"
-    "\0"
-END
-
-#endif    // APSTUDIO_INVOKED
-
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Icon
-//
-
-// Icon with lowest ID value placed first to ensure application icon
-// remains consistent on all systems.
-IDR_MAINFRAME           ICON    DISCARDABLE     "res\\princed.ico"
-IDR_PRINCETYPE          ICON    DISCARDABLE     "res\\32x32.ped.ico"
-#endif    // Spanish (Castilian) (unknown sub-lang: 0xB) resources
-/////////////////////////////////////////////////////////////////////////////
-
-
-
-#ifndef APSTUDIO_INVOKED
-/////////////////////////////////////////////////////////////////////////////
-//
-// Generated from the TEXTINCLUDE 3 resource.
-//
-#define _AFX_NO_SPLITTER_RESOURCES
-#define _AFX_NO_OLE_RESOURCES
-#define _AFX_NO_TRACKER_RESOURCES
-#define _AFX_NO_PROPERTY_RESOURCES
-
-#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
-#ifdef _WIN32
-LANGUAGE 9, 1
-#pragma code_page(1252)
-#endif //_WIN32
-#include "res\Princed V3.rc2"  // non-Microsoft Visual C++ edited resources
-#include "afxres.rc"         // Standard components
-#include "afxprint.rc"       // printing/print preview resources
-#endif
-
-/////////////////////////////////////////////////////////////////////////////
-#endif    // not APSTUDIO_INVOKED
-
diff --git a/pv3/Princed V3Doc.cpp b/pv3/Princed V3Doc.cpp
deleted file mode 100644
index 7f69a42..0000000
--- a/pv3/Princed V3Doc.cpp	
+++ /dev/null
@@ -1,236 +0,0 @@
-// Princed V3Doc.cpp : implementation of the CPrincedV3Doc class
-//
-
-#include "stdafx.h"
-#include "Princed V3.h"
-
-#include "maps.h"
-#include "Princed V3Doc.h"
-
-#ifdef _DEBUG
-#define new DEBUG_NEW
-#undef THIS_FILE
-static char THIS_FILE[] = __FILE__;
-#endif
-
-/////////////////////////////////////////////////////////////////////////////
-// CPrincedV3Doc
-
-IMPLEMENT_DYNCREATE(CPrincedV3Doc, CDocument)
-
-BEGIN_MESSAGE_MAP(CPrincedV3Doc, CDocument)
-	//{{AFX_MSG_MAP(CPrincedV3Doc)
-	ON_COMMAND(ID_EDIT_UNDO, OnEditUndo)
-	ON_COMMAND(ID_EDIT_REDO, OnEditRedo)
-	//}}AFX_MSG_MAP
-END_MESSAGE_MAP()
-
-/////////////////////////////////////////////////////////////////////////////
-// CPrincedV3Doc construction/destruction
-
-//Width and height of POP1's screen
-const int CPrincedV3Doc::SCRX=10, CPrincedV3Doc::SCRY=3;
-const int CPrincedV3Doc::MAXSCRN=24;
-CString CPrincedV3Doc::m_strWallName[32];
-
-CPrincedV3Doc::CPrincedV3Doc(): m_Map("")
-{
-	m_Map.lev=(tLevel *)malloc(sizeof(tLevel));
-
-	if(m_strWallName[0].IsEmpty()) { //only once when necessary
-		int i; TCHAR buff[512];
-		::LoadString(AfxGetApp()->m_hInstance, IDS_WALL_NAMES, buff, 512);
-		for(i=0, m_strWallName[0]=_tcstok(buff, _T("\n")); i<31;
-			i++, m_strWallName[i]=_tcstok(NULL, _T("\n")));
-	}
-}
-
-CPrincedV3Doc::~CPrincedV3Doc()
-{
-}
-
-BOOL CPrincedV3Doc::OnNewDocument()
-{
-	if(!CDocument::OnNewDocument()) return FALSE;
-
-	// TODO: add reinitialization code here
-	// (SDI documents will reuse this document)
-	return TRUE;
-}
-
-/////////////////////////////////////////////////////////////////////////////
-// CPrincedV3Doc diagnostics
-
-#ifdef _DEBUG
-void CPrincedV3Doc::AssertValid() const
-{
-	CDocument::AssertValid();
-}
-
-void CPrincedV3Doc::Dump(CDumpContext& dc) const
-{
-	CDocument::Dump(dc);
-}
-#endif //_DEBUG
-
-/////////////////////////////////////////////////////////////////////////////
-// CPrincedV3Doc commands
-
-BOOL CPrincedV3Doc::OnOpenDocument(LPCTSTR lpszPathName) 
-{
-	if(!CDocument::OnOpenDocument(lpszPathName)) return FALSE;
-	CFile f(lpszPathName, CFile::modeRead); DWORD dw=f.GetLength(); f.Close();
-
-	//according to the file size
-	switch(dw) {
-	case sizeof(tLevel): //if PED
-		m_nLevel=-1; m_Map.mLoadPED(lpszPathName, m_Map.lev); break;
-	case MAPS_BLOCK_SIZEOF_FILE: //if DAT, load whole level
-		m_nLevel=1;
-		m_Map.mLoadDAT(lpszPathName, m_Map.lev, m_nLevel);
-		break;
-	default:
-		return FALSE; //neither of the supported types
-	}
-	return TRUE;
-}
-
-SCRNNUM CPrincedV3Doc::PositionFromScreen(int a, int b) const
-{
-	char c, x,y, err; x=(char)(a/SCRX)+1, y=(char)(b/SCRY)+1;
-	c=m_Map.mGetScreen(m_Map.lev, y, x, &err); return err || c<0 ? 0: c;
-}
-
-CPrincedV3Doc::WALL CPrincedV3Doc::GetWallAt(int x, int y, SCRNNUM s) const
-{
-	switch(s) {
-	case -1: //x, y is the absolute position: screen number should be implied from it
-		s=PositionFromScreen(x, y);
-		if(s) return static_cast<WALL>(m_Map.mGetWall(m_Map.lev, (char)s, y%SCRY, x%SCRX)&(~0x20));
-		else return wNull;
-	case 0: //invalid screen
-		return wNull;
-	default: //specified screen
-		ASSERT(x>=0 && x<SCRX && y>=0 && y<SCRY);
-		return static_cast<WALL>(m_Map.mGetWall(m_Map.lev, (char)s, y, x)&(~0x20));
-	}
-}
-
-CPrincedV3Doc::ATTRIB CPrincedV3Doc::GetBackAt(int x, int y, SCRNNUM s) const
-{
-	switch(s) {
-	case -1: //x, y is the absolute position: screen number should be implied from it
-		s=PositionFromScreen(x, y);
-		if(s) return static_cast<ATTRIB>(m_Map.mGetBack(m_Map.lev, (char)s, y%SCRY, x%SCRX));
-		else return null;
-	case 0: //invalid screen
-		return null;
-	default:
-		ASSERT(x>=0 && x<SCRX && y>=0 && y<SCRY);
-		return static_cast<ATTRIB>(m_Map.mGetBack(m_Map.lev, (char)s, y, x));
-	}
-}
-
-void CPrincedV3Doc::LoadLevel(int n)
-{
-	//to go to another level, you must save the current document~
-	if(m_nLevel!=-1 && SaveModified()) {
-		m_Map.mLoadDAT(GetPathName(), m_Map.lev, n); m_nLevel=n; SetModifiedFlag(FALSE);
-	}
-}
-
-CString CPrincedV3Doc::GetWallName(CPrincedV3Doc::WALL nam, CPrincedV3Doc::ATTRIB at) const
-{
-	int wn=static_cast<int>(nam);
-	if(wn>=0 && wn<32) return m_strWallName[wn]; else return CString("");
-}
-
-BOOL CPrincedV3Doc::GetGuard(SCRNNUM s, GUARD *pInf) const
-{
-	char x, y, skill, color, dire, era; if(s<=0) return FALSE;
-	m_Map.mGetGuard(m_Map.lev, s, &y, &x, &skill, &color, &dire, &era);
-	if(pInf) {
-		pInf->color=static_cast<G_COLOR>(color);
-		pInf->skill=static_cast<G_SKILL>(skill);
-		pInf->org=static_cast<G_ORIENTATION>(dire);
-		pInf->x=x; pInf->y=y;
-	}
-	return era;
-}
-
-//If there're any objects which belong to a palace (arch, carpet, for example)
-BOOL CPrincedV3Doc::IsPalaceLevel() const
-{
-	int i,j,k;
-	for(k=1;k<=MAXSCRN;k++)
-		for(j=0;j<SCRY;j++) for(i=0;i<SCRX;i++)
-			switch(m_Map.mGetWall(m_Map.lev, k, j, i)) {
-			case wCarpetWall:
-			case wArchDown: case wArchUpSmall: case wArchUpBigLeft:
-			case wArchUpBigRight: case wArchColumn:
-			case wStarWindowLeft: case wStarWindowRight:
-				return TRUE;
-			case wSkeleton:
-				return FALSE;
-			case wCarpetWallSpace: //only if the adjacent cell is not the wall
-				if((m_Map.mGetWall(m_Map.lev, k, j, i+1)&(~0x20))!=wWallBlock) return TRUE;
-			}
-	return FALSE;
-}
-
-void CPrincedV3Doc::PlaceObject(int x, int y, WALL wa, ATTRIB at, SCRNNUM s)
-{
-	switch(s) {
-	case -1:
-		s=PositionFromScreen(x, y); if(s) x%=SCRX, y%=SCRY; else return;
-		break;
-	case 0: return; //invalid screen
-	default: ASSERT(x>=0 && x<SCRX && y>=0 && y<SCRY);
-	}
-	m_Map.mSetWall(m_Map.lev, (char)s, (char)y, (char)x, wa);
-	m_Map.mSetBack(m_Map.lev, (char)s, (char)y, (char)x, at);
-}
-
-CSize CPrincedV3Doc::GetMapSize() const
-{
-	char i,j; CSize pt; m_Map.mGetSize(m_Map.lev, &i, &j); pt.cx=j-1; pt.cy=i-1;
-	return pt;
-}
-
-CPoint CPrincedV3Doc::GetStartScreen() const
-{
-	char i, j; m_Map.mGetMainScreen(m_Map.lev, &i, &j); return CPoint(j,i);
-}
-
-  
-void CPrincedV3Doc::OnEditUndo() 
-{
-	//will be implemented in the future.
-}
-
-void CPrincedV3Doc::OnEditRedo() 
-{
-	//will be implemented in the future.
-}
-
-//lev \xb8\xe2\xb9\xf6\xc0\xc7 \xc7\xfc\xc5\xc2 \xb0\xedġ\xb1\xe2
-//\xb8\xca ũ\xb1⸦ \xb0\xe1\xc1\xa4\xc7\xd2 \xb6\xa7 GetSize\xb8\xa6 \xbb\xe7\xbf\xeb\xc7ϱ\xe2
-//\xc5\xf8\xb9ٿ\xa1 \xc4޺\xb8 \xb9ڽ\xba \xb1\xb8\xc7\xf6\xc7ϱ\xe2
-
-BOOL CPrincedV3Doc::OnSaveDocument(LPCTSTR lpszPathName) 
-{
-	if(m_nLevel==-1) {
-		if(CDocument::OnSaveDocument(lpszPathName)) {
-			m_Map.mSavePED(lpszPathName, m_Map.lev); return TRUE;
-		}
-	}
-	else {
-		//When saving DAT file, you mustn't call the base class, because it will completely
-		//overwrite the file, while we're going to modify only a part of the file.
-
-		//TODO: then, what about when handling SAVE AS??
-		m_Map.mSaveDAT(lpszPathName, m_Map.lev);
-		SetModifiedFlag(FALSE);
-	}
-	return FALSE;
-}
diff --git a/pv3/Princed V3Doc.h b/pv3/Princed V3Doc.h
deleted file mode 100644
index 6c7c099..0000000
--- a/pv3/Princed V3Doc.h	
+++ /dev/null
@@ -1,141 +0,0 @@
-// Princed V3Doc.h : interface of the CPrincedV3Doc class
-//
-/////////////////////////////////////////////////////////////////////////////
-
-#if !defined(AFX_PRINCEDV3DOC_H__B98D158D_6AA8_11D7_8A8E_00104B7CC0FF__INCLUDED_)
-#define AFX_PRINCEDV3DOC_H__B98D158D_6AA8_11D7_8A8E_00104B7CC0FF__INCLUDED_
-
-#if _MSC_VER > 1000
-#pragma once
-#endif // _MSC_VER > 1000
-
-#include "maps.h"
-
-typedef int SCRNNUM;
-
-class CPrincedV3Doc : public CDocument
-{
-protected: // create from serialization only
-	CPrincedV3Doc();
-	DECLARE_DYNCREATE(CPrincedV3Doc)
-
-// Attributes
-public:
-	const static int SCRX, SCRY; //screen size 10x3
-	const static int MAXSCRN; //max number of screens 24
-	enum WALL {
-		wNull=0x00,
-		wFloor=0x01,
-		wLooseFloor=0x0b,
-		wOneColumn=0x03,
-		wBrokenFloor=0x0e,
-		wFloorTorch=0x13,
-		wBrokenFloorTorch=0x1e,
-		wBigColumnUp=0x09,
-		wBigColumnDown=0x08,
-		wPotion=0x0a,
-		wSkeleton=0x15,
-		wSword=0x16,
-		wSpike=0x02,
-		wChopper=0x12,
-		wDoorOpener=0x0f,
-		wDoorCloser=0x06,
-		wDoor=0x04,
-		wExitGateLeft=0x10,
-		wExitGateRight=0x11,
-		wWallBlock=0x14,
-		wCarpetWallSpace=0x0c, //it also exists in dungeon :)
-		
-		//Some out handling objects
-		wOutWallDown=0xFF1,
-		wOutWallRight=0xFF2,
-		wOutWallDownRight=0xFF3,
-
-		//The following are palace-specific
-		wCarpetWall=0x07,
-		wArchDown=0x1a,
-		wArchUpSmall=0x1b,
-		wArchUpBigLeft=0x1c,
-		wArchUpBigRight=0x1d,
-		wArchColumn=0x19,
-		wStarWindowLeft=0x17,
-		wStarWindowRight=0x18
-	};
-	enum ATTRIB {
-		null=0x00,
-		wallBrick=1, wallBrick2=2, wallWindow=3,
-		potRedSmall=1, potRedBig=2, potGreenBigGravity=3, potGreenBigInverse=4, potBlueSmall=5,
-		spikState1=0, spikState2=1, spikState3=2, spikState4=3,
-		doorOpen=1, doorClosed=2
-	};
-	enum G_ORIENTATION {
-		gLeft=0, gRight=1
-	};
-	enum G_COLOR {
-	};
-	enum G_SKILL {
-	};
-	struct GUARD {
-		int x, y; //screen location
-		G_COLOR color;
-		G_SKILL skill;
-		G_ORIENTATION org;
-	};
-
-// Operations
-public:
-	void LoadLevel(int n);
-	int GetLevel() const { return m_nLevel; }
-
-	//cMap helper functions
-	//x, y: block(wall)-unit coordinate
-	//a, b: screen-unit coordinate
-	//s: screen number
-	WALL GetWallAt(int x, int y, SCRNNUM s=-1) const;
-	ATTRIB GetBackAt(int x, int y, SCRNNUM s=-1) const;
-	SCRNNUM PositionFromScreen(int x, int y) const;
-	CString GetWallName(WALL nam, ATTRIB at=null) const;
-	BOOL GetGuard(SCRNNUM s, GUARD *pInf=NULL) const;
-	BOOL IsPalaceLevel() const;
-	CSize GetMapSize() const;
-	CPoint GetStartScreen() const;
-	void PlaceObject(int x, int y, WALL wa, ATTRIB at=null, SCRNNUM s=-1);
-
-	// Overrides
-	// ClassWizard generated virtual function overrides
-	//{{AFX_VIRTUAL(CPrincedV3Doc)
-	public:
-	virtual BOOL OnNewDocument();
-	virtual BOOL OnOpenDocument(LPCTSTR lpszPathName);
-	virtual BOOL OnSaveDocument(LPCTSTR lpszPathName);
-	//}}AFX_VIRTUAL
-
-// Implementation
-public:
-	friend class CPrincedV3View;
-	virtual ~CPrincedV3Doc();
-#ifdef _DEBUG
-	virtual void AssertValid() const;
-	virtual void Dump(CDumpContext& dc) const;
-#endif
-
-protected:
-	cMaps m_Map; CString m_strFile;
-	int m_nLevel; //-1 indicates it's PED file, not dat
-	static CString m_strWallName[];
-
-// Generated message map functions
-protected:
-	//{{AFX_MSG(CPrincedV3Doc)
-	afx_msg void OnEditUndo();
-	afx_msg void OnEditRedo();
-	//}}AFX_MSG
-	DECLARE_MESSAGE_MAP()
-};
-
-/////////////////////////////////////////////////////////////////////////////
-
-//{{AFX_INSERT_LOCATION}}
-// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
-
-#endif // !defined(AFX_PRINCEDV3DOC_H__B98D158D_6AA8_11D7_8A8E_00104B7CC0FF__INCLUDED_)
diff --git a/pv3/Princed V3View.cpp b/pv3/Princed V3View.cpp
deleted file mode 100644
index 03ea67f..0000000
--- a/pv3/Princed V3View.cpp	
+++ /dev/null
@@ -1,697 +0,0 @@
-// Princed V3View.cpp : implementation of the CPrincedV3View class
-//
-
-#include "stdafx.h"
-#include "Princed V3.h"
-
-#include "MainFrm.h"
-#include "Princed V3Doc.h"
-#include "Princed V3View.h"
-#include "conf.cpp"
-
-#include "process.cpp"
-
-#ifdef _DEBUG
-#define new DEBUG_NEW
-#undef THIS_FILE
-static char THIS_FILE[] = __FILE__;
-#endif
-
-/////////////////////////////////////////////////////////////////////////////
-// CPrincedV3View
-
-IMPLEMENT_DYNCREATE(CPrincedV3View, CScrollView)
-
-BEGIN_MESSAGE_MAP(CPrincedV3View, CScrollView)
-	//{{AFX_MSG_MAP(CPrincedV3View)
-	ON_COMMAND(ID_DEBUG_EXECUTEPRINCEOFPERSIA, OnDebugExecuteprinceofpersia)
-	ON_WM_KEYDOWN()
-	ON_WM_MOUSEMOVE()
-	ON_WM_DESTROY()
-	ON_WM_ERASEBKGND()
-	ON_WM_KEYUP()
-	ON_WM_LBUTTONDOWN()
-	ON_WM_SETCURSOR()
-	ON_WM_LBUTTONUP()
-	ON_WM_RBUTTONDOWN()
-	ON_WM_TIMER()
-	//}}AFX_MSG_MAP
-	// Standard printing commands
-	ON_COMMAND(ID_FILE_PRINT, CScrollView::OnFilePrint)
-	ON_COMMAND(ID_FILE_PRINT_DIRECT, CScrollView::OnFilePrint)
-	ON_COMMAND(ID_FILE_PRINT_PREVIEW, CScrollView::OnFilePrintPreview)
-	ON_COMMAND_RANGE(ID_VIEW_ZOOM_200, ID_VIEW_ZOOM_25, OnZoomFactor)
-	ON_COMMAND_RANGE(ID_VIEW_ASDUNGEON, ID_VIEW_ASPALACE, OnViewMode)
-	ON_UPDATE_COMMAND_UI_RANGE(ID_VIEW_ASDUNGEON, ID_VIEW_ASPALACE, OnUpdateViewMode)
-	ON_UPDATE_COMMAND_UI_RANGE(ID_VIEW_ZOOM_200, ID_VIEW_ZOOM_25, OnUpdateZoomFactor)
-
-	//the following number range is reserved for map tool command id.
-	ON_COMMAND_RANGE(32850, 32899, OnMapTool)
-	ON_UPDATE_COMMAND_UI_RANGE(32850, 32899, OnUpdateMapTool)
-END_MESSAGE_MAP()
-
-/////////////////////////////////////////////////////////////////////////////
-// CPrincedV3View construction/destruction
-
-int CPrincedV3View::m_nKeys; BYTE CPrincedV3View::m_byKey[256];
-CPoint CPrincedV3View::m_ptPrev;
-UINT CPrincedV3View::m_nCurTool=ID_MAPTOOLS_ARRASTRAR; //Hand tool is the default
-const int CPrincedV3View::m_nZfact[]={
-	50, 75, 100, 150, 200, 300
-};
-
-CPrincedV3View::CPrincedV3View(): m_bPalace(FALSE), m_pbmOld(NULL), m_nZoom(100),
-	m_bSmoothKey(TRUE), m_dwLastMomn(0)
-{
-	memset(m_byKey, 0, sizeof(m_byKey));
-}
-
-CPrincedV3View::~CPrincedV3View()
-{
-}
-
-BOOL CPrincedV3View::PreCreateWindow(CREATESTRUCT& cs)
-{
-	// TODO: Modify the Window class or styles here by modifying
-	//  the CREATESTRUCT cs
-
-	return CScrollView::PreCreateWindow(cs);
-}
-
-/////////////////////////////////////////////////////////////////////////////
-// CPrincedV3View drawing
-
-void CPrincedV3View::PutSprite(CDC *pDC, int dstx, int dsty, CBitmap *pSrc, CBitmap *pMask,
-	int srcx, int cx, int cy)
-{
-	int cxp=cx>0 ? cx: -cx; //always positive. in case or mirrored bitblt
-	m_dcTemp.SelectObject(pMask);
-	pDC->StretchBlt(dstx, dsty, cxp*m_nZoom/100, cy*m_nZoom/100, &m_dcTemp, srcx, 0, cx, cy,
-		SRCAND);
-	m_dcTemp.SelectObject(pSrc);
-	pDC->StretchBlt(dstx, dsty, cxp*m_nZoom/100, cy*m_nZoom/100, &m_dcTemp, srcx, 0, cx, cy,
-		SRCPAINT);
-}
-
-void CPrincedV3View::DrawObject(CDC *pDC, int x, int y, CPrincedV3Doc::WALL wa, CPrincedV3Doc::ATTRIB at)
-{
-	int ind=-1, atn; CBitmap *pbmBase, *pbmBaseMask;
-	pbmBase=m_bPalace ? &m_bmPala: &m_bmDung; atn=static_cast<int>(at);
-	pbmBaseMask=m_bPalace ? &m_bmPalaMask: &m_bmDungMask;
-
-	//background processing
-	if(m_bPalace) {
-		switch(atn) { //only on a floor
-		case 0:
-			switch(wa) {
-			case CPrincedV3Doc::wNull:
-				break;
-			default: //only on a floor
-				ind=8; break;
-			}
-			break;
-		case 1:
-			switch(wa) { //only when blank space
-			case CPrincedV3Doc::wNull:
-				ind=8; break;
-			}
-		case 2: ind=9; break; case 3: ind=7; break;
-		}
-	}
-	else {
-		switch(wa) {
-		case CPrincedV3Doc::wNull: case CPrincedV3Doc::wFloor:
-		case CPrincedV3Doc::wLooseFloor: case CPrincedV3Doc::wBrokenFloor:
-			if(atn>0 && atn<=3) ind=atn-1; //dungeon
-		}
-	}
-	if(ind!=-1)
-		PutSprite(pDC, x+m_nBlockX, y+m_nFloorHeight, &m_bmBack, &m_bmBackMask, ind*32,
-			32, 63);
-
-	ind=-1;
-	switch(wa) {
-	//empty-background walls
-	case CPrincedV3Doc::wNull: break;
-	case CPrincedV3Doc::wFloor: ind=3; break;
-	case CPrincedV3Doc::wLooseFloor: ind=9; break;
-	case CPrincedV3Doc::wBrokenFloor: ind=5; break;
-
-	case CPrincedV3Doc::wOneColumn: ind=6; break;
-	case CPrincedV3Doc::wFloorTorch: ind=4; break;
-	case CPrincedV3Doc::wBrokenFloorTorch: ind=25; break;
-	case CPrincedV3Doc::wBigColumnUp: ind=18; break;
-	case CPrincedV3Doc::wBigColumnDown: ind=19; break;
-
-	case CPrincedV3Doc::wPotion:
-		switch(at) {
-		case CPrincedV3Doc::potRedSmall: ind=7; break;
-		case CPrincedV3Doc::potRedBig: ind=22; break;
-		case CPrincedV3Doc::potGreenBigGravity:
-		case CPrincedV3Doc::potGreenBigInverse: ind=21; break;
-		case CPrincedV3Doc::potBlueSmall: ind=20; break;
-		default: ind=3; break; //unknown potion
-		}
-		break;
-
-	case CPrincedV3Doc::wSkeleton: ind=8; break;
-	case CPrincedV3Doc::wSword: ind=16; break;
-	case CPrincedV3Doc::wSpike: ind=12+atn; break; //12+(0~3)
-	case CPrincedV3Doc::wChopper: ind=17; break;
-	case CPrincedV3Doc::wDoorCloser: ind=10; break;
-	case CPrincedV3Doc::wDoorOpener: ind=11; break;
-	case CPrincedV3Doc::wDoor: ind=atn; break; //1,2
-
-	case CPrincedV3Doc::wExitGateLeft:
-		PutSprite(pDC, x, y-m_nFloorHeight-m_nFloorDep, pbmBase, pbmBaseMask, 23*58, 58, 76);
-		ind=3; break;
-	case CPrincedV3Doc::wExitGateRight:
-		PutSprite(pDC, x, y-m_nFloorHeight-m_nFloorDep, pbmBase, pbmBaseMask, 24*58, 58, 76);
-		ind=3; break;
-	case CPrincedV3Doc::wStarWindowLeft:
-		PutSprite(pDC, x, y-m_nFloorHeight-m_nFloorDep, pbmBase, pbmBaseMask, 30*58, 58, 76);
-		ind=3; break;
-	case CPrincedV3Doc::wStarWindowRight:
-		PutSprite(pDC, x, y-m_nFloorHeight-m_nFloorDep, pbmBase, pbmBaseMask, 31*58, 58, 76);
-		ind=3; break;
-	case CPrincedV3Doc::wArchColumn: ind= m_bPalace ? 27: 3; break;
-	case CPrincedV3Doc::wWallBlock: ind=0; break;
-	case CPrincedV3Doc::wOutWallDown: ind=32; break;
-	case CPrincedV3Doc::wOutWallRight: ind=33; break;
-
-	case CPrincedV3Doc::wCarpetWall:
-		PutSprite(pDC, x, y, pbmBase, pbmBaseMask, 3*58, 58, 76);
-	case CPrincedV3Doc::wCarpetWallSpace:
-		//special exception case for 0x00 flag: carpet wall with arch!!
-		if(atn==0) PutSprite(pDC, x, y, pbmBase, pbmBaseMask, 29*58, 64, 76);
-		else ind=(atn==1 ? 26: atn==2 ? 28: 0); break; //26+(0~2)
-	}
-
-	if(m_bPalace) {
-		//golden palace objects
-		switch(wa) {
-		case CPrincedV3Doc::wArchDown:
-			PutSprite(pDC, x, y+m_nFloorHeight, &m_bmBack, &m_bmBackMask, 3*32, 32, 63);
-			break;
-		case CPrincedV3Doc::wArchUpSmall:
-			PutSprite(pDC, x, y+m_nFloorHeight, &m_bmBack, &m_bmBackMask, 4*32, 32, 63);
-			break;
-		case CPrincedV3Doc::wArchUpBigLeft:
-			PutSprite(pDC, x, y+m_nFloorHeight, &m_bmBack, &m_bmBackMask, 5*32, 32, 63);
-			break;
-		case CPrincedV3Doc::wArchUpBigRight:
-			PutSprite(pDC, x, y+m_nFloorHeight, &m_bmBack, &m_bmBackMask, 6*32, 32, 63);
-			break;
-		}
-	}
-
-	if(ind!=-1) PutSprite(pDC, x, y, pbmBase, pbmBaseMask, ind*58, 58, 76);
-}
-
-//array allocation helper
-static int *new_zero_int(int size)
-{
-	int *p; p=new int[size]; memset(p, 0, size*sizeof(int)); return p;
-}
-
-template<typename T>
-class CQueue {
-protected:
-    struct NODE {
-		T data; NODE *extra;
-    };
-    NODE *m_pHead, *m_pTail; int m_nElem;
-public:
-    //Construction/destruction
-    CQueue(): m_pHead(NULL), m_nElem(0) {}
-    int GetCount() const { return m_nElem; } //number of elements
-    virtual ~CQueue();
-    virtual void Add(const T& elem);
-    virtual bool Delete(T& elem); //returns the pointer to the element being deleted
-};
-
-template<typename T>
-void CQueue<T>::Add(const T& elem)
-{
-    if(m_pHead) { m_pTail->extra=new NODE; m_pTail=m_pTail->extra; }
-    else { m_pTail=m_pHead=new NODE; }
-    m_pTail->extra=NULL;
-    m_pTail->data=elem;
-}
-
-template<typename T>
-bool CQueue<T>::Delete(T& elem)
-{
-	if(m_pHead) { //If there's anything to draw out
-		NODE *tmp=m_pHead; elem=m_pHead->data; m_pHead=m_pHead->extra;
-		delete tmp; return true;
-	}
-	else return false; //nothing
-}
-
-template<typename T>
-CQueue<T>::~CQueue()
-{
-	NODE *tmp, *tmp2;
-	for(tmp=m_pHead;tmp; tmp=tmp2) { tmp2=tmp->extra; delete tmp; }
-}
-
-void CPrincedV3View::OnDraw(CDC* pDC)
-{
-	SCRNNUM s; CPrincedV3Doc* pDoc = GetDocument(); ASSERT_VALID(pDoc);
-	int i,j,k, x,y, it, jt; CRect rect; CPoint sp=GetScrollPosition();
-	CPrincedV3Doc::GUARD guar;
-
-	//guard settings
-	int *gu; CQueue<CPrincedV3Doc::GUARD> gq; gu=new_zero_int(CPrincedV3Doc::MAXSCRN+1);
-
-	if(pDC->IsKindOf(RUNTIME_CLASS(CPaintDC))) //If by WM_PAINT,
-		//we can optimize the area to be drawn by accessing its member
-		rect=static_cast<CPaintDC *>(pDC)->m_ps.rcPaint;
-	else GetClientRect(rect); //draw the entire screen
-	
-	rect+=sp; //this is an invalid area
-	//to prevent garbages when scrolling to left/top, we must draw additional block (-1)
-	//but also check for negative values.
-	y=rect.bottom/m_nBlockY+1; x=rect.right/m_nBlockX+1; k=rect.top/m_nBlockY; k=max(k,0);
-	for(i=rect.left/m_nBlockX-1, i=max(i,0);i<x;i++)
-		for(j=y;j>=k;j--) {
-			s=pDoc->PositionFromScreen(i, j);
-			it=i%CPrincedV3Doc::SCRX; jt=j%CPrincedV3Doc::SCRY;
-
-			//Virtual border objects
-			if (!s) {
-				SCRNNUM s2;
-				//If it is a floor
-				if ((jt==(CPrincedV3Doc::SCRY-1))&&(pDoc->PositionFromScreen(i, j+1)))
-					DrawObject(pDC, i*m_nBlockX, j*m_nBlockY-m_nFloorHeight, CPrincedV3Doc::wFloor, CPrincedV3Doc::null);
-				//If it is a wall
-				else if ((it==(CPrincedV3Doc::SCRX-1))&&(pDoc->PositionFromScreen(i+1, j)))
-					DrawObject(pDC, i*m_nBlockX, j*m_nBlockY-m_nFloorHeight, CPrincedV3Doc::wWallBlock, CPrincedV3Doc::null);
-				//If it is a lower nothing
-				else if ((jt==0)&&(s2=pDoc->PositionFromScreen(i, j-1))&&(pDoc->GetWallAt(it, CPrincedV3Doc::SCRY-1, s2)==CPrincedV3Doc::wNull))
-					DrawObject(pDC, i*m_nBlockX, j*m_nBlockY-m_nFloorHeight, CPrincedV3Doc::wOutWallDown, CPrincedV3Doc::null);
-				//If it is a right nothing
-				else if ((it==0)&&(s2=pDoc->PositionFromScreen(i-1, j))&&(pDoc->GetWallAt(CPrincedV3Doc::SCRX-1, jt, s2)!=CPrincedV3Doc::wWallBlock))
-					DrawObject(pDC, i*m_nBlockX, j*m_nBlockY-m_nFloorHeight, CPrincedV3Doc::wOutWallRight, CPrincedV3Doc::null);
-				//If it is a right-lower nothing
-				else if ((jt==0)&&(it==0)&&(s2=pDoc->PositionFromScreen(i-1, j-1))&&(pDoc->GetWallAt(CPrincedV3Doc::SCRX-1, CPrincedV3Doc::SCRY-1, s2)==CPrincedV3Doc::wNull))
-					DrawObject(pDC, i*m_nBlockX, j*m_nBlockY-m_nFloorHeight, CPrincedV3Doc::wOutWallDownRight, CPrincedV3Doc::null);
-				else 
-					DrawObject(pDC, i*m_nBlockX, j*m_nBlockY-m_nFloorHeight, CPrincedV3Doc::wWallBlock, CPrincedV3Doc::null);
-			}
-
-			//Real objects
-			DrawObject(pDC, i*m_nBlockX, j*m_nBlockY-m_nFloorHeight,
-				pDoc->GetWallAt(it, jt, s), pDoc->GetBackAt(it, jt, s));
-
-			if(!gu[s]) { //Prepare for handling guard (only one guard per screen)
-				gu[s]=1; //only once
-				if(pDoc->GetGuard(s, &guar)) { //This screen has a guard
-					it=i-it; jt=j-jt; //12,13,14 -> 10, 3,4,5 -> 3
-					guar.x+=it, guar.y+=jt; gq.Add(guar); //for convinience
-				}
-			}
-		}
-	
-	//Now, display guards at once //TODO: Redraw the front layer
-	while(gq.Delete(guar)) {					
-		if(guar.color) k=guar.color; //normal guards
-		else k=8; //fat guy/Jaffar
-
-		//according to his direction
-		switch(guar.org) {
-		case CPrincedV3Doc::gRight:
-			PutSprite(pDC, guar.x*m_nBlockX, guar.y*m_nBlockY-m_nFloorHeight,
-				&m_bmGuard, &m_bmGuardMask, k*58, 58, 76);
-			break;
-		case CPrincedV3Doc::gLeft: //m_nFloorDep is uncertain
-			PutSprite(pDC, guar.x*m_nBlockX+m_nFloorDep*2, guar.y*m_nBlockY-
-				m_nFloorHeight, &m_bmGuard, &m_bmGuardMask, (k+1)*58, -58, 76);
-		}
-		guar.x=(guar.x/10)*10; guar.y=(guar.y/3)*3;
-	}
-
-	//at last, draw the border line
-	CPen rp, *op; rp.CreatePen(PS_SOLID, 1, m_bPalace ? RGB(0,255,255): RGB(255,0,0));
-	op=pDC->SelectObject(&rp);
-	it=CPrincedV3Doc::SCRX*m_nBlockX; jt=CPrincedV3Doc::SCRY*m_nBlockY;
-	for(j=(rect.top/jt)*jt;j<rect.bottom;j+=jt) {
-		pDC->MoveTo(rect.left, j); pDC->LineTo(rect.right, j);
-	}
-	for(i=(rect.left/it)*it;i<rect.right;i+=it) {
-		pDC->MoveTo(i, rect.top); pDC->LineTo(i, rect.bottom);
-	}
-
-	pDC->SelectObject(op); delete []gu;
-#if 0
-	CString st;
-	st.Format("Rendering level %d, pos %d %d, (screen %d)  \n", m_nLev, i,j,c);
-	pDC->TextOut(0, rect.bottom-16, st);
-
-	//locate the guard
-	{
-			//handle the front layer (when the guard overlaps the column and something)
-			for(err=b;err<b+2 && err<10;err++) { //have to consider the right side too :)
-				ind=-1;
-				switch(mpc.mGetWall(mpc.lev, c, a,err)&(~0x20)) {
-				case 0x03: ind=26; break; //floor with 1-story column
-				case 0x09: ind=27; break; //2-story floor (up part)
-				case 0x08: ind=28; break; //2-story floor (down part)
-					//TODO: more.. (spikes, choppers, doors ...)
-				}
-				if(ind!=-1) {
-					tempd.SelectObject(&bmMask);
-					pDC->BitBlt(err*32, a*63-13, 58, 76, &tempd, ind*58, 0, SRCAND);
-					tempd.SelectObject(&bmElem);
-					pDC->BitBlt(err*32, a*63-13, 58, 76, &tempd, ind*58, 0, SRCPAINT);
-				}
-			}
-		}
-	}
-	tempd.SelectObject(olb);
-#endif
-}
-
-/////////////////////////////////////////////////////////////////////////////
-// CPrincedV3View printing
-
-BOOL CPrincedV3View::OnPreparePrinting(CPrintInfo* pInfo)
-{
-	// default preparation
-	return DoPreparePrinting(pInfo);
-}
-
-void CPrincedV3View::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
-{
-	// TODO: add extra initialization before printing
-}
-
-void CPrincedV3View::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
-{
-	// TODO: add cleanup after printing
-}
-
-/////////////////////////////////////////////////////////////////////////////
-// CPrincedV3View diagnostics
-
-#ifdef _DEBUG
-void CPrincedV3View::AssertValid() const
-{
-	CScrollView::AssertValid();
-}
-
-void CPrincedV3View::Dump(CDumpContext& dc) const
-{
-	CScrollView::Dump(dc);
-}
-
-CPrincedV3Doc* CPrincedV3View::GetDocument() // non-debug version is inline
-{
-	ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CPrincedV3Doc)));
-	return (CPrincedV3Doc*)m_pDocument;
-}
-#endif //_DEBUG
-
-/////////////////////////////////////////////////////////////////////////////
-// CPrincedV3View message handlers
-
-void CPrincedV3View::OnDebugExecuteprinceofpersia() {
-//	SetRegKeyValue(
-	//cProcess normalExec("C:\\WINDOWS\\Escritorio\\kkx\\princed\\prince.exe");
-	cConfig c;
-	c.setSetting("test","probando");
-	c.setSetting("tama\xf1o",(char)43);
-
-	Beep(2600,100);
-
-}
-
-void CPrincedV3View::OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags) 
-{
-	CPrincedV3Doc *pDoc=GetDocument();
-	if(!m_byKey[nChar]) m_byKey[nChar]=1; m_nKeys++;
-	switch(nChar) {
-	case VK_PRIOR:
-		pDoc->LoadLevel(pDoc->GetLevel()-1); m_bPalace=pDoc->IsPalaceLevel(); CenterView();
-		Invalidate(); break;
-	case VK_NEXT:
-		pDoc->LoadLevel(pDoc->GetLevel()+1); m_bPalace=pDoc->IsPalaceLevel(); CenterView();
-		Invalidate(); break;
-	case VK_UP:
-		if(m_bSmoothKey) break;
-		ScrollToPosition(GetScrollPosition()+CPoint(0, -m_nBlockY)); break;
-	case VK_DOWN:
-		if(m_bSmoothKey) break;
-		ScrollToPosition(GetScrollPosition()+CPoint(0, m_nBlockY)); break;
-	case VK_LEFT:
-		if(m_bSmoothKey) break;
-		ScrollToPosition(GetScrollPosition()+CPoint(-m_nBlockX, 0)); break;
-	case VK_RIGHT:
-		if(m_bSmoothKey) break;
-		ScrollToPosition(GetScrollPosition()+CPoint(m_nBlockX, 0)); break;
-	case VK_SPACE: m_bPalace^=1; Invalidate(); break;
-	}
-	
-	CScrollView::OnKeyDown(nChar, nRepCnt, nFlags);
-}
-
-void CPrincedV3View::OnMouseMove(UINT nFlags, CPoint point) 
-{
-	if(GetCapture()==this) { //dragging
-		HandleEdit(point, nFlags);
-		switch(m_nCurTool) {
-		case ID_MAPTOOLS_ARRASTRAR: //Hand tool. drag the view.
-			ScrollToPosition(GetScrollPosition()+(m_ptPrev-point)); m_ptPrev=point;
-			break;
-		}
-	}
-	else {
-		//Hit-test the position
-		CMainFrame *pfr=DYNAMIC_DOWNCAST(CMainFrame, AfxGetMainWnd());
-		CPrincedV3Doc* pDoc=GetDocument(); CPoint ps; CString t;
-		point+=GetScrollPosition(); ps.x=point.x/m_nBlockX, ps.y=point.y/m_nBlockY;
-		t.Format("(%d, %d) - %s 0x%x! ", ps.x, ps.y,
-			pDoc->GetWallName(pDoc->GetWallAt(ps.x, ps.y)), pDoc->GetBackAt(ps.x, ps.y));
-		if(pfr) pfr->SetStatusText(t);
-	}
-}
-
-void CPrincedV3View::OnInitialUpdate() 
-{
-	SetZoom(m_nZoom); CScrollView::OnInitialUpdate();
-
-	m_bPalace=GetDocument()->IsPalaceLevel();
-	if(m_bmBack.m_hObject==NULL) { //initialize graphic elements
-		m_bmBack.LoadBitmap(IDB_BACKS); m_bmBackMask.LoadBitmap(IDB_BACKMASK);
-		m_bmDung.LoadBitmap(IDB_ELEMS); m_bmDungMask.LoadBitmap(IDB_ELEMMASK);
-		m_bmPala.LoadBitmap(IDB_ELEMP); m_bmPalaMask.LoadBitmap(IDB_ELEMPMASK);
-		m_bmGuard.LoadBitmap(IDB_GUARD); m_bmGuardMask.LoadBitmap(IDB_GUARDMASK);
-
-		CClientDC dc(this);
-		m_dcTemp.CreateCompatibleDC(&dc); m_pbmOld=m_dcTemp.GetCurrentBitmap();
-	}
-}
-
-void CPrincedV3View::OnDestroy() 
-{
-	CScrollView::OnDestroy(); m_dcTemp.SelectObject(m_pbmOld);	
-}
-
-BOOL CPrincedV3View::OnEraseBkgnd(CDC* pDC) 
-{
-	CRect rect; GetClientRect(rect); //fill black~
-	pDC->FillRect(rect, CBrush::FromHandle((HBRUSH)::GetStockObject(BLACK_BRUSH)));
-	return TRUE;
-}
-
-void CPrincedV3View::OnZoomFactor(UINT nID)
-{
-	switch(nID) {
-	case ID_VIEW_ZOOM_200: SetZoom(200); break; case ID_VIEW_ZOOM_100: SetZoom(100); break;
-	case ID_VIEW_ZOOM_50: SetZoom(50); break; case ID_VIEW_ZOOM_25: SetZoom(25); break;
-	}
-	Invalidate();
-}
-
-//Set the zoom factor, change related variables, and reset the view, placing the CPoint
-//orientation to the center.
-#define ZOOM(x) x=x*m_nZoom/100
-void CPrincedV3View::SetZoom(int fact, CPoint point)
-{
-	CSize sz; int nPrevz=m_nZoom; CRect rect; GetClientRect(rect); m_nZoom=fact;
-	m_nBlockX=32*m_nZoom/100; m_nBlockY=63*m_nZoom/100; m_nFloorHeight=13*m_nZoom/100;
-	m_nFloorDep=3*m_nZoom/100;
-
-	sz=GetDocument()->GetMapSize();
-	SetScrollSizes(MM_TEXT, CSize(m_nBlockX*CPrincedV3Doc::SCRX*15,
-		m_nBlockY*CPrincedV3Doc::SCRY*12),
-		CSize(CPrincedV3Doc::SCRX*m_nBlockX, m_nBlockY*CPrincedV3Doc::SCRY),
-		CSize(m_nBlockX, m_nBlockY));
-
-	point+=GetScrollPosition(); //now, center this point.
-	point.x=point.x*m_nZoom/nPrevz; point.y=point.y*m_nZoom/nPrevz;
-	ScrollToPosition(point+CPoint(-rect.Width()/2, -rect.Height()/2 ));
-	if(m_nZoom!=nPrevz) Invalidate(); //no optimized drawing
-}
-#undef ZOOM
-
-void CPrincedV3View::OnUpdateZoomFactor(CCmdUI *pCmdUI)
-{
-	switch(pCmdUI->m_nID) {
-	case ID_VIEW_ZOOM_200: pCmdUI->SetRadio(m_nZoom==200); break;
-	case ID_VIEW_ZOOM_100: pCmdUI->SetRadio(m_nZoom==100); break;
-	case ID_VIEW_ZOOM_50: pCmdUI->SetRadio(m_nZoom==50); break;
-	case ID_VIEW_ZOOM_25: pCmdUI->SetRadio(m_nZoom==25); break;
-	}
-}
-
-void CPrincedV3View::OnKeyUp(UINT nChar, UINT nRepCnt, UINT nFlags) 
-{
-	if(m_byKey[nChar]) m_byKey[nChar]=0, m_nKeys--;
-}
-
-BOOL CPrincedV3View::HandleKey()
-{
-	if(m_nKeys==0 || !m_bSmoothKey) { m_dwLastMomn=0; return FALSE; }
-	if(m_dwLastMomn==0) { m_dwLastMomn=::GetTickCount(); return TRUE; }
-	DWORD ex=::GetTickCount(); int delta; CPoint newp=GetScrollPosition();
-	delta=(ex-m_dwLastMomn)*m_nZoom/200; //constant delta for both fast/slow computers
-	if(m_byKey[VK_LEFT]) newp+=CPoint(-delta,0); if(m_byKey[VK_RIGHT]) newp+=CPoint(delta,0);
-	if(m_byKey[VK_UP]) newp+=CPoint(0,-delta); if(m_byKey[VK_DOWN]) newp+=CPoint(0,delta);
-	if(newp!=GetScrollPosition()) { /*::Sleep(1);*/  ScrollToPosition(newp); }
-	m_dwLastMomn=ex;
-	return TRUE;
-}
-
-void CPrincedV3View::CenterView()
-{
-	CRect rct; int srcsx, srcsy; CPoint pp=GetDocument()->GetStartScreen();
-	GetClientRect(rct); srcsx=m_nBlockX*CPrincedV3Doc::SCRX;
-	srcsy=m_nBlockY*CPrincedV3Doc::SCRY; pp.x=(pp.x-1)*srcsx; pp.y=(pp.y-1)*srcsy;
-	pp.x-=(rct.Width()-srcsx)/2; pp.y-=(rct.Height()-srcsy)/2;
-	ScrollToPosition(pp);
-}
-
-void CPrincedV3View::OnLButtonDown(UINT nFlags, CPoint point) 
-{
-	int i; m_ptPrev=point; HandleEdit(point, nFlags);
-	switch(m_nCurTool) {
-	case ID_MAPTOOLS_ZOOM: //zoom in
-		for(i=0;i+1<sizeof(m_nZfact)/sizeof(m_nZfact[0]);i++) if(m_nZfact[i]>m_nZoom) break;
-		SetZoom(m_nZfact[i], point); break;
-	default: SetCapture();
-	}
-}
-
-void CPrincedV3View::OnMapTool(UINT nID)
-{
-	m_nCurTool=nID;
-}
-
-void CPrincedV3View::OnUpdateMapTool(CCmdUI *pCmdUI)
-{
-	pCmdUI->Enable(!(pCmdUI->m_nID==ID_MAPTOOLS_WALKABLE_BALDOZACONESQUELETO && m_bPalace));
-	pCmdUI->SetRadio(m_nCurTool==pCmdUI->m_nID);
-}
-
-BOOL CPrincedV3View::OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message) 
-{
-	UINT ind=0;
-	if(nHitTest==HTCLIENT) //not on a scroll bar or anything else! :-P
-		switch(m_nCurTool) { //different cursor for different map tools
-		case ID_MAPTOOLS_DROPPER: ind=IDC_DROPPER; break;
-		case ID_MAPTOOLS_ZOOM: ind=IDC_ZOOMTOOL; break;
-		case ID_MAPTOOLS_ARRASTRAR: ind=IDC_HANDPALM; break;
-		}
-
-	if(ind!=0) { ::SetCursor(AfxGetApp()->LoadCursor(ind)); return FALSE; }
-	return CScrollView::OnSetCursor(pWnd, nHitTest, message);
-}
-
-void CPrincedV3View::OnLButtonUp(UINT nFlags, CPoint point) 
-{
-	ReleaseCapture();
-}
-
-void CPrincedV3View::OnRButtonDown(UINT nFlags, CPoint point) 
-{
-	int i;
-	switch(m_nCurTool) {
-	case ID_MAPTOOLS_ZOOM: //zoom out
-		for(i=sizeof(m_nZfact)/sizeof(m_nZfact[0])-1;i>0;i--) if(m_nZfact[i]<m_nZoom) break;
-		SetZoom(m_nZfact[i], point); break;
-	}
-}
-
-void CPrincedV3View::HandleEdit(CPoint point, UINT nFlags)
-{
-	BOOL b=TRUE; CPrincedV3Doc::WALL wa; CPrincedV3Doc::ATTRIB at=CPrincedV3Doc::null;
-	int sx,sy; CPoint pt=point; CPrincedV3Doc *pDoc=GetDocument();
-	point+=GetScrollPosition(); sx=point.x/m_nBlockX, sy=point.y/m_nBlockY;
-
-	switch(m_nCurTool) {
-	case ID_MAPTOOLS_CLEAR: wa=CPrincedV3Doc::wNull; break; //draw-something tool
-	case ID_MAPTOOLS_OBJECTS_POSSION: wa=CPrincedV3Doc::wPotion; at=CPrincedV3Doc::potRedSmall; break;
-
-	case ID_MAPTOOLS_WALKABLE_NORMAL: wa=CPrincedV3Doc::wFloor; break; //normal floor
-	case ID_MAPTOOLS_WALKABLE_BALDOZAROTA:
-		switch(pDoc->GetWallAt(sx, sy)) {
-		case CPrincedV3Doc::wFloorTorch: case CPrincedV3Doc::wBrokenFloorTorch:
-			wa=CPrincedV3Doc::wBrokenFloorTorch; break;
-		default: wa=CPrincedV3Doc::wBrokenFloor;
-		}
-		break; //broken floor
-	case ID_MAPTOOLS_WALKABLE_BALDOZAFLOJA: wa=CPrincedV3Doc::wLooseFloor; break; //loose floor
-	case ID_MAPTOOLS_WALKABLE_BALDOZAAPRETABLE: wa=CPrincedV3Doc::wDoorOpener; break; //door opener
-	case ID_MAPTOOLS_WALKABLE_DOORCLOSER: wa=CPrincedV3Doc::wDoorCloser; break; //door closer
-	case ID_MAPTOOLS_WALKABLE_PINCHES: wa=CPrincedV3Doc::wSpike; break; //spikes
-	case ID_MAPTOOLS_WALKABLE_BALDOZACONESQUELETO: wa=CPrincedV3Doc::wSkeleton; break; //skeleton
-
-	case ID_MAPTOOLS_GATES_DOOR: wa=CPrincedV3Doc::wDoor; at=CPrincedV3Doc::doorClosed; break;
-	case ID_MAPTOOLS_GATES_PUERTASIERRA: wa=CPrincedV3Doc::wChopper; break; //chopper
-	case ID_MAPTOOLS_SWORD: wa=CPrincedV3Doc::wSword;break;
-	//case ID_MAPTOOLS_GATES_LEVELGATE: wa=CPrincedV3Doc::; break; //level gate. (NOTE: 2 blocks)
-	case ID_MAPTOOLS_WALL: wa=CPrincedV3Doc::wWallBlock; break;
-	case ID_MAPTOOLS_BACKGROUND_COLUMN: wa=CPrincedV3Doc::wOneColumn; break;
-	//case ID_MAPTOOLS_BACKGROUND_BIGCOLUMN: wa=CPrincedV3Doc::wBigColumnUp; break; //(NOTE: 2 blocks)
-	case ID_MAPTOOLS_BACKGROUND_LIGHT:
-		switch(pDoc->GetWallAt(sx, sy)) {
-		case CPrincedV3Doc::wBrokenFloor: case CPrincedV3Doc::wBrokenFloorTorch:
-			wa=CPrincedV3Doc::wBrokenFloorTorch; break;
-		default: wa=CPrincedV3Doc::wFloorTorch;
-		}
-		break;
-
-	//and many background objects
-
-	default: b=FALSE; break;
-	}
-	if(b) {
-		CRect rct;
-		rct.left=pt.x-m_nBlockX; rct.right=pt.x+m_nBlockX*2; //with original mouse point
-		rct.top=pt.y-m_nBlockY; rct.bottom=pt.y+m_nBlockY*2;
-		if(pDoc->GetWallAt(sx, sy)!=wa || pDoc->GetBackAt(sx, sy)!=at) {
-			pDoc->PlaceObject(sx, sy, wa, at); InvalidateRect(rct); //invalidate only when necessary
-		}
-		pDoc->SetModifiedFlag();
-	}
-}
-
-//Setting the view mode -- either the palace or the dungeon
-void CPrincedV3View::OnViewMode(UINT nID)
-{
-	m_bPalace= nID==ID_VIEW_ASPALACE; Invalidate();
-}
-
-void CPrincedV3View::OnUpdateViewMode(CCmdUI *pCmdUI)
-{
-	pCmdUI->SetRadio( (pCmdUI->m_nID==ID_VIEW_ASDUNGEON) ^ m_bPalace);
-}
-
-void CPrincedV3View::OnTimer(UINT nIDEvent) 
-{
-	//TODO: implement scroll when dragging mouse outside the view
-	
-	CScrollView::OnTimer(nIDEvent);
-}
diff --git a/pv3/Princed V3View.h b/pv3/Princed V3View.h
deleted file mode 100644
index 1cc09b3..0000000
--- a/pv3/Princed V3View.h	
+++ /dev/null
@@ -1,111 +0,0 @@
-// Princed V3View.h : interface of the CPrincedV3View class
-//
-/////////////////////////////////////////////////////////////////////////////
-
-#if !defined(AFX_PRINCEDV3VIEW_H__B98D158F_6AA8_11D7_8A8E_00104B7CC0FF__INCLUDED_)
-#define AFX_PRINCEDV3VIEW_H__B98D158F_6AA8_11D7_8A8E_00104B7CC0FF__INCLUDED_
-
-#if _MSC_VER > 1000
-#pragma once
-#endif // _MSC_VER > 1000
-
-
-class CPrincedV3View : public CScrollView
-{
-protected: // create from serialization only
-	CPrincedV3View();
-	DECLARE_DYNCREATE(CPrincedV3View)
-
-// Attributes
-public:
-	CPrincedV3Doc* GetDocument();
-
-// Operations
-public:
-	void DrawObject(CDC *pDC, int x, int y, CPrincedV3Doc::WALL wa, CPrincedV3Doc::ATTRIB at=
-		CPrincedV3Doc::null);
-	void CenterView();
-	BOOL HandleKey(); //Idle-time processing for smooth key scroll
-	void HandleEdit(CPoint pt, UINT nFlags=0);
-
-// Overrides
-	// ClassWizard generated virtual function overrides
-	//{{AFX_VIRTUAL(CPrincedV3View)
-	public:
-	virtual void OnDraw(CDC* pDC);  // overridden to draw this view
-	virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
-	virtual void OnInitialUpdate();
-	protected:
-	virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
-	virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
-	virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
-	//}}AFX_VIRTUAL
-
-// Implementation
-public:
-	virtual ~CPrincedV3View();
-#ifdef _DEBUG
-	virtual void AssertValid() const;
-	virtual void Dump(CDumpContext& dc) const;
-#endif
-
-protected:
-	//Map tool
-	static UINT m_nCurTool; //currently selected tool
-	static CPoint m_ptPrev; //previous mouse cursor position (only one mouse, so static :-)
-
-	//Graphic elements
-	CBitmap m_bmDung, m_bmDungMask, m_bmPala, m_bmPalaMask;
-	CBitmap m_bmGuard, m_bmGuardMask, m_bmBack, m_bmBackMask;
-	BOOL m_bPalace; //yellow palace mode?
-
-	//Metric factor
-	int m_nBlockX, m_nBlockY, m_nFloorHeight, m_nFloorDep; //32, 63, 13, 3
-	int m_nZoom;
-	void SetZoom(int fact, CPoint orig=CPoint(0,0));
-	const static int m_nZfact[];
-
-	//Virtual DC
-	CDC m_dcTemp; CBitmap *m_pbmOld;
-	void PutSprite(CDC *pDC, int dstx, int dsty, CBitmap *pSrc, CBitmap *pMask,
-		int srcx, int cx, int cy); //helper function
-
-	//Keyboard behavior
-	static BYTE m_byKey[256]; BOOL m_bSmoothKey; static int m_nKeys; DWORD m_dwLastMomn;
-
-// Generated message map functions
-protected:
-
-	afx_msg void OnZoomFactor(UINT nID);
-	afx_msg void OnUpdateZoomFactor(CCmdUI *pCmdUI);
-	afx_msg void OnMapTool(UINT nID);
-	afx_msg void OnUpdateMapTool(CCmdUI *pCmdUI);
-	afx_msg void OnViewMode(UINT nID);
-	afx_msg void OnUpdateViewMode(CCmdUI *pCmdUI);
-	//{{AFX_MSG(CPrincedV3View)
-	afx_msg void OnDebugExecuteprinceofpersia();
-	afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
-	afx_msg void OnMouseMove(UINT nFlags, CPoint point);
-	afx_msg void OnDestroy();
-	afx_msg BOOL OnEraseBkgnd(CDC* pDC);
-	afx_msg void OnKeyUp(UINT nChar, UINT nRepCnt, UINT nFlags);
-	afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
-	afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message);
-	afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
-	afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
-	afx_msg void OnTimer(UINT nIDEvent);
-	//}}AFX_MSG
-	DECLARE_MESSAGE_MAP()
-};
-
-#ifndef _DEBUG  // debug version in Princed V3View.cpp
-inline CPrincedV3Doc* CPrincedV3View::GetDocument()
-   { return (CPrincedV3Doc*)m_pDocument; }
-#endif
-
-/////////////////////////////////////////////////////////////////////////////
-
-//{{AFX_INSERT_LOCATION}}
-// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
-
-#endif // !defined(AFX_PRINCEDV3VIEW_H__B98D158F_6AA8_11D7_8A8E_00104B7CC0FF__INCLUDED_)
diff --git a/pv3/RegisterWIN32.cpp b/pv3/RegisterWIN32.cpp
deleted file mode 100644
index b0badc7..0000000
--- a/pv3/RegisterWIN32.cpp
+++ /dev/null
@@ -1,973 +0,0 @@
-// RegisterWIN32.cpp: implementation of the CRegistreWIN32 class.
-//
-//////////////////////////////////////////////////////////////////////
-
-#include "stdafx.h"
-#include "RegisterWIN32.h"
-
-//////////////////////////////////////////////////////////////////////
-// Construction/Destruction
-//////////////////////////////////////////////////////////////////////
-
-CRegisterWIN32::CRegisterWIN32()
-{
-	//** Par defaut on utilise ce RootKey
-	m_RootKey = HKEY_LOCAL_MACHINE;
-	m_pszPath = new TCHAR[_MAX_PATH * sizeof(TCHAR)];
-	m_hKey = NULL;
-	m_szTemp = new TCHAR[_MAX_PATH * sizeof(TCHAR)];
-}
-
-CRegisterWIN32::~CRegisterWIN32()
-{
-	//** Clean up memory and Close Session
-	delete []m_pszPath;
-	delete []m_szTemp;
-	if(m_hKey) RegCloseKey(m_hKey);
-}
-
-
-////////////////////////////////////////////////////////////////////////////////
-//  Function.......: Open 
-//
-//  Description....: Open a registry Session
-//          Example: CRegistreWIN32 MyReg;
-//                   if( MyReg.Open(HKEY_CURRENT_USER, _T("Software\\SevySoft\\Admin")) )
-//						//** Open the Key in Read Mode Only
-//						//** The Key is in the Registry
-//					else
-//						//** The Key is not founded
-//
-//			Example: Open(HKEY_CURRENT_USER, _T("Software\\SevySoft\\Admin"), FALSE) 						  
-//                   //** This time if the Key do not exist then
-//					 //** it will be created 
-//                  
-//
-//  Author, date...: Yves Lessard , 24-Avril-2001.
-//
-//  Modifications..:
-//
-//  Arguments
-//  Name                Type     Acces   Description
-//  ------------------  -------  ------  -------------------------------------
-//  hKeyRoot            HKEY       R      Root Key
-//  szSubKey            LPCTSTR    R      Sub Key
-//  bReadOnly           BOOL       R      TRUE -> (Default) Read Only
-//                                        FALSE-> Read/Write
-//                                                If Subkey not found Create it     
-//  Open                BOOL       W      TRUE-> OK else FALSE  
-////////////////////////////////////////////////////////////////////////////////
-BOOL CRegisterWIN32::Open(HKEY hKeyRoot, LPCTSTR szPath, BOOL bReadOnly)
-{
-	BOOL bResult = FALSE;
-	try
-	{
-		//** If a Session Key Opened then close it
-		if ( m_hKey )
-			RegCloseKey(m_hKey);
-
-		//** 5 Roots Key choice 
-		if ( hKeyRoot == HKEY_CLASSES_ROOT || 
-			 hKeyRoot == HKEY_CURRENT_USER ||
-			 hKeyRoot == HKEY_LOCAL_MACHINE || 
-			 hKeyRoot == HKEY_USERS ||
-			 hKeyRoot == HKEY_CURRENT_CONFIG ) 
-			{
-				//** Save RootKey for reference
-				m_RootKey = hKeyRoot;
-				if ( _tcslen(szPath)* sizeof(TCHAR) > 0 )
-				{
-					//** We have a path so save it
-					_tcscpy(m_pszPath, szPath);
-					switch (bReadOnly)
-					{
-					case TRUE:
-						//** Read Mode Only
-						if ( VerifyKey() )
-							bResult = TRUE;
-						break;
-					default:
-						//** Else Read/Write
-						if ( VerifyKey() == FALSE )
-						{
-							//** Key not Found so create it
-							if( CreateKey() )
-								bResult = TRUE;
-						}
-					}
-				}
-			}
-	}
-	catch(...)
-	{
-		bResult = FALSE;
-	}
-	return bResult;
-}
-
-
-////////////////////////////////////////////////////////////////////////////////
-//  Function.......: Close 
-//
-//  Description....: Close a Registry Session  
-//                   The destructor also Close the Key
-//
-//  Author, date...: Yves Lessard , 24-Avril-2001.
-//
-//  Modifications..:
-//
-//  Arguments
-//  Name                Type     Acces   Description
-//  ------------------  -------  ------  -------------------------------------
-//  Close               BOOL        W    TRUE->OK else FALSE   
-////////////////////////////////////////////////////////////////////////////////
-BOOL CRegisterWIN32::Close()
-{
-	BOOL bResult = FALSE;
-	try
-	{
-		if ( m_hKey )
-			RegCloseKey(m_hKey);
-		m_hKey = NULL;
-	}
-	catch(...)
-	{
-		bResult = FALSE;
-	}
-
-	return bResult;
-}
-
-
-////////////////////////////////////////////////////////////////////////////////
-//  Function.......:  Open
-//
-//  Description....:  Open a Session with Path  and Key
-//                    The KeyRoot = HKEY_LOCAL_MACHINE as Default
-//
-//  Author, date...: Yves Lessard , 24-Avril-2001.
-//
-//  Modifications..:
-//
-//  Arguments
-//  Name                Type     Acces   Description
-//  ------------------  -------  ------  -------------------------------------
-//  szPath              LPCTSTR     R    The Path
-//  bReadOnly           BOOL        R    TRUE-> (Default) Read Only
-//                                       FALSE-> Read/Write           
-////////////////////////////////////////////////////////////////////////////////
-BOOL CRegisterWIN32::Open(LPCTSTR szPath, BOOL bReadOnly)
-{
-	BOOL bResult = FALSE;
-	try
-	{
-		//** If Session Key Opened then close it
-		if ( m_hKey )
-		RegCloseKey(m_hKey);
-		//** Always use this one
-		m_RootKey = HKEY_LOCAL_MACHINE;
-
-		if ( _tcslen(szPath)* sizeof(TCHAR) > 0 )
-		{
-			_tcscpy(m_pszPath, szPath);
-			switch (bReadOnly)
-			{
-				case TRUE:
-					//** Read only mode 
-					if ( VerifyKey() )
-						//** The Path exist
-						bResult = TRUE;
-					break;
-				default:
-					//** Read Write Mode
-					if ( VerifyKey() == FALSE )
-						{
-							//** If Path not Found Create it
-							if( CreateKey() )
-								//** If success return TRUE
-								bResult = TRUE;
-						}
-			}
-		}
-	}
-	catch(...)
-	{
-		bResult = FALSE;
-	}
-
-	return bResult;
-	
-}
-
-////////////////////////////////////////////////////////////////////////////////
-//  Function.......: Write (int)
-//
-//  Description....: Write Integer value
-//                  
-//
-//  Author, date...: Yves Lessard , 24-Avril-2001.
-//
-//  Modifications..:
-//
-//  Arguments
-//  Name                Type     Acces   Description
-//  ------------------  -------  ------  -------------------------------------
-//  szKey               LPCTSTR    R     The Key
-//  iVal                int        R     The Value
-//  Write               BOOL       W     TRUE->Succes Else FALSE
-////////////////////////////////////////////////////////////////////////////////
-BOOL CRegisterWIN32::Write(LPCTSTR szKey, int iVal)
-{
-	BOOL bResult = FALSE;
-	try
-	{
-		if ( SetValue(szKey, (DWORD)iVal) )
-			bResult = TRUE;
-	}
-	catch(...)
-	{
-		bResult = FALSE;
-	}
-	return bResult;
-}
-
-////////////////////////////////////////////////////////////////////////////////
-//  Function.......: Write (string)
-//
-//  Description....: Write a string into the Key value
-//                  
-//
-//  Author, date...: Yves Lessard , 24-Avril-2001.
-//
-//  Modifications..:
-//
-//  Arguments
-//  Name                Type     Acces   Description
-//  ------------------  -------  ------  -------------------------------------
-//  szKey               LPCTSTR    R     The Key
-//  szValue             LPCTSTR    R     The String to Write 
-//  Write               BOOL       W     TRUE-> Ok Else FALSE
-////////////////////////////////////////////////////////////////////////////////
-BOOL CRegisterWIN32::Write(LPCTSTR szKey, LPCTSTR szValue)
-{
-	BOOL bResult = FALSE;
-	try
-	{
-		DWORD dLen = _tcslen(szValue) * sizeof(TCHAR);
-		if ( dLen > 0)
-		{
-			//** Not empty string so proceed
-			dLen++;
-			if( RegSetValueEx(m_hKey, szKey,0,
-							REG_SZ, (CONST BYTE*)szValue,
-							dLen ) == ERROR_SUCCESS )
-							//** Success
-							bResult = TRUE;
-		}
-	}
-	catch(...)
-	{
-		bResult = FALSE;
-	}
-	return bResult;
-}
-
-
-////////////////////////////////////////////////////////////////////////////////
-//  Function.......: Write (DWORD)  
-//
-//  Description....: Write a DWORD to the Key
-//                  
-//
-//  Author, date...: Yves Lessard , 24-Avril-2001.
-//
-//  Modifications..:
-//
-//  Arguments
-//  Name                Type     Acces   Description
-//  ------------------  -------  ------  -------------------------------------
-//  szKey               LPCTSTR    R     The Key
-//  dwVal               DWORD      R     The Value
-//  Write               BOOL       W     TRUE->Succes Else FALSE
-////////////////////////////////////////////////////////////////////////////////
-BOOL CRegisterWIN32::Write(LPCTSTR szKey, DWORD dwVal)
-{
-	BOOL bResult = FALSE;
-	try
-	{
-		if ( SetValue(szKey, dwVal) )
-			bResult = TRUE;
-	}
-	catch(...)
-	{
-		bResult = FALSE;
-	}
-	return bResult;
-}
-
-////////////////////////////////////////////////////////////////////////////////
-//  Function.......: Write (LPBYTE)  
-//
-//  Description....: Write a Binary value
-//          Example: BYTE MonByte[10]={1,2,3,4,5,6,7,8,9,10}; 
-//                   MyReg.Write("BinVal", MonByte, 10);
-//                   We write the BYTE array with 10 values           
-//                  
-//
-//  Author, date...: Yves Lessard , 24-Avril-2001.
-//
-//  Modifications..:
-//
-//  Arguments
-//  Name                Type     Acces   Description
-//  ------------------  -------  ------  -------------------------------------
-//  szKey               LPCTSTR    R     The Key
-//  dwVal               LPBYTE     R     The BYTE Array
-//  nLen                DWORD      R     Number of Elements to Write 
-//  Write               BOOL       W     TRUE->Succes Else FALSE
-////////////////////////////////////////////////////////////////////////////////
-BOOL CRegisterWIN32::Write(LPCTSTR szKey, LPBYTE pValue, DWORD nLen)
-{
-	BOOL bResult = FALSE;
-	try
-	{
-		if ( RegSetValueEx(m_hKey, szKey, 0, REG_BINARY, pValue, nLen) == ERROR_SUCCESS )
-			bResult = TRUE;
-	}
-	catch(...)
-	{
-		bResult = FALSE;
-	}
-   	return bResult;
-}
-
-
-
-////////////////////////////////////////////////////////////////////////////////
-//  Function.......: Read
-//
-//  Description....: Read a string Value into a char or TCHAR
-//			Example: TCHAR *szTemp=NULL;
-//					 You don't need to allocate memory 
-//                   but you are responsable to free up memmory 
-//
-//  Author, date...: Yves Lessard , 25-Avril-2001.
-//
-//  Modifications..:
-//
-//  Arguments
-//  Name                Type     Acces   Description
-//  ------------------  -------  ------  -------------------------------------
-//  szKey               LPCTSTR     R    The key to read
-//  pszValue            LPTSTR      R    Destination to store Data
-//  Read                BOOL        W    TRUE-> OK Else FALSE       
-////////////////////////////////////////////////////////////////////////////////
-BOOL CRegisterWIN32::Read(LPCTSTR szKey, LPTSTR &pszValue)
-{
-	BOOL bResult = FALSE;
-	try
-	{
-		if ( StringIN(szKey) )
-		{
-			//** The Key exist so proceed 
-			if( pszValue != NULL )
-				delete pszValue;
-			//** We re-allocate memory on destination pointer
-			pszValue = new _TCHAR[_tcslen(m_szTemp) + 1 * sizeof(TCHAR)];
-			//** Transfert the reading result
-			_tcscpy(pszValue, m_szTemp);
-			bResult = TRUE;
-		}
-	}
-	catch(...)
-	{
-		bResult = FALSE;
-	}
-	return bResult;
-}
-
-
-////////////////////////////////////////////////////////////////////////////////
-//  Function.......: Read (DWORD)
-//
-//  Description....: We read a DWORD value
-//	        Example: DWORD dVal;
-//	                 MyReg.Read("LTop", dVal);                  
-//
-//  Author, date...: Yves Lessard , 25-Avril-2001.
-//
-//  Modifications..:
-//
-//  Arguments
-//  Name                Type     Acces   Description
-//  ------------------  -------  ------  -------------------------------------
-//  szKey               LPCTSTR    R     The Key
-//  pdwVal              DWORD      R     Destination
-//  Read                BOOL       W     TRUE->Succes else FALSE
-////////////////////////////////////////////////////////////////////////////////
-BOOL CRegisterWIN32::Read(LPCTSTR szKey, DWORD &pdwVal)
-{
-	BOOL bResult = FALSE;
-	try
-	{
-		if ( GetValue(szKey) )
-		{
-			//** Save result into destination 
-			pdwVal = m_dTemp;
-			bResult = TRUE;
-		}
-	}
-	catch(...)
-	{
-		bResult = FALSE;
-	}
-	return bResult;
-}
-
-
-////////////////////////////////////////////////////////////////////////////////
-//  Function.......: Read (int)
-//
-//  Description....: Integer reading
-//                  
-//
-//  Author, date...: Yves Lessard , 24-Avril-2001.
-//
-//  Modifications..:
-//
-//  Arguments
-//  Name                Type     Acces   Description
-//  ------------------  -------  ------  -------------------------------------
-//  szKey               LPCTSTR    R     The Key
-//  *piVal              int        R     Int result
-//  Read                BOOL       W     TRUE->Succes Else FALSE
-////////////////////////////////////////////////////////////////////////////////
-BOOL CRegisterWIN32::Read(LPCTSTR szKey, int &piVal)
-{
-	BOOL bResult = FALSE;
-	try
-	{
-		if ( GetValue(szKey) )
-		{
-			//** Store reulst into destination
-			piVal = (int)m_dTemp;
-			bResult = TRUE;
-		}
-	}
-	catch(...)
-	{
-		bResult = FALSE;
-	}
-	return bResult;
-}
-
-
-#ifdef USE_MFC
-//** If we are using MFC CString
-
-////////////////////////////////////////////////////////////////////////////////
-//  Function.......:  Read
-//
-//  Description....:  Read a String key & store it in CString (MFC)
-//                    CString automaticaly deal with memory
-//
-//  Author, date...: Yves Lessard , 24-Avril-2001.
-//
-//  Modifications..:
-//
-//  Arguments
-//  Name                Type     Acces   Description
-//  ------------------  -------  ------  -------------------------------------
-//  szKey               LPCTSTR     R     The Key
-//  szValue             CString     W     The read result
-//  Read                BOOL        W     TRUE->OK else FALSE  
-////////////////////////////////////////////////////////////////////////////////
-BOOL CRegisterWIN32::Read(LPCTSTR szKey, CString &pszValue)
-{
-	BOOL bResult = FALSE;
-	try
-	{
-		if( StringIN(szKey) )
-		{
-			//** Store result in CString destination
-			pszValue = m_szTemp;
-			bResult = TRUE;
-		}
-	}
-	catch(...)
-	{
-		bResult = FALSE;
-	}
-	return bResult;
-}
-#endif
-
-
-////////////////////////////////////////////////////////////////////////////////
-//  Function.......: DeleteValue
-//
-//  Description....: Delete a Key Value 
-//                  
-//
-//  Author, date...: Yves Lessard , 25-Avril-2001.
-//
-//  Modifications..:
-//
-//  Arguments
-//  Name                Type     Acces   Description
-//  ------------------  -------  ------  -------------------------------------
-//  szKey               LPCTSTR     R    The Key Value
-//  DeleteValue			BOOL		W	 TRUE->Success else FALSE
-////////////////////////////////////////////////////////////////////////////////
-BOOL CRegisterWIN32::DeleteValue(LPCTSTR szKey)
-{
-	BOOL bResult = FALSE;
-	try
-	{
-		//** The Key Value to Delete
-		if ( RegDeleteValue(m_hKey, szKey) == ERROR_SUCCESS )
-			bResult= TRUE;
-	}
-	catch(...)
-	{	
-		bResult = FALSE;
-	}
-	return bResult;
-}
-
-
-////////////////////////////////////////////////////////////////////////////////
-//  Function.......:  DeleteKey
-//
-//  Description....:  Delete Key and SubKey
-//					  With WinNT we need a special Function 
-//					  You don't need to use Open for this Function
-//           Example: MyReg.DeleteKey(HKEY_CURRENT_USER, _T("Software\\SevySoft"));
-//                    The Function will extract the Path = Software
-//                    Then delete the Key SevySoft with all SubDir and Value Inside
-//            	
-//
-//  Author, date...: Yves Lessard , 07-Fev-2001.
-//
-//  Modifications..:
-//
-//  Arguments
-//  Name                Type     Acces   Description
-//  ------------------  -------  ------  -------------------------------------
-//  hKeyRoot            HKEY       R      The KeyRoot
-//  szPath              LPCTSTR    R      Key or SubKey
-//  DeleteKey           BOOL       W      TRUE->OK Else FALSE
-////////////////////////////////////////////////////////////////////////////////
-BOOL CRegisterWIN32::DeleteKey(HKEY hKeyRoot, LPCTSTR szPath)
-{
-	BOOL bResult  = FALSE;
-	try
-	{
-		TCHAR *pszSubKey = new TCHAR[_MAX_PATH * sizeof(TCHAR)];
-		TCHAR *pszPath = new TCHAR[_MAX_PATH * sizeof(TCHAR)];
-		TCHAR *pDest=NULL;
-		//** If Path empty we get out
-		if( _tcslen(szPath) * sizeof(TCHAR) == 0)
-			goto Exit_Point;
-		
-		pDest= _tcsrchr(szPath, '\\');
-		if (pDest != NULL)
-		{
-			//** Must extract the Last Key
-			pDest++;
-			//** Copy the Key or SubKey to delete
-			_tcscpy(pszSubKey, pDest);
-			//** We must now extract the Path
-			pDest--;
-			int iCount=0;
-			int Result=0;
-			Result = pDest - szPath ;
-			do
-			{
-				pszPath[iCount] = szPath[iCount];
-				iCount++;
-			}while ( iCount < Result );
-			//** Add end of string mark
-			pszPath[iCount]= '\0';
-		}
-		else
-		{
-			//** We want to delete a path
-			_tcscpy(pszSubKey, szPath);
-			//** There is no path
-			_tcscpy(pszPath, _T(""));
-		}
-		HKEY hKey;
-		//** Check if Path exist ...
-		if ( RegOpenKeyEx(hKeyRoot, pszPath, 0L, KEY_ALL_ACCESS, &hKey) != ERROR_SUCCESS )
-			goto Exit_Point;
-
-		//** Check NT or 2000
-		if( GetOSversion() )
-			if ( m_dTemp == 1 )
-			{
-				//** NT system must use Recursive Delete
-				if( DeleteNTway(hKey, pszSubKey) )
-					bResult = TRUE;
-			}
-			else
-			{
-				//** Windows 95 or 98
-				if ( RegDeleteKey(hKey , pszSubKey) == ERROR_SUCCESS )
-					bResult= TRUE;
-			}
-
-			RegCloseKey(hKey);
-Exit_Point:
-			delete pszSubKey, pszPath;
-		}
-	catch(...)
-	{
-		bResult = FALSE;
-	}
-	return bResult;
-}
-
-////////////////////////////////////////////////////////////////////////////////
-//  Function.......: Read LPBYTE 
-//
-//  Description....: Read a Byte array  
-//                   Most of the times we know how many Bytes we need
-//          Example: BYTE MyBytes[25];
-//                   DWORD dwByteRead;
-//					 MyReg.Read("ArrayKey", MyBytes, dwByteRead);
-//      
-//
-//  Author, date...: Yves Lessard , 24-Avril-2001.
-//
-//  Modifications..:
-//
-//  Arguments
-//  Name                Type     Acces   Description
-//  ------------------  -------  ------  -------------------------------------
-//  szKey               LPCTSTR     R    The Key
-//  pValue              LPBYTE      W    The Byte Array
-//  pnLen               DWORD       W    The number of Bytes readed
-//  Read				BOOL		W	 TRUE->Success else FALSE  
-////////////////////////////////////////////////////////////////////////////////
-BOOL CRegisterWIN32::Read(LPCTSTR szKey, LPBYTE pValue, DWORD &pnLen)
-{
-	BOOL bResult = FALSE;
-	try
-	{
-		if ( VerifyKey() )
-		{
-			if ( RegQueryValueEx(m_hKey, szKey, NULL, NULL, pValue, &pnLen) == ERROR_SUCCESS )
-				bResult = TRUE;
-		}
-	}
-	catch(...)
-	{
-		bResult = FALSE;
-	}
-   
-	return bResult;
-}
-
-
-//*********************
-//  Private Functions
-//*********************
-
-////////////////////////////////////////////////////////////////////////////////
-//  Function.......: VerifyKey
-//
-//  Description....: Private function  We check if a Key exist  
-//					 We already have the RootKey & Path
-//                  
-//
-//  Author, date...: Yves Lessard , 24-Avril-2001.
-//
-//  Modifications..:
-//
-//  Arguments
-//  Name                Type     Acces   Description
-//  ------------------  -------  ------  -------------------------------------
-//  VerifyKey           BOOL        W    TRUE-> OK else FALSE 
-////////////////////////////////////////////////////////////////////////////////
-BOOL CRegisterWIN32::VerifyKey()
-{
-	BOOL bResult = FALSE;
-	try
-	{
-		if ( RegOpenKeyEx(m_RootKey, m_pszPath, 0L, KEY_ALL_ACCESS, &m_hKey) == ERROR_SUCCESS )
-			//** Success the Key exist
-			bResult= TRUE;
-	}
-		catch(...)
-	{
-		bResult = FALSE;
-	}
-
-	return bResult;
-}
-
-////////////////////////////////////////////////////////////////////////////////
-//  Function.......: StringIN
-//
-//  Description....: Private function for String reading
-//                  
-//
-//  Author, date...: Yves Lessard , 24-Avril-2001.
-//
-//  Modifications..:
-//
-//  Arguments
-//  Name                Type     Acces   Description
-//  ------------------  -------  ------  -------------------------------------
-//  szKey               LPCTSTR     R    The Key to read
-//  StringIN            BOOL        W    TRUE->OK Else FALSE 
-////////////////////////////////////////////////////////////////////////////////
-BOOL CRegisterWIN32::StringIN(LPCTSTR szKey)
-{
-	BOOL bResult = FALSE;
-	try
-	{
-		if ( _tcsclen(szKey)* sizeof(TCHAR) > 0 )
-		{
-			//** We can do the writing
-			DWORD dwType;
-			DWORD dwSize = MAX_PATH;
-			if( RegQueryValueEx(m_hKey, szKey, 0, &dwType,
-							(BYTE*)m_szTemp, &dwSize) == ERROR_SUCCESS)
-							//** No error
-							bResult = TRUE;
-		}
-	}
-	catch(...)
-	{
-		bResult = FALSE;
-	}
-	return bResult;
-}
-
-////////////////////////////////////////////////////////////////////////////////
-//  Function.......: SetValue
-//
-//  Description....: Private function for DWORD & Int writing
-//                  
-//
-//  Author, date...: Yves Lessard , 24-Avril-2001.
-//
-//  Modifications..:
-//
-//  Arguments
-//  Name                Type     Acces   Description
-//  ------------------  -------  ------  -------------------------------------
-//  SetValue            BOOL       W      TRUE->OK Else FALSE  
-////////////////////////////////////////////////////////////////////////////////
-BOOL CRegisterWIN32::SetValue(LPCTSTR szKey, DWORD dVal)
-{
-	BOOL bResult = FALSE;
-	try
-	{
-		//** Write the Value
-		if( RegSetValueEx(m_hKey, szKey,0,
-						REG_DWORD, (CONST BYTE*)&dVal, sizeof(DWORD)) == ERROR_SUCCESS )
-						//** No error
-						bResult = TRUE;
-	}
-	catch(...)
-	{
-		bResult = FALSE;
-	}
-	return bResult;	
-}
-
-////////////////////////////////////////////////////////////////////////////////
-//  Function.......: GetValue 
-//
-//  Description....: Private function to read a DWORD 
-//                   The value is store in m_dTemp
-//
-//  Author, date...: Yves Lessard , 24-Avril-2001.
-//
-//  Modifications..:
-//
-//  Arguments
-//  Name                Type     Acces   Description
-//  ------------------  -------  ------  -------------------------------------
-//  szKey               LPCTSTR    R     The Key
-//  GetValue            BOOL       W     TRUE->OK Else FALSE  
-////////////////////////////////////////////////////////////////////////////////
-BOOL CRegisterWIN32::GetValue(LPCTSTR szKey)
-{
-	BOOL bResult = FALSE;
-	try
-	{
-		DWORD dwType;
-		DWORD dwSize = sizeof(DWORD);
-		if( RegQueryValueEx(m_hKey, szKey, 0, &dwType,
-						(BYTE*)&m_dTemp, &dwSize) == ERROR_SUCCESS )
-						//** Success
-						bResult = TRUE;
-	}
-	catch(...)
-	{
-		bResult = FALSE;
-	}
-	return bResult;
-}
-
-////////////////////////////////////////////////////////////////////////////////
-//  Function.......: GetOSversion 
-//
-//  Description....: We want to know if NT4 ou Win2000 
-//                   Private Fucntion 
-//
-//  Author, date...: Yves Lessard , 26-Avril-2001.
-//
-//  Modifications..:
-//
-//  Arguments
-//  Name                Type     Acces   Description
-//  ------------------  -------  ------  -------------------------------------
-//  GetOSversion        BOOL        W    TRUE->OK 
-//                                       We should check m_dTemp after called
-//                                       m_dTemp = 1 NT4 ou Win2000
-//                                       m_dTemp = 0 Win95, Win98
-////////////////////////////////////////////////////////////////////////////////
-BOOL CRegisterWIN32::GetOSversion()
-{
-	BOOL bResult = FALSE;
-	m_dTemp = 0;
-	try
-	{
-		OSVERSIONINFO osv;
-		osv.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
-		if (GetVersionEx(&osv))
-		{
-			// note: szCSDVersion =  service pack  release  
-			TCHAR *ServiceRelease = osv.szCSDVersion;
-			switch(osv.dwPlatformId)
-			{
-				case VER_PLATFORM_WIN32_NT: 
-					m_dTemp=1;
-					bResult = TRUE;
-					break;
-				default:
-					m_dTemp=0;
-					bResult = TRUE;
-					break;
-			}   
-		}
-	}
-	catch(...)
-	{
-		bResult = FALSE;
-	}
-	return bResult;
-}
-
-////////////////////////////////////////////////////////////////////////////////
-//  Function.......:  CreateKey
-//
-//  Description....:  (Private Fucntion) From m_RootKey and m_pszPath and m_hKey
-//                    We create the Key path 
-//                  
-//
-//  Author, date...: Yves Lessard , 24-Avril-2001.
-//
-//  Modifications..:
-//
-//  Arguments
-//  Name                Type     Acces   Description
-//  ------------------  -------  ------  -------------------------------------
-//  CreateKey            BOOL      W     TRUE-> OK else FALSE 
-////////////////////////////////////////////////////////////////////////////////
-BOOL CRegisterWIN32::CreateKey()
-{
-	BOOL bResult = FALSE;
-	try
-	{	
-		if ( m_hKey )
-			RegCloseKey(m_hKey);
-		LONG lresult=0;
-		lresult= RegCreateKeyEx(m_RootKey, m_pszPath, 0, 0,
-							REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS,
-							0, &m_hKey, 0);
-		if ( lresult == ERROR_SUCCESS ) 
-			//** Creating the key was successfull
-			bResult= TRUE;
-	}
-		catch(...)
-	{
-		bResult = FALSE;
-	}
-
-	return bResult;
-}
-
-////////////////////////////////////////////////////////////////////////////////
-//  Function.......: DeleteNTway 
-//
-//  Description....: Delete each Subkey  
-//                   Thsi is a recursive Function 
-//
-//  Author, date...: Yves Lessard , 17-Apr-2001.
-//
-//  Modifications..:
-//
-//  Arguments
-//  Name                Type     Acces   Description
-//  ------------------  -------  ------  -------------------------------------
-//  hKey				HKEY		R    The RootKey
-//  szSubKey            LPCTSTR		R    The Subkey to Delete
-//  DeleteNTway			BOOL		W	 TRUE-> Success else FALSE 
-////////////////////////////////////////////////////////////////////////////////
-BOOL CRegisterWIN32::DeleteNTway(HKEY hKey, LPCTSTR szSubKey)
-{
-	BOOL bResult = FALSE;
-	try
-	{
-		HKEY lhKey;
-		FILETIME ft;
-		LONG lResult;
-		DWORD dwKeyLen;
-		TCHAR *pszTemp = new TCHAR[_MAX_PATH * sizeof(TCHAR)];
-
-		//** If Path empty we get out
-		if( _tcslen(szSubKey) * sizeof(TCHAR) == 0)
-			goto Exit_Point;
-		lResult =RegOpenKeyEx(hKey, szSubKey, 0L, KEY_ENUMERATE_SUB_KEYS, &lhKey);
-		if (lResult == ERROR_SUCCESS )
-		{
-			//** So far the Key exist
-			do
-			{
-				dwKeyLen = _MAX_PATH * sizeof(TCHAR);
-				lResult = RegEnumKeyEx(lhKey, 0, pszTemp, &dwKeyLen, NULL, NULL,
-						  NULL, &ft);
-				switch (lResult)
-				{
-					case ERROR_NO_MORE_ITEMS:
-						//** No more Subkey so delete the base
-						if ( RegDeleteKey(hKey , szSubKey) == ERROR_SUCCESS )
-						{
-							bResult= TRUE;
-							goto Exit_Point;
-						}
-						break;
-					case ERROR_SUCCESS:
-						if( DeleteNTway(lhKey, pszTemp) )
-							bResult = TRUE;
-						break;
-				}
-			}while( lResult == ERROR_SUCCESS);
-			RegCloseKey(lhKey);
-		}
-
-Exit_Point:
-		delete pszTemp;
-	}
-	catch(...)
-	{
-		bResult = FALSE;
-	}
-	return bResult;
-}
diff --git a/pv3/RegisterWIN32.h b/pv3/RegisterWIN32.h
deleted file mode 100644
index 69506f3..0000000
--- a/pv3/RegisterWIN32.h
+++ /dev/null
@@ -1,132 +0,0 @@
-/******************************************************************************
-/** Class Name.....: CRegisterWIN32 (RegisterWIN32.h)
-/** Description....: Some registry functions in WIN32 Environnment
-/**                  If you want to use the Class in MFC (CString)
-/**                  #define USE_MFC
-/**
-/** Author, date...: Yves Lessard , 27-Apr-2000.
-/**
-/** 1.0.0.0   30-Apr-2000
-/**
-/** Modifications..:
-/**
-/** Method(Public)						Description
-/**
-/**	--> There are 2 ways to initialize a Session Key
-/**
-/** 1) Open(RootKey,SubKey,Mode)		Open a Session and must pass the RootKey and Path
-/**                                     By default Mode is Read Only
-/** 2) Open(Subkey, Mode)               The Rootkey = HKEY_LOCAL_MACHINE as default
-/**                                     You specify the Path and The Key
-/** Close								Close a Session Key
-/**
-/** Write(szKey, LPCTSTR szValue)       Write a String to the Key
-/** Write(szKey, DWORD)					Write a DWORD value
-/** Write(szKey , Int)					Write a Int value
-/** Write(szKey, LPBYTE)				Write Byte array
-/** WriteStruct(szKey, T &obj)          For all other kind of Data
-/**                                     Float, Double, CRect, etc
-/**  
-/** Read(szKey, &pszDest)               Read a string value
-/** Read(szKey, CString)                Read a String value Store in CString
-/** Read(szKey, &DWORD)					Read a Dword value
-/** Read(szKey, Int)					Read Integer value
-/** Read(szKey, LPBYTE, &DWORD)			Read a Byte array
-/** ReadStruct(LPCTSTR szKey, T &obj)	Read all other kind of Data
-/**
-/** DeleteValue(LPCTSTR szKey)			Delete a Key Value
-/** DeleteKey(HKEY, LPCTSTR szSubKey)   Delete a Key or SubKey (Recursive)
-/**    
-******************************************************************************/
-
-//#if !defined(AFX_REGISTERWIN32_H__305C4B07_38D6_11D5_8068_0050BAB07D8B__INCLUDED_)
-//#define AFX_REGISTERWIN32_H__305C4B07_38D6_11D5_8068_0050BAB07D8B__INCLUDED_
-
-//#if _MSC_VER > 1000
-//#pragma once
-//#endif // _MSC_VER > 1000
-#include <tchar.h>
-#include <windows.h>
-#include <stdlib.h>
-
-//** If use with MFC and you want CString remove rem on next line
-//#define USE_MFC
-
-class CRegisterWIN32  
-{
-public:
-	BOOL DeleteKey(HKEY hKeyRoot, LPCTSTR szPath);
-	BOOL DeleteValue(LPCTSTR szKey);
-#ifdef USE_MFC
-	BOOL Read(LPCTSTR szKey, CString &pszValue);
-#endif
-	BOOL Read(LPCTSTR szKey, int &piVal);
-	BOOL Read(LPCTSTR szKey, DWORD &pdwVal);
-	BOOL Read(LPCTSTR szKey, LPTSTR &pszValue);
-	BOOL Read(LPCTSTR szKey, LPBYTE pValue, DWORD &pnLen);
-
-	BOOL Write(LPCTSTR szKey, int iVal);
-	BOOL Write(LPCTSTR szKey, DWORD dwVal);
-	BOOL Write(LPCTSTR szKey, LPCTSTR szValue);
-	BOOL Write(LPCTSTR szKey, LPBYTE pValue, DWORD nLen);
-	
-	BOOL Open(LPCTSTR szPath, BOOL bReadOnly = TRUE);
-	BOOL Close();
-	BOOL Open(HKEY hKeyRoot, LPCTSTR szPath, BOOL bReadOnly = TRUE);
-	CRegisterWIN32();
-	virtual ~CRegisterWIN32();
-	//**************
-	//  WriteStruct
-	//**************
-	template <class T>BOOL WriteStruct(LPCTSTR szKey, T &obj)
-	{
-		BOOL bResult = FALSE;
-		try
-		{
-			//** Translate data to Binary
-			if ( RegSetValueEx(m_hKey, szKey, 0, REG_BINARY,(LPBYTE)&obj, sizeof(T)) == ERROR_SUCCESS )
-				bResult = TRUE;
-		}
-		catch(...)
-		{
-			bResult = FALSE;
-		}
-		return bResult;
-	}
-	//********************
-	// ReadStruct
-	//********************
-	template <class T>BOOL ReadStruct(LPCTSTR szKey, T &obj)
-	{
-		BOOL bResult = FALSE;
-		try
-		{
-			//** Read the data
-			DWORD dwLen = sizeof(T);
-			if ( ::RegQueryValueEx(m_hKey, szKey, NULL, NULL, (LPBYTE)&obj,&dwLen) == ERROR_SUCCESS )
-				bResult = TRUE;
-		}
-		catch(...)
-		{	
-			bResult = FALSE;
-		}
-		return bResult;
-	}
-
-private:
-	BOOL DeleteNTway(HKEY hKey, LPCTSTR szSubKey);
-	BOOL GetOSversion();
-	_TCHAR * m_szTemp;
-	BOOL StringIN(LPCTSTR szKey);
-	BOOL GetValue(LPCTSTR szKey);
-	DWORD m_dTemp;
-	BOOL SetValue(LPCTSTR szKey, DWORD dVal);
-	HKEY m_hKey;
-	BOOL CreateKey();
-	BOOL VerifyKey();
-	_TCHAR *m_pszPath;
-	HKEY m_RootKey;
-	int iOSversion;
-};
-
-//#endif // !defined(AFX_REGISTERWIN32_H__305C4B07_38D6_11D5_8068_0050BAB07D8B__INCLUDED_)
diff --git a/pv3/StdAfx.cpp b/pv3/StdAfx.cpp
deleted file mode 100644
index bc56938..0000000
--- a/pv3/StdAfx.cpp
+++ /dev/null
@@ -1,8 +0,0 @@
-// stdafx.cpp : source file that includes just the standard includes
-//	Princed V3.pch will be the pre-compiled header
-//	stdafx.obj will contain the pre-compiled type information
-
-#include "stdafx.h"
-
-
-
diff --git a/pv3/StdAfx.h b/pv3/StdAfx.h
deleted file mode 100644
index 391faef..0000000
--- a/pv3/StdAfx.h
+++ /dev/null
@@ -1,28 +0,0 @@
-// stdafx.h : include file for standard system include files,
-//  or project specific include files that are used frequently, but
-//      are changed infrequently
-//
-
-#if !defined(AFX_STDAFX_H__B98D1587_6AA8_11D7_8A8E_00104B7CC0FF__INCLUDED_)
-#define AFX_STDAFX_H__B98D1587_6AA8_11D7_8A8E_00104B7CC0FF__INCLUDED_
-
-#if _MSC_VER > 1000
-#pragma once
-#endif // _MSC_VER > 1000
-
-#define VC_EXTRALEAN		// Exclude rarely-used stuff from Windows headers
-
-#include <afxwin.h>         // MFC core and standard components
-#include <afxext.h>         // MFC extensions
-#include <afxdisp.h>        // MFC Automation classes
-#include <afxdtctl.h>		// MFC support for Internet Explorer 4 Common Controls
-#ifndef _AFX_NO_AFXCMN_SUPPORT
-#include <afxcmn.h>			// MFC support for Windows Common Controls
-#endif // _AFX_NO_AFXCMN_SUPPORT
-
-#include <afxsock.h>		// MFC socket extensions
-
-//{{AFX_INSERT_LOCATION}}
-// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
-
-#endif // !defined(AFX_STDAFX_H__B98D1587_6AA8_11D7_8A8E_00104B7CC0FF__INCLUDED_)
diff --git a/pv3/cSelectLevelWindow.cpp b/pv3/cSelectLevelWindow.cpp
deleted file mode 100644
index 84de5ee..0000000
--- a/pv3/cSelectLevelWindow.cpp
+++ /dev/null
@@ -1,52 +0,0 @@
-// cSelectLevelWindow.cpp : implementation file
-//
-
-#include "stdafx.h"
-#include "Princed V3.h"
-#include "cSelectLevelWindow.h"
-
-#ifdef _DEBUG
-#define new DEBUG_NEW
-#undef THIS_FILE
-static char THIS_FILE[] = __FILE__;
-#endif
-
-/////////////////////////////////////////////////////////////////////////////
-// cSelectLevelWindow dialog
-
-
-cSelectLevelWindow::cSelectLevelWindow(CWnd* pParent /*=NULL*/)
-	: CDialog(cSelectLevelWindow::IDD, pParent)
-{
-	//{{AFX_DATA_INIT(cSelectLevelWindow)
-		// NOTE: the ClassWizard will add member initialization here
-	//}}AFX_DATA_INIT
-}
-
-
-void cSelectLevelWindow::DoDataExchange(CDataExchange* pDX)
-{
-	CDialog::DoDataExchange(pDX);
-	//{{AFX_DATA_MAP(cSelectLevelWindow)
-		// NOTE: the ClassWizard will add DDX and DDV calls here
-	//}}AFX_DATA_MAP
-}
-
-
-BEGIN_MESSAGE_MAP(cSelectLevelWindow, CDialog)
-	//{{AFX_MSG_MAP(cSelectLevelWindow)
-	//}}AFX_MSG_MAP
-END_MESSAGE_MAP()
-
-/////////////////////////////////////////////////////////////////////////////
-// cSelectLevelWindow message handlers
-
-BOOL cSelectLevelWindow::OnInitDialog() 
-{
-	CDialog::OnInitDialog();
-	
-	// TODO: Add extra initialization here
-	
-	return TRUE;  // return TRUE unless you set the focus to a control
-	              // EXCEPTION: OCX Property Pages should return FALSE
-}
diff --git a/pv3/cSelectLevelWindow.h b/pv3/cSelectLevelWindow.h
deleted file mode 100644
index 67e77a9..0000000
--- a/pv3/cSelectLevelWindow.h
+++ /dev/null
@@ -1,46 +0,0 @@
-#if !defined(AFX_CSELECTLEVELWINDOW_H__AF32C261_6F5D_11D7_8A8E_00104B7CC0FF__INCLUDED_)
-#define AFX_CSELECTLEVELWINDOW_H__AF32C261_6F5D_11D7_8A8E_00104B7CC0FF__INCLUDED_
-
-#if _MSC_VER > 1000
-#pragma once
-#endif // _MSC_VER > 1000
-// cSelectLevelWindow.h : header file
-//
-
-/////////////////////////////////////////////////////////////////////////////
-// cSelectLevelWindow dialog
-
-class cSelectLevelWindow : public CDialog
-{
-// Construction
-public:
-	cSelectLevelWindow(CWnd* pParent = NULL);   // standard constructor
-
-// Dialog Data
-	//{{AFX_DATA(cSelectLevelWindow)
-	enum { IDD = IDD_DIALOG_SELECT_LEVEL };
-		// NOTE: the ClassWizard will add data members here
-	//}}AFX_DATA
-
-
-// Overrides
-	// ClassWizard generated virtual function overrides
-	//{{AFX_VIRTUAL(cSelectLevelWindow)
-	protected:
-	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
-	//}}AFX_VIRTUAL
-
-// Implementation
-protected:
-
-	// Generated message map functions
-	//{{AFX_MSG(cSelectLevelWindow)
-	virtual BOOL OnInitDialog();
-	//}}AFX_MSG
-	DECLARE_MESSAGE_MAP()
-};
-
-//{{AFX_INSERT_LOCATION}}
-// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
-
-#endif // !defined(AFX_CSELECTLEVELWINDOW_H__AF32C261_6F5D_11D7_8A8E_00104B7CC0FF__INCLUDED_)
diff --git a/pv3/conf.cpp b/pv3/conf.cpp
deleted file mode 100644
index 2d94449..0000000
--- a/pv3/conf.cpp
+++ /dev/null
@@ -1,60 +0,0 @@
-// conf.cpp : implementation of the cMaps class
-//
-
-#include "stdafx.h"
-#include "Princed V3.h"
-#include "string.h"
-#include "RegisterWIN32.h"
-
-#define CONF_PROGRAM_NAME    "Princed V3";
-#define CONF_PROGRAM_COMPANY "Princed Development Team";
-
-
-class cConfig {
-private:
-	CRegisterWIN32 registro;
-
-public:
-	cConfig() {
-		registro.Open(HKEY_LOCAL_MACHINE, _T("Software\\Princed Development Team\\Princed V3\\settings"), FALSE);
-		checkConf();
-	}
-
-	~cConfig() {
-		registro.Close();
-	}
-
-	void setSetting(char *setting,char *value) {		
-		registro.Write(setting, value);
-	}
-
-	void getSetting(char *setting,char *value) {		
-		registro.Read(setting, value);
-	}
-
-	void setSetting(char *setting,int value) {		
-		registro.Write(setting, value);
-	}
-
-	void getSetting(char *setting,int &value) {		
-		registro.Read(setting, value);
-	}
-
-	void setSetting(char *setting,char value) {		
-		registro.Write(setting, value?"Yes":"No");
-	}
-
-	void getSetting(char *setting,char &value) {		
-		char *sValue;
-		registro.Read(setting, sValue);
-		value=(strcmp(sValue,"Yes"));
-	}
-
-private:
-	void checkConf() {
-		//!ToDo!: buscar toda la configuracion y si no est\xe1 seteada, poner el default
-
-
-	}
-}
-;
diff --git a/pv3/gpl.txt b/pv3/gpl.txt
deleted file mode 100644
index 5b6e7c6..0000000
--- a/pv3/gpl.txt
+++ /dev/null
@@ -1,340 +0,0 @@
-		    GNU GENERAL PUBLIC LICENSE
-		       Version 2, June 1991
-
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.
-                       59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-			    Preamble
-
-  The licenses for most software are designed to take away your
-freedom to share and change it.  By contrast, the GNU General Public
-License is intended to guarantee your freedom to share and change free
-software--to make sure the software is free for all its users.  This
-General Public License applies to most of the Free Software
-Foundation's software and to any other program whose authors commit to
-using it.  (Some other Free Software Foundation software is covered by
-the GNU Library General Public License instead.)  You can apply it to
-your programs, too.
-
-  When we speak of free software, we are referring to freedom, not
-price.  Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it
-if you want it, that you can change the software or use pieces of it
-in new free programs; and that you know you can do these things.
-
-  To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the rights.
-These restrictions translate to certain responsibilities for you if you
-distribute copies of the software, or if you modify it.
-
-  For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must give the recipients all the rights that
-you have.  You must make sure that they, too, receive or can get the
-source code.  And you must show them these terms so they know their
-rights.
-
-  We protect your rights with two steps: (1) copyright the software, and
-(2) offer you this license which gives you legal permission to copy,
-distribute and/or modify the software.
-
-  Also, for each author's protection and ours, we want to make certain
-that everyone understands that there is no warranty for this free
-software.  If the software is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original, so
-that any problems introduced by others will not reflect on the original
-authors' reputations.
-
-  Finally, any free program is threatened constantly by software
-patents.  We wish to avoid the danger that redistributors of a free
-program will individually obtain patent licenses, in effect making the
-program proprietary.  To prevent this, we have made it clear that any
-patent must be licensed for everyone's free use or not licensed at all.
-
-  The precise terms and conditions for copying, distribution and
-modification follow.
-
-		    GNU GENERAL PUBLIC LICENSE
-   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
-  0. This License applies to any program or other work which contains
-a notice placed by the copyright holder saying it may be distributed
-under the terms of this General Public License.  The "Program", below,
-refers to any such program or work, and a "work based on the Program"
-means either the Program or any derivative work under copyright law:
-that is to say, a work containing the Program or a portion of it,
-either verbatim or with modifications and/or translated into another
-language.  (Hereinafter, translation is included without limitation in
-the term "modification".)  Each licensee is addressed as "you".
-
-Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope.  The act of
-running the Program is not restricted, and the output from the Program
-is covered only if its contents constitute a work based on the
-Program (independent of having been made by running the Program).
-Whether that is true depends on what the Program does.
-
-  1. You may copy and distribute verbatim copies of the Program's
-source code as you receive it, in any medium, provided that you
-conspicuously and appropriately publish on each copy an appropriate
-copyright notice and disclaimer of warranty; keep intact all the
-notices that refer to this License and to the absence of any warranty;
-and give any other recipients of the Program a copy of this License
-along with the Program.
-
-You may charge a fee for the physical act of transferring a copy, and
-you may at your option offer warranty protection in exchange for a fee.
-
-  2. You may modify your copy or copies of the Program or any portion
-of it, thus forming a work based on the Program, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
-    a) You must cause the modified files to carry prominent notices
-    stating that you changed the files and the date of any change.
-
-    b) You must cause any work that you distribute or publish, that in
-    whole or in part contains or is derived from the Program or any
-    part thereof, to be licensed as a whole at no charge to all third
-    parties under the terms of this License.
-
-    c) If the modified program normally reads commands interactively
-    when run, you must cause it, when started running for such
-    interactive use in the most ordinary way, to print or display an
-    announcement including an appropriate copyright notice and a
-    notice that there is no warranty (or else, saying that you provide
-    a warranty) and that users may redistribute the program under
-    these conditions, and telling the user how to view a copy of this
-    License.  (Exception: if the Program itself is interactive but
-    does not normally print such an announcement, your work based on
-    the Program is not required to print an announcement.)
-
-These requirements apply to the modified work as a whole.  If
-identifiable sections of that work are not derived from the Program,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works.  But when you
-distribute the same sections as part of a whole which is a work based
-on the Program, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Program.
-
-In addition, mere aggregation of another work not based on the Program
-with the Program (or with a work based on the Program) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
-  3. You may copy and distribute the Program (or a work based on it,
-under Section 2) in object code or executable form under the terms of
-Sections 1 and 2 above provided that you also do one of the following:
-
-    a) Accompany it with the complete corresponding machine-readable
-    source code, which must be distributed under the terms of Sections
-    1 and 2 above on a medium customarily used for software interchange; or,
-
-    b) Accompany it with a written offer, valid for at least three
-    years, to give any third party, for a charge no more than your
-    cost of physically performing source distribution, a complete
-    machine-readable copy of the corresponding source code, to be
-    distributed under the terms of Sections 1 and 2 above on a medium
-    customarily used for software interchange; or,
-
-    c) Accompany it with the information you received as to the offer
-    to distribute corresponding source code.  (This alternative is
-    allowed only for noncommercial distribution and only if you
-    received the program in object code or executable form with such
-    an offer, in accord with Subsection b above.)
-
-The source code for a work means the preferred form of the work for
-making modifications to it.  For an executable work, complete source
-code means all the source code for all modules it contains, plus any
-associated interface definition files, plus the scripts used to
-control compilation and installation of the executable.  However, as a
-special exception, the source code distributed need not include
-anything that is normally distributed (in either source or binary
-form) with the major components (compiler, kernel, and so on) of the
-operating system on which the executable runs, unless that component
-itself accompanies the executable.
-
-If distribution of executable or object code is made by offering
-access to copy from a designated place, then offering equivalent
-access to copy the source code from the same place counts as
-distribution of the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
-  4. You may not copy, modify, sublicense, or distribute the Program
-except as expressly provided under this License.  Any attempt
-otherwise to copy, modify, sublicense or distribute the Program is
-void, and will automatically terminate your rights under this License.
-However, parties who have received copies, or rights, from you under
-this License will not have their licenses terminated so long as such
-parties remain in full compliance.
-
-  5. You are not required to accept this License, since you have not
-signed it.  However, nothing else grants you permission to modify or
-distribute the Program or its derivative works.  These actions are
-prohibited by law if you do not accept this License.  Therefore, by
-modifying or distributing the Program (or any work based on the
-Program), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Program or works based on it.
-
-  6. Each time you redistribute the Program (or any work based on the
-Program), the recipient automatically receives a license from the
-original licensor to copy, distribute or modify the Program subject to
-these terms and conditions.  You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties to
-this License.
-
-  7. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License.  If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Program at all.  For example, if a patent
-license would not permit royalty-free redistribution of the Program by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Program.
-
-If any portion of this section is held invalid or unenforceable under
-any particular circumstance, the balance of the section is intended to
-apply and the section as a whole is intended to apply in other
-circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system, which is
-implemented by public license practices.  Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
-  8. If the distribution and/or use of the Program is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Program under this License
-may add an explicit geographical distribution limitation excluding
-those countries, so that distribution is permitted only in or among
-countries not thus excluded.  In such case, this License incorporates
-the limitation as if written in the body of this License.
-
-  9. The Free Software Foundation may publish revised and/or new versions
-of the General Public License from time to time.  Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
-Each version is given a distinguishing version number.  If the Program
-specifies a version number of this License which applies to it and "any
-later version", you have the option of following the terms and conditions
-either of that version or of any later version published by the Free
-Software Foundation.  If the Program does not specify a version number of
-this License, you may choose any version ever published by the Free Software
-Foundation.
-
-  10. If you wish to incorporate parts of the Program into other free
-programs whose distribution conditions are different, write to the author
-to ask for permission.  For software which is copyrighted by the Free
-Software Foundation, write to the Free Software Foundation; we sometimes
-make exceptions for this.  Our decision will be guided by the two goals
-of preserving the free status of all derivatives of our free software and
-of promoting the sharing and reuse of software generally.
-
-			    NO WARRANTY
-
-  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
-FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
-OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
-PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
-OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
-TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
-PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
-REPAIR OR CORRECTION.
-
-  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
-REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
-INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
-OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
-TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
-YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
-PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGES.
-
-		     END OF TERMS AND CONDITIONS
-
-	    How to Apply These Terms to Your New Programs
-
-  If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
-  To do so, attach the following notices to the program.  It is safest
-to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
-    <one line to give the program's name and a brief idea of what it does.>
-    Copyright (C) <year>  <name of author>
-
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program; if not, write to the Free Software
-    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-
-Also add information on how to contact you by electronic and paper mail.
-
-If the program is interactive, make it output a short notice like this
-when it starts in an interactive mode:
-
-    Gnomovision version 69, Copyright (C) year name of author
-    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
-    This is free software, and you are welcome to redistribute it
-    under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License.  Of course, the commands you use may
-be called something other than `show w' and `show c'; they could even be
-mouse-clicks or menu items--whatever suits your program.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the program, if
-necessary.  Here is a sample; alter the names:
-
-  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
-  `Gnomovision' (which makes passes at compilers) written by James Hacker.
-
-  <signature of Ty Coon>, 1 April 1989
-  Ty Coon, President of Vice
-
-This General Public License does not permit incorporating your program into
-proprietary programs.  If your program is a subroutine library, you may
-consider it more useful to permit linking proprietary applications with the
-library.  If this is what you want to do, use the GNU Library General
-Public License instead of this License.
diff --git a/pv3/maps.cpp b/pv3/maps.cpp
deleted file mode 100644
index 3e87f21..0000000
--- a/pv3/maps.cpp
+++ /dev/null
@@ -1,841 +0,0 @@
-// maps.cpp : implementation of the cMaps class
-//
-
-#include "stdafx.h"
-#include "Princed V3.h"
-#include "cSelectLevelWindow.h"
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include "maps.h"
-
-cMaps::cMaps(char* fileName) {
-	struct _stat buf;
-	if (_stat( "stat.c", &buf )) {
-		return;
-	}
-	if (buf.st_size==MAPS_BLOCK_SIZEOF_FILE) {
-		char levelNumber=1;
-		//!ToDo!: que levelnumber se lea de un msgbox
-		cSelectLevelWindow levelWindow;
-		levelWindow.DoModal();
-		mLoadDAT(fileName,lev,levelNumber);
-	} else {
-		mLoadPED(fileName,lev);
-	}
-}
-
-bool cMaps::exists() {
-	return (lev!=NULL);
-}
-
-
-cMaps::~cMaps() {
-	free(lev);
-}
-
-/***************************************************************\
-|                  I M P L E M E N T A T I O N                  |
-\***************************************************************/
-
-/*
-	Se utilizan partes del archivo como validadores, texto aparte,
-	etc. Aparentemente es texto desperdiciado, no se detectaron
-	cambios en el comportamiento de los niveles.
-*/
-
-/***************************************************************\
-|                Private memory stream handling                 |
-\***************************************************************/
-
-void cMaps::mSetArray(tLevel* lev, const char *pos,int from,unsigned int length,int validator) {
-	char validate=0;
-	while (length--) {
-		validate+=((*lev).levelArray[from]-pos[length]);
-		(*lev).levelArray[from++]=pos[length];
-	}
-	(*lev).levelArray[validator]+=validate;
-}
-
-void cMaps::mGetArray(tLevel* lev, char* pos,int from,int length) {
-	while (length--) pos[length]=(*lev).levelArray[from++];
-}
-
-/***************************************************************\
-|                         Gate handling                         |
-\***************************************************************/
-
-//Privados
-void cMaps::getRawEvent(tLevel* lev,char id,tGateEvent* event) { //private
-	(*event).pos[0]  =(*lev).levelArray[MAPS_BLOCK_OFFSET_GATE_1+id];
-	(*event).pos[1]  =(*lev).levelArray[MAPS_BLOCK_OFFSET_GATE_2+id];
-}
-
-void cMaps::setRawEvent(tLevel* lev,char id,tGateEvent* event) { //private
-	unsigned char x1,x2,validate;
-	x1=(*event).pos[0];
-	x2=(*event).pos[1];
-	validate  =((*lev).levelArray[MAPS_BLOCK_OFFSET_GATE_1+id]-x1)+((*lev).levelArray[MAPS_BLOCK_OFFSET_GATE_2+id]-x2);
-
-	(*lev).levelArray[MAPS_BLOCK_OFFSET_GATE_1+id]=x1;
-	(*lev).levelArray[MAPS_BLOCK_OFFSET_GATE_2+id]=x2;
-	(*lev).levelArray[MAPS_BLOCK_OFFSET_VALIDATOR_WALL]+=validate;
-}
-
-//Privado, pero publico dentro de maps.c
-void cMaps::mLoadEventList(tLevel* lev) {
-	//Esta funcion carga el TDA con los datos que lee del rigido
-	char a=0;
-	char b=0;
-
-	//Cargar gateList con las asociaciones del mapa
-	int j=0;
-	for (int i=0;i<MAPS_BLOCK_SIZEOF_WALL;i++) {
-		switch ((*lev).levelArray[MAPS_BLOCK_OFFSET_WALL+i]) {
-			case MAPS_OBJ_BAL_D:
-			case MAPS_OBJ_BAL_U:
-				(*lev).gateList.item[j].door=i;
-				(*lev).gateList.item[j++].id=(*lev).levelArray[MAPS_BLOCK_OFFSET_BACK+i];
-		}
-	}
-	(*lev).gateList.size=j;
-
-	//Cargar gateTDA con datos de la tabla
-	j=0;
-	for (tGateEvent evento;j<MAPS_BLOCK_SIZEOF_GATE;j++) {
-		getRawEvent(lev,j,&evento);
-		if (evento.pos[0]>=(0x80)) {
-			(*lev).gateTDA.row[a].size=b;
-			b=0;
-			a++;
-		} else {
-			b++;
-		}
-		(*lev).gateTDA.row[a].event[b]=evento;
-	}
-	(*lev).gateTDA.size=a;
-}
-
-//mSevEventList private functions
-
-void cMaps::anularEvento(tGateEvent *e) {
-	(*e).pos[0]=0;
-	(*e).pos[1]=0;
-}
-
-char cMaps::obtenerFila(tGateRow *fila,unsigned char c,int k,tLevel* lev) {
-	char aux=((*lev).gateTDA.row[k].size==c);
-	if (aux) {
-		*fila=(*lev).gateTDA.row[k];
-	}
-	return aux;
-}
-
-char cMaps::sameEvent(tGateEvent event1,tGateEvent event2) {
-	return ((event1.pos[1]==event2.pos[1]) && ((event1.pos[0]%0x80)==(event1.pos[0]%0x80)));
-}
-
-tGateEvent cMaps::setFlag(tGateEvent evento,char flag) {
-	evento.pos[0]=(evento.pos[0]%0x80)+(0x80*flag);
-	return evento;
-}
-
-#define MAPS_GATE_DIFFERS 0
-#define MAPS_GATE_EQUALS  1
-#define MAPS_GATE_BELONGS 2
-
-char cMaps::belongsToDiskList(tLevel* lev, tGateRow *fila,int i) {
-
-	char total=0;
-	char pertenece;
-	//recorrer la lista de eventos
-	for (int k=i;((*lev).gateEvents.event[k].pos[0]<(0x80));k++) {
-		total++;
-		pertenece=0;
-		for (char j=0;(j<(*fila).size) && (!pertenece);j++) {
-			pertenece=(sameEvent((*fila).event[j],(*lev).gateEvents.event[k]));
-		}
-		if (!pertenece) {
-			return MAPS_GATE_DIFFERS;
-		}
-	}
-	if (total==(*fila).size) {
-		return MAPS_GATE_EQUALS;
-	} else {
-		return MAPS_GATE_BELONGS;
-	}
-}
-
-void cMaps::apuntar(tLevel* lev,unsigned char i) {
-	(*lev).gateList.item[(*lev).gateList.size].id=i;
-	(*lev).gateList.size++;
-}
-
-#define MAPS_GATE_SINGLE_EVENT    0
-#define MAPS_GATE_MULTIPLE_EVENT  1
-char cMaps::intertLeft(tLevel* lev,tGateRow fila,int inicioFila,int numeroFila,char mode) {
-	//Esta funcion inserta en gateEvents el o los eventos de fila que no estan insertados
-	//Por cada insersion deben ser modificados los ids correspondientes en la gateList
-	//devuelve 1 si entro
-	//devuelve 0 en caso de superarse lso 256 bytes
-
-	/*
-	 1) En caso de MULTIPLE EVENT los elementos de la fila
-	    que ya estan enliastados en gateEvents deben ser
-	    eliminados de la fila. Se coloca el evento nulo en
-	    reemplazo de estos.
-	*/
-
-	char j,pertenece;
-	if (mode==MAPS_GATE_MULTIPLE_EVENT) {
-		for (int k=inicioFila;((*lev).gateEvents.event[k].pos[0]<(0x80));k++) {
-			pertenece=0;
-			for (j=0;(j<fila.size) && (!pertenece);j++) {
-				pertenece=(sameEvent(fila.event[j],(*lev).gateEvents.event[k]));
-			}
-			if (pertenece) {
-				anularEvento(&(fila.event[j]));
-			}
-		}
-	}
-
-	/*
-	 2) En caso de MAPS_GATE_SINGLE_EVENT el ultimo debe
-	    marcar fin de la lista. A tal fin, cambiaremos ese
-	    flag del evento. Como la inserion se hara de adelante
-	    hacia atras, simplemente debemos setear el flag al
-	    principio
-	*/
-
-	int c=(mode==MAPS_GATE_SINGLE_EVENT);
-
-	/*
-	 3) Se debera iterar para toda la fila e insertar
-	    evento por evento en la gateEvents en la posicion inicioFila.
-			Cada insersion implica un corrimiento de ids en la gateList
-	*/
-
-	for (j=0;(j<fila.size);j++) {
-		if (fila.event[j].pos[0]) { //Para cada evento nonulo de la fila
-			//Adelantar todos los eventos posteriores a inicioFila
-			for (int k=(*lev).gateEvents.size;k>inicioFila;k--) {
-				(*lev).gateEvents.event[k+1]=(*lev).gateEvents.event[k];
-			}
-
-			//Insertar (*fila).event[j] en la gateEvents en la posicion generada en inicioFila.
-			//Se tendra en cuenta el flag de de fin de lista
-			(*lev).gateEvents.event[inicioFila]=setFlag(fila.event[j],c);
-
-			//El flag del fin de lista se cancela
-			c=0;
-
-			//Incrementar la cantidad de eventos de la gateEvent, en caso de no poder abortar
-			if ((*lev).gateEvents.size==255) {
-				return 0;
-			} else {
-				(*lev).gateEvents.size++;
-			}
-
-			//Finalmente se debe recorrer la gate list e incrementar el contenido que supere a inicioFila
-			for (int k2=0;k2<(*lev).gateList.size;k2++) {
-				if ((*lev).gateList.item[k2].id>=inicioFila)
-					((*lev).gateList.item[k2].id)++;
-			}
-		}
-	}
-	return 1;
-}
-
-//Main function
-char cMaps::mSaveEventList(tLevel* lev) {
-	//Lee el TDA, optimiza el espacio que ocupan los datos y lo guardaen disco
-	//devuelve 1 en caso de que entre en disco
-	//devuelve 0 en caso de que no hayan entrado los datos en disco
-
-	//Inicializar variables
-	unsigned char n=(*lev).gateTDA.size;
-	unsigned char c=1;
-	char x;
-	tGateRow fila;
-	(*lev).gateEvents.size=0;
-	(*lev).gateList.size=0;
-
-	//Generar a partir de gateTDA la lista de eventos gateEventList y de asociaciones gateList
-	while (n) { //Para todos los elementos
-		for (int k=0;k<(*lev).gateTDA.size;k++) { //Recorrer filas de gateTDA
-			if (obtenerFila(&fila,c,k,lev)) {  //mietras haya elementos con tamagno=c sin procesar fila=(*lev).gateTDA.row[n] where fila=(*lev).gateTDA.row[n].size=c;
-				//entra con fila seteada en la fila k con c elementos adentro.
-				n--;
-				x=0;
-				for (int i=0;((i<(*lev).gateEvents.size) && (!x));i++) { //recorrer lo ya creado de gateEvents
-					x=belongsToDiskList(lev,&fila,i);
-					switch (x) {
-						case MAPS_GATE_BELONGS:
-							/*
-							  Pertenece, pero puede que este no sea el principio de la lista
-							  en ese caso no puedo insertar porque corromperia la puerta
-							  anterior, por eso voy a verificar que sea el primero de la lista
-							  o bien que el anterior tenga el flag c.
-							*/
-							if ((i=0) || ((*lev).gateEvents.event[i-1].pos[0]>0x80)) {
-								if (!intertLeft(lev,fila,i,k,MAPS_GATE_MULTIPLE_EVENT)) {
-									return 0;
-								}
-								apuntar(lev,i);
-							}
-							break;
-						case MAPS_GATE_EQUALS:
-							apuntar(lev,i);
-					}
-				}
-				if (!x) {
-					if (!intertLeft(lev,fila,(*lev).gateEvents.size,k,MAPS_GATE_SINGLE_EVENT)) {
-						return 0;
-					}
-				}
-			}
-		}
-		c++;
-	}
-
-	//Guardar gateEvents y gateList en el formato.
-	//gateList
-	for (int i=0;i<(*lev).gateEvents.size;i++) {
-		setRawEvent(lev,i,&((*lev).gateEvents.event[i]));
-	}
-	int location;
-	unsigned char validate=0;
-	for (int i2=0;i2<(*lev).gateList.size;i2++) {
-		location=MAPS_BLOCK_OFFSET_BACK+(*lev).gateList.item[i2].door;
-		validate+=(*lev).levelArray[location]-(*lev).gateList.item[i2].id;
-		(*lev).levelArray[location]=(*lev).gateList.item[i2].id;
-	}
-	(*lev).levelArray[MAPS_BLOCK_OFFSET_VALIDATOR_WALL]+=validate;
-
-	return 1;
-}
-
-void cMaps::getGateAsociation(tLevel* lev,char id,char* scr,char* p,char* b, char *termino) {
-	unsigned char x1,x2,valor;
-	x1        =(*lev).levelArray[MAPS_BLOCK_OFFSET_GATE_1+id];
-	x2        =(*lev).levelArray[MAPS_BLOCK_OFFSET_GATE_2+id];
-
-	*scr      =(x2/8)+(x1%(0x80))/(0x20);
-	valor     =(x1%(0x20));
-	*b        =(valor%10);
-	*p        =(valor/10);
-	*termino  =(x1/(0x80)); //c=(Se pasa a la siguiente)?0:1
-}
-
-void cMaps::setGateAsociation(tLevel* lev,char id,char scr,char p,char b, char termino) {
-	unsigned char x1,x2,validate;
-
-	x1        =((scr%4)*0x20)+(p*10+b)+(termino?0x80:0);
-	x2        =((scr/4)*0x20);
-	validate  =((*lev).levelArray[MAPS_BLOCK_OFFSET_GATE_1+id]-x1)+((*lev).levelArray[MAPS_BLOCK_OFFSET_GATE_2+id]-x2);
-
-	(*lev).levelArray[MAPS_BLOCK_OFFSET_GATE_1+id]=x1;
-	(*lev).levelArray[MAPS_BLOCK_OFFSET_GATE_2+id]=x2;
-	(*lev).levelArray[MAPS_BLOCK_OFFSET_VALIDATOR_WALL]+=validate;
-}
-
-void cMaps::shiftEventId(tLevel* lev,char from,char delta) { //private
-	char validate=0;
-	for (int i=0;i<MAPS_BLOCK_SIZEOF_WALL;i++) {
-		switch ((*lev).levelArray[MAPS_BLOCK_OFFSET_WALL+i]) {
-			case MAPS_OBJ_BAL_D:
-			case MAPS_OBJ_BAL_U:
-				if ((*lev).levelArray[MAPS_BLOCK_OFFSET_BACK+i]>from) {
-					(*lev).levelArray[MAPS_BLOCK_OFFSET_BACK+i]+=delta;
-					validate-=delta;
-				}
-		}
-	}
-	(*lev).levelArray[MAPS_BLOCK_OFFSET_VALIDATOR_WALL]+=validate;
-}
-
-void cMaps::insertEvent(tLevel* lev,char id,char scr,char p,char b) {
-	char x1,x2,x3,x4;
-
-	shiftEventId(lev,id,+1);
-	for (int i=20;i>id;i--) {
-		getGateAsociation(lev,i-1,&x1,&x2,&x3,&x4);
-		setGateAsociation(lev,i,x1,x2,x3,x4);
-	}
-	setGateAsociation(lev,id,scr,p,b,0);
-}
-
-/***************************************************************\
-|                         Text handling                         |
-\***************************************************************/
-
-#define MAPS_BLOCK_OFFSET_START_POSITION_SIZE3 3
-//Actualmente guarda 1+MAPS_BLOCK_SIZEOF_UNKNOWN_1+MAPS_BLOCK_SIZEOF_UNKNOWN_2+MAPS_BLOCK_SIZEOF_UNKNOWN_4+unk_5+unk_6+unk_7 = 564 caracteres. *text debe medir 565 incluyendo el caracter nulo.
-void cMaps::mSetText (tLevel* lev,const char* text) {
-	mSetArray(lev,text,MAPS_BLOCK_OFFSET_START_POSITION+MAPS_BLOCK_OFFSET_START_POSITION_SIZE3,1,MAPS_BLOCK_OFFSET_VALIDATOR_LINK);
-	mSetArray(lev,&(text[1]),MAPS_BLOCK_OFFSET_UNKNOWN_1,MAPS_BLOCK_SIZEOF_UNKNOWN_1,MAPS_BLOCK_OFFSET_VALIDATOR_WALL);
-	mSetArray(lev,&(text[MAPS_BLOCK_SIZEOF_UNKNOWN_1+1]),MAPS_BLOCK_OFFSET_UNKNOWN_2,MAPS_BLOCK_SIZEOF_UNKNOWN_2,MAPS_BLOCK_OFFSET_VALIDATOR_WALL);
-	mSetArray(lev,&(text[MAPS_BLOCK_SIZEOF_UNKNOWN_2+MAPS_BLOCK_SIZEOF_UNKNOWN_1+1]),MAPS_BLOCK_OFFSET_UNKNOWN_4,MAPS_BLOCK_SIZEOF_UNKNOWN_4,MAPS_BLOCK_OFFSET_VALIDATOR_LINK);
-	mSetArray(lev,&(text[MAPS_BLOCK_SIZEOF_UNKNOWN_4+MAPS_BLOCK_SIZEOF_UNKNOWN_2+MAPS_BLOCK_SIZEOF_UNKNOWN_1+1]),MAPS_BLOCK_OFFSET_UNKNOWN_5,MAPS_BLOCK_SIZEOF_UNKNOWN_5,MAPS_BLOCK_OFFSET_VALIDATOR_LINK);
-	mSetArray(lev,&(text[MAPS_BLOCK_SIZEOF_UNKNOWN_5+MAPS_BLOCK_SIZEOF_UNKNOWN_4+MAPS_BLOCK_SIZEOF_UNKNOWN_2+MAPS_BLOCK_SIZEOF_UNKNOWN_1+1]),MAPS_BLOCK_OFFSET_UNKNOWN_6,MAPS_BLOCK_SIZEOF_UNKNOWN_6,MAPS_BLOCK_OFFSET_VALIDATOR_LINK);
-	mSetArray(lev,&(text[MAPS_BLOCK_SIZEOF_UNKNOWN_6+MAPS_BLOCK_SIZEOF_UNKNOWN_5+MAPS_BLOCK_SIZEOF_UNKNOWN_4+MAPS_BLOCK_SIZEOF_UNKNOWN_2+MAPS_BLOCK_SIZEOF_UNKNOWN_1+1]),MAPS_BLOCK_OFFSET_UNKNOWN_7,MAPS_BLOCK_SIZEOF_UNKNOWN_7,MAPS_BLOCK_OFFSET_VALIDATOR_LINK);
-}
-
-void cMaps::mGetText (tLevel* lev,char* text) {
-	mGetArray(lev,text,MAPS_BLOCK_OFFSET_START_POSITION+MAPS_BLOCK_OFFSET_START_POSITION_SIZE3,1);
-	mGetArray(lev,&(text[1]),MAPS_BLOCK_OFFSET_UNKNOWN_1,MAPS_BLOCK_SIZEOF_UNKNOWN_1);
-	mGetArray(lev,&(text[MAPS_BLOCK_SIZEOF_UNKNOWN_1+1]),MAPS_BLOCK_OFFSET_UNKNOWN_2,MAPS_BLOCK_SIZEOF_UNKNOWN_2);
-	mGetArray(lev,&(text[MAPS_BLOCK_SIZEOF_UNKNOWN_2+MAPS_BLOCK_SIZEOF_UNKNOWN_1+1]),MAPS_BLOCK_OFFSET_UNKNOWN_4,MAPS_BLOCK_SIZEOF_UNKNOWN_4);
-	mGetArray(lev,&(text[MAPS_BLOCK_SIZEOF_UNKNOWN_4+MAPS_BLOCK_SIZEOF_UNKNOWN_2+MAPS_BLOCK_SIZEOF_UNKNOWN_1+1]),MAPS_BLOCK_OFFSET_UNKNOWN_5,MAPS_BLOCK_SIZEOF_UNKNOWN_5);
-	mGetArray(lev,&(text[MAPS_BLOCK_SIZEOF_UNKNOWN_5+MAPS_BLOCK_SIZEOF_UNKNOWN_4+MAPS_BLOCK_SIZEOF_UNKNOWN_2+MAPS_BLOCK_SIZEOF_UNKNOWN_1+1]),MAPS_BLOCK_OFFSET_UNKNOWN_6,MAPS_BLOCK_SIZEOF_UNKNOWN_6);
-	mGetArray(lev,&(text[MAPS_BLOCK_SIZEOF_UNKNOWN_6+MAPS_BLOCK_SIZEOF_UNKNOWN_5+MAPS_BLOCK_SIZEOF_UNKNOWN_4+MAPS_BLOCK_SIZEOF_UNKNOWN_2+MAPS_BLOCK_SIZEOF_UNKNOWN_1+1]),MAPS_BLOCK_OFFSET_UNKNOWN_7,MAPS_BLOCK_SIZEOF_UNKNOWN_7);
-	text[MAPS_BLOCK_SIZEOF_UNKNOWN_7+MAPS_BLOCK_SIZEOF_UNKNOWN_6+MAPS_BLOCK_SIZEOF_UNKNOWN_5+MAPS_BLOCK_SIZEOF_UNKNOWN_4+MAPS_BLOCK_SIZEOF_UNKNOWN_2+MAPS_BLOCK_SIZEOF_UNKNOWN_1+1]=0;
-}
-
-/***************************************************************\
-|                     Start Position handling                   |
-\***************************************************************/
-
-void cMaps::mGetDebugPosition(tLevel* lev,char* pantalla, char* p, char *b,char *sentido) {
-	char dp[2];
-	unsigned char valor;
-	mGetArray(lev,dp,MAPS_BLOCK_OFFSET_START_POSITION+4,2);
-	*pantalla =(dp[0]);
-	*sentido  =(dp[1]%2);
-	valor     =(dp[1]/2);
-	*b        =(valor%10);
-	*p        =(valor/10);
-}
-
-void cMaps::mSetDebugPosition(tLevel* lev,char pantalla, char p, char b,char sentido) {
-	char dp[2];
-	dp[0]     =pantalla;
-	dp[1]     =pantalla?(((p*10+b)*2)+(sentido?1:0)):0;
-	mSetArray(lev,dp,MAPS_BLOCK_OFFSET_START_POSITION+4,2,MAPS_BLOCK_OFFSET_VALIDATOR_LINK);
-}
-
-void cMaps::mGetStartPosition(tLevel* lev,char* pantalla, char* p, char *b,char *sentido,char *sentido2) {
-	*pantalla =(*lev).levelArray[MAPS_BLOCK_OFFSET_START_POSITION];
-	char valor=(*lev).levelArray[MAPS_BLOCK_OFFSET_START_POSITION+1];
-	*b        =(valor%10);
-	*p        =(valor/10);
-	*sentido  =((*lev).levelArray[MAPS_BLOCK_OFFSET_START_POSITION+2])?1:0;
-	*sentido2 =((*lev).levelArray[MAPS_BLOCK_OFFSET_START_POSITION+6])?1:0;
-}
-
-void cMaps::mSetStartPosition(tLevel* lev,char pantalla, char p, char b,char sentido,char sentido2) {
-	unsigned char valor=pantalla;
-	int location=MAPS_BLOCK_OFFSET_START_POSITION;
-	unsigned char offsetval=0;
-
-	//pantalla
-	offsetval+=(256-valor)+(*lev).levelArray[location];
-	(*lev).levelArray[location++]=valor;
-
-	//Posicion
-	valor     =p*10+b;
-	offsetval+=(256-valor)+(*lev).levelArray[location];
-	(*lev).levelArray[location++]=valor;
-
-	//sentidos
-	valor     =sentido?MAPS_DIRECTION_RIGHT:MAPS_DIRECTION_LEFT;
-	offsetval+=(256-valor)+(*lev).levelArray[location];
-	(*lev).levelArray[location]=valor;
-
-	location +=4;
-	valor     =sentido2?MAPS_DIRECTION_RIGHT:MAPS_DIRECTION_LEFT;
-	offsetval+=(256-valor)+(*lev).levelArray[location];
-	(*lev).levelArray[location]=valor;
-
-	//Validacion
-	(*lev).levelArray[MAPS_BLOCK_OFFSET_VALIDATOR_LINK]+=offsetval;
-}
-
-/***************************************************************\
-|                      S E T S  &  G E T S                      |
-\***************************************************************/
-
-
-void cMaps::mSetWall  (tLevel* lev,char pantalla,char p,char b,char valor) {
-	int location=MAPS_BLOCK_OFFSET_WALL+30*(pantalla-1)+10*p+b;
-
-	(*lev).levelArray[MAPS_BLOCK_OFFSET_VALIDATOR_WALL]+=(*lev).levelArray[location]-valor;
-	(*lev).levelArray[location]=valor;
-}
-
-char cMaps::mGetWall (tLevel* lev,char pantalla,char p,char b) const {
-	return (*lev).levelArray[MAPS_BLOCK_OFFSET_WALL+30*(pantalla-1)+10*p+b];
-}
-
-void cMaps::mSetBack (tLevel* lev,char pantalla,char p,char b,char valor) {
-	int location=MAPS_BLOCK_OFFSET_BACK+30*(pantalla-1)+10*p+b;
-
-	(*lev).levelArray[MAPS_BLOCK_OFFSET_VALIDATOR_WALL]+=(*lev).levelArray[location]-valor;
-	(*lev).levelArray[location]=valor;
-}
-
-char cMaps::mGetBack (tLevel* lev,char pantalla,char p,char b) const {
-	return (*lev).levelArray[MAPS_BLOCK_OFFSET_BACK+30*(pantalla-1)+10*p+b];
-}
-
-void cMaps::mSetLink (tLevel* lev,char pantalla,char tipo,char valor) {
-	if ((pantalla<25) && (pantalla) && (valor<25)) {
-		int location=(MAPS_BLOCK_OFFSET_LINK+((pantalla-1)*4)+tipo);
-		(*lev).levelArray[MAPS_BLOCK_OFFSET_VALIDATOR_LINK]+=(*lev).levelArray[location]-valor;
-		(*lev).levelArray[location]=valor;
-	}
-}
-
-char cMaps::mGetLink (tLevel* lev,char pantalla,char tipo) {
-	return (*lev).levelArray[MAPS_BLOCK_OFFSET_LINK+((pantalla-1)*4)+tipo];
-}
-
-/***************************************************************\
-|                   Abstract Guard Handling                     |
-\***************************************************************/
-
-void cMaps::mSetGuard(tLevel* lev,char pantalla,char p,char b,char vidas,char color,char sentido,char erase) {
-
-	//Posicion
-	unsigned char valor=erase?30:p*10+b;
-	int location=MAPS_BLOCK_OFFSET_GUARD_POSITION-1+pantalla;
-	unsigned char offsetval=((*lev).levelArray[MAPS_BLOCK_OFFSET_VALIDATOR_LINK]+(256-valor)+(*lev).levelArray[location]);
-	(*lev).levelArray[location]=valor;
-	//sentido
-	valor     =sentido?MAPS_DIRECTION_RIGHT:MAPS_DIRECTION_LEFT;
-	location  =MAPS_BLOCK_OFFSET_GUARD_DIRECTION-1+pantalla;
-	offsetval+=(256-valor)+(*lev).levelArray[location];
-	(*lev).levelArray[location]=valor;
-	//skill
-	valor     =erase?1:vidas;
-	location  =MAPS_BLOCK_OFFSET_GUARD_SKILL-1+pantalla;
-	offsetval+=(256-valor)+(*lev).levelArray[location];
-	(*lev).levelArray[location]=valor;
-	//Color
-	valor     =erase?0:color;
-	location  =MAPS_BLOCK_OFFSET_GUARD_COLOR-1+pantalla;
-	offsetval+=(256-valor)+(*lev).levelArray[location];
-	(*lev).levelArray[location]=valor;
-
-	//Validar
-	(*lev).levelArray[MAPS_BLOCK_OFFSET_VALIDATOR_LINK]=offsetval/*+(256-valor)+(*lev).levelArray[location]*/;
-}
-
-void cMaps::mGetGuard(tLevel* lev,char pantalla,char* p,char* b,char* vidas,char* color,char* sentido,char* exists)  const {
-	//Posicion
-	unsigned char valor=((*lev).levelArray[(MAPS_BLOCK_OFFSET_GUARD_POSITION-1+pantalla)]);
-	*exists = (valor<30);
-	*b      = (valor%10);
-	*p      = (valor/10);
-	//sentido
-	*sentido=!(*lev).levelArray[MAPS_BLOCK_OFFSET_GUARD_DIRECTION-1+pantalla];
-	//skill
-	*vidas  =(*lev).levelArray[MAPS_BLOCK_OFFSET_GUARD_SKILL-1+pantalla];
-	//Color
-	*color  =(*lev).levelArray[MAPS_BLOCK_OFFSET_GUARD_COLOR-1+pantalla];
-}
-
-/***************************************************************\
-|                     Screen Link Handling                      |
-\***************************************************************/
-
-//Recursive mapping sub procedures
-void cMaps::mRecIndirect(char i, char j, tLevel* lev, char scr, char pos) {
-	char aux;
-	char auxb;
-	if ((*lev).handledLinks.linkMap[i][j]==255) {
-		aux=mGetLink (lev,scr,pos);
-		if (!(auxb=(!aux))) auxb=(!(*lev).handledLinks.linkList[aux]);
-		if (auxb) {
-			(*lev).handledLinks.linkMap[i][j]=aux;
-			if (aux) {
-				(*lev).handledLinks.linkList[aux]=1;
-				mRecLink(i,j,lev);
-			}
-		} else {
-			(*lev).handledLinks.linkMap[i][j]=0;
-		}
-	}
-}
-
-void cMaps::mRecLink(char i, char j, tLevel* lev) {
-	char scr=(*lev).handledLinks.linkMap[i][j];
-
-	mRecIndirect(i,j-1,lev,scr,MAPS_sLeft);
-	mRecIndirect(i,j+1,lev,scr,MAPS_sRight);
-	mRecIndirect(i-1,j,lev,scr,MAPS_sUp);
-	mRecIndirect(i+1,j,lev,scr,MAPS_sDown);
-}
-
-void cMaps::mCalcularLimUp (tLevel* lev) {
-	char i=0;
-	char j=0;
-	while (((*lev).handledLinks.linkMap[i][j]==255) && (j<MAPS_MAX_LENGTH)) {
-		if (++i==MAPS_MAX_LENGTH) {
-			j++;
-			i=0;
-		}
-	}
-	(*lev).handledLinks.limUp=j;
-}
-
-void cMaps::mCalcularLimLeft (tLevel* lev) {
-	char i=0;
-	char j=0;
-	while (((*lev).handledLinks.linkMap[j][i]==255) && (j<MAPS_MAX_LENGTH)) {
-		if (++i==MAPS_MAX_LENGTH) {
-			j++;
-			i=0;
-		}
-	}
-	(*lev).handledLinks.limLeft=j;
-}
-
-void cMaps::mCalcularLimDown (tLevel* lev) {
-	char i=0;
-	char j=MAPS_MAX_LENGTH-1;
-	while (((*lev).handledLinks.linkMap[i][j]==255) && j) {
-		if (++i==MAPS_MAX_LENGTH) {
-			j--;
-			i=0;
-		}
-	}
-	(*lev).handledLinks.limDown=j;
-}
-
-void cMaps::mCalcularLimRight (tLevel* lev) {
-	char i=0;
-	char j=MAPS_MAX_LENGTH-1;
-	while (((*lev).handledLinks.linkMap[j][i]==255) && j) {
-		if (++i==MAPS_MAX_LENGTH) {
-			j--;
-			i=0;
-		}
-	}
-	(*lev).handledLinks.limRight=j;
-}
-
-
-//	Main mCreateLinkMap
-void cMaps::mCreateLinkMap(tLevel* lev) { //private
-	char	i,j,start;
-
-	//Initialize arrays
-	for (j=0;j<MAPS_MAX_LENGTH;j++)
-		for (i=0;i<MAPS_MAX_LENGTH;(*lev).handledLinks.linkMap[i++][j]=255);
-	for (j=1;j<=MAPS_MAX_SCREENS;(*lev).handledLinks.linkList[j++]=0);
-
-	//Inicializar start en la pantalla de inicio
-	mGetStartPosition(lev,&start,&i,&i,&i,&i);
-	(*lev).handledLinks.linkMap[MAPS_LINKMAP_CENTER][MAPS_LINKMAP_CENTER]=start;
-	(*lev).handledLinks.linkList[start]=1;
-
-	//Start Recursive Mapper
-	mRecLink(MAPS_LINKMAP_CENTER,MAPS_LINKMAP_CENTER,lev);
-
-	//Buscar limites del nivel
-	mCalcularLimUp   (lev);
-	mCalcularLimDown (lev);
-	mCalcularLimLeft (lev);
-	mCalcularLimRight(lev);
-
-}
-
-void cMaps::mGetSize      (tLevel* lev, char* i,char* j)  const {
-	*i=(*lev).handledLinks.limRight - (*lev).handledLinks.limLeft;
-	*j=(*lev).handledLinks.limDown  - (*lev).handledLinks.limUp;
-}
-
-char cMaps::mGetScrCount  (tLevel* lev)  {
-	char l,aux;
-
-	aux=0;
-	for (l=1;l<=MAPS_MAX_SCREENS;aux+=((*lev).handledLinks.linkList[l++]?1:0));
-	return aux;
-}
-
-char cMaps::mGetScreen    (tLevel* lev, char i,char j, char* error)  const  {
-	char aux;
-
-	aux=(*lev).handledLinks.linkMap[(*lev).handledLinks.limLeft+i][(*lev).handledLinks.limUp+j];
-	*error=(aux==255);
-	return aux;
-}
-
-void cMaps::mGetMainScreen(tLevel* lev, char* i,char* j) const {
-	*i=(MAPS_LINKMAP_CENTER) - (*lev).handledLinks.limLeft;
-	*j=(MAPS_LINKMAP_CENTER) - (*lev).handledLinks.limUp;
-}
-
-void cMaps::mAddScreen    (tLevel* lev, char i,char j, char* error) {
-	char scr=mGetScreen(lev,i,j,error);
-	*error=(*error || scr);
-	if (!*error) {
-		int l=1;
-		while ((*lev).handledLinks.linkList[l] && (l++<MAPS_MAX_SCREENS));
-		if ((*lev).handledLinks.linkList[l]) {
-			*error=1;
-		} else {
-			//Pedir pantalla
-			(*lev).handledLinks.linkList[l]=1;
-
-			i+=(*lev).handledLinks.limLeft;
-			j+=(*lev).handledLinks.limUp;
-
-			//En caso de agregar una pantalla en alguno de los bordes, estos se amplian
-			if ((*lev).handledLinks.limLeft=i) (*lev).handledLinks.limLeft--;
-			if ((*lev).handledLinks.limUp=j) (*lev).handledLinks.limUp--;
-			if ((*lev).handledLinks.limRight=i) (*lev).handledLinks.limRight++;
-			if ((*lev).handledLinks.limDown=j) (*lev).handledLinks.limDown++;
-
-
-			//Poner 0 alrededor de l
-			(*lev).handledLinks.linkMap[i][j-1]%=255;
-			(*lev).handledLinks.linkMap[i][j+1]%=255;
-			(*lev).handledLinks.linkMap[i+1][j]%=255;
-			(*lev).handledLinks.linkMap[i-1][j]%=255;
-
-			//Poner l en l
-			(*lev).handledLinks.linkMap[i][j]=l;
-
-			//Setear links desde l a las 4 pantallas adyacentes
-			mSetLink (lev,l,MAPS_sUp,(*lev).handledLinks.linkMap[i][j-1]);
-			mSetLink (lev,l,MAPS_sDown,(*lev).handledLinks.linkMap[i][j+1]);
-			mSetLink (lev,l,MAPS_sRight,(*lev).handledLinks.linkMap[i+1][j]);
-			mSetLink (lev,l,MAPS_sLeft,(*lev).handledLinks.linkMap[i-1][j]);
-
-			//Setear links desde las 4 pantallas adyacentes a l
-			mSetLink (lev,(*lev).handledLinks.linkMap[i][j+1],MAPS_sUp,l);
-			mSetLink (lev,(*lev).handledLinks.linkMap[i][j-1],MAPS_sDown,l);
-			mSetLink (lev,(*lev).handledLinks.linkMap[i-1][j],MAPS_sRight,l);
-			mSetLink (lev,(*lev).handledLinks.linkMap[i+1][j],MAPS_sLeft,l);
-
-			//Limpiar contenido de la pantalla l
-			for (i=0;i<3;i++) {
-				for (j=0;j<10;j++) {
-					mSetWall(lev,l,i,j,0);
-					mSetBack(lev,l,i,j,0);
-				}
-			}
-			mSetGuard(lev,l,1,1,1,1,1,1);
-			//Listo, ya cree la pantalla y la linkie
-		}
-	}
-}
-
-void cMaps::mRemScreen    (tLevel* lev, char i,char j, char* error) {
-	/*{Q&D:
-		1) Si parten a la mitad un nivel se pierde una de las mitades
-		2) no se refresca la LinkMap en ese caso
-		3) tampoco une las pantallas que estaban a los costados}*/
-	unsigned char l=mGetScreen(lev,i,j,error);
-	*error=*error || (!l);
-	if (!*error) {
-		//Liberar pantalla
-		(*lev).handledLinks.linkList[l]=0;
-
-		//Seteo posiciones absolutas
-		i+=(*lev).handledLinks.limLeft;
-		j+=(*lev).handledLinks.limUp;
-
-		//Poner 0 en l
-		(*lev).handledLinks.linkMap[i][j]=0;
-
-		//En caso de remover una pantalla en alguno de los bordes, estos se recalculan
-		if ((*lev).handledLinks.limLeft=i) 	mCalcularLimLeft(lev);
-		if ((*lev).handledLinks.limUp=j)    mCalcularLimUp(lev);
-		if ((*lev).handledLinks.limRight=i) mCalcularLimRight(lev);
-		if ((*lev).handledLinks.limDown=j)  mCalcularLimDown(lev);
-
-		//Borrar links desds las 4 pantallas adyacentes a l
-		mSetLink (lev,(*lev).handledLinks.linkMap[i][j+1],MAPS_sLeft,0);
-		mSetLink (lev,(*lev).handledLinks.linkMap[i][j-1],MAPS_sRight,0);
-		mSetLink (lev,(*lev).handledLinks.linkMap[i-1][j],MAPS_sDown,0);
-		mSetLink (lev,(*lev).handledLinks.linkMap[i+1][j],MAPS_sUp,0);
-	}
-}
-
-void cMaps::mCpyScreen    (tLevel* lev, char fromi,char fromj,char toi,char toj, char* error) {
-	char fromscr,toscr,i,j,k,l;
-	char sentido,existe;
-
-	//Verificar que la pantalla source y la pantalla target existan
-	fromscr=mGetScreen(lev,fromi,fromj,error); //Verifico que existe la pantalla from
-	*error=(*error || fromscr);
-	if (!*error) { //Verifico que existe la pantalla to
-		toscr=mGetScreen(lev,toi,toj,error);
-		*error=(*error || toscr);
-	}
-	if (!*error) { //Si existen ambas pantallas
-		//Copiar contenido de la pantalla from a la pantalla to:
-
-		//Copiar wall y back
-		char contenido[30];
-		mGetArray(lev,contenido,MAPS_BLOCK_OFFSET_WALL-30+fromscr*30,30);
-		mSetArray(lev,contenido,MAPS_BLOCK_OFFSET_WALL-30+toscr*30,30,MAPS_BLOCK_OFFSET_VALIDATOR_WALL);
-		mGetArray(lev,contenido,MAPS_BLOCK_OFFSET_BACK-30+fromscr*30,30);
-		mSetArray(lev,contenido,MAPS_BLOCK_OFFSET_BACK-30+toscr*30,30,MAPS_BLOCK_OFFSET_VALIDATOR_WALL);
-
-		//Copiar Guards
-		mGetGuard(lev,fromscr,&i,&j,&k,&l,&sentido,&existe);
-		mSetGuard(lev,toscr,i,j,k,l,sentido,existe);
-		//Listo, ya se copio el contenido y el guardia
-	}
-}
-
-/***************************************************************\
-|                         File handling                         |
-\***************************************************************/
-
-char cMaps::mLoadPED(const char* vFile,tLevel* lev) {
-	FILE *fp;
-	char aux;
-
-	if ((fp=fopen(vFile,"rb"))==NULL) {
-		return 0;
-	} else {
-		aux=fread (lev,sizeof(*lev),1,fp);
-		fclose(fp);
-		return aux;
-	}
-}
-
-char cMaps::mLoadDAT(const char* vFile,tLevel* lev,char levelNumber) {
-	FILE *fp;
-	char aux;
-
-	if ((fp=fopen(vFile,"rb"))==NULL) {
-		return 0;
-	} else {
-		(*lev).level=levelNumber;
-		fpos_t position=levelNumber*MAPS_BLOCK_SIZEOF_LEVEL+MAPS_BLOCK_OFFSET_LEVELS;
-		fsetpos (fp, &position);
-		aux=fread (&(*lev).levelArray,MAPS_BLOCK_SIZEOF_LEVEL,1,fp);
-		mCreateLinkMap(lev);
-		fclose(fp);
-		return aux;
-	}
-}
-
-char cMaps::mSavePED(const char* vFile,tLevel* lev) {
-  FILE * pFile;
-  if ((pFile = fopen (vFile , "wb"))==NULL) {
-		return 0;
-	}
-  fwrite (lev, 1, sizeof(*lev), pFile);
-  fclose (pFile);
-  return 1;
-}
-
-char cMaps::mSaveDAT(const char* vFile,tLevel* lev) {
-  FILE * pFile;
-  if ((pFile = fopen (vFile , "r+b"))==NULL) {
-		return 0;
-	}
-	fpos_t position=(*lev).level*MAPS_BLOCK_SIZEOF_LEVEL+MAPS_BLOCK_OFFSET_LEVELS;
-  fsetpos (pFile, &position);
-  fwrite ((*lev).levelArray, 1, MAPS_BLOCK_SIZEOF_LEVEL, pFile);
-  fclose (pFile);
-  return 1;
-}
-;
\ No newline at end of file
diff --git a/pv3/maps.h b/pv3/maps.h
deleted file mode 100644
index 10a7f6e..0000000
--- a/pv3/maps.h
+++ /dev/null
@@ -1,216 +0,0 @@
-/***************************************************************\
-|                  Format Block Specification                   |
-\************************************************************** /
-
-Len	Offs	BlockName & Description
-1 	0   	validador (0-1953)
-720	1   	wall
-720	721 	back
-18	1441	doors1
-238	1459	unknown1 (22/215?) (por convencion: empty para guardar info)
-18	1697	doors2
-238	1715	unknown2 (22/215?) (por convencion: empty para guardar info)
-96	1953	links
-64	2049	unknown3 (peligroso)
-3 	2113	startPosition (1: screen; 2: module; 3: direction)
-3 	2116	unknownSP (Dafault: triple 0) (por convencion: 1: comienzo de string info; 2 y 3: Debug Position)
-1 	2117	startPositionUnknown (direction?)
-24	2120	guardPosition
-24	2144	guardDirection (00: right; FF: left)
-1 	2168	unknown4/1 (por convencion: validator 1953-2306)
-23	2169	unknown4/23 (por convencion: empty para guardar info)
-24	2192	unknown5 (por convencion: empty para guardar info)
-24	2216	guardSkill
-24	2240	unknown6 (por convencion: empty para guardar info)
-24	2264	guardColor
-16	2288	unknown7 (por convencion: empty para guardar info)
-2 	2304	0F 09
-  	2306	New Level
-
-/ **************************************************************\
-|                          Inclusiones                          |
-\***************************************************************/
-
-#ifndef INCLUDED_MAPS_H
-#define INCLUDED_MAPS_H
-
-#include <stdio.h>
-
-/***************************************************************\
-|                  Definiciones del Precompilador               |
-\***************************************************************/
-
-#define MAPS_MAX_SCREENS    24
-#define MAPS_MAX_LENGTH     49
-//MAPS_MAX_SCREENS*2+1
-#define MAPS_LINKMAP_CENTER 24
-//(char)(MAPS_MAX_SCREENS*2+1)/2
-
-#define MAPS_DIRECTION_RIGHT 0x00
-#define MAPS_DIRECTION_LEFT  0xFF
-
-#define MAPS_BLOCK_SIZEOF_LEVEL    					2306
-#define MAPS_BLOCK_OFFSET_LEVELS   					6
-
-#define MAPS_BLOCK_OFFSET_VALIDATOR_WALL		0
-#define MAPS_BLOCK_SIZEOF_VALIDATOR_WALL		1
-#define MAPS_BLOCK_OFFSET_WALL							1
-#define MAPS_BLOCK_SIZEOF_WALL							720
-#define MAPS_BLOCK_SIZEOF_BACK							720
-#define MAPS_BLOCK_OFFSET_BACK							721
-#define MAPS_BLOCK_OFFSET_LINK							1953
-#define MAPS_BLOCK_OFFSET_VALIDATOR_LINK		2168
-#define MAPS_BLOCK_OFFSET_GUARD_DIRECTION 	2144
-#define MAPS_BLOCK_OFFSET_GUARD_POSITION  	2120
-#define MAPS_BLOCK_OFFSET_START_POSITION    2113
-#define MAPS_BLOCK_OFFSET_GUARD_SKILL     	2216
-#define MAPS_BLOCK_OFFSET_GUARD_COLOR     	2264
-#define MAPS_BLOCK_OFFSET_UNKNOWN_1         1459
-#define MAPS_BLOCK_SIZEOF_UNKNOWN_1         238
-#define MAPS_BLOCK_OFFSET_UNKNOWN_2         1715
-#define MAPS_BLOCK_SIZEOF_UNKNOWN_2         238
-#define MAPS_BLOCK_OFFSET_UNKNOWN_4         2169
-#define MAPS_BLOCK_SIZEOF_UNKNOWN_4         23
-#define MAPS_BLOCK_SIZEOF_UNKNOWN_5         24
-#define MAPS_BLOCK_OFFSET_UNKNOWN_5         2192
-#define MAPS_BLOCK_SIZEOF_UNKNOWN_6         24
-#define MAPS_BLOCK_OFFSET_UNKNOWN_6         2240
-#define MAPS_BLOCK_SIZEOF_UNKNOWN_7         16
-#define MAPS_BLOCK_OFFSET_UNKNOWN_7         2288
-#define MAPS_BLOCK_SIZEOF_GATE_1            18
-#define MAPS_BLOCK_SIZEOF_GATE              18
-//256
-#define MAPS_BLOCK_OFFSET_GATE_1            1441
-#define MAPS_BLOCK_SIZEOF_GATE_2            18
-#define MAPS_BLOCK_OFFSET_GATE_2            1697
-#define MAPS_BLOCK_SIZEOF_FILE              37031
-
-#define MAPS_OBJ_BAL_D 0x26
-#define MAPS_OBJ_BAL_U 0x2f
-
-//Constantes copadas
-#define MAPS_sUp			2
-#define MAPS_sDown		3
-#define MAPS_sLeft		0
-#define MAPS_sRight		1
-
-
-#include "structures.h"
-
-/*
-char pantalla --> the screen number
-char p --> floor (0 to 2)
-char b --> square (0 to 9)
-
-idem setWall but it sets the background property
-char valor --> value (it has to be a MAP_BCK_* define)
-vidas is something like lives but it depends on the level you are
-sentido is where is the guard looking at
-erase has to be 0, if you use a non 0 value you set no guard on this screen
-*/
-
-class cMaps {
-public:
-	cMaps(char* fileName);
-	bool exists();
-	~cMaps();
-	tLevel* lev;
-
-private:
-
-
-/***************************************************************\
-|                           Prototipos                          |
-\***************************************************************/
-
-public: //prototipos publicos
-
-	//File management procedures
-	char mLoadPED(const char* vFile,tLevel* lev);
-	char mLoadDAT(const char* vFile,tLevel* lev,char levelNumber); //Tested 5
-	char mSavePED(const char* vFile,tLevel* lev); //Tested 8
-	char mSaveDAT(const char* vFile,tLevel* lev); //Tested 3
-
-	//char mChangeLevel(tLevel* lev,char newLevel); //0 si no hay cambios; si hay cambios en paredes devuelve la camtidad de paredes cambiadas
-	//char mAllowedOn(char levelnumber,char wall); //1 si wall es permitido en levelnumber; 0 si no
-
-	//Information methods
-	void mSetText (tLevel* lev,const char* text);
-	void mGetText (tLevel* lev,char* text);
-
-	//tLevel Set methods
-	void mSetWall (tLevel* lev,char pantalla,char p,char b,char valor);
-	void mSetLink (tLevel* lev,char pantalla,char tipo,char valor);
-	void mSetGuard(tLevel* lev,char pantalla,char p,char b,char vidas,char color,char sentido,char erase);
-	void mSetBack (tLevel* lev,char pantalla,char p,char b,char valor);
-	//tLevel Get Methods
-	char mGetWall (tLevel* lev,char pantalla,char p,char b) const;
-	char mGetLink (tLevel* lev,char pantalla,char tipo);
-	void mGetGuard(tLevel* lev,char pantalla,char* p,char* b,char* vidas,char* color,char* sentido,char* erase) const;
-	char mGetBack (tLevel* lev,char pantalla,char p,char b) const;
-
-	//Gate handling Methods
-	/*
-	Public:
-	mCreateEventList
-	mAddToEventList
-	mGetEventList
-	mRemFromEventList
-	mRemoveEventList
-
-	Private:
-
-	mSaveEventList
-	mLoadEventList
-	*/
-
-
-	//Screen Links Handling Methods
-	char mGetScreen    (tLevel* lev, char i,char j, char* error) const;
-	void mGetMainScreen(tLevel* lev, char* i,char* j) const;
-	void mRemScreen    (tLevel* lev, char i,char j, char* error);
-	void mAddScreen    (tLevel* lev, char i,char j, char* error);
-	void mGetSize      (tLevel* lev, char* i,char* j) const;
-	char mGetScrCount  (tLevel* lev);
-		//Nota: si mGetScrCount(lev) es 24, entonces el nivel esta lleno
-	void mCpyScreen    (tLevel* lev, char fromi,char fromj,char toi,char toj, char* error);
-
-	//Start position handling
-	void mGetStartPosition(tLevel* lev,char* pantalla, char* p, char *b,char *sentido,char *sentido2);
-	void mSetStartPosition(tLevel* lev,char pantalla, char p, char b,char sentido,char sentido2);
-	void mGetDebugPosition(tLevel* lev,char* pantalla, char* p, char *b,char *sentido);
-	void mSetDebugPosition(tLevel* lev,char pantalla, char p, char b,char sentido);
-		//Nota: DebugPosition puede no existir en lev, en ese caso la convension es no existe si pantalla igual a 0, de lo contrario existe y la pantalla inicial es pantalla
-
-private: //Prototipos privados
-	void mSetArray(tLevel* lev, const char *pos,int from,unsigned int length,int validator);
-	void mGetArray(tLevel* lev, char* pos,int from,int length);
-	void getRawEvent(tLevel* lev,char id,tGateEvent* event);
-	void setRawEvent(tLevel* lev,char id,tGateEvent* event);
-	void mLoadEventList(tLevel* lev);
-	void anularEvento(tGateEvent *e);
-	char obtenerFila(tGateRow *fila,unsigned char c,int k,tLevel* lev);
-	char sameEvent(tGateEvent event1,tGateEvent event2);
-	tGateEvent setFlag(tGateEvent evento,char flag);
-	char belongsToDiskList(tLevel* lev, tGateRow *fila,int i);
-	void apuntar(tLevel* lev,unsigned char i);
-	char intertLeft(tLevel* lev,tGateRow fila,int inicioFila,int numeroFila,char mode);
-	char mSaveEventList(tLevel* lev);
-	void mRecLink(char i, char j, tLevel* lev); //recursive prototype
-	void mRecIndirect(char i, char j, tLevel* lev, char scr, char pos);
-	void mCalcularLimUp (tLevel* lev);
-	void mCalcularLimDown (tLevel* lev);
-	void mCalcularLimLeft (tLevel* lev);
-	void mCalcularLimRight (tLevel* lev);
-	void mCreateLinkMap(tLevel* lev);
-	void cMaps::getGateAsociation(tLevel* lev,char id,char* scr,char* p,char* b, char *termino);
-	void cMaps::setGateAsociation(tLevel* lev,char id,char scr,char p,char b, char termino);
-	void cMaps::shiftEventId(tLevel* lev,char from,char delta);
-	void cMaps::insertEvent(tLevel* lev,char id,char scr,char p,char b);
-
-
-
-}
-;
-
-#endif
diff --git a/pv3/process.cpp b/pv3/process.cpp
deleted file mode 100644
index 01d3915..0000000
--- a/pv3/process.cpp
+++ /dev/null
@@ -1,23 +0,0 @@
-// process.cpp : implementation of the cProcess class
-//
-
-#include "stdafx.h"
-#include "Princed V3.h"
-#include <process.h>
-#include <signal.h>
-
-class cProcess {
-private:
-	int handle;
-public:
-
-	cProcess(char *cmdname) {
-		handle=_spawnl(_P_NOWAIT, cmdname, "megahit","3", NULL);
-		
-	}
-
-//int raise( int sig );
-
-
-}
-;
\ No newline at end of file
diff --git a/pv3/res/32x32.ped.ico b/pv3/res/32x32.ped.ico
deleted file mode 100644
index 5680552..0000000
Binary files a/pv3/res/32x32.ped.ico and /dev/null differ
diff --git a/pv3/res/Princed V3.rc2 b/pv3/res/Princed V3.rc2
deleted file mode 100644
index 104fc86..0000000
--- a/pv3/res/Princed V3.rc2	
+++ /dev/null
@@ -1,13 +0,0 @@
-//
-// PRINCED V3.RC2 - resources Microsoft Visual C++ does not edit directly
-//
-
-#ifdef APSTUDIO_INVOKED
-	#error this file is not editable by Microsoft Visual C++
-#endif //APSTUDIO_INVOKED
-
-
-/////////////////////////////////////////////////////////////////////////////
-// Add manually edited resources here...
-
-/////////////////////////////////////////////////////////////////////////////
diff --git a/pv3/res/Toolbar.bmp b/pv3/res/Toolbar.bmp
deleted file mode 100644
index 4900f03..0000000
Binary files a/pv3/res/Toolbar.bmp and /dev/null differ
diff --git a/pv3/res/about.bmp b/pv3/res/about.bmp
deleted file mode 100644
index 74c6d10..0000000
Binary files a/pv3/res/about.bmp and /dev/null differ
diff --git a/pv3/res/about.jpg b/pv3/res/about.jpg
deleted file mode 100644
index 2038850..0000000
Binary files a/pv3/res/about.jpg and /dev/null differ
diff --git a/pv3/res/about_pi.bmp b/pv3/res/about_pi.bmp
deleted file mode 100644
index f96060b..0000000
Binary files a/pv3/res/about_pi.bmp and /dev/null differ
diff --git a/pv3/res/backmask.bmp b/pv3/res/backmask.bmp
deleted file mode 100644
index 51182a6..0000000
Binary files a/pv3/res/backmask.bmp and /dev/null differ
diff --git a/pv3/res/backs.bmp b/pv3/res/backs.bmp
deleted file mode 100644
index f96a4bb..0000000
Binary files a/pv3/res/backs.bmp and /dev/null differ
diff --git a/pv3/res/dropper.cur b/pv3/res/dropper.cur
deleted file mode 100644
index 4ae0b0b..0000000
Binary files a/pv3/res/dropper.cur and /dev/null differ
diff --git a/pv3/res/elemmask.bmp b/pv3/res/elemmask.bmp
deleted file mode 100644
index 64d8d79..0000000
Binary files a/pv3/res/elemmask.bmp and /dev/null differ
diff --git a/pv3/res/elemp.bmp b/pv3/res/elemp.bmp
deleted file mode 100644
index 1d84e57..0000000
Binary files a/pv3/res/elemp.bmp and /dev/null differ
diff --git a/pv3/res/elempmask.bmp b/pv3/res/elempmask.bmp
deleted file mode 100644
index d35149a..0000000
Binary files a/pv3/res/elempmask.bmp and /dev/null differ
diff --git a/pv3/res/elems.bmp b/pv3/res/elems.bmp
deleted file mode 100644
index 0426959..0000000
Binary files a/pv3/res/elems.bmp and /dev/null differ
diff --git a/pv3/res/guard.bmp b/pv3/res/guard.bmp
deleted file mode 100644
index 1fdd060..0000000
Binary files a/pv3/res/guard.bmp and /dev/null differ
diff --git a/pv3/res/guardmask.bmp b/pv3/res/guardmask.bmp
deleted file mode 100644
index 55e7119..0000000
Binary files a/pv3/res/guardmask.bmp and /dev/null differ
diff --git a/pv3/res/hand.cur b/pv3/res/hand.cur
deleted file mode 100644
index 38ec954..0000000
Binary files a/pv3/res/hand.cur and /dev/null differ
diff --git a/pv3/res/icons & cursors.zip b/pv3/res/icons & cursors.zip
deleted file mode 100644
index 0f2860a..0000000
Binary files a/pv3/res/icons & cursors.zip and /dev/null differ
diff --git a/pv3/res/manifest.txt b/pv3/res/manifest.txt
deleted file mode 100644
index 70bcf93..0000000
--- a/pv3/res/manifest.txt
+++ /dev/null
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
-<assemblyIdentity
-    name="Prince.editor"
-    processorArchitecture="x86"
-    version="1.0.0.0"
-    type="win32"/>
-<description>Princed V3</description>
-<dependency>
-    <dependentAssembly>
-        <assemblyIdentity
-            type="win32"
-            name="Microsoft.Windows.Common-Controls"
-            version="6.0.0.0"
-            processorArchitecture="x86"
-            publicKeyToken="6595b64144ccf1df"
-            language="*"
-        />
-    </dependentAssembly>
-</dependency>
-</assembly>
\ No newline at end of file
diff --git a/pv3/res/newer BMPs.zip b/pv3/res/newer BMPs.zip
deleted file mode 100644
index cba4d97..0000000
Binary files a/pv3/res/newer BMPs.zip and /dev/null differ
diff --git a/pv3/res/palette.bmp b/pv3/res/palette.bmp
deleted file mode 100644
index 7b3489e..0000000
Binary files a/pv3/res/palette.bmp and /dev/null differ
diff --git a/pv3/res/princed.ico b/pv3/res/princed.ico
deleted file mode 100644
index 10bfe8f..0000000
Binary files a/pv3/res/princed.ico and /dev/null differ
diff --git a/pv3/res/pspbrwse.jbf b/pv3/res/pspbrwse.jbf
deleted file mode 100644
index 17185af..0000000
Binary files a/pv3/res/pspbrwse.jbf and /dev/null differ
diff --git a/pv3/res/zoomer.cur b/pv3/res/zoomer.cur
deleted file mode 100644
index c36918c..0000000
Binary files a/pv3/res/zoomer.cur and /dev/null differ
diff --git a/pv3/resource.h b/pv3/resource.h
deleted file mode 100644
index e61a635..0000000
--- a/pv3/resource.h
+++ /dev/null
@@ -1,126 +0,0 @@
-//{{NO_DEPENDENCIES}}
-// Microsoft Developer Studio generated include file.
-// Used by Princed V3.rc
-//
-#define IDD_ABOUTBOX                    100
-#define IDP_SOCKETS_INIT_FAILED         104
-#define IDR_MAINFRAME                   128
-#define IDR_PRINCETYPE                  129
-#define IDD_DIALOG_SELECT_LEVEL         132
-#define IDB_ELEMMASK                    136
-#define IDB_ELEMS                       137
-#define IDB_GUARD                       139
-#define IDB_GUARDMASK                   140
-#define IDB_BACKMASK                    141
-#define IDB_BACKS                       142
-#define IDB_ELEMPMASK                   143
-#define IDB_ELEMP                       144
-#define IDD_EDIT_SAV                    145
-#define IDC_HANDPALM                    146
-#define IDC_ZOOMTOOL                    147
-#define IDR_TOOLPAL                     148
-#define IDC_DROPPER                     150
-#define IDB_ABOUT_PIC                   158
-#define IDC_COMBO1                      1000
-#define IDC_EDIT1                       1001
-#define IDC_BROWSE                      1002
-#define IDC_OPEN                        1003
-#define IDC_SAVE                        1004
-#define IDC_LEVEL                       1005
-#define IDC_SPIN1                       1006
-#define IDC_EDIT2                       1007
-#define IDC_BUTTON1                     1009
-#define IDC_EDIT3                       1010
-#define ID_FILE_SAVEALL                 32771
-#define ID_FILE_COMPILEDAT              32772
-#define ID_FILE_UNCOMPILEDAT            32773
-#define ID_FILE_PUBLISHDAT              32774
-#define ID_FILE_EXPORTTOIMAGE           32775
-#define ID_FILE_EXPORTTOTEXT            32776
-#define ID_FILE_EXPORTTOHTML            32777
-#define ID_FILE_SEARCHFILES             32778
-#define ID_FILE_PREFERENCES             32779
-#define ID_EDIT_CLEARSELECTION          32780
-#define ID_VIEW_MAPTOOLS                32781
-#define ID_VIEW_TOOLOPTIONSWINDOW       32782
-#define ID_VIEW_LEVELPROPERTRIES        32783
-#define ID_VIEW_OPENLEVELS              32784
-#define ID_VIEW_READERSCREENMENU        32785
-#define ID_VIEW_TOGGLEGRID              32786
-#define ID_VIEW_TOGGLERULERS            32787
-#define ID_VIEW_IN                      32788
-#define ID_VIEW_ZOOM_OUT                32789
-#define ID_VIEW_ZOOM_FITSCREENTOWINDOW  32790
-#define ID_VIEW_ZOOM_200                32791
-#define ID_VIEW_ZOOM_100                32792
-#define ID_VIEW_ZOOM_50                 32793
-#define ID_VIEW_ZOOM_25                 32794
-#define ID_VIEW_ZOOM_FITLEVELTOWINDOW   32795
-#define ID_ADDONS_EDITHALLOFFAME        32796
-#define ID_ADDONS_EDITSAVEDGAME         32797
-#define ID_ADDONS_EDITGRAPHICS          32798
-#define ID_ADDONS_EDITPRINCEEXE         32799
-#define ID_DEBUG_RUNLEVELFROMDEGUBPOSITION 32800
-#define ID_DEBUG_RUNLEVELFROMSTARTPOSITION 32801
-#define ID_DEBUG_REFRESHRUNNINGLEVE     32802
-#define ID_DEBUG_RUNDATFILE             32803
-#define ID_DEBUG_STOPRUNNING            32804
-#define ID_DEBUG_EXECUTEPRINCEOFPERSIA  32805
-#define ID_WINDOW_TILEHORIZONTALLY      32806
-#define ID_WINDOW_FITTOLEVEL            32807
-#define ID_WINDOW_CLOSEALL              32808
-#define ID_HELP_HELPTOPICS              32809
-#define ID_HELP_LICENSE                 32810
-#define ID_HELP_FREQUENTLYASKEDQUESTIONS 32811
-#define ID_HELP_PRINCEDHOMEPAGE         32812
-#define ID_FILE_NEWX                    32813
-#define ID_TOOL_SELECTION               32814
-#define ID_MAPTOOLS_CLEAR               32850
-#define ID_MAPTOOLS_OBJECTS_POSSION     32851
-#define ID_MAPTOOLS_OBJECTS_STARTPOSITION 32852
-#define ID_MAPTOOLS_OBJECTS_DEBUGPOSITION 32853
-#define ID_MAPTOOLS_OBJECTS_GUARDS      32854
-#define ID_MAPTOOLS_BACKGROUND_LIGHT    32855
-#define ID_MAPTOOLS_BACKGROUND_BRICKS   32856
-#define ID_MAPTOOLS_BACKGROUND_WINDOW   32857
-#define ID_MAPTOOLS_BACKGROUND_BIGWINDOW 32858
-#define ID_MAPTOOLS_BACKGROUND_COLUMN   32859
-#define ID_MAPTOOLS_BACKGROUND_BIGCOLUMN 32860
-#define ID_MAPTOOLS_BACKGROUND_RANDOM   32861
-#define ID_MAPTOOLS_WALL                32862
-#define ID_MAPTOOLS_WALKABLE_NORMAL     32863
-#define ID_MAPTOOLS_WALKABLE_BALDOZAROTA 32864
-#define ID_MAPTOOLS_WALKABLE_BALDOZAAPRETABLE 32865
-#define ID_MAPTOOLS_WALKABLE_BALDOZACONESQUELETO 32866
-#define ID_MAPTOOLS_WALKABLE_PINCHES    32867
-#define ID_MAPTOOLS_WALKABLE_BALDOZAFLOJA 32868
-#define ID_MAPTOOLS_WALKABLE_RANDOM     32869
-#define ID_MAPTOOLS_GATES_DOOR          32870
-#define ID_MAPTOOLS_GATES_PUERTASIERRA  32871
-#define ID_MAPTOOLS_GATES_LEVELGATE     32872
-#define ID_MAPTOOLS_DROPPER             32873
-#define ID_MAPTOOLS_SELECT              32874
-#define ID_MAPTOOLS_ZOOM                32875
-#define ID_MAPTOOLS_ARRASTRAR           32876
-#define ID_MAPTOOLS_WALKABLE_DOORCLOSER 32877
-#define ID_MAPTOOLS_SWORD               32878
-#define ID_VIEW_ASDUNGEON               32901
-#define ID_VIEW_ASPALACE                32902
-#define ID_BUTTON32903                  32903
-#define ID_BUTTON32904                  32904
-#define ID_VIEW_ZOOM_IN                 32905
-#define IDS_PRINCED_HOMEPAGE            61446
-#define IDS_WALL_NAMES                  61447
-#define IDS_ABOUT_TEXT                  61448
-
-// Next default values for new objects
-// 
-#ifdef APSTUDIO_INVOKED
-#ifndef APSTUDIO_READONLY_SYMBOLS
-#define _APS_3D_CONTROLS                     1
-#define _APS_NEXT_RESOURCE_VALUE        159
-#define _APS_NEXT_COMMAND_VALUE         32907
-#define _APS_NEXT_CONTROL_VALUE         1011
-#define _APS_NEXT_SYMED_VALUE           101
-#endif
-#endif
diff --git a/pv3/stackqueue.cpp.cpp b/pv3/stackqueue.cpp.cpp
deleted file mode 100644
index 5ce7914..0000000
--- a/pv3/stackqueue.cpp.cpp
+++ /dev/null
@@ -1,76 +0,0 @@
-#include <iostream.h>
-
-//ds \xbc\xf7\xc1\xa6 4: 20010078 \xb1\xe8\xbf빬
-//3\xb9\xf8 \xbc\xf7\xc1\xa6\xbf\xcd \xc0\xce\xc5\xcd\xc6\xe4\xc0̽\xba\xb4\xc2 \xbf\xcf\xc0\xfc\xc8\xf7 \xb0\xb0\xb5\xc7, \xb1\xb8\xc7\xf6 \xb9\xe6\xbdĸ\xb8 \xb8\xb5ũ\xb5\xe5 \xb8\xae\xbd\xbaƮ\xc0Դϴ\xd9.
-
-template<typename T>
-class CStack {
-protected:
-	struct NODE {
-		T data; NODE *extra;
-	};
-	NODE *m_pHead; int m_nElem;
-public:
-	//Construction/destruction
-	CStack(): m_pHead(NULL), m_nElem(0) {}
-	int GetCount() const { return m_nElem; } //number of elements
-	virtual ~CStack();
-	virtual void Add(const T& elem);
-	virtual bool Delete(T& elem); //returns the pointer to the element being deleted
-};
-
-template<typename T>
-class CQueue: public CStack<T> {
-protected:
-	NODE *m_pTail;
-public:
-	virtual void Add(const T& elem);
-};
-
-template<typename T>
-void CStack<T>::Add(const T& elem)
-{
-	if(m_pHead==NULL) { m_pHead=new NODE; m_pHead->extra=NULL; }
-	else { NODE *tmp=m_pHead; m_pHead=new NODE; m_pHead->extra=tmp; }
-	m_pHead->data=elem;
-}
-
-template<typename T>
-void CQueue<T>::Add(const T& elem)
-{
-	if(m_pHead) { m_pTail->extra=new NODE; m_pTail=m_pTail->extra; }
-	else { m_pTail=m_pHead=new NODE; }
-	m_pTail->extra=NULL; m_pTail->data=elem;
-}
-
-template<typename T>
-bool CStack<T>::Delete(T& elem)
-{
-	if(m_pHead) { //If there's anything to draw out
-		NODE *tmp=m_pHead; elem=m_pHead->data; m_pHead=m_pHead->extra; delete tmp;
-		return true;
-	}
-	else return false; //nothing
-}
-
-template<typename T>
-CStack<T>::~CStack()
-{
-	NODE *tmp, *tmp2; //\xb3\xeb\xb5带 \xbc\xf8ȸ\xc7ϸ鼭 \xbf\xf8\xbcҵ\xe9\xc0\xbb \xb8\xf0\xb5\xce \xc1\xf6\xbf\xf2
-	for(tmp=m_pHead;tmp; tmp=tmp2) { tmp2=tmp->extra; delete tmp; }
-}
-
-int main()
-{
-	CStack<int> ap; CQueue<int> aq; int x;
-	cout<<"\xbd\xba\xc5ÿ\xa1\xb4\xd9 1 \xb3־\xfa\xb4\xd9 \xc1\xf6\xbf\xec\xb0\xed, 2 3 4 5\xb8\xa6 \xb3־\xfa\xb4ٰ\xa1 \xc2\xf7\xb7ʴ\xeb\xb7\xce \xbb\xa9\xb3\xbb\xb1\xe2\n";
-	ap.Add(1); ap.Delete(x); ap.Add(2); ap.Add(3); ap.Add(4); ap.Add(5);
-	ap.Delete(x); cout<<x<<" "; ap.Delete(x); cout<<x<<" ";
-	ap.Delete(x); cout<<x<<" "; ap.Delete(x); cout<<x<<endl<<endl;
-
-	cout<<"ť\xbf\xa1\xb4\xd9 1 \xb3־\xfa\xb4\xd9 \xc1\xf6\xbf\xec\xb0\xed, 2 3 4 5\xb8\xa6 \xb3־\xfa\xb4ٰ\xa1 \xc2\xf7\xb7ʴ\xeb\xb7\xce \xbb\xa9\xb3\xbb\xb1\xe2\n";
-	aq.Add(1); aq.Delete(x); aq.Add(2); aq.Add(3); aq.Add(4); aq.Add(5);
-	aq.Delete(x); cout<<x<<" "; aq.Delete(x); cout<<x<<" ";
-	aq.Delete(x); cout<<x<<" "; aq.Delete(x); cout<<x<<endl;
-	return 0;
-}
diff --git a/pv3/structures.h b/pv3/structures.h
deleted file mode 100644
index 43cd986..0000000
--- a/pv3/structures.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/***************************************************************\
-|                       Estructuras de Datos                    |
-\***************************************************************/
-
-//Link Handler
-typedef struct {
-	unsigned char linkMap[MAPS_MAX_LENGTH][MAPS_MAX_LENGTH];
-	unsigned char linkList[MAPS_MAX_SCREENS];
-	char limLeft,limRight,limUp,limDown;
-}tLevelHandleLinks;
-
-//Gate Handler
-typedef struct {
-	unsigned char pos[2];
-}tGateEvent;
-
-typedef struct {
-	tGateEvent event[256];
-	unsigned char size;
-}tGateEvents;
-
-typedef struct {
-	unsigned char size;
-	tGateEvent event[50];
-}tGateRow;
-
-typedef struct {
-	unsigned char size;
-	tGateRow row[50];
-}tGateTDA;
-
-typedef struct {
-	unsigned char id;
-	unsigned char door;
-}tGateListItem;
-
-typedef struct {
-	int size;
-	tGateListItem item[720];
-}tGateList;
-
-//Main level structure
-typedef struct {
-	char level;
-	tLevelHandleLinks handledLinks;
-	unsigned char levelArray[MAPS_BLOCK_SIZEOF_LEVEL];
-	char desc[200];
-	char name[50];
-	tGateTDA gateTDA;
-	tGateList gateList;
-	tGateEvents gateEvents;
-}tLevel;
diff --git a/stuff/cvsroot-pr/CVSROOT/checkoutlist b/stuff/cvsroot-pr/CVSROOT/checkoutlist
deleted file mode 100644
index b04b350..0000000
--- a/stuff/cvsroot-pr/CVSROOT/checkoutlist
+++ /dev/null
@@ -1,13 +0,0 @@
-# The "checkoutlist" file is used to support additional version controlled
-# administrative files in $CVSROOT/CVSROOT, such as template files.
-#
-# The first entry on a line is a filename which will be checked out from
-# the corresponding RCS file in the $CVSROOT/CVSROOT directory.
-# The remainder of the line is an error message to use if the file cannot
-# be checked out.
-#
-# File format:
-#
-#	[<whitespace>]<filename><whitespace><error message><end-of-line>
-#
-# comment lines begin with '#'
diff --git a/stuff/cvsroot-pr/CVSROOT/commitinfo b/stuff/cvsroot-pr/CVSROOT/commitinfo
deleted file mode 100644
index b19e7b7..0000000
--- a/stuff/cvsroot-pr/CVSROOT/commitinfo
+++ /dev/null
@@ -1,15 +0,0 @@
-# The "commitinfo" file is used to control pre-commit checks.
-# The filter on the right is invoked with the repository and a list 
-# of files to check.  A non-zero exit of the filter program will 
-# cause the commit to be aborted.
-#
-# The first entry on a line is a regular expression which is tested
-# against the directory that the change is being committed to, relative
-# to the $CVSROOT.  For the first match that is found, then the remainder
-# of the line is the name of the filter to run.
-#
-# If the repository name does not match any of the regular expressions in this
-# file, the "DEFAULT" line is used, if it is specified.
-#
-# If the name "ALL" appears as a regular expression it is always used
-# in addition to the first matching regex or "DEFAULT".
diff --git a/stuff/cvsroot-pr/CVSROOT/config b/stuff/cvsroot-pr/CVSROOT/config
deleted file mode 100644
index ff43ec0..0000000
--- a/stuff/cvsroot-pr/CVSROOT/config
+++ /dev/null
@@ -1,14 +0,0 @@
-# Set this to "no" if pserver shouldn't check system users/passwords
-#SystemAuth=no
-
-# Put CVS lock files in this directory rather than directly in the repository.
-#LockDir=/var/lock/cvs
-
-# Set `TopLevelAdmin' to `yes' to create a CVS directory at the top
-# level of the new working directory when using the `cvs checkout'
-# command.
-#TopLevelAdmin=no
-
-# Set `LogHistory' to `all' or `TOFEWGCMAR' to log all transactions to the
-# history file, or a subset as needed (ie `TMAR' logs all write operations)
-#LogHistory=TOFEWGCMAR
diff --git a/stuff/cvsroot-pr/CVSROOT/cvswrappers b/stuff/cvsroot-pr/CVSROOT/cvswrappers
deleted file mode 100644
index 0accaf1..0000000
--- a/stuff/cvsroot-pr/CVSROOT/cvswrappers
+++ /dev/null
@@ -1,23 +0,0 @@
-# This file affects handling of files based on their names.
-#
-# The -t/-f options allow one to treat directories of files
-# as a single file, or to transform a file in other ways on
-# its way in and out of CVS.
-#
-# The -m option specifies whether CVS attempts to merge files.
-#
-# The -k option specifies keyword expansion (e.g. -kb for binary).
-#
-# Format of wrapper file ($CVSROOT/CVSROOT/cvswrappers or .cvswrappers)
-#
-#  wildcard	[option value][option value]...
-#
-#  where option is one of
-#  -f		from cvs filter		value: path to filter
-#  -t		to cvs filter		value: path to filter
-#  -m		update methodology	value: MERGE or COPY
-#  -k		expansion mode		value: b, o, kkv, &c
-#
-#  and value is a single-quote delimited value.
-# For example:
-#*.gif -k 'b'
diff --git a/stuff/cvsroot-pr/CVSROOT/editinfo b/stuff/cvsroot-pr/CVSROOT/editinfo
deleted file mode 100644
index d78886c..0000000
--- a/stuff/cvsroot-pr/CVSROOT/editinfo
+++ /dev/null
@@ -1,21 +0,0 @@
-# The "editinfo" file is used to allow verification of logging
-# information.  It works best when a template (as specified in the
-# rcsinfo file) is provided for the logging procedure.  Given a
-# template with locations for, a bug-id number, a list of people who
-# reviewed the code before it can be checked in, and an external
-# process to catalog the differences that were code reviewed, the
-# following test can be applied to the code:
-#
-#   Making sure that the entered bug-id number is correct.
-#   Validating that the code that was reviewed is indeed the code being
-#       checked in (using the bug-id number or a seperate review
-#       number to identify this particular code set.).
-#
-# If any of the above test failed, then the commit would be aborted.
-#
-# Actions such as mailing a copy of the report to each reviewer are
-# better handled by an entry in the loginfo file.
-#
-# One thing that should be noted is the the ALL keyword is not
-# supported.  There can be only one entry that matches a given
-# repository.
diff --git a/stuff/cvsroot-pr/CVSROOT/loginfo b/stuff/cvsroot-pr/CVSROOT/loginfo
deleted file mode 100644
index 5a59f0a..0000000
--- a/stuff/cvsroot-pr/CVSROOT/loginfo
+++ /dev/null
@@ -1,26 +0,0 @@
-# The "loginfo" file controls where "cvs commit" log information
-# is sent.  The first entry on a line is a regular expression which must match
-# the directory that the change is being made to, relative to the
-# $CVSROOT.  If a match is found, then the remainder of the line is a filter
-# program that should expect log information on its standard input.
-#
-# If the repository name does not match any of the regular expressions in this
-# file, the "DEFAULT" line is used, if it is specified.
-#
-# If the name ALL appears as a regular expression it is always used
-# in addition to the first matching regex or DEFAULT.
-#
-# You may specify a format string as part of the
-# filter.  The string is composed of a `%' followed
-# by a single format character, or followed by a set of format
-# characters surrounded by `{' and `}' as separators.  The format
-# characters are:
-#
-#   s = file name
-#   V = old version number (pre-checkin)
-#   v = new version number (post-checkin)
-#
-# For example:
-#DEFAULT (echo ""; id; echo %s; date; cat) >> $CVSROOT/CVSROOT/commitlog
-# or
-#DEFAULT (echo ""; id; echo %{sVv}; date; cat) >> $CVSROOT/CVSROOT/commitlog
diff --git a/stuff/cvsroot-pr/CVSROOT/modules b/stuff/cvsroot-pr/CVSROOT/modules
deleted file mode 100644
index cb9e9ef..0000000
--- a/stuff/cvsroot-pr/CVSROOT/modules
+++ /dev/null
@@ -1,26 +0,0 @@
-# Three different line formats are valid:
-#	key	-a    aliases...
-#	key [options] directory
-#	key [options] directory files...
-#
-# Where "options" are composed of:
-#	-i prog		Run "prog" on "cvs commit" from top-level of module.
-#	-o prog		Run "prog" on "cvs checkout" of module.
-#	-e prog		Run "prog" on "cvs export" of module.
-#	-t prog		Run "prog" on "cvs rtag" of module.
-#	-u prog		Run "prog" on "cvs update" of module.
-#	-d dir		Place module in directory "dir" instead of module name.
-#	-l		Top-level directory only -- do not recurse.
-#
-# NOTE:  If you change any of the "Run" options above, you'll have to
-# release and re-checkout any working directories of these modules.
-#
-# And "directory" is a path to a directory relative to $CVSROOT.
-#
-# The "-a" option specifies an alias.  An alias is interpreted as if
-# everything on the right of the "-a" had been typed on the command line.
-#
-# You can encode a module within a module by using the special '&'
-# character to interpose another module into the current module.  This
-# can be useful for creating a module that consists of many directories
-# spread out over the entire source repository.
diff --git a/stuff/cvsroot-pr/CVSROOT/notify b/stuff/cvsroot-pr/CVSROOT/notify
deleted file mode 100644
index 34f0bc2..0000000
--- a/stuff/cvsroot-pr/CVSROOT/notify
+++ /dev/null
@@ -1,12 +0,0 @@
-# The "notify" file controls where notifications from watches set by
-# "cvs watch add" or "cvs edit" are sent.  The first entry on a line is
-# a regular expression which is tested against the directory that the
-# change is being made to, relative to the $CVSROOT.  If it matches,
-# then the remainder of the line is a filter program that should contain
-# one occurrence of %s for the user to notify, and information on its
-# standard input.
-#
-# "ALL" or "DEFAULT" can be used in place of the regular expression.
-#
-# For example:
-#ALL mail %s -s "CVS notification"
diff --git a/stuff/cvsroot-pr/CVSROOT/rcsinfo b/stuff/cvsroot-pr/CVSROOT/rcsinfo
deleted file mode 100644
index 49e59f4..0000000
--- a/stuff/cvsroot-pr/CVSROOT/rcsinfo
+++ /dev/null
@@ -1,13 +0,0 @@
-# The "rcsinfo" file is used to control templates with which the editor
-# is invoked on commit and import.
-#
-# The first entry on a line is a regular expression which is tested
-# against the directory that the change is being made to, relative to the
-# $CVSROOT.  For the first match that is found, then the remainder of the
-# line is the name of the file that contains the template.
-#
-# If the repository name does not match any of the regular expressions in this
-# file, the "DEFAULT" line is used, if it is specified.
-#
-# If the name "ALL" appears as a regular expression it is always used
-# in addition to the first matching regex or "DEFAULT".
diff --git a/stuff/cvsroot-pr/CVSROOT/taginfo b/stuff/cvsroot-pr/CVSROOT/taginfo
deleted file mode 100644
index 274a46d..0000000
--- a/stuff/cvsroot-pr/CVSROOT/taginfo
+++ /dev/null
@@ -1,20 +0,0 @@
-# The "taginfo" file is used to control pre-tag checks.
-# The filter on the right is invoked with the following arguments:
-#
-# $1 -- tagname
-# $2 -- operation "add" for tag, "mov" for tag -F, and "del" for tag -d
-# $3 -- repository
-# $4->  file revision [file revision ...]
-#
-# A non-zero exit of the filter program will cause the tag to be aborted.
-#
-# The first entry on a line is a regular expression which is tested
-# against the directory that the change is being committed to, relative
-# to the $CVSROOT.  For the first match that is found, then the remainder
-# of the line is the name of the filter to run.
-#
-# If the repository name does not match any of the regular expressions in this
-# file, the "DEFAULT" line is used, if it is specified.
-#
-# If the name "ALL" appears as a regular expression it is always used
-# in addition to the first matching regex or "DEFAULT".
diff --git a/stuff/cvsroot-pr/CVSROOT/verifymsg b/stuff/cvsroot-pr/CVSROOT/verifymsg
deleted file mode 100644
index 86f747c..0000000
--- a/stuff/cvsroot-pr/CVSROOT/verifymsg
+++ /dev/null
@@ -1,21 +0,0 @@
-# The "verifymsg" file is used to allow verification of logging
-# information.  It works best when a template (as specified in the
-# rcsinfo file) is provided for the logging procedure.  Given a
-# template with locations for, a bug-id number, a list of people who
-# reviewed the code before it can be checked in, and an external
-# process to catalog the differences that were code reviewed, the
-# following test can be applied to the code:
-#
-#   Making sure that the entered bug-id number is correct.
-#   Validating that the code that was reviewed is indeed the code being
-#       checked in (using the bug-id number or a seperate review
-#       number to identify this particular code set.).
-#
-# If any of the above test failed, then the commit would be aborted.
-#
-# Actions such as mailing a copy of the report to each reviewer are
-# better handled by an entry in the loginfo file.
-#
-# One thing that should be noted is the the ALL keyword is not
-# supported.  There can be only one entry that matches a given
-# repository.