Commit Graph

268 Commits

Author SHA1 Message Date
Doyle Thai
be0b84a244 Static analysis cppcheck 2017-07-13 12:50:01 +10:00
979679470b Fix DqnMat4_Rotate not normalising axis 2017-07-04 14:22:24 +10:00
924aa84e7d Fix problem exposing platform w/o implementation 2017-07-03 15:17:09 +10:00
f8a4d4fe4b Fix crashes on unix using gcc -O3 2017-07-02 16:31:29 +10:00
2d163fa554 Add fix for strict-aliasing in DqnRnd 2017-07-02 14:47:38 +10:00
cbf7b4d606 Add quicksort generic to lib 2017-06-28 22:47:27 +10:00
825caefe4a Fix non-used param bugs, add minimal win32 sample 2017-06-27 17:45:51 +10:00
db1f76996c Add quicker filesize query, and ReadEntireFile() 2017-06-26 21:46:28 +10:00
866126e735 Make atomic add allow amounts not just +-1 2017-06-26 12:37:52 +10:00
fca8db0366 Port atomics, mutex lock and job queue to unix 2017-06-26 01:57:51 +10:00
19c427d756 Add opt. RAII-isms for destruction, fix thread bug
Thread Bug: Incorrectly using && operator for while
(DqnJobQueue_TryExecuteNextJob(queue) &&
!DqnJobQueue_AllJobsComplete(queue)) causing it to prematurely exit if
the main thread has completed its work before other threads have
completed the remainder. Should be using an || operator, so instead
creating a helper function which encapsulates this functionality.
2017-06-24 14:59:48 +10:00
886425eaa3 Add CPP api for dqn file and lock 2017-06-24 11:00:44 +10:00
45bc637773 Expose job queue, update init function 2017-06-23 23:12:20 +10:00
f9de41b6c0 Add cpp members to DqnArray 2017-06-23 21:17:26 +10:00
3d61d66388 Fix destructor premature call in memstack cpp api 2017-06-23 19:05:51 +10:00
9bb8efcf9d Add CPP member functions to DqnMemStack 2017-06-23 15:30:21 +10:00
187fc14d02 DqnTimer unix implementation 2017-06-22 18:10:44 +10:00
f464e869ec Add compile time asserts, table of contents 2017-06-22 16:16:28 +10:00
b2639447d0 Reorganise layout with table of contents 2017-06-22 14:43:53 +10:00
81c68ad908 Add better documentation 2017-06-22 14:00:11 +10:00
84149d0ad1 Add file write tests and delete functionality 2017-06-22 01:26:08 +10:00
93bbc25b11 Fix compile and warnings on MSVC 2017-06-21 19:01:36 +10:00
a067fed81f Implement dir read/free and file write in Unix 2017-06-21 18:52:14 +10:00
245e6b11f1 Basic file open/close/read implemented in Unix 2017-06-21 18:05:30 +10:00
036afb9b10 Implemented unix DqnFile_Open 2017-06-21 17:48:00 +10:00
73b5d05df8 Enable more warnings for unix, fix StrtoF32 bug 2017-06-21 14:54:57 +10:00
341388bb70 Get basics to compile & work in unix 2017-06-21 14:10:53 +10:00
b1e7fdc264 Reorganise platform specific code 2017-06-20 22:23:34 +10:00
307621fb03 Add more win32 functions from dtrenderer 2017-06-20 19:19:52 +10:00
65ee7bab4b Add new mat4 functions and some external testing 2017-06-08 16:41:24 +10:00
fceac54ecb Add helper V4 functions, change allocate to push 2017-05-26 01:10:32 +10:00
25744855ee Switch membuffer to memstack and add pop 2017-05-22 18:50:21 +10:00
034de12235 Add support for scientific notation in strtof32 2017-05-20 22:59:21 +10:00
44ef3759e5 Fix strtoi64 and add a basic strtof32 function 2017-05-20 19:11:28 +10:00
5c06410929 Various small changes and helper functions
- Fix typo for int32_t and int64_t
- Add new helper functions to convert v2i to v2 and back
- Add DqnRect_ClipRect to restrict rect to some specified clip-rect
- Improve I32ToStr and StrToI32 to support up to I64
2017-05-15 17:45:53 +10:00
73f0fd448c Differentiate between freeing [non]linked blocks 2017-05-08 20:10:14 +10:00
c47748c168 Remove default mem buffer api 2017-05-08 18:57:47 +10:00
00cae20654 Rename file flags/actions to be consistent 2017-05-08 17:59:51 +10:00
f9555d8edb Improve realloc for MemBuffers in default callback
Realloc now works for arbitrary length of blocks in MemBuffers and also works
slightly more efficiently than the old implementation.
2017-05-06 17:28:57 +10:00
6fe75928f0 Create a default MemoryAPI for MemBuffers 2017-05-06 02:44:17 +10:00
1c3c78d738 Add custom memory allocator support for DArray 2017-05-05 02:37:38 +10:00
116861d888 Add str find first occurence, fix array pop logic
Array pop was incorrectly returning the last element which is now an invalid ptr
to data.
2017-05-04 00:22:30 +10:00
2203e9b4f2 Add comments, make alignment function to macro
Alignment function becomes macro so that we can pass around alignment as a u32
instead of size_t.
2017-05-01 21:03:27 +10:00
fef763aaff Add MemBuffer with allocation from stack memory 2017-05-01 18:29:45 +10:00
fbb9c8bf9d Add operator overloads to vectors 2017-05-01 16:40:52 +10:00
4bea4f6505 Change naming scheme to be more compact 2017-05-01 14:01:05 +10:00
c3ebef2ea1 Add wchar operations 2017-04-25 17:37:40 +10:00
8d471a1502 Add some wide len, win32 error code display 2017-04-20 22:43:58 +10:00
a4bc798a6f Remove inline for now
I found in another project that using inline, inlined some functions in the
output object code. When using single file build, the implementation is defined
in one file and if it becomes inlined, then the function name is lost.

If then another file references the library and tries to use a function that has
been inlined, the linker won't be able to resolve the function name and the
object code since it has been inlined. So I've removed it from the library until
I find a case where it's suitable to use.
2017-04-19 18:10:00 +10:00
00685b9ce9 Add better push buffer system for dynamic alloc 2017-04-18 23:38:52 +10:00