Some user-contributed patches to cleanup the build and remove warnings.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1322 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
parent
571cf70b58
commit
056ce73ee9
@ -34,6 +34,7 @@
|
|||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
#include "operatio.h"
|
#include "operatio.h"
|
||||||
#include "pages.h"
|
#include "pages.h"
|
||||||
|
#include "sdlscreen.h"
|
||||||
#include "windows.h"
|
#include "windows.h"
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -53,7 +53,7 @@ static byte Palette_has_changed;
|
|||||||
static byte Brush_was_altered;
|
static byte Brush_was_altered;
|
||||||
|
|
||||||
/// Helper function to clamp a double to 0-255 range
|
/// Helper function to clamp a double to 0-255 range
|
||||||
inline byte clamp_byte(double value)
|
static inline byte clamp_byte(double value)
|
||||||
{
|
{
|
||||||
if (value<0.0)
|
if (value<0.0)
|
||||||
return 0;
|
return 0;
|
||||||
@ -233,9 +233,10 @@ int L_GetLayerPixel(lua_State* L)
|
|||||||
int L_SetColor(lua_State* L)
|
int L_SetColor(lua_State* L)
|
||||||
{
|
{
|
||||||
byte c=lua_tonumber(L,1);
|
byte c=lua_tonumber(L,1);
|
||||||
byte r=clamp_byte(lua_tonumber(L,2));
|
|
||||||
byte g=clamp_byte(lua_tonumber(L,3));
|
byte r=clamp_byte((double)lua_tonumber(L,2));
|
||||||
byte b=clamp_byte(lua_tonumber(L,4));
|
byte g=clamp_byte((double)lua_tonumber(L,3));
|
||||||
|
byte b=clamp_byte((double)lua_tonumber(L,4));
|
||||||
|
|
||||||
Main_palette[c].R=Round_palette_component(r);
|
Main_palette[c].R=Round_palette_component(r);
|
||||||
Main_palette[c].G=Round_palette_component(g);
|
Main_palette[c].G=Round_palette_component(g);
|
||||||
|
|||||||
@ -422,7 +422,7 @@ static const T_Help_table helptable_credits[] =
|
|||||||
HELP_TEXT (" Pasi Kallinen the Peach petter ")
|
HELP_TEXT (" Pasi Kallinen the Peach petter ")
|
||||||
HELP_TEXT (" richienyhus tape.wyrm TeeEmCee ")
|
HELP_TEXT (" richienyhus tape.wyrm TeeEmCee ")
|
||||||
HELP_TEXT (" tempest Timo Kurrpa titus^Rab ")
|
HELP_TEXT (" tempest Timo Kurrpa titus^Rab ")
|
||||||
HELP_TEXT (" Tobé 00ai99 ")
|
HELP_TEXT (" Tobé yakumo9275 00ai99 ")
|
||||||
HELP_TEXT ("")
|
HELP_TEXT ("")
|
||||||
HELP_TEXT ("")
|
HELP_TEXT ("")
|
||||||
HELP_TEXT (" ... posted the annoying bug reports.")
|
HELP_TEXT (" ... posted the annoying bug reports.")
|
||||||
|
|||||||
@ -1344,7 +1344,7 @@ void Rotate_safety_backups(void)
|
|||||||
sprintf(deleted_file, "%s%c%6.6d.bkp",
|
sprintf(deleted_file, "%s%c%6.6d.bkp",
|
||||||
Config_directory,
|
Config_directory,
|
||||||
Main_safety_backup_prefix,
|
Main_safety_backup_prefix,
|
||||||
(Main_safety_number + 1000000l - Rotation_safety_backup) % 1000000l);
|
(Uint32)(Main_safety_number + 1000000l - Rotation_safety_backup) % (Uint32)1000000l);
|
||||||
remove(deleted_file); // no matter if fail
|
remove(deleted_file); // no matter if fail
|
||||||
|
|
||||||
// Reset counters
|
// Reset counters
|
||||||
@ -1354,7 +1354,7 @@ void Rotate_safety_backups(void)
|
|||||||
// Create a new file name and save
|
// Create a new file name and save
|
||||||
sprintf(file_name, "%c%6.6d.bkp",
|
sprintf(file_name, "%c%6.6d.bkp",
|
||||||
Main_safety_backup_prefix,
|
Main_safety_backup_prefix,
|
||||||
Main_safety_number);
|
(Unit32)Main_safety_number);
|
||||||
Init_context_layered_image(&context, file_name, Config_directory);
|
Init_context_layered_image(&context, file_name, Config_directory);
|
||||||
context.Format=FORMAT_GIF;
|
context.Format=FORMAT_GIF;
|
||||||
Save_image(&context);
|
Save_image(&context);
|
||||||
|
|||||||
@ -229,5 +229,6 @@ void Init_preview(short width,short height,long size,int format,enum PIXEL_RATIO
|
|||||||
void Init_write_buffer(void);
|
void Init_write_buffer(void);
|
||||||
void Write_one_byte(FILE *file, byte b);
|
void Write_one_byte(FILE *file, byte b);
|
||||||
void End_write(FILE *file);
|
void End_write(FILE *file);
|
||||||
|
void Rotate_safety_backups(void);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user