1
1
Fork 0
mirror of https://github.com/QB64-Phoenix-Edition/QB64pe.git synced 2024-09-09 16:20:18 +00:00
Commit graph

64 commits

Author SHA1 Message Date
Samuel Gomes
85afb4b84a Make FS_GetFQN() return trailing slash for directories 2023-12-29 00:58:15 +05:30
Samuel Gomes
5d037775af Add support for _FILES$() 2023-12-15 20:54:11 +05:30
Samuel Gomes
a52c3ba977 Simplify sub_kill() 2023-12-12 15:40:35 +05:30
Samuel Gomes
4ca0cf3a7b Add initial support for FILES$() 2023-12-11 04:46:28 +05:30
Samuel Gomes
20e5789ffd Simplify func__direxists() and func__fileexists() 2023-12-11 02:43:26 +05:30
Samuel Gomes
a11a66fb63 Rename startDir to g_startDir 2023-12-10 11:25:01 +05:30
Samuel Gomes
48539861f3 Repace fixdir() with filepath_fix_directory() 2023-12-10 11:15:41 +05:30
Samuel Gomes
0e251eb8e8 Consolidate all filesystem related functions to it's own translation unit 2023-12-10 01:16:29 +05:30
SteveMcNeill
1be3e366ac Final fixes to math stuff (I hope)
Fix to CONST with the math evaluator to toss a message and error with values out of acceptable range for ARCSEC and ARCCSC.

Tweak to _PI to add constexpr for speedier execution.

Fix to the math tests for the new (and unbuggy) values for ARCSEC and ARCCSC.
2023-10-31 11:32:22 -04:00
SteveMcNeill
64ba64f0bd rename math.h to extended_math.h 2023-10-31 08:45:10 -04:00
SteveMcNeill
01163fb9e9 Create math.h
Move the extended math functions out of libqb and qbx, and place them inside math.h.

Correct the formula for _ARCSEC and _ARCCSC.
2023-10-31 08:34:19 -04:00
Samuel Gomes
c82dd88ee2
Merge branch 'main' into game-controller-fixes-and-enhancements 2023-10-04 18:47:20 +05:30
Samuel Gomes
49aeccc486 Initial WoA64 and MingW-LLVM support 2023-10-01 08:08:58 +05:30
Samuel Gomes
b514da5b39 Add include guard to game_controller.h 2023-09-26 03:41:16 +05:30
Samuel Gomes
79c531f2bb Reorg. game controller and update libstem_gamepad 2023-09-26 02:01:35 +05:30
Samuel Gomes
87a99c3970 Make _MEMSOUND channel parameter optional 2023-09-22 19:14:30 +05:30
Samuel Gomes
586371dc77 Implement _SAVEIMAGE 2023-09-17 11:52:54 +05:30
Samuel Gomes
412b783efa Add QOI support 2023-09-15 21:05:41 +05:30
Samuel Gomes
3b1ca3a386 Fix fonts getting vertically misaligned 2023-06-19 07:06:49 +05:30
Samuel Gomes
3f16e3c9d1 Add volume, panning & waveform support for SOUND 2023-06-10 02:24:05 +05:30
Samuel Gomes
ef5d29e5fb Implement PSG class 2023-06-09 13:02:14 +05:30
Samuel Gomes
bd9a7b6f6f
Merge branch 'QB64-Phoenix-Edition:main' into audio-enhancements 2023-05-23 01:42:57 +05:30
Samuel Gomes
3fc585241a
Merge branch 'QB64-Phoenix-Edition:main' into audio-enhancements 2023-05-08 19:12:51 +05:30
Samuel Gomes
381e5ab0e9
Merge branch 'main' into ucharpos-enhancement 2023-05-08 18:04:22 +05:30
Samuel Gomes
60a448fb54 Add _UCHARPOS() to get individual char pixel position 2023-05-07 22:12:47 +05:30
Samuel Gomes
c6b8524739 Improve dialog functions using #305 & make string options case insensitive 2023-05-02 00:19:33 +05:30
Samuel Gomes
67b95016fc
Merge branch 'QB64-Phoenix-Edition:main' into audio-enhancements 2023-04-30 03:27:55 +05:30
Samuel Gomes
f1bb16a6fe Changes per discussion in #335 2023-04-30 00:27:34 +05:30
Samuel Gomes
3dd439e625 Change function names 2023-04-26 22:36:24 +05:30
Samuel Gomes
c033c624ac Add support for _UPrint*() 2023-04-26 17:36:09 +05:30
Samuel Gomes
2da5b89a22 Improve ResizeBuffers() behavior and update comments 2023-04-21 00:02:40 +05:30
Samuel Gomes
e4b36ca8ad Add font load-from-memory support 2023-04-20 09:23:13 +05:30
Samuel Gomes
618e5117cd Add FontPrintWidthUTF32() and optimize chrwidth() 2023-04-19 09:30:38 +05:30
Samuel Gomes
492c8d0cf5 Remove unused out_x_pre_increment, out_x_post_increment 2023-04-19 08:39:56 +05:30
Samuel Gomes
ec723ed46b New FreeType cached font renderer 2023-04-19 07:49:02 +05:30
Samuel Gomes
ac6f6574a1 Update comments 2023-04-11 23:21:47 +05:30
Samuel Gomes
1c505561d6 Implement pending changes in #330 2023-04-09 03:37:44 +05:30
Samuel Gomes
d974c0b9a8 Tidy up font code 2023-04-04 17:51:17 +05:30
Samuel Gomes
6dd651f7cd Replace MinGW intrinsic zlib with miniz 2023-03-19 02:28:05 +05:30
Samuel Gomes
52d168ff00 Update to use #305 2023-02-13 03:52:16 +05:30
Samuel Gomes
68234d4786 Fix ambiguous overload 2023-01-11 22:09:24 +05:30
Samuel Gomes
f0f0a9a420 Overload _LOADIMAGE to allow strings as the 2nd parameter 2023-01-11 16:18:43 +05:30
Matthew Kilgore
f21ce09e2d Replace time() with std::chrono, fix startup delay
Currently main() includes logic that is intended to sync time() with
GetTicks() for the purpose of using GetTicks() to get millisecond
accuracy with time(), which only has second accuracy. Unfortunately, the
'syncing' up of these time sources results in an average of a half
second delay in starting a QB64-PE program.

