Added 16x16 mouse pointer (cursor) shapes. (Useful for Mac OS X.)

This commit is contained in:
William Kendrick 2004-09-29 06:06:11 +00:00
parent aec0dcc442
commit 3e8f9a7a90
25 changed files with 195 additions and 45 deletions

View file

@ -6,7 +6,7 @@
# bill@newbreedsoftware.com
# http://www.newbreedsoftware.com/tuxpaint/
# June 14, 2002 - September 14, 2004
# June 14, 2002 - September 28, 2004
# Where to install things:
@ -65,6 +65,15 @@ LOCALE_PREFIX=$(PREFIX)/share/locale/
NOSOUNDFLAG=__SOUND
# Where to find cursor shape XBMs
MOUSEDIR=mouse
CURSOR_SHAPES=LARGE
# MOUSEDIR=mouse/16x16
# CURSOR_SHAPES=SMALL
# Don't build with hqxx code yet...
# HQXX_O = obj/hqxx.o obj/hq4x.o
# HQXX_H = src/hqxx.h src/hq4x.h
@ -79,7 +88,7 @@ SDL_CFLAGS=$(shell sdl-config --cflags)
# The entire set of CFLAGS:
CFLAGS=-O2 -Wall
CFLAGS=-O2 -Wall -Isrc/$(MOUSEDIR) -D$(CURSOR_SHAPES)_CURSOR_SHAPES
DEFS=-DDATA_PREFIX=\"$(DATA_PREFIX)\" \
-D$(NOSOUNDFLAG) -DDOC_PREFIX=\"$(DOC_PREFIX)\" \
-DLOCALEDIR=\"$(LOCALE_PREFIX)\" -DCONFDIR=\"$(CONFDIR)\"
@ -703,17 +712,19 @@ obj/tuxpaint.o: src/tuxpaint.c obj \
src/tools.h src/titles.h src/colors.h src/shapes.h \
src/magic.h src/sounds.h src/tip_tux.h src/great.h \
$(HQXX_H) \
src/mouse/arrow.xbm src/mouse/arrow-mask.xbm \
src/mouse/hand.xbm src/mouse/hand-mask.xbm \
src/mouse/insertion.xbm src/mouse/insertion-mask.xbm \
src/mouse/wand.xbm src/mouse/wand-mask.xbm \
src/mouse/brush.xbm src/mouse/brush-mask.xbm \
src/mouse/crosshair.xbm src/mouse/crosshair-mask.xbm \
src/mouse/rotate.xbm src/mouse/rotate-mask.xbm \
src/mouse/tiny.xbm src/mouse/tiny-mask.xbm \
src/mouse/watch.xbm src/mouse/watch-mask.xbm \
src/mouse/up.xbm src/mouse/up-mask.xbm \
src/mouse/down.xbm src/mouse/down-mask.xbm \
src/$(MOUSEDIR)/arrow.xbm src/$(MOUSEDIR)/arrow-mask.xbm \
src/$(MOUSEDIR)/hand.xbm src/$(MOUSEDIR)/hand-mask.xbm \
src/$(MOUSEDIR)/insertion.xbm \
src/$(MOUSEDIR)/insertion-mask.xbm \
src/$(MOUSEDIR)/wand.xbm src/$(MOUSEDIR)/wand-mask.xbm \
src/$(MOUSEDIR)/brush.xbm src/$(MOUSEDIR)/brush-mask.xbm \
src/$(MOUSEDIR)/crosshair.xbm \
src/$(MOUSEDIR)/crosshair-mask.xbm \
src/$(MOUSEDIR)/rotate.xbm src/$(MOUSEDIR)/rotate-mask.xbm \
src/$(MOUSEDIR)/tiny.xbm src/$(MOUSEDIR)/tiny-mask.xbm \
src/$(MOUSEDIR)/watch.xbm src/$(MOUSEDIR)/watch-mask.xbm \
src/$(MOUSEDIR)/up.xbm src/$(MOUSEDIR)/up-mask.xbm \
src/$(MOUSEDIR)/down.xbm src/$(MOUSEDIR)/down-mask.xbm \
$(ARCH_HEADERS)
@echo
@echo "...Compiling Tux Paint from source..."

View file

@ -241,6 +241,10 @@ http://www.newbreedsoftware.com/tuxpaint/
Karl Ove Hufthammer <karl@huftis.org>
* Made sure KDE icon directories exist before trying to copy files to them.
* Created 16x16 mouse pointer shapes; use "MOUSEDIR" and "CURSOR_SHAPES"
Makefile variables to use them.
* Application icon updates:
-------------------------

View file

