List of Changes from KiriKiri 2 in KiriKiri Z

The following changes are regarding the initial official release.
There is a possibility that further changes have been added in subsequent versions.
For updates after 1.0, please refer to the Update History.


  1. Modified to allow building with Visual Studio.
  2. Various modifications were made so that KiriKiri 2, which was built with C++Builder 5, can be built with Visual C++ 2012.

  3. Changed VCL-dependent parts to Win32 API calls.
  4. Since VCL cannot be used with VC, processing was changed to use standard Win32 API.
    While the processing is somewhat equivalent, the implementation is not identical, so some details in behavior may differ.
    In VCL, an invisible main window functions as the application (window), and other windows act as its children.
    In KiriKiri 2, the first window created is treated as the main window, but an invisible application (window) exists internally (likely).
    In KiriKiri Z, along with rewriting VCL, this invisible application (window) no longer exists.
    Because of this, there are places where the application behavior differs in detail.
    Among those treated as the application, several correspond to the main window within KiriKiri created first.
    Application events like Active/Inactive now belong to the main window.

  5. Changed Direct3D7 to Direct3D9.
  6. Things that were rendered with Direct3D7 have been rewritten to Direct3D9.
    Along with this, the following changes were made.

  7. Changed Fullscreen processing to be handled by DrawDevice.
  8. Fullscreening with DirectDraw seems to have caused several issues in Windows 8, so this part needed to be changed. In Direct3D9, the Direct3D Device handles fullscreening, so fullscreen processing was implemented on the DrawDevice side.
    As mentioned above, with the transition to Direct3D9, fullscreening changed from API/DirectDraw to API/Direct3D9, and the setting is now dependent on DrawDevice rather than being an option.

  9. Changed KAGParser class to a plugin.
  10. Since it was a class that was originally thought better as a plugin, it was moved to a plugin.
    This plugin was created for compatibility.

  11. Changed Menu class to a plugin.
  12. When deprecating Menu, it was moved to a plugin.
    Implementation without using menus is recommended for the future.

  13. Updated various dependency libraries.
  14. Updated to the latest versions at the time of VC project creation.

  15. Changed the regular expression engine to Oniguruma.
  16. Since it was an older version of boost, it was changed to Oniguruma.

  17. Changed console output to command-line output; also output to debug output during debugging.
  18. Along with the removal of the console, it was changed to output to the command line.
    During debugging, it was also made to output to debug output because it makes debugging easier, so debug builds output to debug output as well.

  19. Changed Font class so it can be instantiated.
  20. It only existed as Layer.font before, but it can now be created independently.

  21. Specification change for tooltip processing.
  22. VCL tooltips were a proprietary implementation rather than common control tooltips. After considering whether to replace them with common controls or implement them similarly, they were changed to a form where events are generated and can be drawn as a Layer.
    When Layer.hint is set and the cursor stops for a certain period reaching the hint display timing, the Window.onHintChanged event occurs.
    The cursor pause time can be specified with Window.hintDelay.
    For layers that draw hints, enable Layer.ignoreHintSensing to ignore hint sensing.
    With this, when isshow is true in onHintChanged, you can draw the hint on the frontmost layer, and by setting the hint layer to ignore mouse messages, you can achieve a display similar to the conventional one.
    If the event comes with isshow as false, hide it.
    A sample is available on GitHub.

  23. Made Gamepad enable/disable a debug option.
  24. Since there are cases where it's better not to have built-in gamepad support, it was made so it can be disabled via compile options as well as regular options.
    Specifying DISABLE_EMBEDDED_GAME_PAD disables it.

  25. Made using LLM the standard for JPEG decoding.
  26. In KiriKiri 2, AAN was used when quality was standard, but since AAN is low quality, LLM was made the standard.
    In KiriKiri Z, JPEG loading is significantly faster than in KiriKiri 2. Even when changing the IDCT algorithm from AAN to LLM, it decodes faster than KiriKiri 2.
    Since LLM is generally used, situations where images look "dirty" when displayed in KiriKiri should decrease.

  27. Changed the default character code for TJS2 scripts to UTF-8.
  28. Changed from Shift-JIS because UTF-8 has become more common.
    Compiling with TVP_TEXT_READ_ANSI_MBCS will make Shift-JIS the default as before.
    Encoding can be specified in the 3rd argument of the public function TVPCreateTextStreamForReadByEncoding for plugins.
    Specify either "Shift_JIS" or "UTF-8".
    Also, the default can be changed by specifying either "Shift_JIS" or "UTF-8" with the "-readencoding" option.
    Specification is also possible with Scripts.textEncoding.
    The KAGParser plugin also follows this setting.
    By changing the places where TVPCreateTextStreamForReadByEncoding is called in plugins, they can be read with any encoding.

  29. Moved source code embedded strings to resources.
  30. Strings such as error messages that were directly described in the source code were moved to resources and separated into Japanese and English.
    Since resources and source code are automatically generated from messages by script, it's easier to maintain for other environments.
    They are described in Messages.xlsx and generated with entext.bat.
    The license text is described in license.txt in the resources.

  31. Moved options that were combined into the binary after compilation to resources.
  32. Changed the method of appending optionarea.bin to the end of tvpwin32.exe (as krkr.eXe) and reading the binary at the end during execution to embedding them in resources.
    Options are described in optionarea.txt with line breaks.
    Since this is a more common structure, it's expected to reduce false positives in antivirus software.

  33. Changed screen size return values due to multi-display support.
  34. Previously, it always returned the values of the primary display, but it was changed to return values considering multiple displays.
    System.screenWidth / screenHeight return the size of the monitor where the main window is located. Before the main window is created, it returns the size of the primary monitor.
    System.desktopLeft / desktopTop / desktopWidth / desktopHeight return the working area of the monitor where the main window is located. When there is no main window, it returns the working area of the primary monitor.

  35. Scripted the font selection dialog.
  36. Removed from the core and changed to an implementation using win32dialog.dll + scripts.
    Scripts are on GitHub.

  37. Scripted the character input dialog.
  38. Removed from the core and changed to an implementation using win32dialog.dll + scripts.
    Scripts are on GitHub.

  39. Changed startup file selection dialog to folder selection dialog.
  40. Changed what was a proprietary dialog using VCL to a folder selection dialog.

  41. Made it possible to disable startup file selection via debug option.
  42. Since it's a feature better not to have in the final release version, it was made possible to disable.
    Defining TVP_DISABLE_SELECT_XP3_OR_FOLDER disables it.

  43. Changed from Multi-byte code to Wide (UNICODE) byte code.
  44. Since only NT-based systems are supported, it was changed to Wide (UNICODE) byte code.

  45. Property conversion of -waitvsync.
  46. The command-line option -waitvsync was deprecated and changed to Window.waitVSync.
    This is because each window has a D3DDevice, and vertical sync wait depends on that device.

  47. Changed to PassThroughDrawDevice and BasicDrawDevice.
  48. Deprecated PassThroughDrawDevice, which benchmarked DirectDraw / Direct3D / GDI and performed rendering with one of them, and added BasicDrawDevice, which performs rendering with Direct3D9.
    BasicDrawDevice is the standard for DrawDevice.
    If you want to render with something other than Direct3D9, additions via plugins are required.

  49. JSON-ized option descriptions and moved them to resources.
  50. Changed the option description file, which was in a proprietary format, to JSON.
    Also moved the file to resources, and changed reading from plugins from a public function to resources.
    Specification is possible in option_desc_ja.json.
    When started with -userconf, setting items are displayed according to this file.

  51. Supported XP3 files exceeding 2GB.
  52. Fixed an issue in KiriKiri 2 where errors occurred during loading, allowing XP3 files over 2GB to be read.

  53. Removal of Window regeneration.
  54. In KiriKiri 2, the window was recreated when changing to fullscreen or changing border styles, but in KiriKiri Z, recreation no longer occurs.
    Because of this, opportunities for TVP_WM_DETACH and TVP_WM_ATTACH to be called are almost gone.
    To know the timing of fullscreening/windowing, TVP_WM_FULLSCREEN_CHANGING is called before the change, and TVP_WM_FULLSCREEN_CHANGED is called after the change. (Note that these are not for determining if it is currently fullscreen).

  55. Increase/Decrease of plugin public functions.
  56. The following public functions were added:
    TVPCreateTextStreamForReadByEncoding
    TVPSetDefaultReadEncoding
    TVPGetDefaultReadEncoding
    TVPRegisterAcceleratorKey
    TVPUnregisterAcceleratorKey
    TVPDeleteAcceleratorKeyTable
    TVPEnsureDirect3DObject
    TVPGetDirect3DObjectNoAddRef
    TVPChBlurMulCopy
    TVPChBlurAddMulCopy
    TVPChBlurCopy

    The following public functions were removed:
    TVPMIDIOutData
    TVPEnsureDirectDrawObject
    TVPGetDirectDrawObjectNoAddRef
    TVPGetDirectDraw7ObjectNoAddRef
    TVPGetDDPrimarySurfaceNoAddRef
    TVPSetDDPrimaryClipper
    TVPReleaseDDPrimarySurface

  1. Removal of Console
  2. Removed because it is better not to be included in the final release.

  3. Removal of Controller
  4. Removed because it is better not to be included in the final release.

  5. Removal of MIDI / CDDA / Pad classes
  6. Removed based on the judgment that these are legacy features considering the current situation.

  7. Removal of Win9X-related methods
  8. Since only XP and later are supported, APIs for supporting previous versions were removed.

  9. Removal of DirectDraw rendering processing
  10. Removed because DirectDraw support in drivers has become unreliable and it is an old API.

  11. Removal of ERI format support
  12. Removed because no particular significance is found for its use in the current situation.

  13. Removal of several Window class methods.
  14. The removed methods/properties are as follows:
    Window.layerLeft / Window.layerTop / Window.setLayerPos
    Window.innerSunken
    Window.showScrollBars
    Window.beginMove

  15. Removal of obsolete Layer class methods.
  16. Removed because they were already obsolete and replacement with newer methods had been recommended.
    The removed methods are as follows:
    Layer.affineBlend
    Layer.affinePile
    Layer.blendRect
    Layer.pileRect
    Layer.stretchBlend
    Layer.stretchPile

  17. Removal of mouse cursors not supported by standard Windows.
  18. Removed cursors that are standard in C++Builder but not in Windows.
    The removed cursors are: crDrag, crNoDrop, crHSplit, crVSplit, crMultiDrag, crSQLWait, crAppStart, crHBeam.
    If necessary, you must add resources yourself.
    Also, other icons may look slightly different from C++ Builder.
    Click here for supported cursors (images are still from KiriKiri 2).

  19. Removal of krflash.dll
  20. krflash.dll is no longer bundled.
    It might work if you use the one from KiriKiri 2, but it is not officially supported.
    Migration to the flashPlayer plugin is recommended.

  1. Support for multi-touch features.
  2. Touch becomes enabled if a device supporting multi-touch is active.
    In cases where only one-point touch is supported, it is considered safe to treat it the same as mouse input, so touch is not enabled.
    If you want to always handle input the same as a mouse instead of touch processing, you need to disable touch by setting Window.enableTouch to false.

  3. Added Bitmap/ImageFunction/Rect classes.
  4. The Bitmap class was newly established based on requests for a class that only holds images, similar to the Layer class.
    Along with that, ImageFunction and Rect classes were added to implement necessary features separated from Layer.

  5. Added Octet.unpack and Array.pack.
  6. These are features that were planned for KiriKiri 2 but were seemingly not added.
    This makes reading and writing binary files easier.
    Refer to Operations for Octet Strings and Array Class.

  7. Possible to start from any script via -startup="xxx".
  8. Added because it is convenient for testing, etc.
    Refer to Command Line Options for details.

  9. Support for "Back" and "Forward" keys on 5-button mice.
  10. Added because they were introduced in Windows 2000 and later and are usable.
    Can be used in Window.onMouseDown, etc.

  11. Support for background image loading features.
  12. Added because there was an issue where the display would stop during loading when updating images with conventional synchronous loading.
    Asynchronous loading allows reading the next image without stopping display updates. Asynchronous loading is performed via Bitmap.loadAsync.

  13. TJS2 class inheritance can now be described in native (C++).
  14. Added because it is better to be able to describe TJS2 class inheritance in C++ as well.

  15. Added drawGlyph to make drawing external characters easier.
  16. Added to make it easier to draw by embedding any glyph into a character string.
    Can be drawn with Layer.drawGlyph / ImageFunction.drawGlyph.

  17. Added PNG/JPEG/TLG save features.
  18. Since they can be read, saving features were added to correspond with that.
    It has become convenient as reading and writing of BMP/PNG/JPEG/TLG is now possible in the core.
    Format specification other than Bitmap is now possible with the type argument of Layer.saveLayerImage / Bitmap.save.

  19. Added character rendering with FreeType.
  20. KiriKiri 2 only had character rendering by GDI, but rendering by FreeType is now also supported.
    Can be specified with Font.rasterizer.
    Cleaner character rendering than GDI can be expected.

  21. Added log handlers.
  22. Added log handlers to make it possible to display logs via script.
    Can be processed with Debug.addLoggingHandler / removeLoggingHandler / getLastLog.

  23. Added method to get actual character rendering range.
  24. Since it can be difficult to draw at a specified position cleanly depending on the font, a method to get the actual rendering range of a character string was added.
    Can be obtained with Font.getGlyphDrawRect.

  25. Implementation of strikeout and underline.
  26. Implemented strikeout and underline, which were unimplemented in KiriKiri 2.
    This allows drawing characters that include strikeouts or underlines.
    Can be specified with Font.strikeout / underline.

  27. Support for Opus sound format.
  28. Supported the Opus sound format, which has a higher compression ratio than Vorbis, via kropus.dll.
    Since the file size becomes small even for short sounds, it is also easy to use for sound effects.
    Also, because it has compression methods optimized for voice, it is effective for dialogue, etc.

  29. Bundled KiriKiri Debugger.
  30. Bundled the KiriKiri Debugger, which was previously distributed separately, and included binaries to enable the debugger.
    TJS2 script debugging can now be performed more easily.

  31. Added editor specification for script exception occurrence.
  32. Since the display using Pad upon exception occurrence was removed, it was made possible to specify any editor as a replacement.
    Can be specified with -exceptionexe and -exceptionarg.
    Refer to Command Line Options for details.