Commit Graph

15 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
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
c5b98e2d5e library: Clean more source code files 2022-10-15 03:08:32 +01:00
Antonio Niño Díaz
d8eaaf2562 Remove unneeded casts 2019-06-10 17:17:19 +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
60b38de9e6 Rename NE_Input struct 2019-06-10 16:35:38 +01:00
Antonio Niño Díaz
357bd27b0a Cleanup code of NEGUI.c further 2019-06-09 23:53:58 +01:00
Antonio Niño Díaz
fba2efbd72 Simplify code of NE_GUIDraw()
Extract code into multiple functions for readability.
2019-06-09 23:30:39 +01:00
Antonio Niño Díaz
18043f6078 Simplify NE_GUIUpdate()
Extract code of each object type into individual functions.
2019-06-09 22:52:32 +01:00
Antonio Niño Díaz
9245eadfbe Cleanup style of NEGUI.c 2019-06-09 22:45:41 +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
ea9b88ba5b Rename API subsystem to GUI
Seriously, what was I thinking? This happened about 10 years ago, I
didn't know what things were called like. Sorry.
2019-06-04 16:27:58 +01:00