afe37f58cc
Updated to new release and fixed build with factory OBS-URL: https://build.opensuse.org/request/show/351645 OBS-URL: https://build.opensuse.org/package/show/games/ltris?expand=0&rev=13
81 lines
2.2 KiB
Diff
81 lines
2.2 KiB
Diff
diff -Nur ltris-1.0.19/src/sdl.c ltris-1.0.19-new/src/sdl.c
|
|
--- ltris-1.0.19/src/sdl.c 2013-10-29 16:21:35.000000000 +0100
|
|
+++ ltris-1.0.19-new/src/sdl.c 2016-01-02 14:02:50.996108557 +0100
|
|
@@ -905,7 +905,7 @@
|
|
/*
|
|
update rectangle (0,0,0,0)->fullscreen
|
|
*/
|
|
-inline void refresh_screen(int x, int y, int w, int h)
|
|
+extern inline void refresh_screen(int x, int y, int w, int h)
|
|
{
|
|
SDL_UpdateRect(sdl.screen, x, y, w, h);
|
|
}
|
|
@@ -1132,7 +1132,7 @@
|
|
/*
|
|
get milliseconds since last call
|
|
*/
|
|
-inline int get_time()
|
|
+extern inline int get_time()
|
|
{
|
|
int ms;
|
|
cur_time = SDL_GetTicks();
|
|
@@ -1148,7 +1148,7 @@
|
|
/*
|
|
reset timer
|
|
*/
|
|
-inline void reset_timer()
|
|
+extern inline void reset_timer()
|
|
{
|
|
last_time = SDL_GetTicks();
|
|
}
|
|
diff -Nur ltris-1.0.19/src/tools.c ltris-1.0.19-new/src/tools.c
|
|
--- ltris-1.0.19/src/tools.c 2013-05-03 19:13:11.000000000 +0200
|
|
+++ ltris-1.0.19-new/src/tools.c 2016-01-02 13:48:10.219694001 +0100
|
|
@@ -23,27 +23,27 @@
|
|
#include "ltris.h"
|
|
|
|
/* compares to strings and returns true if their first strlen(str1) chars are equal */
|
|
-inline int strequal( char *str1, char *str2 )
|
|
+extern inline int strequal( char *str1, char *str2 )
|
|
{
|
|
if ( strlen( str1 ) != strlen( str2 ) ) return 0;
|
|
return ( !strncmp( str1, str2, strlen( str1 ) ) );
|
|
}
|
|
|
|
/* set delay to ms milliseconds */
|
|
-inline void delay_set( Delay *delay, int ms )
|
|
+extern inline void delay_set( Delay *delay, int ms )
|
|
{
|
|
delay->limit = ms;
|
|
delay->cur = 0;
|
|
}
|
|
|
|
/* reset delay ( cur = 0 )*/
|
|
-inline void delay_reset( Delay *delay )
|
|
+extern inline void delay_reset( Delay *delay )
|
|
{
|
|
delay->cur = 0;
|
|
}
|
|
|
|
/* check if times out and reset */
|
|
-inline int delay_timed_out( Delay *delay, int ms )
|
|
+extern inline int delay_timed_out( Delay *delay, int ms )
|
|
{
|
|
delay->cur += ms;
|
|
if ( delay->cur >= delay->limit ) {
|
|
@@ -56,12 +56,12 @@
|
|
}
|
|
|
|
/* set timer so that we have a time out next call of delay_timed_out() */
|
|
-inline void delay_force_time_out( Delay *delay )
|
|
+extern inline void delay_force_time_out( Delay *delay )
|
|
{
|
|
delay->cur = delay->limit;
|
|
}
|
|
|
|
-inline void goto_tile( int *x, int *y, int d )
|
|
+extern inline void goto_tile( int *x, int *y, int d )
|
|
{
|
|
/* 0 -up, clockwise, 5 - left up */
|
|
switch ( d ) {
|