In other words, I compiled QB64 with an older working version
and copied that across to internal/source/, then did a few self-compile
runs to ensure sanity.
Removed GIF decoder which I never got working
Added stb_image which can decode GIF (not animated) and some other formats
(stb_image is now used as a fall-back for when no specific image decoder is available for the given format, it is supposed to be able to decode PNG, TGA, BMP, PSD, GIF, HDR, PIC, PNM(PPM/PGM))
Removed some precompiled object files from mini-mp3 which should not have been there in the first place
Fixes a threading issue which caused QB64 to intermittently crash when using hardware commands
(Same threading fix yet to be applied to Linux)
Fixes problem in last update which prevented _OPENHOST/_OPENCLIENT from working (they always returned invalid handle '0')
Fixes 3D perspective issue when 3D rendering into images not the primary display (previuosly the dimensions of the screen/window not the target image were used to determine the aspect ratio)
Corrects dependency detection bug in prev update which rendered _SCREENIMAGE unusable
Implements new command _FPS which limits the maximum hardware fps (primarily for throttling SUB _GL) [default is 60]
Usage example:
_FPS 100
(Can now generate stand-alone executables <1MB)
-g can be specified within code with:
$CONSOLE:ONLY
Note: Programs using this still need to call _DEST _CONSOLE or output will not be visible
Also added dependency rules to remove unrequired static system libs from being linked:
[X] lws2_32 as DEPENDENCY_SOCKETS
_OPENHOST
_OPENCLIENT
[X] -lwinspool as DEPENDENCY_PRINTER
LPRINT
_PRINTIMAGE
[X] -lwinmm & mmsystem.h
Required by:
FreeGlut (GUI)
Audio Out
[X] -lksguid (From the DirectX SDK, Required for Audio)
Required by:
Audio Out
[X] -ldxguid (From the DirectX SDK, Required for Audio)
Required by:
Audio Out
[X] -lole32
Required by:
Audio Out (dsound.c)
[X] -lgdi32
Required by:
void sub__icon(int32 handle_icon, int32 handle_window_icon, int32 passed){
int32 func__screenimage(int32 x1,int32 y1,int32 x2,int32 y2,int32 passed)
Printer
Some code has been moved from inside libqb.cpp into subfolder internal\c\libqb
Added dummy config.h file so libsamplerate could compile in Linux (Need to establish when it was removed)
New vertex/tex-coord arrays only created when state changes
_BLEND enabled hardware images don't write to the depth-buffer if their alpha is 0 (strictly speaking <0.001 if represented as a SINGLE from 0 to 1)
Apart from texture on texture rendering (requires FBOs) and the tiling of non-power of two dimensioned images with _MAPTRIANGLE QB64-GL now works via remote desktop and should work responsively and reliably on most less-OpenGL capable environments (if not, report it on the forums. I've successfully run a 3D minecraft-like program and a 2D top-down shooter with hardware acceleration via remote desktop)
A new function has been added to parts/video/fonts/ttf/src.c, FontFree().
This takes an index into the fonts array, and calls FT_Done_Face() on the
handle, free() on the ttf_data then sets in_use to 0.
The sub__freefont() function calls FontFree(), and sets the appropriate font[]
element to NULL (after checking the passed font handle is valid, of course.
This way, we only include that code if its commands are called upon.
In order to do this, some other areas had to be changed as well:
- There is now a libqb.h file, which declares some routines in libqb.cpp,
in order to allow them to be called from a separately compiled unit, i.e,
the user mods part.
- common.cpp now has an #include guard, just to be on the safe side.
- The library purge routines know about the new part.
- qb64.bas is modified to handle the new part; this area is just modeled
off the code for the other parts.
- Appropriate flags were set in the hash table entires for the commands.
- The user mods, now being a separate compilation unit, #include common.cpp
and libqb.h. The former is required for important type declarations and
access to glut commmands, the latter for access to libqb routines.
- qbx.cpp #includes the src.cpp file in the user mods part, which declares the
routines.
Something to ponder: libqb does not include or rely on any of the user mod routines,
so it's probably not necessary to rebuild it like with the other parts. That exploration
is for another day, however.
Without a parameter, it clears all buffers. A numeric parameter will
clear only a specific buffer: 1 = INKEY$ buffer (and other traditional
QB input commands), 2 = _KEYHIT buffer, 3 = INP(&H60) buffer. The last
one is not actually cleared, but we pretend we've read all the data from
it.
To ensure no stray characters, use this command immediately before the
code you wish to sanitise. You never know when the user might bang on
the keyboard, and this also helps to avoid stray key release values
persisting in the _KEYHIT buffer.
Added new _STRCMP and _STRICMP commands for quick string comparisons.
Cleaned up QB64 to finish removing the QUI (quick user insert) code and folders.
Altered UCASE and LCASE routines to be faster in some situations for us.
Deleted makedat_win.txt, and created makedat_win32.txt and makedat_win64.txt which we toggle between according to compiler now.
Made change inside QB64.bas so it automatically adjusts output for DATA statements according to OS.
It's not true cross-program clipboard support, but the clipboard now functions
within a QB64 program. Importantly, this means you can copy/paste code around
in the IDE.
[{_CLOCKWISE|_ANTICLOCKWISE}][{_SEAMLESS}](?,?)-(?,?)-(?,?)[,?]{TO}(?,?[,?])-(?,?[,?])-(?,?[,?])[,[?][,{_SMOOTH|_SMOOTHSHRUNK|_SMOOTHSTRETCHED}]]
Refactor/rewrite of how OpenGL state is monitored/maintained
Critical fix to stop _MAPTRIANGLE (2D hardware version) not freeing old commands in the pipeline
Critical fix to stop intermittent QB64 crashing in 32-bit mode when screen size expanded