remove warnings when compiling with MSVC++2010

This commit is contained in:
Thomas Bernard 2018-03-19 15:58:28 +01:00
parent 10997509c8
commit f9616f570a
6 changed files with 10 additions and 8 deletions

View File

@ -1020,7 +1020,7 @@ void Rotate_brush_0_5(void)
short computed_y=0;
byte angle_change;
short prev_state;
float angle=0.0;
double angle=0.0;
int dx,dy;
short cursor_x, cursor_y;

View File

@ -107,7 +107,7 @@
#define RIGHT_SIDE 2 ///< Indicates a right side or right-click
#define SEPARATOR_WIDTH 6 ///< Width of the separator between the normal and the zoomed view
#define INITIAL_SEPARATOR_PROPORTION 0.3 ///< Proportion of the normal view width, relative to the whole screen width.
#define INITIAL_SEPARATOR_PROPORTION 0.3f ///< Proportion of the normal view width, relative to the whole screen width.
#define NB_ZOOMED_PIXELS_MIN 4 ///< Minimal number of pixel shown (in width) by the zoomed view. (Note: below 4, you can't scroll!)
#if defined(__MORPHOS__) || defined(__amigaos4__) || defined(__amigaos__) || defined(__AROS__)

View File

@ -892,7 +892,7 @@ void Load_IFF(T_IO_Context * context)
short line_size = 0; // Taille d'une ligne en octets
short plane_line_size = 0; // Size of line in bytes for 1 plane
short real_line_size = 0; // Taille d'une ligne en pixels
long file_size;
unsigned long file_size;
dword dummy;
int iff_format = 0;
int plane;

View File

@ -2002,7 +2002,7 @@ void Draw_curve_general(short x1, short y1,
old_x=x1;
old_y=y1;
Pixel_figure(old_x,old_y,color);
delta=0.05; // 1.0/20
delta=0.05f; // 1.0/20
t=0;
for (i=1; i<=20; i++)
{

View File

@ -21,6 +21,9 @@
You should have received a copy of the GNU General Public License
along with Grafx2; if not, see <http://www.gnu.org/licenses/>
*/
#if defined(WIN32)
#define _WIN32_WINNT 0x0500
#endif
#include <SDL.h>
#include <string.h>
#ifndef _MSC_VER
@ -709,7 +712,6 @@ void Zoom_a_line(byte* original_line, byte* zoomed_line,
/*############################################################################*/
#if defined(__WIN32__)
#define _WIN32_WINNT 0x0500
#include <windows.h>
#elif defined(__macosx__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
#if defined(__OpenBSD__)

View File

@ -3012,7 +3012,7 @@ byte Best_color_range(byte r, byte g, byte b, byte max)
{
int col;
float best_diff=255.0*1.56905;
float best_diff=255.0f*1.56905f;
byte best_color=0;
float target_bri;
float bri;
@ -3055,7 +3055,7 @@ byte Best_color_perceptual(byte r,byte g,byte b)
{
int col;
float best_diff=255.0*1.56905;
float best_diff=255.0f*1.56905f;
byte best_color=0;
float target_bri;
float bri;
@ -3098,7 +3098,7 @@ byte Best_color_perceptual_except(byte r,byte g,byte b, byte except)
{
int col;
float best_diff=255.0*1.56905;
float best_diff=255.0f*1.56905f;
byte best_color=0;
float target_bri;
float bri;