diff --git a/ext/tinyfiledialogs/tinyfiledialogs.c b/ext/tinyfiledialogs/tinyfiledialogs.c index 5fe7de61e6..9dccf31b02 100644 --- a/ext/tinyfiledialogs/tinyfiledialogs.c +++ b/ext/tinyfiledialogs/tinyfiledialogs.c @@ -65,7 +65,6 @@ misrepresented as being the original software. #endif /* _WIN32 */ #define MAX_PATH_OR_CMD 1024 /* _MAX_PATH or MAX_PATH */ -#define MAX_MULTIPLE_FILES 32 int tinyfd_verbose = 0; /* on unix: prints the command line calls */ int tinyfd_silent = 1; /* 1 (default) or 0 : on unix, diff --git a/src/building/clone.c b/src/building/clone.c index 807b231fe7..a299a68004 100644 --- a/src/building/clone.c +++ b/src/building/clone.c @@ -12,12 +12,12 @@ * For example, given a fort, return the enumaration value corresponding to * the specific type of fort rather than the general value * - * @param building Building to examine + * @param b Building to examine * @return the building_type value to clone, or BUILDING_NONE if not cloneable */ -static building_type get_clone_type_from_building(building *building) +static building_type get_clone_type_from_building(building *b) { - building_type clone_type = building->type; + building_type clone_type = b->type; if (building_is_house(clone_type)) { return BUILDING_HOUSE_VACANT_LOT; @@ -27,7 +27,7 @@ static building_type get_clone_type_from_building(building *building) case BUILDING_RESERVOIR: return BUILDING_DRAGGABLE_RESERVOIR; case BUILDING_FORT: - switch (building->subtype.fort_figure_type) { + switch (b->subtype.fort_figure_type) { case FIGURE_FORT_LEGIONARY: return BUILDING_FORT_LEGIONARIES; case FIGURE_FORT_JAVELIN: return BUILDING_FORT_JAVELIN; case FIGURE_FORT_MOUNTED: return BUILDING_FORT_MOUNTED; diff --git a/src/core/image.c b/src/core/image.c index 13368369eb..a30f130b1f 100644 --- a/src/core/image.c +++ b/src/core/image.c @@ -29,7 +29,7 @@ #define EMPIRE_DATA_SIZE (2000*1000*4) #define ENEMY_DATA_SIZE 2400000 #define CYRILLIC_FONT_DATA_SIZE 1500000 -#define TRAD_CHINESE_FONT_DATA_SIZE 7200000 +#define CHINESE_FONT_DATA_SIZE 7200000 #define KOREAN_FONT_DATA_SIZE 7500000 #define JAPANESE_FONT_DATA_SIZE 11000000 #define SCRATCH_DATA_SIZE 12100000 @@ -449,7 +449,7 @@ static int parse_chinese_font( static int load_traditional_chinese_fonts(void) { - if (!alloc_font_memory(TRAD_CHINESE_FONT_ENTRIES, TRAD_CHINESE_FONT_DATA_SIZE)) { + if (!alloc_font_memory(TRAD_CHINESE_FONT_ENTRIES, CHINESE_FONT_DATA_SIZE)) { return 0; } @@ -491,7 +491,7 @@ static int load_traditional_chinese_fonts(void) static int load_simplified_chinese_fonts(void) { - if (!alloc_font_memory(TRAD_CHINESE_FONT_ENTRIES, TRAD_CHINESE_FONT_DATA_SIZE)) { + if (!alloc_font_memory(SIMP_CHINESE_FONT_ENTRIES, CHINESE_FONT_DATA_SIZE)) { return 0; } diff --git a/src/core/smacker.c b/src/core/smacker.c index 2f0d98a6d3..e289c40d2d 100644 --- a/src/core/smacker.c +++ b/src/core/smacker.c @@ -15,7 +15,7 @@ #define MAX_TRACKS 7 #define MAX_PALETTE 256 -#define FLAG_RING 0x01 +// #define FLAG_RING 0x01 - not supported #define FLAG_Y_INTERLACE 0x02 #define FLAG_Y_DOUBLE 0x04 @@ -27,7 +27,7 @@ #define BLOCK_MONO 0 #define BLOCK_FULL 1 -#define BLOCK_VOID 2 +// #define BLOCK_VOID 2 - not supported #define BLOCK_SOLID 3 typedef struct { diff --git a/src/input/joystick.c b/src/input/joystick.c index 4fb28bb418..3fe9ed61e5 100644 --- a/src/input/joystick.c +++ b/src/input/joystick.c @@ -684,7 +684,7 @@ static int translate_hotkeys(void) return handled; } -int translate_system_functions(void) +static int translate_system_functions(void) { if (get_joystick_input_for_action(MAPPING_ACTION_SHOW_VIRTUAL_KEYBOARD, &data.virtual_keyboard)) { if (data.virtual_keyboard.state == INPUT_STATE_WENT_DOWN) { diff --git a/src/platform/file_manager.c b/src/platform/file_manager.c index 9a0deaacfb..3460a8bc50 100644 --- a/src/platform/file_manager.c +++ b/src/platform/file_manager.c @@ -13,7 +13,7 @@ #include #include -#if _MSC_VER +#ifdef _MSC_VER // Of course MSVC is the only compiler that doesn't have POSIX strcasecmp... #include #else @@ -187,7 +187,7 @@ int platform_file_manager_should_case_correct_file(void) int platform_file_manager_compare_filename(const char *a, const char *b) { -#if _MSC_VER +#ifdef _MSC_VER return _mbsicmp((const unsigned char *) a, (const unsigned char *) b); #else return strcasecmp(a, b); @@ -196,7 +196,7 @@ int platform_file_manager_compare_filename(const char *a, const char *b) int platform_file_manager_compare_filename_prefix(const char *filename, const char *prefix, int prefix_len) { -#if _MSC_VER +#ifdef _MSC_VER return _mbsnicmp((const unsigned char *) filename, (const unsigned char *) prefix, prefix_len); #else return strncasecmp(filename, prefix, prefix_len); diff --git a/src/platform/file_manager_cache.c b/src/platform/file_manager_cache.c index 37c1d7f67c..e456deb2a5 100644 --- a/src/platform/file_manager_cache.c +++ b/src/platform/file_manager_cache.c @@ -165,4 +165,4 @@ int platform_file_manager_cache_file_has_extension(const file_info *f, const cha return platform_file_manager_compare_filename(f->extension, extension) == 0; } -#endif // __vita__ +#endif // USE_FILE_CACHE diff --git a/src/platform/screen.c b/src/platform/screen.c index e7a2d5ab22..dd4dec0f42 100644 --- a/src/platform/screen.c +++ b/src/platform/screen.c @@ -411,7 +411,7 @@ void platform_screen_render(void) SDL_RenderPresent(SDL.renderer); } -void platform_screen_generate_mouse_cursor_texture(int cursor_id, int scale, const color_t *cursor_colors) +void platform_screen_generate_mouse_cursor_texture(int cursor_id, cursor_scale scale, const color_t *cursor_colors) { if (SDL.cursors[cursor_id]) { SDL_DestroyTexture(SDL.cursors[cursor_id]); diff --git a/src/platform/screen.h b/src/platform/screen.h index 91214dee98..c04542e857 100644 --- a/src/platform/screen.h +++ b/src/platform/screen.h @@ -2,6 +2,7 @@ #define PLATFORM_SCREEN_H #include "graphics/color.h" +#include "input/cursor.h" int platform_screen_create(const char *title, int dispay_scale_percentage); void platform_screen_destroy(void); @@ -24,6 +25,6 @@ void platform_screen_clear(void); void platform_screen_update(void); void platform_screen_render(void); -void platform_screen_generate_mouse_cursor_texture(int cursor_id, int scale, const color_t *cursor_colors); +void platform_screen_generate_mouse_cursor_texture(int cursor_id, cursor_scale scale, const color_t *cursor_colors); #endif // PLATFORM_SCREEN_H diff --git a/src/widget/city_figure.c b/src/widget/city_figure.c index cdca21b197..83a4febb35 100644 --- a/src/widget/city_figure.c +++ b/src/widget/city_figure.c @@ -58,6 +58,7 @@ static void draw_hippodrome_horse(const figure *f, int x, int y) } else { y -= 12; } + break; case DIR_4_BOTTOM: x += 20; if (val <= 9) {