OpenPTC 1.0 Win32 Distribution Changes Log
------------------------------------------


Version 1.0.14 [13/5/99]:

   - Fixed a minor bug when WM_CLOSE message is trapped. Now ddraw
     is properly shutdown again before exit(0) is called.
   - Cleaned up and improved the ptc configuration system. Now
     everything is organized into 'config.h' for user configuration,
     'compiler.h' for compiler specific setup, and 'version.h' for
     current version information.
   - Fixed link errors encountered with Visual C++ 5.0 in 1.0.13.
     Now the library file is vc5 and vc6 compatable once more ;)   
   - Fixed the "ptc_dynamic_setup" link error that was introduced
     in version 1.0.12.


Version 1.0.13 [1/5/99]:

   - Simplified the core console down to just a proxy on top of
     DirectXConsole. I have saved the old merger console to the
     files ~Console.h and ~Console.cpp for future development
     when there are GDI and DirectX consoles in OpenPTC Win32.
   - Implemented what i call 'open console recycling'. Basically,
     when a console has already been opened, now instead of closing
     everything down and starting from scratch, i just change the
     display mode using ddraw and reinitiatize the primary surface.
     What this means is that now when you have to open a console
     more than once in a program (say a demo with two parts) you
     get much cleaner mode setting, and most importantly, the
     same HWND gets used during the whole program. (helps with
     DirectSound and DirectInput programming). Note. it is also
     implemented in windowed output, instead of shutting down the
     current window and creating another, a second open will
     just resize the existing console window. nifty :)
   - Sad but true, i made another improvement to the damned mouse
     cursor hiding code. All rational attempts to hide it failed,
     so now i have been reduced to calling "SetCursor(0)" on
     every single console update. oh the humanity. :)
   - Improved the "Dynamic.def" module definition file to keep the
     JNI/RNI exported functions private and out of the ptc.lib.
     This has greatly reduced the size of the ptc import library.


