Commit Graph

88 Commits

Author SHA1 Message Date
bjorn cdecc1bae7 Add defer system; Rework exceptions; util cleanup;
Defer can be used to clean up resources when an error occurs.
2024-03-29 18:10:22 -07:00
bjorn 2b218d09d0 Merge branch 'stable' into dev 2024-03-12 11:58:34 -07:00
bjorn 66f6ee9bb9 v0.17.1; 2024-03-12 11:56:30 -07:00
bjorn d097d9819d Add wrappers for malloc functions; 2024-03-11 14:38:00 -07:00
bjorn 9068c8daee rm map_remove;
It's no longer used.
2024-03-07 10:13:00 -08:00
Ilya 4139f0f180
Make lovrAssert act like a function
`do {} while(0)` is the perfect way to make function-like macro act like a real function (require ;, encapsulate local variables)
2024-03-03 14:37:14 +03:00
bjorn 1d6f3afc34 v0.17.0; 2023-10-14 19:36:19 -07:00
mcc c3b63e60ba Create LOVR_NORETURN abstracting the contradictory noreturn implementations in C11 and C++11 2023-03-05 19:16:59 -05:00
bjorn efc81e4cec Fix some gcc warnings; 2022-12-03 01:20:02 -08:00
bjorn 904fb282c2 v0.16.0; 2022-10-15 21:49:25 -07:00
bjorn 3ff13edfb6 util: Add BREAK; 2022-05-11 12:47:12 -07:00
bjorn c60116ad61 rm Color; 2022-04-29 20:55:54 -07:00
bjorn d8701df780 Add f16 conversion to util; 2022-04-27 00:19:44 -07:00
bjorn 65b0f95ca9 Add lovrUnreachable macro; 2022-04-27 00:05:14 -07:00
bjorn 5d271de91a mv map util; 2022-03-30 12:34:38 -07:00
bjorn dc6de4ca14 Freeze! GCC police; 2022-03-25 12:15:38 -07:00
bjorn 2da18d419b mv util src; 2022-03-22 00:13:38 -07:00
bjorn 7645f4c014 Add core folder; 2019-05-20 02:47:33 -07:00
bjorn 8e7a4323d0 rm custom PI define; 2019-05-13 03:56:34 -07:00
bjorn afc8000fc7 rm stddef from util; 2019-04-21 11:52:04 -07:00
bjorn c021afedae Fix more warnings; 2019-04-20 18:42:25 -07:00
bjorn 2dea0eacfb Use -fvisibility=hidden to hide symbols by default;
This saves some space, and it's better to be conscious about symbol exports.
2019-04-20 16:20:05 -07:00
bjorn 5e74222a48 rm types from util; 2019-04-05 05:12:21 -07:00
bjorn 941fc1717f headset: forward declarations; 2019-04-05 05:08:03 -07:00
bjorn 8df55795b1 rm stdint from util; 2019-04-05 04:08:06 -07:00
bjorn 410a2810cf Move types into their own file; 2019-04-05 04:05:03 -07:00
bjorn 14cab6cd3c Move utf helper into lib; 2019-04-05 04:04:52 -07:00
bjorn 86a342877f rm nextPo2; 2019-04-05 03:56:56 -07:00
bjorn d31dca5520 Free objects in their destructors; 2019-04-05 03:56:10 -07:00
bjorn 6fdeda9e61 Make lovrRelease non-generic;
We know what type we're releasing 99% of the time, we don't need to
play a guessing game in lovrRelease, just have the caller say which
destructor to use.

There is lovrGenericRelease for situations where we need it, which
does the slower lookup of the destructor.
2019-04-05 03:41:03 -07:00
bjorn 7932ef6f9f Add type lookup;
Now Ref has a type id instead of a destructor/name, and use the type to
lookup the destructor and name when needed.

This improves performance, since now Ref contains a lot less data and we
can do an integer comparison instead of a string comparison when reading
objects from Lua.
2019-04-05 02:54:54 -07:00
bjorn 85c51399a6 Fix MSVC warnings; 2019-03-17 00:58:13 -07:00
bjorn d1fd59a176 rm string hashing code;
It doesn't work in Visual Studio.
2019-02-13 15:10:52 -08:00
bjorn 4ed3cad851 Parse animations; 2019-02-13 15:10:52 -08:00
bjorn 347a399890 Adjust util.h macros; 2019-01-18 08:44:03 -08:00
bjorn 40c7deaefe Vector API improvements; 2019-01-06 03:25:00 -08:00
bjorn 4f716499b0 Fix declspec for math functions;
LuaJIT can't find math functions on windows unless they are exported.
2019-01-04 02:18:21 -08:00
bjorn 5b52a91778 mv ref->free ref->destructor; 2018-12-19 01:33:47 -08:00
bjorn 9803e9916f Use naming convention for destructor; 2018-12-19 01:04:42 -08:00
bjorn c999f10039 Use _Noreturn for lovrThrow;
Generates smaller and prettier assembly.
2018-12-12 19:35:18 -08:00
bjorn eaf26ce4b8 Struct cleanup; 2018-12-10 15:18:42 -08:00
bjorn 24ba340929 Add CHECK_SIZEOF;
It can be used to check the size of a type at compile time.
2018-12-09 23:36:02 -08:00
bjorn ba192374dc Start math types; 2018-12-02 12:08:07 -08:00
bjorn f8011f7bf7 Initial platform.h; 2018-10-29 14:00:16 -07:00
bjorn 816fda2177 Fix everything and merge; 2018-09-27 18:38:44 -07:00
bjorn 92e6ad93cb Dynamically load modules; 2018-09-27 18:38:44 -07:00
bjorn 05802f3e90 util: rm vec_uint; 2018-09-26 10:49:33 -07:00
bjorn 148a2bdb45 Error system no longer relies on Lua; 2018-09-26 10:39:17 -07:00
bjorn f872a5f094 Re-enable threads for emscripten;
They don't appear to work very well but this simplifies code a lot.
2018-08-30 22:09:54 -07:00
bjorn bc2d638b00 Refs know their type; 2018-07-24 19:14:29 -07:00