Hello community,
here is the log from the commit of package SDL_bgi for openSUSE:Factory checked in at 2018-09-11 17:21:08
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/SDL_bgi (Old)
and /work/SRC/openSUSE:Factory/.SDL_bgi.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "SDL_bgi"
Tue Sep 11 17:21:08 2018 rev:12 rq:634949 version:2.2.2
Changes:
--------
--- /work/SRC/openSUSE:Factory/SDL_bgi/SDL_bgi.changes 2018-08-18 00:03:01.822883122 +0200
+++ /work/SRC/openSUSE:Factory/.SDL_bgi.new/SDL_bgi.changes 2018-09-11 17:21:09.499055602 +0200
@@ -1,0 +2,7 @@
+Tue Sep 11 11:11:35 UTC 2018 - Jan Engelhardt
+
+- Update to new upstream release 2.2.2
+ * The constants TMP_FG_COL, TMP_BG_COL, and TMP_FILL_COL
+ were added.
+
+-------------------------------------------------------------------
Old:
----
SDL_bgi-2.2.1.tar.gz
New:
----
SDL_bgi-2.2.2.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ SDL_bgi.spec ++++++
--- /var/tmp/diff_new_pack.UaLoKt/_old 2018-09-11 17:21:10.439054168 +0200
+++ /var/tmp/diff_new_pack.UaLoKt/_new 2018-09-11 17:21:10.443054162 +0200
@@ -18,7 +18,7 @@
Name: SDL_bgi
%define lname libSDL_bgi2
-Version: 2.2.1
+Version: 2.2.2
Release: 0
Summary: BGI-compatible 2D graphics C library with SDL backend
License: Zlib AND GPL-2.0-or-later
++++++ SDL_bgi-2.2.1.tar.gz -> SDL_bgi-2.2.2.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/SDL_bgi-2.2.1/CMakeLists.txt new/SDL_bgi-2.2.2/CMakeLists.txt
--- old/SDL_bgi-2.2.1/CMakeLists.txt 2018-07-26 12:06:47.000000000 +0200
+++ new/SDL_bgi-2.2.2/CMakeLists.txt 2018-09-11 00:09:43.000000000 +0200
@@ -5,7 +5,7 @@
cmake_minimum_required (VERSION 3.5.0)
-set (SDL_BGI_VERSION 2.2.1)
+set (SDL_BGI_VERSION 2.2.2)
# Project name
project (SDL_bgi VERSION ${SDL_BGI_VERSION} LANGUAGES C)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/SDL_bgi-2.2.1/ChangeLog new/SDL_bgi-2.2.2/ChangeLog
--- old/SDL_bgi-2.2.1/ChangeLog 2018-08-10 08:36:13.000000000 +0200
+++ new/SDL_bgi-2.2.2/ChangeLog 2018-09-11 00:00:33.000000000 +0200
@@ -1,6 +1,10 @@
Changelog
---------
+v. 2.2.2, 2018-09-10
+- documentation updates (clarification on colours)
+- constants TMP_FG_COL, TMP_BG_COL, and TMP_FILL_COL added
+
v. 2.2.1, 2018-08-08
- renamed getch() to bgi_getch() and added the macro getch()
to avoid Mingw bug
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/SDL_bgi-2.2.1/VERSION new/SDL_bgi-2.2.2/VERSION
--- old/SDL_bgi-2.2.1/VERSION 2018-07-26 12:06:47.000000000 +0200
+++ new/SDL_bgi-2.2.2/VERSION 2018-09-10 11:37:19.000000000 +0200
@@ -1 +1 @@
-2.2.1
+2.2.2
Binary files old/SDL_bgi-2.2.1/doc/functions.pdf and new/SDL_bgi-2.2.2/doc/functions.pdf differ
Binary files old/SDL_bgi-2.2.1/doc/sdl_bgi-quickref.pdf and new/SDL_bgi-2.2.2/doc/sdl_bgi-quickref.pdf differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/SDL_bgi-2.2.1/doc/sdl_bgi-quickref.tex new/SDL_bgi-2.2.2/doc/sdl_bgi-quickref.tex
--- old/SDL_bgi-2.2.1/doc/sdl_bgi-quickref.tex 2018-08-08 11:48:38.000000000 +0200
+++ new/SDL_bgi-2.2.2/doc/sdl_bgi-quickref.tex 2018-09-10 00:00:09.000000000 +0200
@@ -1,7 +1,7 @@
% sdl_bgi-quickref.tex
%
% Guido Gonzato, PhD
-% August 8, 2018
+% September 11, 2018
\documentclass[a4paper,11pt]{article}
\usepackage{graphicx}
@@ -18,7 +18,7 @@
\newcommand{\SDLbgi}{\texttt{SDL\_bgi}}
-\newcommand{\version}{2.2.1} % !!! <<<=== Change here !!!
+\newcommand{\version}{2.2.2} % !!! <<<=== Change here !!!
\newcommand{\V}{\texttt{void}} % void
\newcommand{\I}{\texttt{int}} % int
@@ -131,7 +131,7 @@
#ifndef _SDL_BGI_H
#define _SDL_BGI_H
-#define SDL_BGI_VERSION 2.2.1
+#define SDL_BGI_VERSION 2.2.2
#define NOPE 0
#define YEAH 1
@@ -198,6 +198,12 @@
#define YELLOW 14
#define WHITE 15
+// temporary colours
+
+#define TMP_FG_COL 16
+#define TMP_BG_COL 17
+#define TMP_FILL_COL 18
+
// line style, thickness, and drawing mode
#define NORM_WIDTH 1
@@ -385,6 +391,21 @@
% -----
+\section{Colours}
+
+The default BGI palette includes 16 named colours (\T{BLACK}{\ldots}
+\T{WHITE}); functions \func{setbkcolor()}, \func{setcolor()},
+\func{getbkcolor()}, and \func{getcolor()} use this palette.
+
+An extended RGB palette of `PALETTE\_SIZE` additional colours can be
+created and accessed using the functions described below.
+
+Constants \T{TMP\_FG\_COL}, \T{TMP\_BG\_COL}, and \T{TMP\_FILL\_COL}
+denote the temporary foreground, background, and fill RGB colours that
+can be set up with the \func{COLOR()} function described below.
+
+% -----
+
\section{Note for SDL2 Programmers}
The following variables, declared in \F{SDL\_bgi.h}, are accessible to
@@ -460,9 +481,9 @@
Draws a three-dimensional, filled-in rectangle (bar), using the
current fill colour and fill pattern. The three-dimensional outline of
-the bar is drawn in the current line style and color. The bar's depth,
-in pixels, is given by \A{depth}. If \A{topflag} is nonzero, a top is
-put on.
+the bar is drawn in the current line style and colour. The bar's
+depth, in pixels, is given by \A{depth}. If \A{topflag} is nonzero, a
+top is put on.
% -----
@@ -483,7 +504,7 @@
\end{bgi}
Clears the graphics screen, filling it with the current background
-color. The CP is moved to (0, 0).
+colour. The CP is moved to (0, 0).
% -----
@@ -491,8 +512,8 @@
\V{} \func{clearviewport} (\V{});
\end{bgi}
-Clears the viewport, filling it with the current background color. The
-drawing CP is moved to (0, 0), relative to the viewport.
+Clears the viewport, filling it with the current background colour.
+The drawing CP is moved to (0, 0), relative to the viewport.
% -----
@@ -541,7 +562,7 @@
Draws an ellipse centered at (\A{x}, \A{y}), with axes given by
\A{xradius} and \A{yradius}, and fills it using the current fill
-color and fill pattern.
+colour and fill pattern.
% -----
@@ -550,7 +571,7 @@
\end{bgi}
Draws a polygon of \A{numpoints} vertices and fills it using the
-current fill color.
+current fill colour.
% -----
@@ -559,8 +580,8 @@
\end{bgi}
Fills an enclosed area, containing the \A{x} and \A{y} points bounded
-by the \A{border} color. The area is filled using the current fill
-color.
+by the \A{border} colour. The area is filled using the current fill
+colour.
% -----
@@ -594,7 +615,7 @@
\I{} \func{getbkcolor} (\V{});
\end{bgi}
-Returns the current background color.
+Returns the current background colour.
% -----
@@ -602,7 +623,7 @@
\I{} \func{getcolor} (\V{});
\end{bgi}
-Returns the current drawing (foreground) color.
+Returns the current drawing (foreground) colour.
% -----
@@ -647,7 +668,7 @@
Fills the \texttt{fillsettingstype} structure pointed to by
\A{fillinfo} with information about the current fill pattern and fill
-color.
+colour.
% -----
@@ -683,8 +704,8 @@
\I{} \func{getmaxcolor} (\V{});
\end{bgi}
-Returns the maximum color value available (\T{MAXCOLORS}). If RGB
-colors are being used, it returns \T{PALETTE\_SIZE}.
+Returns the maximum colour value available (\T{MAXCOLORS}). If RGB
+colours are being used, it returns \T{PALETTE\_SIZE}.
% -----
@@ -737,7 +758,7 @@
\end{bgi}
Fills the \texttt{palettetype} structure pointed by \A{palette} with
-information about the current palette's size and colors.
+information about the current palette's size and colours.
% -----
@@ -754,7 +775,7 @@
\I{} \func{getpixel} (\I{} \A{x}, \I{} \A{y});
\end{bgi}
-Returns the color of the pixel located at (\A{x}, \A{y}).
+Returns the colour of the pixel located at (\A{x}, \A{y}).
% -----
@@ -808,7 +829,7 @@
Resets all graphics settings to their defaults: sets the viewport to
the entire screen, moves the CP to (0, 0), sets the default palette
-colors, the default drawing and background color, the default fill
+colours, the default drawing and background colour, the default fill
style and pattern, the default text font and justification.
% -----
@@ -965,7 +986,7 @@
\V{} \func{putpixel} (\I{} \A{x}, \I{} \A{y}, \I{} \A{color});
\end{bgi}
-Plots a point at (\A{x},\A{y}) in the color defined by \A{color}.
+Plots a point at (\A{x},\A{y}) in the colour defined by \A{color}.
% -----
@@ -980,14 +1001,6 @@
% -----
\begin{bgi}
-\V{} \func{refresh} (\V{});
-\end{bgi}
-
-Updates the screen.
-
-% -----
-
-\begin{bgi}
\I{} \func{registerbgidriver} (\V{} (\A{*driver})(\V{}));
\end{bgi}
@@ -1052,7 +1065,7 @@
\V{} \func{setbkcolor} (\I{} \A{color});
\end{bgi}
-Sets the current background color using the default palette.
+Sets the current background colour using the default palette.
% -----
@@ -1060,7 +1073,7 @@
\V{} \func{setcolor} (\I{} \A{color});
\end{bgi}
-Sets the current drawing color using the default palette.
+Sets the current drawing colour using the default palette.
% -----
@@ -1086,7 +1099,7 @@
\V{} \func{setfillstyle} (\I{} \A{upattern}, \I{} \A{color});
\end{bgi}
-Sets the fill pattern and fill color. \A{upattern} is a pointer to a
+Sets the fill pattern and fill colour. \A{upattern} is a pointer to a
sequence of 8 bytes, with each byte corresponding to 8 pixels in the
pattern.
@@ -1264,7 +1277,8 @@
\I{} \func{ALPHA\_VALUE} (\I{} \A{color})
\end{bgi}
-Returns the alpha (transparency) component of an RGB color.
+Returns the alpha (transparency) component of an RGB colour in the
+extended palette.
% -----
@@ -1273,7 +1287,7 @@
\I{} \func{BLUE\_VALUE} (\I{} \A{color})
\end{bgi}
-Returns the blue component of an RGB color.
+Returns the blue component of an RGB colour in the extended palette.
% -----
@@ -1281,8 +1295,14 @@
\I{} \func{COLOR} (\I{} \A{r}, \I{} \A{g}, \I{} \A{b});
\end{bgi}
-Can be used as an argument for \func{setcolor()} and
-\func{setbkcolor()} to set an RBG color.
+Can be used as an argument for \func{setcolor()}, \func{setbkcolor()},
+and \func{setfillstyle()} to set an RBG colour. Temporary colours are
+\T{TMP\_FG\_COL}, \T{TMP\_BG\_COL}, and \T{TMP\_FILL\_COL},
+respectively.
+
+Functions \func{ALPHA\_VALUE}, \func{BLUE\_VALUE},
+\func{GREEN\_VALUE}, and \func{RED\_VALUE} do not work on temporary
+colours.
% -----
@@ -1290,7 +1310,7 @@
\I{} \func{GREEN\_VALUE} (\I{} \A{color})
\end{bgi}
-Returns the green component of an RGB color.
+Returns the green component of an RGB colour in the extended palette.
% -----
@@ -1298,8 +1318,9 @@
\I{} \func{IS\_BGI\_COLOR} (\I{} \A{color});
\end{bgi}
-Returns 1 if the current drawing color is a standard BGI color (that
-is, not RGB). The argument is actually redundant.
+Returns 1 if the \emph{current} drawing colour is a standard BGI
+colour (that is, not RGB). The \A{color} argument is actually
+redundant.
% -----
@@ -1307,8 +1328,8 @@
\I{} \func{IS\_RGB\_COLOR} (\I{} \A{color});
\end{bgi}
-Returns 1 if the current drawing color is RGB. The argument is
-actually redundant.
+Returns 1 if the \emph{current} drawing colour is RGB. The \A{color}
+argument is actually redundant.
% -----
@@ -1316,7 +1337,7 @@
\I{} \func{RED\_VALUE} (\I{} \A{color})
\end{bgi}
-Returns the red component of an RGB color.
+Returns the red component of an RGB colour in the extended palette.
% -----
@@ -1437,7 +1458,7 @@
\V{} \func{\_putpixel} (\I{} \A{x}, \I{} \A{y});
\end{bgi}
-Plots a point at (\A{x},\A{y}) using the current drawing color. This
+Plots a point at (\A{x},\A{y}) using the current drawing colour. This
function may be faster than \func{putpixel()}.
% -----
@@ -1492,8 +1513,8 @@
\V{} \func{setbkrgbcolor} (\I{} \A{n});
\end{bgi}
-Sets the current background color using using the \A{n}-th color index
-in the RGB palette.
+Sets the current background colour using using the \A{n}-th colour
+index in the RGB palette.
% -----
\begin{bgi}
@@ -1508,7 +1529,7 @@
\V{} \func{setrgbcolor} (\I{} \A{n});
\end{bgi}
-Sets the current drawing color using the \A{n}-th color index in the
+Sets the current drawing colour using the \A{n}-th colour index in the
RGB palette.
% -----
@@ -1521,7 +1542,7 @@
\A{g}, and \A{b} components.
Using \func{setrgbpalette()} and \func{setrgbcolor()} is faster than
-setting colors with \func{setcolor()} with a \func{COLOR()} argument.
+setting colours with \func{setcolor()} with a \func{COLOR()} argument.
% -----
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/SDL_bgi-2.2.1/doc/using.md new/SDL_bgi-2.2.2/doc/using.md
--- old/SDL_bgi-2.2.1/doc/using.md 2018-08-08 11:46:17.000000000 +0200
+++ new/SDL_bgi-2.2.2/doc/using.md 2018-09-11 00:07:27.000000000 +0200
@@ -171,6 +171,17 @@
consider using `SDL_ttf`!
+Colours
+-------
+
+The default BGI palette includes 16 named colours (`BLACK`...`WHITE`);
+standard BGI functions use this palette.
+
+An extended ARGB palette of `PALETTE_SIZE` additional colours can
+be created and accessed using functions described below. Please see
+the example programs in the `test/` directory.
+
+
Additions
---------
@@ -201,16 +212,18 @@
`col` is an allocated colour entry in the RGB palette.
- `COLOR(int r, int g, int b)` can be used as an argument whenever a
-colour value is expected (e.g. `setcolor(int col)` and other
+colour value is expected (e.g. `setcolor()` and other
functions). It's an alternative to `setrgbcolor(int col)` and
`setbkrgbcolor(int col)`. Allocating colours with `setrgbpalette()`
and using `setrgbcolor()` is much faster, though.
- `IS_BGI_COLOR(int c)` and `IS_RGB_COLOR(int c)` return 1 if the
-current colour is standard BGI or RGB, respectively.
+current colour is standard BGI or RGB, respectively. The argument is
+actually redundant.
- `ALPHA_VALUE(int c)`, `RED_VALUE(int c)`, `GREEN_VALUE(int c)`,
-and `BLUE_VALUE(int c)` return the A, R, G, B component of an RGB colour.
+and `BLUE_VALUE(int c)` return the A, R, G, B component of an RGB
+colour in the extended palette.
- `setalpha(int col, Uint8 alpha)` sets the alpha component of colour
'col'.
Binary files old/SDL_bgi-2.2.1/doc/using.pdf and new/SDL_bgi-2.2.2/doc/using.pdf differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/SDL_bgi-2.2.1/sdl_bgi.spec new/SDL_bgi-2.2.2/sdl_bgi.spec
--- old/SDL_bgi-2.2.1/sdl_bgi.spec 2018-07-30 07:54:12.000000000 +0200
+++ new/SDL_bgi-2.2.2/sdl_bgi.spec 2018-09-11 00:09:28.000000000 +0200
@@ -4,7 +4,7 @@
Summary: BGI-compatible 2D graphics C library
Name: SDL_bgi
-Version: 2.2.1
+Version: 2.2.2
Release: 1
License: ZLib
Group: Libraries
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/SDL_bgi-2.2.1/src/SDL_bgi.c new/SDL_bgi-2.2.2/src/SDL_bgi.c
--- old/SDL_bgi-2.2.1/src/SDL_bgi.c 2018-08-09 11:04:44.000000000 +0200
+++ new/SDL_bgi-2.2.2/src/SDL_bgi.c 2018-09-11 11:43:13.000000000 +0200
@@ -5,7 +5,7 @@
// and for teaching.
//
// By Guido Gonzato, PhD
-// August 9, 2018
+// September 10, 2018
/*
@@ -1971,6 +1971,15 @@
// -----
+int IS_RGB_COLOR (int color)
+{
+ // Returns 1 if the current color is a standard BGI color
+ // (not ARGB); the color argument is redundant
+ return bgi_argb_mode;
+} // IS_RGB_COLOR ()
+
+// -----
+
int kbhit (void)
{
// Returns 1 when a key is pressed, or QUIT
@@ -2934,7 +2943,7 @@
// COLOR () set up the BGI_COLORS + 1 color
if (-1 == color) {
bgi_argb_mode = YEAH;
- tmpcolor = WHITE + 1;
+ tmpcolor = TMP_FG_COL;
palette[tmpcolor] = bgi_tmp_color_argb;
}
else {
@@ -3237,7 +3246,7 @@
// COLOR () set up the BGI_COLORS + 1 color
if (-1 == col) {
bgi_argb_mode = YEAH;
- bgi_fg_color = WHITE + 1;
+ bgi_fg_color = TMP_FG_COL;
palette[bgi_fg_color] = bgi_tmp_color_argb;
}
else {
@@ -3305,10 +3314,10 @@
bgi_fill_style.pattern = pattern;
- // COLOR () set up the BGI_COLORS + 3 color
+ // COLOR () set up the temporary fill colour
if (-1 == color) {
bgi_argb_mode = YEAH;
- bgi_fill_color = BGI_COLORS + 3;
+ bgi_fill_color = TMP_FILL_COL - 1;
palette[bgi_fill_color] = bgi_tmp_color_argb;
bgi_fill_style.color = bgi_fill_color;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/SDL_bgi-2.2.1/src/SDL_bgi.h new/SDL_bgi-2.2.2/src/SDL_bgi.h
--- old/SDL_bgi-2.2.1/src/SDL_bgi.h 2018-08-10 08:33:48.000000000 +0200
+++ new/SDL_bgi-2.2.2/src/SDL_bgi.h 2018-09-11 07:56:01.000000000 +0200
@@ -3,7 +3,7 @@
// A BGI (Borland Graphics Library) implementation based on SDL2.
// Easy to use, pretty fast, and useful for porting old programs.
// Guido Gonzato, PhD
-// August 8, 2018
+// September 10, 2018
/*
This software is provided 'as-is', without any express or implied
@@ -40,7 +40,7 @@
#ifndef _SDL_BGI_H
#define _SDL_BGI_H
-#define SDL_BGI_VERSION 2.2.1
+#define SDL_BGI_VERSION 2.2.2
#define NOPE 0
#define YEAH 1
@@ -106,6 +106,12 @@
#define YELLOW 14
#define WHITE 15
+// temporary colours
+
+#define TMP_FG_COL 16
+#define TMP_BG_COL 17
+#define TMP_FILL_COL 18
+
// line style, thickness, and drawing mode
#define NORM_WIDTH 1
++++++ sdlbgi-automake.diff ++++++
--- /var/tmp/diff_new_pack.UaLoKt/_old 2018-09-11 17:21:10.575053961 +0200
+++ /var/tmp/diff_new_pack.UaLoKt/_new 2018-09-11 17:21:10.575053961 +0200
@@ -12,19 +12,19 @@
test/Makefile.am | 11 +++++++++++
4 files changed, 30 insertions(+)
-Index: SDL_bgi-2.0.6/Makefile.am
+Index: SDL_bgi-2.2.2/Makefile.am
===================================================================
--- /dev/null
-+++ SDL_bgi-2.0.6/Makefile.am
++++ SDL_bgi-2.2.2/Makefile.am
@@ -0,0 +1,2 @@
+ACLOCAL_AMFLAGS = -I m4
+SUBDIRS = src test
-Index: SDL_bgi-2.0.6/configure.ac
+Index: SDL_bgi-2.2.2/configure.ac
===================================================================
--- /dev/null
-+++ SDL_bgi-2.0.6/configure.ac
++++ SDL_bgi-2.2.2/configure.ac
@@ -0,0 +1,9 @@
-+AC_INIT([SDL_bgi], [2.2.1])
++AC_INIT([SDL_bgi], [2.2.2])
+AC_CONFIG_AUX_DIR([build-aux])
+AC_CONFIG_MACRO_DIR([m4])
+AC_PROG_CC
@@ -33,10 +33,10 @@
+PKG_CHECK_MODULES([sdl2], [sdl2])
+AC_CONFIG_FILES([Makefile src/Makefile test/Makefile])
+AC_OUTPUT
-Index: SDL_bgi-2.0.6/src/Makefile.am
+Index: SDL_bgi-2.2.2/src/Makefile.am
===================================================================
--- /dev/null
-+++ SDL_bgi-2.0.6/src/Makefile.am
++++ SDL_bgi-2.2.2/src/Makefile.am
@@ -0,0 +1,8 @@
+AM_CPPFLAGS = ${sdl2_CFLAGS}
+AM_CFLAGS = -Wall
@@ -46,10 +46,10 @@
+libSDL_bgi_la_LDFLAGS = -no-undefined -version-info 2:0:0
+pkgincludedir = ${includedir}/SDL2
+pkginclude_HEADERS = SDL_bgi.h
-Index: SDL_bgi-2.0.6/test/Makefile.am
+Index: SDL_bgi-2.2.2/test/Makefile.am
===================================================================
--- /dev/null
-+++ SDL_bgi-2.0.6/test/Makefile.am
++++ SDL_bgi-2.2.2/test/Makefile.am
@@ -0,0 +1,11 @@
+AM_CPPFLAGS = -I${top_srcdir}/src
+AM_CFLAGS = -Wall