Version 1.0.12 [29/4/99]:

   - Updated "install.txt" with information on how to install now
     that precompiled libraries are included with the distribution.
     Also added "build.txt" for those that still wish to build the
     PTC library themselves.
   - Set default nearest mode matching to centering. Its the 'best'
     choice on most systems, having stretching on systems which it
     is slow is very very bad... best to go for the safe option
     until better code is available to detect if the stretching
     support is fast and high enough quality to use as default.
   - Added an explicit "console.close" to all example and demo
     programs to keep the source in sync with the java dist.
     Having an explicit close instead of relying on the destructor
     (language specific feature) is a good idea for portability.
   - Finished implementation of RNI support. Now java -> ptc.dll
     bindings will work under practically every 1.1 java VM.
     JNI covers netscape/sun/symantec, RNI covers M$ jview and
     internet explorer. The only thing left to do is support
     JDirect native methods for later versions of M$ vm's.
   - Started work on building the RNI bindings based on the RNI
     headers exported from ptc.rni.*.
   - Implemented the majority of JNI functions. Now Java -> C++
     through JNI works perfectly! Fullscreen triple buffered
     vrt synced output from inside java is pretty damned cool :) 
   - Brought over all my old JNI utility routines from the old
     PTC Win32 2.0.8. Now everything is in place to start work
     on implementing the JNI -> Core bindings.
   - Implemented exception handling in the JNI interface so that
     any c++ exceptions thrown internally are caught and rethrown
     in java as "ptc.Error" objects. funky :)
   - Tested the java examples with ptc.dll. Currently it is all
     very skeletal, just opening a mode and closing it, but it
     proves that everything is interfacing between ptc java and
     PTC win32! :)
   - Implemented a basic skeletal JNI support (java to c++ bind)
     and exported the symbols from ptc.dll.
   - Now that the last known bug in OpenPTC Win32 has been fixed
     we are getting very close to moving out of beta release.
     As this release is a major one with many changes, it is
     likely that i have introduced some minor bugs, if you
     find any problems that were introduced with this version
     report them to news://news.scene.org/coders.ptc.bugs
     right away so i can fix them and declare the next release
     as stable!
   - Implemented a workaround for palette entry 255 = white bug.
     This bug occured on some display drivers (ie. mine!) when
     the primary surface was created with multiple pages. Now
     the palette set should work correctly on all hardware.
   - Updated "Land" demo to process all waiting key presses each
     frame with "while (console.key())" not "if (console.key())" 
     to check for key presses. This means that all key presses
     get processed on the frame that they occur, instead of
     buffering up and causing delays.
   - Added palette and surface clearing when the DirectX primary
     is shutdown so that the mode exit is as clean as possible.
   - Added a lot of nice configuration defines to Source/config.h
     to control exactly what gets compiled in to ptc win32.
   - Improve mouse cursor hiding in fullscreen mode. Now the
     mouse cursor should be correctly hidden in all situations.
     I hope. heh. Tell me if the freaking mouse cursor doesnt
     hide because i really want to make sure that its 100%
     correctly hiding now :)
   - Fixed some code in the clear class. Previously it assumed
     that color values for clearing were in the range of the
     pixel format size, ie 6bits for green in RGB565, 8bits
     for all components in RGB888, however, the clear for hermes
     is always 0-255 range. This simplifies the code to just
     scaling the normalized r,g,b,a floats into 0-255.
   - Now that assembler support is in, NASM is required to build
     the ptc library. You can get NASM from www.cryogen.com/nasm.
     Just put nasm.exe in your path or add its directory to
     the visual c++ directory path for executables, and the build
     will work perfectly!
   - Got assembler support working for HERMES in Win32! Excellent!
     Now OpenPTC Win32 just got a HELL OF A LOT FASTER!!! >B)
     The pixel format conversion routines and clearing routines
     are now optimized x86 assembler code. MMX routines also
     exist for those with MMX support! Bonus! :)
   - Changed from hermes.lib over to hermes.dll. Now ptc.dll
     depends on hermes.dll for all of its low level graphics
     functions such as pixel conversion and clearing.
   - Improved the resource script for ptc.dll and ptcdebug.dll.
     Now the resource does not depend on "afxres.h" so users
     without MFC installed will not have any problems compiling
     anymore.
   - Implemented a C++ wrapper on top of the exported C symbols
     from the ptc.dll. Now ptc.dll exports ansi c symbols, so all
     win32 compilers can easily link to it, and provide a c++
     interface on top of this, pure inline. All you need do is
     link to the ptc.dll and include ptc.h. Soon PTC will support
     all compilers under win32, not just visual c++!
   - Now only c symbols are exported from ptc.dll, not c++ ones.
     Once i have written a set of inline classes to interface to
     the c symbols and put the c++ interface back up over the dll,
     ptc.dll will be able to be used by any win32 c++ compiler
     with ease :)
   - Switched ptc.dll over to use a DEF file instead of dllexport
     this will fix the export interface and stop any compatability
     problems in the future. The ordinals of exports are now fixed
     for total backwards compatability.
   - Added "C" example to demonstrate how to use OpenPTC from C.
     This example is just a port of the C++ random example from
     C++ to C. Pretty funky eh? =)
   - Added C/C++ detection to "ptc.h". Now the C API is included
     when compiling from C, and the C++ API from C++.
   - Changed all projects to generate "program database"
     instead of "program database for edit and continue".
     This will stop some warnings in Visual C++ 5.0 which does
     not support edit and continue debugging, and also stop
     debugging info being turned off in debug build when the
     projects are loaded in vc5.
   - Started work on a c interface to the c++ ptc classes.
   - Switched the source code projects to to optimize for
     blended processor model instead of on pentium pro.
   - Setup code framework for JNI (Java Native Interface).
   - Improved the source workspace formatting, now Dynamic.dsp
     depends on Core.dsp to compile the core source instead of
     including the core source into its own project.
   - Added projects for JNI, RNI and JDirect code bases. This is
     where the code for java to ptc.dll support will be placed.


