Now using AUDIO_S16SYS, 15bpp graphics. Has room for 512 stamps loaded at once.

This commit is contained in:
William Kendrick 2004-11-22 01:47:04 +00:00
parent c52c1321fc
commit abe6a5637f
2 changed files with 27 additions and 6 deletions

View file

@ -8,6 +8,18 @@ http://www.newbreedsoftware.com/tuxpaint/
2004.November.21 (0.9.15)
* Increased maximum number of stamps that can be loaded at once from
256 to 512.
Albert Cahalan <albert@users.sourceforge.net>
* Switched from using 16bpp display surfaces to 15bpp, to reduce
discoloration. ("#define" options exist at the top of src/tuxpaint.c
to choose which you want.)
Albert Cahalan <albert@users.sourceforge.net>
* Now uses "AUDIO_S16SYS" when initializing audio system (on Linux/Mac/BeOS)
Albert Cahalan <albert@users.sourceforge.net>
* Improved compiler warnings (CLFAGS in Makefile)
Albert Cahalan <albert@users.sourceforge.net>

View file

@ -29,6 +29,12 @@
#define VER_DATE "2004-11-21"
#define VIDEO_BPP 15 // saves memory
//#define VIDEO_BPP 16 // causes discoloration
//#define VIDEO_BPP 24 // compromise
//#define VIDEO_BPP 32 // might be fastest, if conversion funcs removed
/* #define DEBUG */
/* #define LOW_QUALITY_THUMBNAILS */
/* #define LOW_QUALITY_COLOR_SELECTOR */
@ -518,9 +524,10 @@ SDL_Surface * img_title_on, * img_title_off,
SDL_Surface * img_title_names[NUM_TITLES];
SDL_Surface * img_tools[NUM_TOOLS], * img_tool_names[NUM_TOOLS];
#define MAX_STAMPS 256
#define MAX_STAMPS 512
#define MAX_BRUSHES 64
#define MAX_FONTS 64
int num_brushes, num_stamps;
SDL_Surface * img_brushes[MAX_BRUSHES];
SDL_Surface * img_stamps[MAX_STAMPS];
@ -5019,7 +5026,7 @@ void setup(int argc, char * argv[])
else
{
#ifndef WIN32
if (Mix_OpenAudio(44100, AUDIO_S16, 2, 1024) < 0)
if (Mix_OpenAudio(44100, AUDIO_S16SYS, 2, 1024) < 0)
#else
if (Mix_OpenAudio(44100, AUDIO_S16, 2, 2048) < 0)
#endif
@ -5065,10 +5072,10 @@ void setup(int argc, char * argv[])
{
#ifdef USE_HWSURFACE
screen = SDL_SetVideoMode(WINDOW_WIDTH, WINDOW_HEIGHT,
16, SDL_FULLSCREEN | SDL_HWSURFACE);
VIDEO_BPP, SDL_FULLSCREEN | SDL_HWSURFACE);
#else
screen = SDL_SetVideoMode(WINDOW_WIDTH, WINDOW_HEIGHT,
16, SDL_FULLSCREEN | SDL_SWSURFACE);
VIDEO_BPP, SDL_FULLSCREEN | SDL_SWSURFACE);
#endif
if (screen == NULL)
@ -5086,9 +5093,11 @@ void setup(int argc, char * argv[])
if (!fullscreen)
{
#ifdef USE_HWSURFACE
screen = SDL_SetVideoMode(WINDOW_WIDTH, WINDOW_HEIGHT, 16, SDL_HWSURFACE);
screen = SDL_SetVideoMode(WINDOW_WIDTH, WINDOW_HEIGHT,
VIDEO_BPP, SDL_HWSURFACE);
#else
screen = SDL_SetVideoMode(WINDOW_WIDTH, WINDOW_HEIGHT, 16, SDL_SWSURFACE);
screen = SDL_SetVideoMode(WINDOW_WIDTH, WINDOW_HEIGHT,
VIDEO_BPP, SDL_SWSURFACE);
#endif
}