mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-12-15 14:08:42 +00:00
merge
This commit is contained in:
commit
c7960efbe4
5 changed files with 34 additions and 34 deletions
|
@ -13,7 +13,7 @@ static unsigned long PIC_Sys_MEM_NbAllocs;
|
|||
#define _msize malloc_usable_size
|
||||
#endif /* __GNUC__ */
|
||||
|
||||
// ----------------------------------------------------------------------------------------------------------------------------------
|
||||
/* ---------------------------------------------------------------------------------------------------------------------------------- */
|
||||
|
||||
void *Pic_malloc(unsigned long size)
|
||||
{
|
||||
|
@ -26,7 +26,7 @@ void *Pic_malloc(unsigned long size)
|
|||
}
|
||||
return(mem);
|
||||
}
|
||||
// -----
|
||||
/* ----- */
|
||||
void *Pic_calloc(unsigned long count, unsigned long size)
|
||||
{
|
||||
void *mem;
|
||||
|
@ -38,7 +38,7 @@ void *Pic_calloc(unsigned long count, unsigned long size)
|
|||
}
|
||||
return(mem);
|
||||
}
|
||||
// -----
|
||||
/* ----- */
|
||||
void Pic_free(void *memblock)
|
||||
{
|
||||
unsigned long size;
|
||||
|
@ -47,23 +47,23 @@ void Pic_free(void *memblock)
|
|||
PIC_Sys_MEM_NbAllocs--;
|
||||
free(memblock);
|
||||
}
|
||||
// -----
|
||||
/* ----- */
|
||||
unsigned long Pic__msize(void *memblock)
|
||||
{
|
||||
return(_msize(memblock));
|
||||
}
|
||||
// -----
|
||||
/* ----- */
|
||||
unsigned long PIC_GetMemNbAllocs(void)
|
||||
{
|
||||
return(PIC_Sys_MEM_NbAllocs);
|
||||
}
|
||||
// -----
|
||||
/* ----- */
|
||||
unsigned long PIC_GetMemAllocated(void)
|
||||
{
|
||||
return(PIC_Sys_MEM_Allocated);
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------------------------------------------------------------
|
||||
/* ---------------------------------------------------------------------------------------------------------------------------------- */
|
||||
|
||||
static unsigned char PIC_ErrorFlag;
|
||||
static unsigned char PIC_ErrorString[PIC_ERRSIZE];
|
||||
|
@ -95,23 +95,23 @@ void Pic_SetError(unsigned char *msg, ...)
|
|||
if (PIC_Sys_FnctActive) PIC_Sys_Fnct();
|
||||
return;
|
||||
}
|
||||
// -----
|
||||
/* ----- */
|
||||
char* PIC_GetError(void)
|
||||
{
|
||||
return(PIC_ErrorString);
|
||||
}
|
||||
// -----
|
||||
/* ----- */
|
||||
unsigned char PIC_Error(void)
|
||||
{
|
||||
return(PIC_ErrorFlag);
|
||||
}
|
||||
// -----
|
||||
/* ----- */
|
||||
void PIC_ResetError(void)
|
||||
{
|
||||
strcpy(PIC_ErrorString,"");
|
||||
PIC_ErrorFlag=0;
|
||||
}
|
||||
// -----
|
||||
/* ----- */
|
||||
unsigned char PIC_OnErrorCall( void pFnct(void) )
|
||||
{
|
||||
if (pFnct != NULL)
|
||||
|
@ -126,5 +126,5 @@ unsigned char PIC_OnErrorCall( void pFnct(void) )
|
|||
return(1);
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------------------------------------------------------------
|
||||
/* ---------------------------------------------------------------------------------------------------------------------------------- */
|
||||
|
||||
|
|
|
@ -595,7 +595,7 @@ unsigned long PIC_Save(unsigned long id, char* FileName, unsigned long type, uns
|
|||
err=1;
|
||||
}
|
||||
break;
|
||||
// ---
|
||||
/* --- */
|
||||
default:
|
||||
Pic_SetError("Save %s, unknow save format/type",FileName);
|
||||
err=1;
|
||||
|
@ -608,7 +608,7 @@ unsigned long PIC_Save(unsigned long id, char* FileName, unsigned long type, uns
|
|||
return(err-1);
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------------------------------------------------------------
|
||||
/* ---------------------------------------------------------------------------------------------------------------------------------- */
|
||||
|
||||
unsigned long PIC_Destroy(unsigned long id)
|
||||
{
|
||||
|
@ -651,4 +651,4 @@ unsigned long PIC_Destroy(unsigned long id)
|
|||
return(1);
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------------------------------------------------------------
|
||||
/* ---------------------------------------------------------------------------------------------------------------------------------- */
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
#include "pic_private.h"
|
||||
#include "pic.h"
|
||||
|
||||
// ----------------------------------------------------------------------------------------------------------------------------------
|
||||
/* ---------------------------------------------------------------------------------------------------------------------------------- */
|
||||
|
||||
#pragma pack(1)
|
||||
typedef struct TGA_HEADER
|
||||
|
@ -25,7 +25,7 @@ typedef struct TGA_HEADER
|
|||
} TGA_HEADER;
|
||||
#pragma pack()
|
||||
|
||||
// ----------------------------------------------------------------------------------------------------------------------------------
|
||||
/* ---------------------------------------------------------------------------------------------------------------------------------- */
|
||||
|
||||
unsigned long Pic_TGA_Read( unsigned char *FileName,
|
||||
unsigned char **ppPal, unsigned char **ppDatas,
|
||||
|
@ -138,7 +138,7 @@ unsigned long Pic_TGA_Read( unsigned char *FileName,
|
|||
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------------------------------------------------------------
|
||||
/* ---------------------------------------------------------------------------------------------------------------------------------- */
|
||||
|
||||
unsigned long Pic_TGA_Write( unsigned char *FileName,
|
||||
unsigned char *pPal,unsigned char *pDatas,
|
||||
|
|
|
@ -17,12 +17,12 @@ typedef struct PIC_PICTURE
|
|||
struct PIC_PICTURE *Next;
|
||||
} PIC_PICTURE;
|
||||
|
||||
// ----------------------------------------------------------------------------------------------------------------------------------
|
||||
/* ---------------------------------------------------------------------------------------------------------------------------------- */
|
||||
|
||||
|
||||
//
|
||||
// JPG
|
||||
//
|
||||
/*
|
||||
* JPG
|
||||
*/
|
||||
|
||||
|
||||
extern unsigned long Pic_JPG_Read( unsigned char *FileName,
|
||||
|
@ -33,9 +33,9 @@ extern unsigned long Pic_JPG_Write( unsigned char *FileName,
|
|||
unsigned long Qual,
|
||||
unsigned char *pDatas,
|
||||
unsigned long w, unsigned long h);
|
||||
//
|
||||
// TGA
|
||||
//
|
||||
/*
|
||||
* TGA
|
||||
*/
|
||||
extern unsigned long Pic_TGA_Read( unsigned char *FileName,
|
||||
unsigned char **ppPal, unsigned char **ppDatas,
|
||||
unsigned long *pWidth, unsigned long *pHeight,
|
||||
|
@ -43,9 +43,9 @@ extern unsigned long Pic_TGA_Read( unsigned char *FileName,
|
|||
extern unsigned long Pic_TGA_Write( unsigned char *FileName,
|
||||
unsigned char *pPal,unsigned char *pDatas,
|
||||
unsigned long w, unsigned long h, unsigned long d);
|
||||
//
|
||||
// BMP
|
||||
//
|
||||
/*
|
||||
* BMP
|
||||
*/
|
||||
extern unsigned long Pic_BMP_Read( unsigned char *FileName,
|
||||
unsigned char **ppPal, unsigned char **ppDatas,
|
||||
unsigned long *pWidth, unsigned long *pHeight,
|
||||
|
@ -54,16 +54,16 @@ extern unsigned long Pic_BMP_Read( unsigned char *FileName,
|
|||
extern unsigned long Pic_BMP_Write( unsigned char *FileName,
|
||||
unsigned char *pPal,unsigned char *pDatas,
|
||||
unsigned long w, unsigned long h, unsigned long d);
|
||||
//
|
||||
// System
|
||||
//
|
||||
/*
|
||||
* System
|
||||
*/
|
||||
extern void* Pic_malloc(unsigned long size);
|
||||
extern void* Pic_calloc(unsigned long count, unsigned long size);
|
||||
extern void Pic_free(void *memblock);
|
||||
extern unsigned long Pic__msize(void *memblock);
|
||||
extern void Pic_SetError(unsigned char *msg, ...);
|
||||
|
||||
// ----------------------------------------------------------------------------------------------------------------------------------
|
||||
/* ---------------------------------------------------------------------------------------------------------------------------------- */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
@ -21,8 +21,8 @@ IF(WITH_SOUND)
|
|||
ADD_SUBDIRECTORY(sound)
|
||||
ENDIF(WITH_SOUND)
|
||||
|
||||
IF(WITH_TESTS)
|
||||
IF(WITH_NEL_TESTS)
|
||||
ADD_SUBDIRECTORY(nel_unit_test)
|
||||
ENDIF(WITH_TESTS)
|
||||
ENDIF(WITH_NEL_TESTS)
|
||||
|
||||
#build_gamedata
|
||||
|
|
Loading…
Reference in a new issue