Version 1.0.11 [19/4/99]:

   - Added code to clear the primary surface when reactivating
     and a secondary surface is the console back buffer. Without
     this occasionally the primary surface would have garbage on it,
     such as remnants of the task bar when switching back into a
     fullscreen application with ALT-TAB.
   - Fixed a subtle palette setting bug that may have caused programs
     that expected to be able to read the palette back from a console
     to behave incorrectly. Now the contents of the console palette
     is always updated to what was set, even in a direct color mode,
     previously, the palette data was unchanged if in direct color.
   - Put code into DirectXHook to show and hide the cursor when the
     console is activated/deactivated. This will make sure that the
     cursor is only hidden while the application is active, and when
     the user switches away, the cursor will be shown again.
   - Added code to DirectXHook to release the ddraw interfaces and
     cleanly shutdown ddraw.dll when WM_CLOSE is recieved. Previously
     the console was being closed, surfaces released and display mode
     restored, but the ddraw objects and library were not cleaned up.
   - Added code to console close to make sure that the mouse cursor
     is always shown once fullscreen output is closed down. This
     should fix problems reported by some users that the mouse cursor
     remained hidden after a fullscreen ptc application had shut
     down.
   - Converted all logging functionality over from the "Error" class
     to a new internal class "Log". Now logging will not just be
     for errors, but will include lots of useful information about
     the internal workings of OpenPTC Win32. Take a look at "ptc.log"
     sometime and marvel at the garbage that only i can understand :)
   - Fixed some simple uninitialized memory reads in Win32Keyboard.
     I wasnt clearing the m_alt/m_shift/m_control flags to false
     in the constructor.
   - Found a major memory leak in the core console. I was not
     deleting the managed console pointer in the destructor! eek!
   - Started work on extensive checking of OpenPTC Win32 using
     BoundsChecker. The goal here is to track down all minor bugs,
     such as uninitialized memory reads, memory leaks, win32 and
     ddraw api call failures and warnings etc.


Version 1.0.10 [14/4/99]:

   - Fixed another big fat bug! This one was causing an infine loop to
     occur when some fullscreen modes were requested because the index
     was not being incremented to iterate through the modes list when
     searching for a mode. simple bug. simple fix. Now i hope we have
     the stability back to the level before we introduced the nearest
     mode matching and mode list support! Thanks again to Marcus
     Fletcher for help in tracking this one down.
   - Tracked down an amazingly simple but devastating bug. The clearing
     code for the primary surface was buggy, it did not specify DDBLT_WAIT
     to ensure that the blt would wait until it could start, instead on
     some cards it caused DDERR_WASSTILLDRAWING to be thrown whever the
     primary was created and cleared. The end result was that on some
     video cards fullscreen output just didnt work. Now it should. Big
     thanks to Marcus Fletcher for helping me track this one down.
   - Added error logging to a file. This allows me to track the cause of
     bugs on other peoples machines easily just by viewing the "ptc.log"
     file generated. Logging is turned on automatically in ptcdebug.dll
     and will create a "ptc.log" file when any errors (even internal ones
     that are recovered from) are thrown. You can enable and disable
     error logging with the console options "enable logging" and
     "disable logging". See options.txt for more information.
   - Upgraded debug checking for non-open consoles, and locked consoles
     in functions that are undefined when the console is not open and/or
     locked. Now the DirectXConsole throws an error message specifying
     the exact function that caused the error so you and i can track
     down bugs easier. For example, what was "console is not open" has
     become "console is not open in DirectXConsole::copy(surface)".


Version 1.0.9 [13/4/99]:

   - Fix the problem with ALT-F4 closing throwing "console is not open"
     errors when the m_console->close is used on WM_CLOSE. Now DX output
     should be shut down cleanly when ALT-F4 is pressed in fullscreen, 
     instead of screwing up the window positions and exiting in a messy
     way.
   - Added options to control console key buffering: "enable key buffering"
     and "disable key buffering". Using these options it is possible to
     turn the console.key/console.read functions on and off, quite useful
     when you are managing your own HWND and really dont want key buffering
     going on in the background because you can handle it directly!
     See options.txt for more information.
   - Improved the nearest mode match search that was added in the previous
     version to have a fallback to the old method of mode setting. This
     has been added because some people reported that problems getting 
     fullscreen output were introduced in 1.0.8, so hopefully this will
     fix it. If you still have problems getting fullscreen output please
     email ptc@gaffer.org immediately with details about what is going
     wrong. A copy of the output from the "Modes" example program on your
     computer will greatly assist me in tracking down any mode setting bugs.
   - Fixed secondary to primary blitting to not blit when either source
     or destination rectangles are zero area. This means that when in
     windowed output, resizing the window to have zero area (ie. shrinking
     the window size down to nothing but the title bar) will not cause a
     "DDERR_INVALIDRECT" in "m_lpDDS_primary->Blt".


Version 1.0.8 [9/4/99]:

   - Improved the primary restoring code to perfection. This latest
     fix makes the "DirectXPrimary::block" function block until the
     restore is successful, previously, a failed restore would cause
     an error to be thrown in some circumstances such as "DDERR_WRONGMODE"
     being thrown by "m_lpDDS_primary->Restore".
   - Added the "frequency [n]" option to allow control over the
     the frequency of the display mode opened. See "options.txt"
   - Added option strings to control whether the cursor is hidden or
     shown. See "options.txt" for more information.
   - Added some options to choose what method is used
     to display the console on the nearest mode, "default nearest"
     uses the fastest method (as below), "center nearest" centers
     the console on the nearest mode, and "stretch nearest"
     stretches to the nearest mode. See "options.txt" for
     more details.
   - Added code to choose between centering and stretching to
     the nearest display mode. By default the fastest method is
     used, ie. stretching is only used if there is hardware
     stretching support (quite common).
   - Implemented fullscreen closest mode emulation with stretching
     and centering. This is majorly cool. If the user does not
     have the exact mode you requested, the nearest mode is used
     and the graphics card hardware is used to stretch up from
     the resolution you wanted up to the resolution of the display.
     Even better, on newer cards the stretch will be performed
     in hardware, potentially with bilinear filtering (TNT).
     Its excellent!
   - Added proper mode list support to the DirectX console, check
     out the "Modes" example now and bask in the power of a fully
     operational console mode list :)


Version 1.0.7 [7/4/99]:

   - Removed the activate/deactivate cursor code because it seems
     to be having some problems hiding the cursor again once it is
     shown on deactivate. blah.
   - Added code to memset the DDSURFACEDESC to zero before setting
     it up in DirectXPrimary::primary to create the LPDIRECTDRAWSURFACE.
     This is a minor change but it is recommended to do this in the
     ddraw documentation to avoid problems with poorly written drivers.
   - Added "WndProc" extension example to demonstrate how to work
     user managed HWND in fullscreen and windowed output.
   - Added "Win32Window::update(bool force)" to force window
     messages to get processed in situations where they must be
     processed, even if the window is user managed (for example,
     DirectXPrimary::block requires that window messages get 
     processed by Win32Window::update in order to operate).
   - Fixed DirectXHook::hook to ignore WM_CLOSE when the HWND is
     user managed (normally it closes the console to make DX close
     clean in fullscreen when ALT-F4 is pressed).
   - Fixed Win32Window::close to leave the user managed HWND alone
     and not destroy it :)
   - Changed Win32Window::update to not process user managed window
     messages. this means that when you use a HWND in Console::open
     it is your responsibility to process window messages (more
     flexibility).
   - Added support for user HWNDs in Console::open. This will give
     users a higher level of control over window management when
     they need it. See "extensions.txt" for more information.
   - Added code to show the cursor when focus is lost, and hide it
     when it is regained when the cursor should be hidden. This fixes
     some minor cursor hiding bugs, ie. no cursor when the application
     has been ALT-TAB'ed away from and the system menu is opened with
     a right click on the app in the task bar.
   - Added the workspace "Extensions" for future example programs
     that demonstrate extensions supported by OpenPTC Win32.
   - Added a extension functions for opening a console with a user
     managed HWND. "Console::open(HWND hWnd,...)".
   - Extended secondary to primary blts to not use DDBLTFX_NOTEARING
     when the primary is multipaged because it could potentially
     cause slowdown.


Version 1.0.6 [6/4/99]:

   - Fixed a major bug that was introduced in the last release.
     The problem occurs in windowed output because the Blt with
     sychronization ("DDBLTFX_NOTEARING") is not supported on
     all cards. I added code to fall back to a normal, unsynced
     blt if the hardware does not support synchonized blts.
     Now everything is stable and i am happy. heh :)


Version 1.0.5 [5/4/99]:

   - Wow! All major bugs in this distribution have been fixed!
     I'm happy to announce that OpenPTC Win32 has moved from
     ALPHA stage to BETA! :)
   - Added options to control whether vertical retrace syncing is
     enabled. These options only effect the Blt from secondary
     to primary, not the primary->Flip (flip always syncs to vrt).
     So basically, you only have control over vertical retrace
     in windowed output. By default all updates sycnchronize to
     the vertical retrace. Two options have been added to control
     retrace synchronization: "synchronized update" and 
     "unsynchronized update". See "options.txt" for details.
   - Added the "Win32Cursor" class to manage showing and hiding
     the cursor in windows.
   - Fixed the bug that caused a "DDERR_WRONGMODE" error when
     the application entry in the title bar was right clicked.
   - Implemented WM_PAINT in DirectXHook so that windowed output
     behaves correctly in situations where update is not being
     repeatedly called. This makes examples like "Pixel" and
     "Image" repaint themselves correctly when required.
   - Fixed some minor bugs that popped up in the Tunnel3D
     demo in the last release (added iostream casts to char*).
   - Added window centering and the options "center window"
     and "default window position" to turn it on and off.
     See "options.txt" for details.
   - Added a lot of options to control windowed output
     and the setup of primary and secondary surfaces.
     See "options.txt" for details.
   - Added resizable window output. Now you can resize the
     window and if you have a cool card like a Riva TNT
     (like i have right here...) the stretch will use bilinear
     interpolation! awesome! >B)
   - Fixed a majorly stupid fat bug in windowed output. Now
     everything works nicely. Previously the width/height of
     the secondary surface in windowed output was not correct,
     this caused stretching to occur when it shouldnt, and
     copying areas to the console to not work correctly.


Version 1.0.4 [3/4/99]:

   - Attached a clipper to the primary surface in windowed
     output so that it now behaves correctly when windows are
     placed on top of it, or it is moved offscreen. windowed
     output should be 100% stable now!
   - Implemented much improved windowed output that renders to
     an offscreen secondary surface then copies the contents
     to the primary surface on each call to Console::update.
     This fixes lots of nasty problems with windowed output.
   - Added code to make sure that the mouse cursor is always
     correctly hidden, however, on some systems explorer seems
     to take mouse focus back from the fullscreen app and show
     the cursor (!) when the app is run with a double click
     on the exe file in explorer. Still looking for a fix for
     this problem!
   - Made DirectXHook close the console on WM_CLOSE. This makes
     DirectX fullscreen shutdown cleanly when ALT-F4 is pressed,
     however calling exit() without first closing the console
     still causes an unclean shutdown (ie. window positions may
     be messed up).
   - Fixed windowed output to stop accidental window flashing or
     activation when the window loses focus (the ALT-TAB handling
     for fullscreen was incorrectly still in place in windowed
     mode causing some problems...)
   - Made the fullscreen window WS_EX_TOPMOST, and added code to
     make sure it gets properly minimized when the window looses
     focus in fullscreen. Now the switch out from a fullscreen mode
     should be clean (no topmost window covering others...).
   - Fixed the ALT-TAB handling code to advoid the occasional
     "DDERR_SURFACELOST" errors in the previous version. Switching
     away from a fullscreen console should be 100% stable now!
   - Fixed a cut&paste bug in DirectXConsole::option, the option
     "default bits" was not behaving correctly (thanks zoon).
   - Added code to make sure that the cursor is shown in the error
     message box after an error was reported from inside a fullscreen
     console. Before this fix, the mouse cursor was invisible over
     the error message box in some circumstances.
   - Almost (heheh) added assembler support for HERMES in Win32. It
     will be in very shortly, but a couple of things halted progress
     for the time being. See "changes.txt" in the "source/Hermes"
     directory for a list of changes i have made to improve HERMES
     under Win32.
   - Added two more extension functions to support the primary and
     secondary surfaces directly: "Console::lpDDS_primary" and
     "Console::lpDDS_secondary". See "extensions.txt" for details.
   - Added a "secondary" ddraw surface to the console. This opens the
     door for a lot of funky things like stable windowed output,
     stretching from a low resolution secondary surface to a higher
     resolution primary surface etc.


