Hi everyone,
i have another release for you all!
This time its a very huge release which consists of a ton of bugfixes, lots of refactoring & renamings.
UTF-8 only
The biggest change is the full translation to UTF-8 only for all paths and strings. This means that all strings and paths expects UTF-8 always and all Wide/Ansi functions are removed - except for UTF-8 <-> Unicode conversion functions. The windows platform implementation works internally in unicode only and does UTF-8 <-> Unicode conversion automatically.
Rewritten Event-System
The second big change is the rewrite of the event handling system.
Now events are generated exactly at the same time as window events comes in.
fplWindowUpdate() does not handle events anymore - except for game controllers.
fplPullEvent() will now pull one event from the OS at a time, which you can handle or not.
To ignore / auto-process events you can call fplPullEvents().
Static-Linking support
Runtime-linking is now optional, you can disable it by defining FPL_NO_RUNTIME_LINKING before including the header file.
This is useful to check for compile errors when OS library API had signature changes.
Improvements & Bugfixes
In addition i renamed all the macro functions to camel-case style, because i hate macro functions in uppercase style. Modern IDEs displays macro functions in different colors anyway.
And lastly i fixed lots of bugs and improved a few systems.
All those changes are indeed heavy api changes, but those was necessary because it was inconsistent all the time. Now all the core parts are consistent and it works across all platforms.
But i am pretty sure i missed some bugs - especially on certain compilers/platforms.
So if you found something, just report it on the github page: https://github.com/f1nalspace/final_game_tech/issues
Or write a post on the yawning void forum...
Oh and i improved the documentations a lot and added new sections like Atomics, File IO, etc.
But its not complete yet - still a lot of pages to add.
State & Future
There was a lot of changes since the last version, but most changes was internal refactoring.
So the next release will finally address all the remaining @IMPLEMENT tasks, which are mostly X11 related.
Documentations will be finished up as well, at least up to the current implementation state.
In the next release i will address networking and proper monitor support plus more audio drivers.
Regarding networking support, i will start a forum post where you can post your idea of a good C network api and i will use the best suited for FPL. If there no ideas, i will make a api up as i am writing a example chat application.
-------------------------------------------------------------------------------------------
As usual the release is tagged and documentations are updated.
Here is the full changelog:
## v0.9.2.0 beta
- Changed: Removed "Ansi" part from all ansi functions
- Changed: Debug/Release user define is always prefered
- Changed: Properly define posix defines like _XOPEN_SOURCE
- Changed: Renamed FPL_STACKALLOCATE to fplStackAllocate
- Changed: Renamed FPL_OFFSETOF to fplOffsetOf
- Changed: Renamed FPL_ARRAYCOUNT to fplArrayCount
- Changed: Renamed FPL_ASSERT to fplAssert
- Changed: Renamed FPL_STATICASSERT to fplStaticAssert
- Changed: Renamed FPL_CLEAR_STRUCT to fplClearStruct
- Changed: Renamed FPL_MIN to fplMin
- Changed: Renamed FPL_MAX to fplMax
- Changed: Renamed FPL_ZERO_INIT to fplZeroInit
- Changed: Renamed FPL_STRUCT_SET to fplStructSet
- Changed: Renamed FPL_STRUCT_INIT to fplStructInit
- Changed: Renamed FPL_KILOBYTES to fplKiloBytes
- Changed: Renamed FPL_MEGABYTES to fplMegaBytes
- Changed: Renamed FPL_GIGABYTES to fplGigaBytes
- Changed: Renamed FPL_TERABYTES to fplTeraBytes
- Changed: Renamed FPL_ALIGNMENT_OFFSET to fplGetAlignmentOffset
- Changed: Renamed FPL_ALIGNED_SIZE to fplGetAlignedSize
- Changed: Renamed FPL_IS_ALIGNED to fplIsAligned
- Changed: Renamed FPL_IS_POWEROFTWO to fplIsPowerOfTwo
- Changed: Renamed fplFormatAnsiStringArgs() to fplFormatStringArgs()
- Changed: Renamed fplFormatAnsiString() to fplFormatString()
- Changed: Renamed fplCopyAnsiString() to fplCopyString()
- Changed: Renamed fplCopyAnsiStringLen() to fplCopyStringLen()
- Changed: Renamed fplGetAnsiStringLength() to fplGetStringLength()
- Changed: Renamed fplOpenAnsiBinaryFile() to fplOpenBinaryFile()
- Changed: Renamed fplCreateAnsiBinaryFile() to fplCreateBinaryFile()
- Changed: Renamed fplSetWindowAnsiTitle() to fplSetWindowTitle()
- Changed: Renamed fplGetClipboardAnsiText() to fplGetClipboardText()
- Changed: Renamed fplSetClipboardAnsiText() to fplSetClipboardText()
- Changed: Renamed all fplAtomicCompareAndExchange*() to fplAtomicCompareAndSwap*()
- Changed: Renamed all fplAtomicAdd*() to fplAtomicFetchAndAdd*()
- Changed: Renamed all fplAtomicInc*() to fplAtomicAddAndFetch*()
- Changed: Renamed fplGetRunningArchitecture() to fplGetProcessorArchitecture()
- Changed: Renamed fplAudioSettings.deviceFormat to fplAudioSettings.targetFormat
- Changed: Renamed fplAudioSettings.deviceInfo to fplAudioSettings.targetDevice
- Changed: All buffers or fixed char/byte arrays uses now either FPL_MAX_BUFFER_LENGTH or FPL_MAX_NAME_LENGTH except for device-id
- Changed: All callback typedefs are now properly named as such
- Changed: Auto-play/stop of audio samples when enabled in configuration
- Changed: fplPlayAudio() will return fplAudioResult_Success when playback is already started
- Changed: fplStopAudio() will return fplAudioResult_Success when playback is already stopped
- Changed: Use nullptr for fpl_null when C++/11 is detected
- Changed: Separated audio target format and device format
- Removed: Removed obsolete to fplGetWideStringLength()
- Removed: Removed obsolete to fplCopyWideString()
- Removed: Removed obsolete to fplCopyWideStringLen()
- Removed: Removed obsolete fplOpenWideBinaryFile()
- Removed: Removed obsolete fplCreateWideBinaryFile()
- Removed: Removed obsolete fplSetWindowWideTitle()
- Removed: Removed obsolete fplGetClipboardWideText()
- Removed: Removed obsolete fplSetClipboardWideText()
- Removed: Removed obsolete fplWideStringToAnsiString()
- Removed: Removed obsolete fplAnsiStringToWideString()
- Removed: fplUpdateGameControllers()
- Removed: fplPushEvent()
- Removed: fplClearEvents()
- Fixed: fplStaticAssert was not compiling on gcc/clang C99 mode
- Fixed: Corrected a ton of misspellings in the documentation
- Fixed: Define for FPL_DEBUG was missing a raute symbol
- Fixed: Use va_copy for all va_list function arguments
- New: Added fplFlushFile()
- New: Added fplAtomicAddAndFetchPtr()
- New: Added fplAtomicFetchAndAddPtr()
- New: Added startAuto field to fplAudioSettings structure
- New: Added stopAuto field to fplAudioSettings structure
- New: Added fplInitFlags_GameController to fplInitFlags enumeration
- New: Added fplPollEvents()
- New: Added typedef fpl_window_event_callback
- New: Added typedef fpl_window_exposed_callback
- New: Added structure fplWindowCallbacks as a field in fplWindowSettings
- New: Added support for disabling runtime linking -> FPL_NO_RUNTIME_LINKING
- New: Added structure fplAudioTargetFormat
- New: Added macro fplCopyStruct()
- New: Added macro fplIsBigEndian()
- New: Added macro fplIsLittleEndian()
- New: Added fplGetWindowState()
- New: Added fplSetWindowState()
- Changed: [Win32] GetTickCount() replaced with GetTickCount64()
- Changed: [Win32] Use unicode (*W) win32 api functions for everything now
- Changed: [Win32] fplGetOperatingSystemInfos uses additional RtlGetVersion
- Changed: [DirectSound] fplGetAudioDevices() uses DirectSoundEnumerateW instead of DirectSoundEnumerateA
- Changed: [Win32/X11] Changed event handling from indirect to direct
- Changed[*]: Optional runtime linking for OS library calls
- Fixed: [Win32] fplGetProcessorArchitecture was not handling the WOW64-case
- Fixed: [Win32] fplGetClipboardAnsiText() was broken
- Fixed: [Win32] Forced compile error when compiling on < vista (FPL uses several features which requires vista or higher)
- Fixed: [Win32] fplGetOperatingSystemInfos had no WINAPI call defined for GetVersion prototype
- Fixed: [Win32] fplSetWindowFloating was not working
- Fixed: [Win32] fplSetWindowDecorated was not working
- Fixed: [Win32] fplSetWindowResizeable was not working
- Fixed: [Alsa] fpl__AudioWaitForFramesAlsa was not compiling (commonAudio missing)
- Fixed: [Alsa] Alsa output was not working anymore for certain playback devices
- Fixed: [X11] fplButtonState_Repeat was not handled in keyboard events
- New: [Win32/POSIX] Implemented fplFlushFile()
- New: [Win32/X11] Handle fplInitFlags_GameController to enable/disable game controllers
- New: [Win32/X11] Support for handling the OS event directly -> fpl_window_event_callback
- New: [Win32/X11] Support for handling the exposed (Repaint) event directly -> fpl_window_exposed_callback
- New: [Win32] Implemented fplSetWindowState / fplGetWindowState