@ -0,0 +1,6 @@
#define arrow_mask_width 16
#define arrow_mask_height 16
static unsigned char arrow_mask_bits[] = {
0x03, 0x00, 0x07, 0x00, 0x0f, 0x00, 0x1f, 0x00, 0x3f, 0x00, 0x7f, 0x00,
0xff, 0x00, 0xff, 0x00, 0x3f, 0x00, 0x3b, 0x00, 0x71, 0x00, 0x70, 0x00,
0xe0, 0x00, 0xe0, 0x00, 0xe0, 0x00, 0x00, 0x00 };

View file

@ -0,0 +1,6 @@
#define arrow_width 16
#define arrow_height 16
static unsigned char arrow_bits[] = {
0x01, 0x00, 0x03, 0x00, 0x07, 0x00, 0x0f, 0x00, 0x1f, 0x00, 0x3f, 0x00,
0x7f, 0x00, 0x3f, 0x00, 0x1f, 0x00, 0x33, 0x00, 0x31, 0x00, 0x60, 0x00,
0x60, 0x00, 0xe0, 0x00, 0x40, 0x00, 0x00, 0x00 };

View file

@ -0,0 +1,6 @@
#define brush_mask_width 16
#define brush_mask_height 16
static unsigned char brush_mask_bits[] = {
0x00, 0x10, 0x00, 0x38, 0x00, 0x7c, 0x00, 0x7e, 0x00, 0x3e, 0x00, 0x1f,
0x80, 0x0f, 0x80, 0x0f, 0xc0, 0x07, 0xe0, 0x03, 0xf0, 0x01, 0xf0, 0x01,
0xfc, 0x01, 0xfe, 0x00, 0x7c, 0x00, 0x38, 0x00 };

View file

@ -0,0 +1,6 @@
#define brush_width 16
#define brush_height 16
static unsigned char brush_bits[] = {
0x00, 0x00, 0x00, 0x10, 0x00, 0x28, 0x00, 0x24, 0x00, 0x14, 0x00, 0x0a,
0x00, 0x05, 0x00, 0x05, 0x80, 0x02, 0xc0, 0x01, 0xa0, 0x00, 0xa0, 0x00,
0x90, 0x00, 0x4c, 0x00, 0x38, 0x00, 0x00, 0x00 };

View file

@ -0,0 +1,6 @@
#define crosshair_mask_width 16
#define crosshair_mask_height 16
static unsigned char crosshair_mask_bits[] = {
0x80, 0x00, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0x80, 0x00,
0x1e, 0x3c, 0x3f, 0x7e, 0x1e, 0x3c, 0x80, 0x00, 0xc0, 0x01, 0xc0, 0x01,
0xc0, 0x01, 0xc0, 0x01, 0x80, 0x00, 0x00, 0x00 };

View file

@ -0,0 +1,6 @@
#define crosshair_width 16
#define crosshair_height 16
static unsigned char crosshair_bits[] = {
0x00, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00,
0x00, 0x00, 0x3e, 0x3e, 0x00, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00,
0x80, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00 };

View file

@ -0,0 +1,6 @@
#define down_mask_width 16
#define down_mask_height 16
static unsigned char down_mask_bits[] = {
0xe0, 0x03, 0xe0, 0x03, 0xe0, 0x03, 0xe0, 0x03, 0xe0, 0x03, 0xe0, 0x03,
0xe0, 0x03, 0xe0, 0x03, 0xe0, 0x03, 0xe0, 0x03, 0xfc, 0x1f, 0xf8, 0x0f,
0xf0, 0x07, 0xe0, 0x03, 0xc0, 0x01, 0x80, 0x00 };

6
src/mouse/16x16/down.xbm Normal file
View file

@ -0,0 +1,6 @@
#define down_width 16
#define down_height 16
static unsigned char down_bits[] = {
0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01,
0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0xf8, 0x0f, 0xf0, 0x07,
0xe0, 0x03, 0xc0, 0x01, 0x80, 0x00, 0x00, 0x00 };

View file

@ -0,0 +1,6 @@
#define hand_mask_width 16
#define hand_mask_height 16
static unsigned char hand_mask_bits[] = {
0x40, 0x00, 0xe0, 0x00, 0xf0, 0x01, 0xf0, 0x01, 0xf0, 0x05, 0xf0, 0x1f,
0xf4, 0x3f, 0xfe, 0x7f, 0xff, 0x7f, 0xff, 0x7f, 0xff, 0x7f, 0xfe, 0x3f,
0xfc, 0x3f, 0xf8, 0x3f, 0xf0, 0x1f, 0xe0, 0x0f };

6
src/mouse/16x16/hand.xbm Normal file
View file

@ -0,0 +1,6 @@
#define hand_width 16
#define hand_height 16
static unsigned char hand_bits[] = {
0x00, 0x00, 0x40, 0x00, 0xa0, 0x00, 0xa0, 0x00, 0xa0, 0x00, 0xa0, 0x05,
0xa0, 0x1a, 0xa4, 0x2a, 0x2a, 0x20, 0x12, 0x20, 0x02, 0x20, 0x04, 0x10,
0x08, 0x10, 0x10, 0x10, 0xe0, 0x0f, 0x00, 0x00 };

