mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-20 19:41:34 +01:00
academic/tuxmath: Rename blits. Remove dupe lan player.
Signed-off-by: Dave Woodfall <dave@slackbuilds.org>
This commit is contained in:
parent
78eae1b73a
commit
fbfee76567
3 changed files with 83 additions and 0 deletions
|
@ -0,0 +1,26 @@
|
||||||
|
From c471e2a94798787afbad4e547a1e2485ef9835db Mon Sep 17 00:00:00 2001
|
||||||
|
From: Adrian Bunk <bunk@debian.org>
|
||||||
|
Date: Sun, 3 Jan 2021 14:22:29 +0200
|
||||||
|
Subject: src/menu_lan.c: Remove unused duplicate lan_player_info definition
|
||||||
|
|
||||||
|
This broke the build with gcc 10:
|
||||||
|
https://bugs.debian.org/976513
|
||||||
|
---
|
||||||
|
src/menu_lan.c | 1 -
|
||||||
|
1 file changed, 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/src/menu_lan.c b/src/menu_lan.c
|
||||||
|
index 4512eb1..d85f2c6 100644
|
||||||
|
--- a/src/menu_lan.c
|
||||||
|
+++ b/src/menu_lan.c
|
||||||
|
@@ -37,7 +37,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||||
|
|
||||||
|
|
||||||
|
/* lan_player_type now defined in network.h */
|
||||||
|
-lan_player_type lan_player_info[MAX_CLIENTS];
|
||||||
|
|
||||||
|
/* Local function prototypes: ------------------- */
|
||||||
|
void draw_player_table(void);
|
||||||
|
--
|
||||||
|
2.20.1
|
||||||
|
|
54
academic/tuxmath/0002-rename-blits-to-tmblits.patch
Normal file
54
academic/tuxmath/0002-rename-blits-to-tmblits.patch
Normal file
|
@ -0,0 +1,54 @@
|
||||||
|
Bug-Debian: https://bugs.debian.org/986623
|
||||||
|
Forwarded: no
|
||||||
|
Last-Update: 2021-04-20
|
||||||
|
|
||||||
|
--- tuxmath-2.0.3.orig/src/titlescreen.c
|
||||||
|
+++ tuxmath-2.0.3/src/titlescreen.c
|
||||||
|
@@ -55,7 +55,7 @@ struct blit {
|
||||||
|
SDL_Rect *srcrect;
|
||||||
|
SDL_Rect *dstrect;
|
||||||
|
unsigned char type;
|
||||||
|
-} blits[MAX_UPDATES];
|
||||||
|
+} tmblits[MAX_UPDATES];
|
||||||
|
|
||||||
|
// Lessons available for play
|
||||||
|
char **lesson_list_titles = NULL;
|
||||||
|
@@ -1019,8 +1019,8 @@ void init_blits(void) {
|
||||||
|
int i;
|
||||||
|
|
||||||
|
for (i = 0; i < MAX_UPDATES; ++i) {
|
||||||
|
- blits[i].srcrect = &srcupdate[i];
|
||||||
|
- blits[i].dstrect = &dstupdate[i];
|
||||||
|
+ tmblits[i].srcrect = &srcupdate[i];
|
||||||
|
+ tmblits[i].dstrect = &dstupdate[i];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -1032,14 +1032,14 @@ void update_screen(int *frame) {
|
||||||
|
|
||||||
|
/* -- First erase everything we need to -- */
|
||||||
|
for (i = 0; i < numupdates; i++)
|
||||||
|
- if (blits[i].type == 'E')
|
||||||
|
- SDL_LowerBlit(blits[i].src, blits[i].srcrect, screen, blits[i].dstrect);
|
||||||
|
+ if (tmblits[i].type == 'E')
|
||||||
|
+ SDL_LowerBlit(tmblits[i].src, tmblits[i].srcrect, screen, tmblits[i].dstrect);
|
||||||
|
// SNOW_erase();
|
||||||
|
|
||||||
|
/* -- then draw -- */
|
||||||
|
for (i = 0; i < numupdates; i++)
|
||||||
|
- if (blits[i].type == 'D')
|
||||||
|
- SDL_BlitSurface(blits[i].src, blits[i].srcrect, screen, blits[i].dstrect);
|
||||||
|
+ if (tmblits[i].type == 'D')
|
||||||
|
+ SDL_BlitSurface(tmblits[i].src, tmblits[i].srcrect, screen, tmblits[i].dstrect);
|
||||||
|
// SNOW_draw();
|
||||||
|
|
||||||
|
/* -- update the screen only where we need to! -- */
|
||||||
|
@@ -1067,7 +1067,7 @@ void add_rect(SDL_Rect* src, SDL_Rect* d
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
- update = &blits[numupdates++];
|
||||||
|
+ update = &tmblits[numupdates++];
|
||||||
|
|
||||||
|
update->srcrect->x = src->x;
|
||||||
|
update->srcrect->y = src->y;
|
|
@ -58,6 +58,9 @@ find -L . \
|
||||||
# Fix .desktop.
|
# Fix .desktop.
|
||||||
sed -i -e '/^##/d' -e '/^X/d' -e 's|Math;||' $PRGNAM.desktop
|
sed -i -e '/^##/d' -e '/^X/d' -e 's|Math;||' $PRGNAM.desktop
|
||||||
|
|
||||||
|
patch -p1 < $CWD/0001-src-menu_lan.c-Remove-unused-duplicate-lan_player_in.patch
|
||||||
|
patch -p1 < $CWD/0002-rename-blits-to-tmblits.patch
|
||||||
|
|
||||||
LDFLAGS="-std=gnu11" \
|
LDFLAGS="-std=gnu11" \
|
||||||
CFLAGS="$SLKCFLAGS -std=gnu11 -fcommon" \
|
CFLAGS="$SLKCFLAGS -std=gnu11 -fcommon" \
|
||||||
CXXFLAGS="$SLKCFLAGS" \
|
CXXFLAGS="$SLKCFLAGS" \
|
||||||
|
|
Loading…
Reference in a new issue