mirror of
https://github.com/Shpoike/Quakespasm.git
synced 2025-02-09 01:01:07 +00:00
conback.c, conback.h: added new QuakeSpasm conback data.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@52 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
parent
de9eca45e1
commit
fa7aa93450
2 changed files with 20512 additions and 0 deletions
31
Quake/conback.c
Normal file
31
Quake/conback.c
Normal file
|
@ -0,0 +1,31 @@
|
|||
// Embed a custom conback.lmp into the binary
|
||||
//
|
||||
// S.A. 6 Feb 2010, Ozkan 18 Feb 2010
|
||||
|
||||
#include "quakedef.h"
|
||||
|
||||
static const byte conback_byte[] =
|
||||
{
|
||||
# include "conback.h"
|
||||
};
|
||||
|
||||
static char *custom_conback = NULL;
|
||||
static char size_data[2 * sizeof(int)];
|
||||
|
||||
char *get_conback (void)
|
||||
{
|
||||
if (custom_conback) {
|
||||
memcpy(custom_conback, size_data, 2 * sizeof(int));
|
||||
return custom_conback;
|
||||
}
|
||||
/* sanity check */
|
||||
if (sizeof(conback_byte) < sizeof(qpic_t))
|
||||
Sys_Error ("Bad conback image.");
|
||||
/* make a copy of the conback_byte[] array */
|
||||
custom_conback = (char *)malloc (sizeof(conback_byte));
|
||||
memcpy (custom_conback, conback_byte, sizeof(conback_byte));
|
||||
/* backup the original size fields */
|
||||
memcpy (size_data, custom_conback, 2 * sizeof(int));
|
||||
return custom_conback;
|
||||
}
|
||||
|
20481
Quake/conback.h
Normal file
20481
Quake/conback.h
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue