Commit Graph

19 Commits

Author SHA1 Message Date
Antonio Niño Díaz
82171bbf69 chore: Simplify copyright years in notices
Instead of listing every individual year, keep only the first and last
years.
2024-03-09 01:42:29 +00:00
Antonio Niño Díaz
f57fa76576 library: Handle failures correctly
The previous code relied too much on assertions, even for things that
are just regular things that may happen while the application is running
(like running out of memory).

- Many assertions have been turned into permanent checks
- Some functions now return "success" or "failure".
- NE_Init3D() and NE_InitDual3D() (and others) have been reworked to
  handle failures gracefully.
2023-04-21 18:19:02 +01:00
Antonio Niño Díaz
22499c5ee5 library: Fix debug message and some comments 2022-10-28 02:05:24 +01:00
Antonio Niño Díaz
17f026bb8f library: Make many function parameters const
This helps the compiler issue warning if there is some logical error in
the code, and it helps the developer realize if some assumption with
the code is wrong.
2022-10-20 22:36:58 +01:00
Antonio Niño Díaz
e8b3c80060 library: Use NE_Model* instead of void* 2022-10-15 19:53:29 +01:00
Antonio Niño Díaz
5bc3abd71b library: Cleanup more source files 2022-10-15 19:51:04 +01:00
Antonio Niño Díaz
fd95ee34fe Replace malloc() by calloc() where it makes sense
If the memory is going to be cleared right away it is better to use
calloc(), as it does it automatically.
2019-06-10 17:17:08 +01:00
Antonio Niño Díaz
8314245958 Small cleanup of physics subsystem 2019-06-10 16:57:13 +01:00
Antonio Niño Díaz
804c9adc6c Cleanup code in NEPhysics
Reduce pyramid levels.
2019-06-05 16:26:33 +01:00
Antonio Niño Díaz
f6b22679e3 Coding style fixes 2019-06-05 15:55:02 +01:00
Antonio Niño Díaz
976cf4d4c6 Simplify NE_DebugPrint messages
The function name is now part of the macro.
2019-06-05 14:19:04 +01:00
Antonio Niño Díaz
a9ae923fff Simplify NE_Assert messages
The function name is now part of the macro.
2019-06-05 14:06:10 +01:00
Antonio Niño Díaz
700971beef Simplify NE_AssertPointer messages
Now the name of the function is added as part of the macro.
2019-06-05 13:41:35 +01:00
Antonio Niño Díaz
fbd7c22d44 Fix collition typos
Yeah, collision was mispelled everywhere.
2019-06-05 02:30:41 +01:00
Antonio Niño Díaz
68d90b44c9 Remove occurrences of inline keyword
Let the compiler decide about it.
2019-06-04 18:24:22 +01:00
Antonio Niño Díaz
51bacc1648 Fix compilation errors and warnings
Now the library can be compiled again.
2019-06-04 15:41:51 +01:00
Antonio Niño Díaz
5be032ed44 Fix coding style of library
With a bit of help of `indent -linux`, but mostly by hand. Also used
`iconv -f ISO-8859-1 -t UTF-8//TRANSLIT` to convert to UTF-8.

There is still some refactoring left to do.
2019-06-04 01:02:56 +01:00
Antonio Niño Díaz
8f8bf4d249 Run dos2unix on library source files 2019-05-30 18:45:00 +01:00
Antonio Niño Díaz
f042d0be3e
Initial dump of code of v0.6.1
This commit is a simple dump of the files of [1]. This needs to undergo
some reorganization.

[1] http://www.skylyrac.net/old-site/nitroengine.html
2019-05-29 01:01:57 +01:00