mirror of
https://github.com/simtactics/niotso.git
synced 2025-03-22 02:52:18 +00:00
Added libpq to the Libraries folder. Finally, I have been waiting for this day. libpq is seriously unready out of the box; you have to edit 3 header files to get it to work outside the PostgreSQL build environment.
Also, in iff2html, the directory name no longer appears as part of the IFF's file name on the web page.
This commit is contained in:
parent
4b395ba3ad
commit
10827bf2df
4 changed files with 15 additions and 11 deletions
|
@ -1,3 +1,4 @@
|
||||||
add_subdirectory(FileHandler)
|
add_subdirectory(FileHandler)
|
||||||
add_subdirectory(freetype)
|
add_subdirectory(freetype)
|
||||||
|
add_subdirectory(libpq)
|
||||||
add_subdirectory(libvitaboy)
|
add_subdirectory(libvitaboy)
|
|
@ -146,8 +146,8 @@ int iff_parse_spr(IFFChunk * ChunkInfo, const uint8_t * Buffer){
|
||||||
Count = *(b.Buffer++);
|
Count = *(b.Buffer++);
|
||||||
SpriteSize -= 2;
|
SpriteSize -= 2;
|
||||||
|
|
||||||
if(Command == 0){
|
if(Command == 0 || Command == 16){
|
||||||
/* Do nothing */
|
/* Start marker */
|
||||||
}else if(Command == 4){
|
}else if(Command == 4){
|
||||||
/* Pixel command: valid commands are 1, 2, and 3 */
|
/* Pixel command: valid commands are 1, 2, and 3 */
|
||||||
unsigned pixel = 0;
|
unsigned pixel = 0;
|
||||||
|
@ -208,8 +208,6 @@ int iff_parse_spr(IFFChunk * ChunkInfo, const uint8_t * Buffer){
|
||||||
if(Count > Sprite->Height - row)
|
if(Count > Sprite->Height - row)
|
||||||
{printf("Error %u\n", 9);return 0;}
|
{printf("Error %u\n", 9);return 0;}
|
||||||
row += Count;
|
row += Count;
|
||||||
}else if(Command == 16){
|
|
||||||
/* Do nothing */
|
|
||||||
}else {printf("Error %u\n", 10);return 0;}
|
}else {printf("Error %u\n", 10);return 0;}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
0
Libraries/FileHandler/iff/spr2.c
Normal file
0
Libraries/FileHandler/iff/spr2.c
Normal file
|
@ -50,10 +50,11 @@ static void printsize(FILE * hFile, size_t FileSize){
|
||||||
}
|
}
|
||||||
|
|
||||||
int main(int argc, char *argv[]){
|
int main(int argc, char *argv[]){
|
||||||
unsigned c, slash;
|
unsigned c;
|
||||||
|
int slash;
|
||||||
FILE * hFile;
|
FILE * hFile;
|
||||||
int overwrite = 0;
|
int overwrite = 0;
|
||||||
char *InFile, *OutFile = NULL, *OutDir = NULL;
|
char *InFile, *OutFile = NULL, *FileName, *OutDir = NULL;
|
||||||
size_t FileSize;
|
size_t FileSize;
|
||||||
struct MD5Context md5c;
|
struct MD5Context md5c;
|
||||||
unsigned char digest[16];
|
unsigned char digest[16];
|
||||||
|
@ -93,14 +94,18 @@ int main(int argc, char *argv[]){
|
||||||
strcpy(max(OutFile+length-4, OutFile), ".html");
|
strcpy(max(OutFile+length-4, OutFile), ".html");
|
||||||
}
|
}
|
||||||
|
|
||||||
for(c=0, slash=0; OutFile[c]; c++)
|
for(c=0, slash=-1; OutFile[c]; c++)
|
||||||
if(OutFile[c] == '/' || OutFile[c] == '\\') slash = c;
|
if(OutFile[c] == '/' || OutFile[c] == '\\') slash = c;
|
||||||
if(slash != 0){
|
if(slash >= 0){
|
||||||
OutDir = malloc(slash+2);
|
OutDir = malloc(slash+2);
|
||||||
memcpy(OutDir, OutFile, slash+1);
|
memcpy(OutDir, OutFile, slash+1);
|
||||||
OutDir[slash+1] = 0x00;
|
OutDir[slash+1] = 0x00;
|
||||||
}else OutDir = "";
|
}else OutDir = "";
|
||||||
|
|
||||||
|
for(c=0, slash=-1; InFile[c]; c++)
|
||||||
|
if(InFile[c] == '/' || InFile[c] == '\\') slash = c;
|
||||||
|
FileName = InFile + slash + 1;
|
||||||
|
|
||||||
/****
|
/****
|
||||||
** Open the file and read in entire contents to memory
|
** Open the file and read in entire contents to memory
|
||||||
*/
|
*/
|
||||||
|
@ -195,9 +200,9 @@ int main(int argc, char *argv[]){
|
||||||
fprintf(hFile, "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\" />\n");
|
fprintf(hFile, "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\" />\n");
|
||||||
fprintf(hFile, "<meta http-equiv=\"Content-Style-Type\" content=\"text/css; charset=iso-8859-1\" />\n");
|
fprintf(hFile, "<meta http-equiv=\"Content-Style-Type\" content=\"text/css; charset=iso-8859-1\" />\n");
|
||||||
fprintf(hFile, "<meta http-equiv=\"Content-Language\" content=\"en\" />\n");
|
fprintf(hFile, "<meta http-equiv=\"Content-Language\" content=\"en\" />\n");
|
||||||
fprintf(hFile, "<meta name=\"description\" content=\"%s (iff2html)\" />\n", InFile);
|
fprintf(hFile, "<meta name=\"description\" content=\"%s (iff2html)\" />\n", FileName);
|
||||||
fprintf(hFile, "<meta name=\"generator\" content=\"iff2html\" />\n");
|
fprintf(hFile, "<meta name=\"generator\" content=\"iff2html\" />\n");
|
||||||
fprintf(hFile, "<title>%s (iff2html)</title>\n", InFile);
|
fprintf(hFile, "<title>%s (iff2html)</title>\n", FileName);
|
||||||
fprintf(hFile, "<style type=\"text/css\" media=\"all\">\n");
|
fprintf(hFile, "<style type=\"text/css\" media=\"all\">\n");
|
||||||
fprintf(hFile, "html, body {\n");
|
fprintf(hFile, "html, body {\n");
|
||||||
fprintf(hFile, " background: #fff;\n");
|
fprintf(hFile, " background: #fff;\n");
|
||||||
|
@ -276,7 +281,7 @@ int main(int argc, char *argv[]){
|
||||||
fprintf(hFile, "</style>\n");
|
fprintf(hFile, "</style>\n");
|
||||||
fprintf(hFile, "</head>\n");
|
fprintf(hFile, "</head>\n");
|
||||||
fprintf(hFile, "<body>\n");
|
fprintf(hFile, "<body>\n");
|
||||||
fprintf(hFile, "<h1>%s</h1>\n", InFile);
|
fprintf(hFile, "<h1>%s</h1>\n", FileName);
|
||||||
fprintf(hFile, "<div id=\"attributes\">\n");
|
fprintf(hFile, "<div id=\"attributes\">\n");
|
||||||
fprintf(hFile, "<div>");
|
fprintf(hFile, "<div>");
|
||||||
for(c=0; c<16; c++)
|
for(c=0; c<16; c++)
|
||||||
|
|
Loading…
Add table
Reference in a new issue