Fixed some more amiga vbcc warnings

git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1093 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
Adrien Destugues 2009-10-27 10:28:32 +00:00
parent 54a673f10f
commit 4d20be0053
2 changed files with 11 additions and 10 deletions

View File

@ -31,6 +31,7 @@
#include <png.h> #include <png.h>
#endif #endif
#include <SDL_image.h> #include <SDL_image.h>
#include <SDL_endian.h>
#include "buttons.h" #include "buttons.h"
#include "const.h" #include "const.h"
@ -828,7 +829,7 @@ void Load_PAL(void)
if ((file=fopen(filename, "rb"))) if ((file=fopen(filename, "rb")))
{ {
T_Palette palette_64; T_Palette palette_64;
// Init_preview(???); // Pas possible... pas d'image... // Init_preview(?); // Pas possible... pas d'image...
// Lecture du fichier dans Main_palette // Lecture du fichier dans Main_palette
if (Read_bytes(file,palette_64,sizeof(T_Palette))) if (Read_bytes(file,palette_64,sizeof(T_Palette)))
@ -4551,10 +4552,10 @@ void Save_CEL(void)
memcpy(header2.Signature,"KiSS",4); // Initialisation de la signature memcpy(header2.Signature,"KiSS",4); // Initialisation de la signature
header2.Kind=0x20; // Initialisation du type (BitMaP) header2.Kind=0x20; // Initialisation du type (BitMaP)
header2.Nb_bits=8; // Initialisation du nombre de bits header2.Nb_bits=8; // Initialisation du nombre de bits
header2.Filler1=0; // Initialisation du filler 1 (???) header2.Filler1=0; // Initialisation du filler 1 (?)
header2.Width=Main_image_width-header2.X_offset; // Initialisation de la largeur header2.Width=Main_image_width-header2.X_offset; // Initialisation de la largeur
header2.Height=Main_image_height-header2.Y_offset; // Initialisation de la hauteur header2.Height=Main_image_height-header2.Y_offset; // Initialisation de la hauteur
for (x_pos=0;x_pos<16;x_pos++) // Initialisation du filler 2 (???) for (x_pos=0;x_pos<16;x_pos++) // Initialisation du filler 2 (?)
header2.Filler2[x_pos]=0; header2.Filler2[x_pos]=0;
if (Write_bytes(file,&header2,sizeof(T_CEL_Header2))) if (Write_bytes(file,&header2,sizeof(T_CEL_Header2)))
@ -4670,7 +4671,7 @@ void Load_KCF(void)
if (Read_bytes(file,&buffer,sizeof(T_KCF_Header))) if (Read_bytes(file,&buffer,sizeof(T_KCF_Header)))
{ {
// Init_preview(???); // Pas possible... pas d'image... // Init_preview(?); // Pas possible... pas d'image...
if (Config.Clear_palette) if (Config.Clear_palette)
memset(Main_palette,0,sizeof(T_Palette)); memset(Main_palette,0,sizeof(T_Palette));
@ -4704,7 +4705,7 @@ void Load_KCF(void)
if (Read_bytes(file,&header2,sizeof(T_CEL_Header2))) if (Read_bytes(file,&header2,sizeof(T_CEL_Header2)))
{ {
// Init_preview(???); // Pas possible... pas d'image... // Init_preview(?); // Pas possible... pas d'image...
index=(header2.Nb_bits==12)?16:0; index=(header2.Nb_bits==12)?16:0;
for (pal_index=0;pal_index<header2.Height;pal_index++) for (pal_index=0;pal_index<header2.Height;pal_index++)
@ -4806,12 +4807,12 @@ void Save_KCF(void)
memcpy(header2.Signature,"KiSS",4); // Initialisation de la signature memcpy(header2.Signature,"KiSS",4); // Initialisation de la signature
header2.Kind=0x10; // Initialisation du type (PALette) header2.Kind=0x10; // Initialisation du type (PALette)
header2.Nb_bits=24; // Initialisation du nombre de bits header2.Nb_bits=24; // Initialisation du nombre de bits
header2.Filler1=0; // Initialisation du filler 1 (???) header2.Filler1=0; // Initialisation du filler 1 (?)
header2.Width=256; // Initialisation du nombre de couleurs header2.Width=256; // Initialisation du nombre de couleurs
header2.Height=1; // Initialisation du nombre de palettes header2.Height=1; // Initialisation du nombre de palettes
header2.X_offset=0; // Initialisation du décalage X header2.X_offset=0; // Initialisation du décalage X
header2.Y_offset=0; // Initialisation du décalage Y header2.Y_offset=0; // Initialisation du décalage Y
for (index=0;index<16;index++) // Initialisation du filler 2 (???) for (index=0;index<16;index++) // Initialisation du filler 2 (?)
header2.Filler2[index]=0; header2.Filler2[index]=0;
if (! Write_bytes(file,&header2,sizeof(T_CEL_Header2))) if (! Write_bytes(file,&header2,sizeof(T_CEL_Header2)))
@ -7019,4 +7020,4 @@ T_Format * Get_fileformat(byte format)
// Normally impossible to reach this point, unless called with an invalid // Normally impossible to reach this point, unless called with an invalid
// enum.... // enum....
return safe_default; return safe_default;
} }

4
misc.c
View File

@ -754,12 +754,12 @@ unsigned long Memory_free(void)
len = sizeof(maxmem); len = sizeof(maxmem);
sysctl(mib,2,&maxmem,&len,NULL,0); sysctl(mib,2,&maxmem,&len,NULL,0);
return maxmem; return maxmem;
#elif defined(__BEOS__) || defined(__HAIKU__) || defined(__SKYOS__) || defined(__amigaos4__) || defined(__amigaos__) #elif defined(__BEOS__) || defined(__HAIKU__) || defined(__SKYOS__) || defined(__amigaos4__)
// No <sys/sysctl.h> on BeOS or Haiku // No <sys/sysctl.h> on BeOS or Haiku
// AvailMem is misleading on os4 (os4 caches stuff in memory that you can still allocate) // AvailMem is misleading on os4 (os4 caches stuff in memory that you can still allocate)
#warning "There is missing code there for your platform ! please check and correct :)" #warning "There is missing code there for your platform ! please check and correct :)"
return 10*1024*1024; return 10*1024*1024;
#elif defined(__AROS__) || defined(__MORPHOS__) #elif defined(__AROS__) || defined(__MORPHOS__) || defined(__amigaos__)
return AvailMem(MEMF_ANY); return AvailMem(MEMF_ANY);
#else #else
struct sysinfo info; struct sysinfo info;