Version 1.0.3 [31/3/99]:

   - Fixed mouse cursor hiding to work more correctly, although there
     still seems to be problems when an application is launched from
     explorer with a double mouse click on some computers... (?)
   - Added code to save the position of the foreground window before
     switching modes, and to restore it on leaving the mode. This
     should fix the annoying bug where VC gets resized to the width
     and height of the display mode. If you still experience problems
     with window/icon positions with PTC, please tell me asap. so i
     can take more comprehensive measures to make sure it does not
     happen (if this does not fix it, i will save and restore the
     position of every single window and icon during mode switches!)
   - Found some minor problems in the merger Console::open functions
     not behaving exactly as i would like them to regarding console
     options in a merged distribution (ie. DirectX + GDI). To fix
     the problem for now i have constructed a little hack, to fix it
     more completely may require a redesign of the merger console.
     For now, this will do :)
   - Fixed a minor bug in the merger Console::option function. Some
     options were not working correctly.
   - Found the primary reason why ALT-TAB was exiting the application
     immediately... ALT is a keypress in PTC, and the main key press
     loop exits immediately in most examples as soon as any key is
     pressed. To get around this i have temporarily disabled ALT
     key presses and modifiers, i will enable an option in the
     future to control whether system keys should be allowed through
     or restricted to the application only.
   - Implemented DirectXHook to handle all required window messages
   - Fixed Win32Hook to correctly handle multiple hooks on the
     same HWND. Now a lot of nasty problems can be fixed...
   - Removed the DirectXConsole and GDIConsole from being exported!
     Now the ptc.dll is much smaller, these consoles were exported
     by accident! Only the main Console was supposed to be exported
     in the dll!
   - Added special defines to increase compilation speed of
     windows.h and to restrict ddraw.h to dx3 compliance.
   - Found some details with option strings that i forget to
     mention in "options.txt" last release. If the console options
     didnt work in 1.0.2, read "options.txt" again and read the
     notes about options in a merged distibution.


Version 1.0.2 [25/3/99]:

   - Simplified the image example source code.
   - Implemented proper key stroke buffering and control,
     alt, shift modifiers. Updated the "Keyboard" example to
     check the "shift" modifier.
   - Fixed a bug in the Palette class. The bug caused the first
     palette set to be the only one used in some cases, now all
     palette operations will work correctly. (note. this bug did
     not show up in the examples because they only use a single
     palette).
   - Added basic "merger kit" functionality. This is currently
     transparent to you using PTC, but in the future will let you
     choose between using the default console, DirectX console,
     or GDI console at runtime.
   - Fixed a very minor bug in the Console::lpDD/lpDD2/lpDDS
     functions. They were not being declared as PTCAPI, which is
     basically stdcall, this may have caused some problems when
     interfacing to the dll. If so, its all fixed now :)
   - Added "GDI" source tree as a placeholder for when GDI console
     support gets added to PTC for Win32.


Version 1.0.1 [22/3/99]:

   - Added documentation for Win32 PTC extensions in "extensions.txt"
   - Added option strings to the console. See "options.txt" for
     more information about the new option strings.
   - Converted all workspace and project files to Visual C++ 6.0.
     This is the best format to use as it works perfectly with
     VC6 without conversion and is backwards compatable with VC5.


Version 1.0.0 [19/3/99]:

   - Fixed surface clear clipping bug with new porting kit 1.0.1 code
   - Updated to the latest porting kit, examples kit, demos kit
     and testing kit. This implementation is OpenPTC 1.0 compliant.
   - Added console pages functionality from porting kit
   - Added "Copy" example program
   - Added "Console" example program
   - Fixed major clipping bug and upgraded clear example
   - Upgraded timer class to use QueryPerformanceCounter API
   - Problems with palette 255 entry being set to white DirectDraw bug
   - Upgraded palette functionality to work properly without a workaround
   - Upgraded DirectDraw Surface interfaces to LPDIRECTDRAWSURFACE2
   - Upgraded DirectDraw interface to LPDIRECTDRAW2 in DirectXDisplay
   - Modified PTCAPI to _stdcall and added DLLAPI (dllexport/import)
     to make sure that the dll is always properly linked to
   - Added PTCAPI exporting define to properly export api functions
   - Changed all examples over to use ptc.dll by default
   - Added dynamic library support (ptc.dll)
   - Partitioned code into Core, Win32 and DirectX directories
   - Brought over old source code from Win32 PTC 2.0.8
   - Built up Win32 implementation framework from porting kit