View file

@ -0,0 +1,5 @@
#define insertion_mask_width 8
#define insertion_mask_height 16
static unsigned char insertion_mask_bits[] = {
0x36, 0x7f, 0x3e, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c,
0x1c, 0x3e, 0x7f, 0x36 };

View file

@ -0,0 +1,5 @@
#define insertion_width 8
#define insertion_height 16
static unsigned char insertion_bits[] = {
0x00, 0x36, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08,
0x08, 0x08, 0x36, 0x00 };

View file

@ -0,0 +1,6 @@
#define rotate_mask_width 16
#define rotate_mask_height 16
static unsigned char rotate_mask_bits[] = {
0xc0, 0x01, 0xf0, 0x07, 0xf8, 0x0f, 0x3c, 0x1e, 0x0e, 0x38, 0x0e, 0x38,
0x07, 0xf8, 0x07, 0xfc, 0x07, 0xf8, 0x07, 0x70, 0x0e, 0x20, 0x0e, 0x00,
0x3c, 0x00, 0xf8, 0x00, 0xf0, 0x01, 0xc0, 0x00 };

View file

@ -0,0 +1,6 @@
#define rotate_width 16
#define rotate_height 16
static unsigned char rotate_bits[] = {
0x00, 0x00, 0xc0, 0x01, 0x30, 0x06, 0x08, 0x08, 0x04, 0x10, 0x04, 0x10,
0x02, 0x20, 0x02, 0xa8, 0x02, 0x70, 0x02, 0x20, 0x04, 0x00, 0x04, 0x00,
0x08, 0x00, 0x30, 0x00, 0xc0, 0x00, 0x00, 0x00 };

View file

@ -0,0 +1,5 @@
/* Created with The GIMP */
#define tiny_mask_width 7
#define tiny_mask_height 7
static unsigned char tiny_mask_bits[] = {
0x00, 0x08, 0x08, 0x3e, 0x08, 0x08, 0x00 };

5
src/mouse/16x16/tiny.xbm Normal file
View file

@ -0,0 +1,5 @@
/* Created with The GIMP */
#define tiny_width 7
#define tiny_height 7
static unsigned char tiny_bits[] = {
0x00, 0x08, 0x08, 0x3e, 0x08, 0x08, 0x00 };

View file

@ -0,0 +1,6 @@
#define up_mask_width 16
#define up_mask_height 16
static unsigned char up_mask_bits[] = {
0x80, 0x00, 0xc0, 0x01, 0xe0, 0x03, 0xf0, 0x07, 0xf8, 0x0f, 0xf8, 0x0f,
0xe0, 0x03, 0xe0, 0x03, 0xe0, 0x03, 0xe0, 0x03, 0xe0, 0x03, 0xe0, 0x03,
0xe0, 0x03, 0xe0, 0x03, 0xe0, 0x03, 0xc0, 0x01 };

6
src/mouse/16x16/up.xbm Normal file
View file

@ -0,0 +1,6 @@
#define up_width 16
#define up_height 16
static unsigned char up_bits[] = {
0x80, 0x00, 0xc0, 0x01, 0xe0, 0x03, 0xf0, 0x07, 0xf8, 0x0f, 0xc0, 0x01,
0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01,
0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0x00, 0x00 };

View file

@ -0,0 +1,6 @@
#define wand_mask_width 16
#define wand_mask_height 16
static unsigned char wand_mask_bits[] = {
0x24, 0x00, 0x0d, 0x00, 0x1e, 0x00, 0x3e, 0x00, 0x7c, 0x00, 0xf9, 0x00,
0xf0, 0x01, 0xe0, 0x03, 0xc0, 0x07, 0x80, 0x0f, 0x00, 0x1f, 0x00, 0x3e,
0x00, 0x7c, 0x00, 0x78, 0x00, 0x30, 0x00, 0x00 };

6
src/mouse/16x16/wand.xbm Normal file
View file

@ -0,0 +1,6 @@
#define wand_width 16
#define wand_height 16
static unsigned char wand_bits[] = {
0x24, 0x00, 0x01, 0x00, 0x0c, 0x00, 0x14, 0x00, 0x28, 0x00, 0x71, 0x00,
0xe0, 0x00, 0xc0, 0x01, 0x80, 0x03, 0x00, 0x07, 0x00, 0x0e, 0x00, 0x1c,
0x00, 0x38, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00 };

View file

