Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff -u -r libtcod/include/libtcod.h libtcod-nosdl/include/libtcod.h
- --- libtcod/include/libtcod.h 2014-10-13 21:44:15.000000000 +0400
- +++ libtcod-nosdl/include/libtcod.h 2015-05-20 16:21:58.470001174 +0400
- @@ -110,14 +110,6 @@
- #include <wchar.h>
- #endif
- -/* This is a hack. SDL by default want you to rename your main statement, and insert it's own first
- - It does that to handle some init code. However, libtcod handles that for you. If we did this
- - wrappers like libtcod-net would be hosed, since there is no main statement there. */
- -#ifdef TCOD_MACOSX
- -#define _SDL_main_h
- -#include "SDL/SDL.h"
- -#endif
- -
- /* base types */
- #ifndef TCOD_NOBASETYPES
- typedef unsigned char uint8;
- diff -u -r libtcod/include/libtcod_int.h libtcod-nosdl/include/libtcod_int.h
- --- libtcod/include/libtcod_int.h 2014-04-15 17:05:58.000000000 +0400
- +++ libtcod-nosdl/include/libtcod_int.h 2015-05-20 16:28:11.113995765 +0400
- @@ -29,14 +29,6 @@
- #define _TCODLIB_INT_H
- #include <stdarg.h>
- #include <assert.h>
- -#if defined (__HAIKU__) || defined(__ANDROID__)
- -#include <SDL.h>
- -#include <android/log.h>
- -#elif defined (TCOD_SDL2)
- -#include <SDL.h>
- -#else
- -#include <SDL/SDL.h>
- -#endif
- /* tcodlib internal stuff */
- #ifdef __cplusplus
- @@ -129,8 +121,6 @@
- int actual_fullscreen_height;
- /* renderer to use */
- TCOD_renderer_t renderer;
- - /* user post-processing callback */
- - SDL_renderer_t sdl_cbk;
- /* fading data */
- TCOD_color_t fading_color;
- uint8 fade;
- @@ -248,69 +238,6 @@
- /* TCOD_list nonpublic methods */
- void TCOD_list_set_size(TCOD_list_t l, int size);
- -/*
- - SDL12/SDL2 abstraction layer
- -*/
- -typedef struct {
- - /* get a fullscreen mode suitable for the console */
- - void (*get_closest_mode)(int *w, int *h);
- - /* render the console on a surface/texture */
- - void (*render)(void *vbitmap, int console_width, int console_height, char_t *console_buffer, char_t *prev_console_buffer);
- - /* create a new surface */
- - SDL_Surface *(*create_surface) (int width, int height, bool with_alpha);
- - /* create the game window */
- - void (*create_window)(int w, int h, bool fullscreen);
- - /* switch fullscreen on/off */
- - void (*set_fullscreen)(bool fullscreen);
- - /* change the game window title */
- - void (*set_window_title)(const char *title);
- - /* save game screenshot */
- - void (*save_screenshot)(const char *filename);
- - /* get desktop resolution */
- - void (*get_current_resolution)(int *w, int *h);
- - /* change the mouse cursor position */
- - void (*set_mouse_position)(int x, int y);
- - /* android compatible file access functions */
- - bool (*file_read)(const char *filename, unsigned char **buf, size_t *size);
- - bool (*file_exists)(const char * filename);
- - bool (*file_write)(const char *filename, unsigned char *buf, uint32 size);
- - /* clean stuff */
- - void (*term)();
- -} TCOD_SDL_driver_t;
- -
- -/* defined in TCOD_sys_sdl12_c.c and TCOD_sys_sdl2_c.c */
- -TCOD_SDL_driver_t *SDL_implementation_factory();
- -void find_resolution();
- -void TCOD_sys_init_screen_offset();
- -extern SDL_Surface* screen;
- -extern int oldFade;
- -extern bool *ascii_updated;
- -extern bool any_ascii_updated;
- -extern SDL_Surface* charmap;
- -typedef struct {
- - float force_recalc;
- - float last_scale_xc, last_scale_yc;
- - float last_scale_factor;
- - float last_fullscreen;
- -
- - float min_scale_factor;
- -
- - float src_height_width_ratio;
- - float dst_height_width_ratio;
- - int src_x0, src_y0;
- - int src_copy_width, src_copy_height;
- - int src_proportionate_width, src_proportionate_height;
- - int dst_display_width, dst_display_height;
- - int dst_offset_x, dst_offset_y;
- - int surface_width, surface_height;
- -} scale_data_t;
- -extern scale_data_t scale_data;
- -#ifdef TCOD_SDL2
- -extern float scale_factor;
- -extern SDL_Window* window;
- -extern SDL_Renderer* renderer;
- -#endif
- -
- /* color values */
- #define TCOD_BLACK 0,0,0
- #define TCOD_DARKEST_GREY 31,31,31
- diff -u -r libtcod/makefiles/makefile-linux libtcod-nosdl/makefiles/makefile-linux
- --- libtcod/makefiles/makefile-linux 2014-04-15 17:05:58.000000000 +0400
- +++ libtcod-nosdl/makefiles/makefile-linux 2015-05-20 16:32:34.325991945 +0400
- @@ -5,9 +5,6 @@
- INCDIR=include
- #dependencies
- -# SDL
- -SDL_FLAGS=`sdl-config --cflags`
- -SDL_LIBS=`sdl-config --libs`
- # ZLIB
- ZLIB_FLAGS=-I src/zlib
- @@ -16,7 +13,7 @@
- #OPENGL
- OPENGL_LIB=-lGL
- -LIBS=$(ZLIB_LIBS) $(SDL_LIBS) $(OPENGL_LIB) -lm -ldl -lX11 -lpthread
- +LIBS=$(ZLIB_LIBS) $(SDL_LIBS) $(OPENGL_LIB) -lm -ldl -lpthread
- CFLAGS=$(FLAGS) -I$(INCDIR) -I$(INCDIR)/gui -Wall $(SDL_FLAGS) $(ZLIB_FLAGS) -fno-strict-aliasing -ansi -fPIC
- TEMP=/tmp
- @@ -83,11 +80,6 @@
- parser_c.o \
- path_c.o \
- sys_c.o \
- - sys_opengl_c.o \
- - sys_sdl_c.o \
- - sys_sdl12_c.o \
- - sys_sdl_img_bmp.o \
- - sys_sdl_img_png.o \
- tree_c.o \
- txtfield_c.o \
- wrappers.o \
Advertisement
Add Comment
Please, Sign In to add comment