This logic is easly replaced with std::chrono, which provides a real
time clock which is also millisecond accurate. That removes the need to
use time() and GetTicks() together to get millisecond accuracy, and
means the delay syncing them is no longer necessary.

I also separated most of the "delay" and "time" related functions into
datetime.cpp, and included the new std::chrono code into that file.

Since I needed to call some of the rounding functions in datetime.cpp I
also moved that stuff out into its own .cpp and header files to clean
things up a bit.

Fixes: #282
2023-01-08 20:24:25 -05:00
Samuel Gomes
061bf6af3d Rename _NEWSOUND to _SNDNEW to align with _SND* APIs 2022-12-31 12:00:38 +05:30
Samuel Gomes
4c80f6bcea Implement feature request #28 2022-12-31 01:49:23 +05:30
Matthew Kilgore
f7fabda198 Fix random seg faults on exit
Fairly straightfowrad, programs were randomly seg faulting on exit. This
was happening due to GLUT registering a cleanup function via atexit(),
which then gets called when exit() is called.

The issue happens when exit() is called on a thread other than the GLUT
thread, which leads to the exit() call then attempting to cleanup GLUT
while the other thread is still using it, which randomly leads to seg
faults.

Fixing this is slightly annoying. We cannot stop the GLUT thread, as
the basic GLUT API (which is used on Mac OS) simply does not offer a way
to exit the glutMainLoop() call. Thus the simplest solution is to simply
make sure we call exit() on the GLUT thread, which we can fairly easily
due via the message queue.

That being the case, a new libqb_exit() API was added, which simply
regsiters the GLUT exit message and then waits for the program to end.
The atexit() handler then runs on the GLUT thread and everything works
out fine.

In the future we probably should redo the exit logic a bit so that all
the threads are actually stopped/joined to ensure the exit process is
consistent, however this is good enough for now. Also, there's plenty of
error states which call exit() which I did not address.
2022-11-29 20:04:54 -05:00
Matthew Kilgore
72193e34e5 Add GLUT command queue, processed on GLUT thread
This fixes all the code so that all the calls to glut functions
happen on the same thread that is running GLUT.

We achieve this by creating a queue of GLUT commands to execute.
Commands can be added to the queue anywhere in the code, and then the
queue is processed on the GLUT thread via it's idle func or timer func.
The command is run and if necessary the result is provided in the
message queue object. Each object contains a completion which can be
waited on to block until the GLUT thread has processed the command.

Fixes: #66
2022-11-29 20:04:54 -05:00
Matthew Kilgore
d678be717c Move GLUT initialization logic into separate .cpp file 2022-11-29 20:04:53 -05:00
Matthew Kilgore
12c9c35db5 Add _StatusCode command for HTTP handles
The _StatusCode command returns the status code on the HTTP response
when given a HTTP handle from _OpenClient().
2022-11-20 04:04:02 -05:00
Matthew Kilgore
45d52271da Add libqb_http API for HTTP connections
This adds the libqb_http API, which is designed to support HTTP and
HTTPS usage from QB64-PE source.

The design consists of a single thread which services all the HTTP(s)
connections. There are then various libqb_http APIs exposed that allow
interacting with this thread to create a new connection, query
connection status, read data, or close the connection.

Internally the thread makes use of the curl_multi interface to allow a
single thread to service multiple HTTP(s) connections in parallel. This
means you can _OPENCLIENT() multiple HTTP connection in a row and all of
them will be serviced at the same time in whatever order data is
available.

HTTP is optional and selected via a Makefile setting. A stub is swapped
in if HTTP support is not used, which avoids need to add another build
flag to libqb.cpp.
2022-11-19 15:13:26 -05:00