@ -0,0 +1,6 @@
#define watch_mask_width 16
#define watch_mask_height 16
static unsigned char watch_mask_bits[] = {
0xc0, 0x01, 0xe0, 0x03, 0xe0, 0x03, 0xe0, 0x03, 0xf0, 0x07, 0xf8, 0x0f,
0xfc, 0x1f, 0xfc, 0x3f, 0xfc, 0x1f, 0xf8, 0x0f, 0xf0, 0x07, 0xe0, 0x03,
0xe0, 0x03, 0xe0, 0x03, 0xe0, 0x03, 0xc0, 0x01 };

View file

@ -0,0 +1,6 @@
#define watch_width 16
#define watch_height 16
static unsigned char watch_bits[] = {
0x00, 0x00, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0x20, 0x02, 0x90, 0x04,
0x88, 0x08, 0x88, 0x19, 0x08, 0x08, 0x10, 0x04, 0x20, 0x02, 0xc0, 0x01,
0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0x00, 0x00 };

View file

@ -227,38 +227,38 @@ extern char* g_win32_getlocale(void);
#include "great.h"
#include "mouse/watch.xbm"
#include "mouse/watch-mask.xbm"
#include "watch.xbm"
#include "watch-mask.xbm"
#include "mouse/hand.xbm"
#include "mouse/hand-mask.xbm"
#include "hand.xbm"
#include "hand-mask.xbm"
#include "mouse/wand.xbm"
#include "mouse/wand-mask.xbm"
#include "wand.xbm"
#include "wand-mask.xbm"
#include "mouse/insertion.xbm"
#include "mouse/insertion-mask.xbm"
#include "insertion.xbm"
#include "insertion-mask.xbm"
#include "mouse/brush.xbm"
#include "mouse/brush-mask.xbm"
#include "brush.xbm"
#include "brush-mask.xbm"
#include "mouse/crosshair.xbm"
#include "mouse/crosshair-mask.xbm"
#include "crosshair.xbm"
#include "crosshair-mask.xbm"
#include "mouse/rotate.xbm"
#include "mouse/rotate-mask.xbm"
#include "rotate.xbm"
#include "rotate-mask.xbm"
#include "mouse/up.xbm"
#include "mouse/up-mask.xbm"
#include "up.xbm"
#include "up-mask.xbm"
#include "mouse/down.xbm"
#include "mouse/down-mask.xbm"
#include "down.xbm"
#include "down-mask.xbm"
#include "mouse/tiny.xbm"
#include "mouse/tiny-mask.xbm"
#include "tiny.xbm"
#include "tiny-mask.xbm"
#include "mouse/arrow.xbm"
#include "mouse/arrow-mask.xbm"
#include "arrow.xbm"
#include "arrow-mask.xbm"
@ -4051,6 +4051,7 @@ void setup(int argc, char * argv[])
FILE * fi;
SDL_Surface * tmp_surf;
SDL_Rect dest;
int scale;
#ifndef LOW_QUALITY_COLOR_SELECTOR
int x, y;
SDL_Surface * tmp_btn;
@ -5058,33 +5059,39 @@ void setup(int argc, char * argv[])
/* Create cursors: */
scale = 1;
#ifdef SMALL_CURSOR_SHAPES
scale = 2;
#endif
cursor_hand = get_cursor(hand_bits, hand_mask_bits,
hand_width, hand_height,
12, 1);
12 / scale, 1 / scale);
cursor_wand = get_cursor(wand_bits, wand_mask_bits,
wand_width, wand_height,
4, 4);
4 / scale, 4 / scale);
cursor_insertion = get_cursor(insertion_bits, insertion_mask_bits,
insertion_width, insertion_height,
7, 4);
7 / scale, 4 / scale);
cursor_brush = get_cursor(brush_bits, brush_mask_bits,
brush_width, brush_height,
4, 28);
4 / scale, 28 / scale);
cursor_crosshair = get_cursor(crosshair_bits, crosshair_mask_bits,
crosshair_width, crosshair_height,
15, 15);
15 / scale, 15 / scale);
cursor_rotate = get_cursor(rotate_bits, rotate_mask_bits,
rotate_width, rotate_height,
15, 15);
15 / scale, 15 / scale);
cursor_watch = get_cursor(watch_bits, watch_mask_bits,
watch_width, watch_height,
14, 14);
14 / scale, 14 / scale);
cursor_arrow = get_cursor(arrow_bits, arrow_mask_bits,
arrow_width, arrow_height,
@ -5092,15 +5099,15 @@ void setup(int argc, char * argv[])
cursor_up = get_cursor(up_bits, up_mask_bits,
up_width, up_height,
15, 1);
15 / scale, 1 / scale);
cursor_down = get_cursor(down_bits, down_mask_bits,
down_width, down_height,
15, 30);
15 / scale, 30 / scale);
cursor_tiny = get_cursor(tiny_bits, tiny_mask_bits,
tiny_width, tiny_height,
3, 3);
3 / scale, 3 / scale);
do_setcursor(cursor_watch);