-
Notifications
You must be signed in to change notification settings - Fork 3
Miscellaneous Errors
-
10 :
E_BMP_PARSE
In our graphical output, we use external ressources such as Windows Bitmaps (.bmp) to get a nicer result. We use our own BMP Parser to load these files into memory and several errors can occur during this process. If data can't be retrieved through
bmp_to_array()
a non-zero value is returned this way we know that the requested asset wasn't loaded and can't be accessed afterwards.
-
11 :
E_BKGD
Our program handles few resolutions (1280x720p, 1366x768p, 1440x900p and 1920x1080p), the original trigger of this error was if the background asset from the main menu couldn't be loaded, since we changed the way we loaded assets during the development, it is now triggered if the requested resolution isn't supported by our program.
-
12 :
E_MALLOC
malloc()
can fail to allocate requested space in memory, due to this fact we must check that the returned address isn'tNULL
. If so, the program integrity can't be ensured and accessing this memory can lead to segmentation faults.
-
28 :
E_THREAD
To get a higher frame-rate, our program uses
libpthread
to parallelize graphic and audio computations. As stated by the man page ofpthread_create()
, which is the function to create a new thread, this process can fail. If so, the thread isn't created and can't be used afterwards.