graphics 1.0.0b1 → 1.0.0b4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (73) hide show
  1. checksums.yaml +4 -4
  2. checksums.yaml.gz.sig +0 -0
  3. data.tar.gz.sig +0 -0
  4. data/History.rdoc +30 -0
  5. data/Manifest.txt +39 -7
  6. data/README.rdoc +48 -4
  7. data/Rakefile +8 -2
  8. data/examples/boid.rb +9 -18
  9. data/examples/bounce.rb +15 -23
  10. data/examples/canvas.rb +75 -0
  11. data/examples/collision.rb +6 -6
  12. data/examples/demo.rb +5 -7
  13. data/examples/editor.rb +12 -9
  14. data/examples/fluid.rb +2 -3
  15. data/examples/fluid2.rb +1 -1
  16. data/examples/{lito2.rb → gol.rb} +0 -0
  17. data/examples/{zenspider4.rb → gol2.rb} +0 -0
  18. data/examples/logo.rb +4 -7
  19. data/examples/maze.rb +136 -0
  20. data/examples/tank.rb +10 -11
  21. data/examples/tank2.rb +12 -17
  22. data/examples/targeting.rb +1 -1
  23. data/examples/vants.rb +1 -1
  24. data/examples/walker.rb +3 -12
  25. data/examples/walker2.rb +197 -0
  26. data/examples/zombies.rb +31 -35
  27. data/ext/sdl/extconf.rb +31 -0
  28. data/ext/sdl/sdl.c +1067 -0
  29. data/ext/sdl/sge/INSTALL +72 -0
  30. data/ext/sdl/sge/LICENSE +504 -0
  31. data/ext/sdl/sge/Makefile +83 -0
  32. data/ext/sdl/sge/Makefile.conf +63 -0
  33. data/ext/sdl/sge/README +219 -0
  34. data/ext/sdl/sge/Todo +7 -0
  35. data/ext/sdl/sge/WhatsNew +224 -0
  36. data/ext/sdl/sge/sge.h +31 -0
  37. data/ext/sdl/sge/sge_blib.cpp +1939 -0
  38. data/ext/sdl/sge/sge_blib.h +68 -0
  39. data/ext/sdl/sge/sge_bm_text.cpp +451 -0
  40. data/ext/sdl/sge/sge_bm_text.h +71 -0
  41. data/ext/sdl/sge/sge_collision.cpp +388 -0
  42. data/ext/sdl/sge/sge_collision.h +54 -0
  43. data/ext/sdl/sge/sge_config.h +6 -0
  44. data/ext/sdl/sge/sge_internal.h +152 -0
  45. data/ext/sdl/sge/sge_misc.cpp +92 -0
  46. data/ext/sdl/sge/sge_misc.h +37 -0
  47. data/ext/sdl/sge/sge_primitives.cpp +2516 -0
  48. data/ext/sdl/sge/sge_primitives.h +111 -0
  49. data/ext/sdl/sge/sge_rotation.cpp +683 -0
  50. data/ext/sdl/sge/sge_rotation.h +46 -0
  51. data/ext/sdl/sge/sge_shape.cpp +762 -0
  52. data/ext/sdl/sge/sge_shape.h +365 -0
  53. data/ext/sdl/sge/sge_surface.cpp +1090 -0
  54. data/ext/sdl/sge/sge_surface.h +100 -0
  55. data/ext/sdl/sge/sge_textpp.cpp +785 -0
  56. data/ext/sdl/sge/sge_textpp.h +270 -0
  57. data/ext/sdl/sge/sge_tt_text.cpp +1456 -0
  58. data/ext/sdl/sge/sge_tt_text.h +114 -0
  59. data/graphics_setup.sh +26 -0
  60. data/lib/graphics.rb +1 -1
  61. data/lib/graphics/body.rb +50 -3
  62. data/lib/graphics/extensions.rb +13 -7
  63. data/lib/graphics/simulation.rb +126 -46
  64. data/test/test_graphics.rb +52 -12
  65. data/test/test_sdl.rb +1 -0
  66. metadata +54 -23
  67. metadata.gz.sig +0 -0
  68. data/.gemtest +0 -0
  69. data/examples/lito.rb +0 -108
  70. data/examples/zenspider1.rb +0 -93
  71. data/examples/zenspider2.rb +0 -123
  72. data/examples/zenspider3.rb +0 -104
  73. data/rubysdl_setup.sh +0 -34
@@ -0,0 +1,83 @@
1
+ # Makefile for the SGE library
2
+
3
+ include Makefile.conf
4
+
5
+ CFLAGS += $(SGE_CFLAGS) -fPIC $(FT_CFLAGS)
6
+ LIBS =$(SGE_LIBS)
7
+
8
+ SGE_VER = 030809
9
+ API_VER = 0
10
+
11
+ OBJECTS=sge_surface.o sge_primitives.o sge_tt_text.o sge_bm_text.o sge_misc.o sge_textpp.o sge_blib.o sge_rotation.o sge_collision.o sge_shape.o
12
+
13
+ all: config $(OBJECTS)
14
+ @ar rsc libSGE.a $(OBJECTS)
15
+
16
+ $(OBJECTS): %.o:%.cpp %.h #Each object depends on thier .cpp and .h file
17
+ $(CXX) $(CFLAGS) -c $<
18
+
19
+ shared: all
20
+ $(CXX) $(CFLAGS) -Wl,-soname,libSGE.so.$(API_VER) -fpic -fPIC -shared -o libSGE.so $(OBJECTS) $(LIBS)
21
+
22
+ shared-strip: shared
23
+ @strip libSGE.so
24
+
25
+ # Building a dll... I have no idea how to do this, but it should be something like below.
26
+ dll: config $(OBJECTS)
27
+ dlltool --output-def SGE.def $(OBJECTS)
28
+ dllwrap --driver-name $(CXX) -o SGE.dll --def SGE.def --output-lib libSGE.a --dllname SGE.dll $(OBJECTS) $(LIBS)
29
+
30
+ dll-strip: dll
31
+ @strip SGE.dll
32
+
33
+ clean:
34
+ @rm -f *.o *.so *.a *.dll *.def
35
+
36
+ config:
37
+ @echo "/* SGE Config header (generated automatically) */" >sge_config.h
38
+ @echo "#define SGE_VER $(SGE_VER)" >>sge_config.h
39
+ ifeq ($(C_COMP),y)
40
+ @echo "#define _SGE_C_AND_CPP" >>sge_config.h
41
+ endif
42
+ ifeq ($(USE_FT),n)
43
+ @echo "#define _SGE_NOTTF" >>sge_config.h
44
+ endif
45
+ ifeq ($(USE_IMG),y)
46
+ @echo "#define _SGE_HAVE_IMG" >>sge_config.h
47
+ endif
48
+ ifeq ($(NO_CLASSES),y)
49
+ @echo "#define _SGE_NO_CLASSES" >>sge_config.h
50
+ endif
51
+
52
+ ifneq ($(QUIET),y)
53
+ @echo "== SGE r$(SGE_VER)"
54
+ ifeq ($(C_COMP),y)
55
+ @echo "== Note: Trying to be C friendly."
56
+ endif
57
+ ifeq ($(USE_FT),n)
58
+ @echo "== FreeType2 support disabled."
59
+ else
60
+ @echo "== FreeType2 support enabled."
61
+ endif
62
+ ifeq ($(USE_IMG),y)
63
+ @echo "== SDL_Image (SFont) support enabled."
64
+ else
65
+ @echo "== SDL_Image (SFont) support disabled."
66
+ endif
67
+ ifeq ($(NO_CLASSES),y)
68
+ @echo "== Warning: No C++ classes will be build!"
69
+ endif
70
+ @echo ""
71
+ endif
72
+
73
+ install: shared
74
+ @mkdir -p $(PREFIX_H)
75
+ install -c -m 644 sge*.h $(PREFIX_H)
76
+ @mkdir -p $(PREFIX)/lib
77
+ install -c -m 644 libSGE.a $(PREFIX)/lib
78
+ install -c libSGE.so $(PREFIX)/lib/libSGE.so.$(API_VER).$(SGE_VER)
79
+ @cd $(PREFIX)/lib;\
80
+ ln -sf libSGE.so.$(API_VER).$(SGE_VER) libSGE.so.$(API_VER);\
81
+ ln -sf libSGE.so.$(API_VER) libSGE.so
82
+ @echo "** Headerfiles installed in $(PREFIX_H)"
83
+ @echo "** Library files installed in $(PREFIX)/lib"
@@ -0,0 +1,63 @@
1
+ # Configure Makefile for the SGE library
2
+
3
+ # Comment/uncomment the following line to disable/enable build options
4
+ # (See README for more info)
5
+ C_COMP = y
6
+ #USE_FT = n
7
+ #USE_IMG = n
8
+ #QUIET = y
9
+
10
+
11
+ # Compilers (C and C++)
12
+ CC=gcc
13
+ CXX=g++
14
+
15
+ # Make sure sdl-config is available
16
+ HAVE_SDL =$(shell if (sdl-config --version) < /dev/null > /dev/null 2>&1; then echo "y"; else echo "n"; fi;)
17
+ ifeq ($(HAVE_SDL),n)
18
+ $(error ERROR: Can't find SDL! Make sure that you have SDL (http://www.libsdl.org/) and its development files installed)
19
+ endif
20
+
21
+ # Where should SGE be installed?
22
+ PREFIX =$(shell sdl-config --prefix)
23
+
24
+ # Where should the headerfiles be installed?
25
+ PREFIX_H =$(shell sdl-config --prefix)/include/SDL
26
+
27
+ # Flags passed to the compiler
28
+ CFLAGS =-Wall -O3 -ffast-math
29
+ SGE_CFLAGS =$(shell sdl-config --cflags)
30
+ # Uncomment to make some more optimizations
31
+ #CFLAGS =-Wall -O9 -ffast-math -march=i686
32
+
33
+
34
+ # Libs config
35
+ SGE_LIBS =$(shell sdl-config --libs) -lstdc++
36
+
37
+
38
+ # Is freetype-config available?
39
+ HAVE_FT =$(shell if (freetype-config --version) < /dev/null > /dev/null 2>&1; then echo "y"; else echo "n"; fi;)
40
+ ifeq ($(HAVE_FT),n)
41
+ USE_FT = n
42
+ endif
43
+
44
+ ifneq ($(USE_FT),n)
45
+ USE_FT = y
46
+ SGE_LIBS +=$(shell freetype-config --libs)
47
+ FT_CFLAGS =$(shell freetype-config --cflags)
48
+ endif
49
+
50
+
51
+ # Is SDL_image available?
52
+ HAVE_IMG =$(shell if test -e "`sdl-config --prefix`/include/SDL/SDL_image.h" >/dev/null 2>&1; then echo "y"; else echo "n"; fi;)
53
+
54
+ ifneq ($(USE_IMG),y)
55
+ ifneq ($(USE_IMG),n)
56
+ USE_IMG =$(HAVE_IMG)
57
+ endif
58
+ endif
59
+
60
+ ifeq ($(USE_IMG),y)
61
+ SGE_LIBS +=-lSDL_image
62
+ endif
63
+
@@ -0,0 +1,219 @@
1
+ SDL Graphics Extension (SGE)
2
+ ====================================================================================
3
+ http://freshmeat.net/projects/sge/
4
+ http://www.etek.chalmers.se/~e8cal1/sge/index.html
5
+ http://www.digitalfanatics.org/cal/sge/index.html
6
+
7
+ Author: Anders Lindstr�m - email: cal@swipnet.se
8
+
9
+
10
+ 1. Intro
11
+ 2. Requirements
12
+ 3. Compiling
13
+ 4. Library usage
14
+ 5. Makefile options
15
+ 5.1 Using pure C with SGE (C_COMP)
16
+ 5.2 FreeType (USE_FT)
17
+ 5.3 The SDL_Image library (USE_IMG)
18
+ 5.4 The QUIET option (QUIET)
19
+ 6. Cross compiling SGE to W32
20
+ 7. Compiling SGE under W32 with MS VisC/C++
21
+ 8. Thanks
22
+ 9. Misc.
23
+
24
+
25
+ ====================================================================================
26
+ 1. Intro
27
+
28
+ SGE is an add-on graphics library for the Simple Direct Media Layer. SGE provides
29
+ pixel operations, graphics primitives, FreeType rendering, rotation/scaling and much
30
+ more.
31
+
32
+ This is free software (LGPL), read LICENSE for details.
33
+
34
+ SGE has the following parts:
35
+ [sge_surface] Pixel operations, blitting and some pallete stuff.
36
+ [sge_primitives] Drawing primitives.
37
+ [sge_tt_text] FreeType font support.
38
+ [sge_bm_text] Bitmapfont and SFont support.
39
+ [sge_textpp] Classes for handling and rendering text.
40
+ [sge_shape] Classes for blitting and sprites.
41
+ [sge_collision] Basic collision detection.
42
+ [sge_rotation] Rotation and scaling of surfaces.
43
+ [sge_blib] Normal, filled, gourand shaded and texture mapped polygons.
44
+ [sge_misc] Random number and delay functions.
45
+
46
+
47
+ Read docs/index.html for API documentation.
48
+
49
+ Always check WhatsNew for important (API) changes!
50
+
51
+ There is a "Beginners guide to SGE" in the html documentation about how to compile and
52
+ use SGE in your own project, please read it if you're new to Unix/Linux development.
53
+
54
+ Read INSTALL for quick compile and install instructions.
55
+
56
+
57
+ ====================================================================================
58
+ 2. Requirements
59
+
60
+ -GNU Make.
61
+ -SDL 1.2+.
62
+ -An ANSI/ISO C++ compiler. SGE should conform to ANSI/ISO C++.
63
+ -Optional:
64
+ -FreeType 2+
65
+ -SDL_Image (see section 5.3)
66
+ -Some SDL knowledge.
67
+
68
+ First you need SDL (http://www.libsdl.org/) and the FreeType (2.x) library
69
+ at http://www.freetype.org/ (you only need the FreeType library if you want
70
+ to use SGE's truetype font routines, see section 5.2). The FreeType library is
71
+ included in most Linux distributions (RPM users: install the freetype dev rpm
72
+ package from the install cd).
73
+
74
+ After installing SDL and FreeType, don't forget to check that the dynamic
75
+ linker can find them (check /etc/ld.so.conf and run ldconfig).
76
+
77
+ You must also have a good C++ compiler (should be able to handle templates). Recent
78
+ versions of GNU c++ works fine. SGE will use gcc/g++ as default, but this can be
79
+ changed in the file "Makefile.conf".
80
+
81
+
82
+ ====================================================================================
83
+ 3. Compiling
84
+
85
+ Before compiling you might want to change some Makefile.conf options, see section 5.
86
+
87
+ Just do 'make install' to compile and install SGE. This will install SGE to the same
88
+ place as SDL. You can change the install location by editing the PREFIX and PREFIX_H
89
+ lines in the file "Makefile.conf".
90
+
91
+ If you just want to test the examples (and not install anything) you can just do
92
+ 'make'. This will build a static version of SGE (libSGE.a).
93
+
94
+ If you want a dynamic version of SGE (libSGE.so) but don't want the makefile to
95
+ install SGE, do 'make shared'.
96
+
97
+ To build the examples, goto the directory examples/ and do 'make'.
98
+
99
+ See the file INSTALL for more information. You can also read the file
100
+ "docs/guide.html"
101
+
102
+
103
+ ====================================================================================
104
+ 4. Library usage
105
+
106
+ Do "#include "sge.h"" in your code after the normal "#include "SDL.h"" line.
107
+
108
+ The normal way to compile code that uses SGE is with the flag
109
+ "`sdl-config --cflags`", but also add the flag "-I/path/to/SGE/headers" if the SGE
110
+ headers are installed at any other place than the SDL headers.
111
+
112
+ The normal way to link code that uses SGE is with the flags
113
+ "-lSGE `sdl-config --libs` -lstdc++", but also add the flag "-L/path/to/SGE/library"
114
+ if SGE is installed at any other place than SDL. If you're using static linking then
115
+ the flags "`freetype-config --libs`" and/or "-lSDL_image" also needs to be added if
116
+ FreeType and/or SDL_Image support is enabled.
117
+
118
+ Example:
119
+ g++ -Wall -O3 `sdl-config --cflags` -c my_sge_app.cxx
120
+ g++ -o my_sge_app my_sge_app.o -lSGE `sdl-config --libs` -lstdc++
121
+
122
+ See "docs/guide.html" and the code in examples/ for more information.
123
+
124
+
125
+ ====================================================================================
126
+ 5. Makefile options
127
+
128
+ Edit Makefile.conf to turn on/off (y/n) these options.
129
+
130
+
131
+ 5.1 Using pure C with SGE (C_COMP)
132
+
133
+ Setting 'C_COMP = y' should allow both C and C++ projects to use SGE. However, you
134
+ will not be able to use any of the overloaded functions (only the Uint32 color
135
+ version of the overloaded functions will be available) or C++ classes from a C
136
+ project. C++ projects should not be affected. Default is 'y'.
137
+
138
+
139
+ 5.2 FreeType (USE_FT)
140
+
141
+ If you don't need the TT font routines or just don't want do depend on FreeType,
142
+ uncomment 'USE_FT = n' in Makefile.conf. Default behavior is to autodetect
143
+ FreeType.
144
+
145
+
146
+ 5.3 The SDL_Image library (USE_IMG)
147
+
148
+ The SDL_Image library (http://www.libsdl.org/projects/SDL_image/index.html) will be
149
+ autodetected with the default setting. SDL_Image support enables SGE to load png
150
+ images and thus use Karl Bartel's very nice SFont bitmapfonts
151
+ (http://www.linux-games.com/sfont/). The use of SDL_Image can also be controlled by
152
+ setting 'USE_IMG = y/n' manually.
153
+
154
+
155
+ 5.4 The QUIET option (QUIT)
156
+ Set 'QUIET = y' if you don't want the makefile to output any SGE specific messages.
157
+
158
+
159
+ ====================================================================================
160
+ 6. Cross compiling SGE to W32
161
+
162
+ SGE can be compiled by a win32 crosscompiler. You need a crosscompiled version of
163
+ SDL (and FreeType or SDL_Image if used). Check SDL's documentation (README.Win32) on how to get and setup
164
+ a cross-compiler.
165
+
166
+ A crosscompiler can be found at http://www.libsdl.org/Xmingw32/index.html. This
167
+ crosscompiler uses the new MS C-Run-time library "msvcrt.dll", you can get it from
168
+ www.microsoft.com/downloads (do a keyword search for "libraries update") if you
169
+ don't already have it.
170
+
171
+ If you want to build a dll ('cross-make dll' or 'dll-strip') then you might want to
172
+ do 'ln -s ../../bin/i386-mingw32msvc-dllwrap dllwrap' in
173
+ /usr/local/cross-tools/i386-mingw32msvc/bin.
174
+
175
+
176
+ ====================================================================================
177
+ 7. Compiling SGE under W32 with MS VisC/C++
178
+
179
+ Should work. Check the download page on SGEs homepage for project files (these are
180
+ untested by me and are often outdated but may be of some help).
181
+
182
+ Note that if you don't use the makefile system to build SGE (as with VisC/C++) then
183
+ you must edit sge_config.h manually to change build options. The options in section
184
+ 5 corresponds to defining the following symbols in sge_config.h:
185
+ _SGE_C_AND_CPP - C_COMP=y
186
+ _SGE_NOTTF - USE_FT=n
187
+ _SGE_HAVE_IMG - USE_IMG=y
188
+
189
+ For example:
190
+ /* SGE Config header */
191
+ #define SGE_VER 030809
192
+ #define _SGE_C_AND_CPP
193
+ #define _SGE_HAVE_IMG
194
+
195
+
196
+ ====================================================================================
197
+ 8. Thanks.
198
+
199
+ Thanks goes to...
200
+ -Sam Lantinga for the excellent SDL library.
201
+ -The FreeType library developers.
202
+ -John Garrison for the PowerPak library.
203
+ -Karl Bartel for the SFont library (http://www.linux-games.com/).
204
+ -Garrett Banuk for his bitmap font routines (http://www.mongeese.org/SDL_Console/).
205
+ -Seung Chan Lim (limsc@maya.com or slim@djslim.com).
206
+ -Idigoras Inaki (IIdigoras@ikerlan.es).
207
+ -Andreas Schiffler (http://www.ferzkopp.net/Software/SDL_gfx-2.0/index.html).
208
+ -Nicolas Roard (http://www.twinlib.org).
209
+
210
+ and many more...
211
+
212
+ ====================================================================================
213
+ 9. Misc.
214
+
215
+ Read the html documentation and study the examples.
216
+
217
+
218
+
219
+ /Anders Lindstr�m - email: cal@swipnet.se
@@ -0,0 +1,7 @@
1
+ -Improve error handling... urk.
2
+
3
+ -Improve/finish sge_screen.
4
+
5
+ -Run the spell checker more often :-)
6
+
7
+ -Alpha blended AA filled circles and AA filled ellipses.
@@ -0,0 +1,224 @@
1
+ This is a list of important changes in SGE's version history.
2
+
3
+ 030809:
4
+ -Better Makefiles (autodetects SDL, Freetype & SDL_Image).
5
+ -Better library numbering (thanks Sam!).
6
+ -Fixed a problem with newer version of g++ and c-linkage.
7
+ -Better C support (thanks Ippei!).
8
+ SGE is now configured to support C and C++ with the same
9
+ library file (set C_COMP=n in Makefile.conf to disable).
10
+ -Resynced the TTF code with SDL_ttf 2.0.6 (.fon and stream support).
11
+ -Added filled and gourand shaded polygons.
12
+ -Removed some harmless warning with MS Visual C++.
13
+ -Added multicolored lines.
14
+ -Cleaned up the text input functions (the return value has changed a bit).
15
+ -Fixed some bitmap rendering bugs in sge_Text.
16
+ -Some minor updates and bugfixes.
17
+
18
+
19
+ 020904:
20
+ -Corrected some errors in the documentation.
21
+ -Fixed problems with Visual C++.
22
+ -Fixed line clipping.
23
+ -Resynced the TTF code with SDL_ttf 2.0.5, some functions added.
24
+ -Fixed alpha levels with the TTF renderer (thanks Marco!).
25
+ -Fixed small error in rotate clipping logic.
26
+
27
+
28
+ 020104:
29
+ -Added sge_FloodFill(), a fast non-recursive flood fill function.
30
+ -Fixed a problem with the example 'speedtest' with gcc v3.
31
+ -Some portability fixes.
32
+ -Some small changes to the makefiles.
33
+ -Added a "Beginners guide to SGE" to the documentation.
34
+ -Added anti-aliased ellipses and circles.
35
+ -Better alpha blending in AA lines.
36
+ -Fixed a problem when AA rotating 32bit surfaces.
37
+
38
+
39
+ 010629:
40
+ -Many, many optimizations.
41
+ -Split sge_draw into sge_surface and sge_primitives.
42
+ -Fixed some bugs with hardware surfaces.
43
+ -Fixed bugs with 24 bpp.
44
+ -Added sge_PutPixelAlpha() - put pixel with blending.
45
+ -Most drawing primitives now have an 'Alpha' version too.
46
+ -Added anti-aliased lines (from SDL_gfxPrimitives).
47
+ -Added anti-aliased bezier curves.
48
+ -Added anti-aliased triangles.
49
+ -Texture mapped rotation/scaling is back! It's a bit faster than normal
50
+ rotation but not as nice and it can't do interpolation. Use the flag
51
+ 'SGE_TTMAP' to select this renderer with sge_transform().
52
+ -A new example is included: 'speedtest', benchmarks most of SGEs
53
+ primitives. Inspired by the example from SDL_gfxPrimitives.
54
+ -Synced the TTF code with SDL_ttf 2.0.3; SGE now uses FreeType 2!
55
+ Changed the makefile to use the new freetype-config tool.
56
+ Note that FreeType2 can load more font formats than just truetype.
57
+
58
+
59
+ 010606:
60
+ -Small fix in sge_draw.h.
61
+ -Fixed sge_Lock_ON(). Added sge_getUpdate() & sge_getLock() to get the
62
+ current mode.
63
+ -Fixed a signed-cast in sge_tt_text.cpp.
64
+ -New rotation/scaling engine! Much faster and can do interpolated
65
+ rendering. Use sge_transform()/sge_transform_surface() to access the new
66
+ features. See documentation for more info.
67
+
68
+
69
+ 010224:
70
+ -Fixed errors with SDL_VERSIONNUM for older versions of SDL.
71
+ -Synced the TTF code with SDL_ttf 1.2.2.
72
+ New functions:
73
+ sge_TTF_FontAscent() returns ascent
74
+ sge_TTF_FontDescent() returns descent
75
+ sge_TTF_FontLineSkip() returns recommended line skip
76
+ sge_TTF_SetFontStyle() sets font style (SGE_TTF_NORMAL|SGE_TTF_BOLD|
77
+ SGE_TTF_ITALIC|SGE_TTF_UNDERLINE)
78
+ sge_TTF_GetFontStyle() returns the current style.
79
+ Thanks to Idigoras Inaki (IIdigoras@ikerlan.es) for betatesting this!
80
+ -Fixed more problems with MSVC. Should work now.
81
+ -Added sge_BF_TextSize().
82
+ -Exorcised the old and horrible sge_tt_input_object class!
83
+ New classes for text handling and rendering:
84
+ sge_TextEditor - edits textstrings
85
+ sge_text - render and buffers text
86
+ sge_TextSurface - same as sge_surface (but with text)
87
+ sge_TextSsprite - same as sge_ssprite ( " )
88
+ sge_TextSprite - same as sge_sprite ( " ).
89
+ -Minor changes to the sge_shape classes (mostly bugfixes).
90
+ -Added border_warp() in sge_ssprite.
91
+ -New flag for sge_BF_OpenFont(): SGE_BFPALETTE. sge_BF_OpenFont() will
92
+ use an 8bit surface for the font if this flag is set, this makes
93
+ sge_BF_SetColor() much faster (~O(1)), but makes bliting a bit slower.
94
+ -Replaced font.bmp with a new font from Garrett Banuk's SDL Console
95
+ (http://www.wpi.edu/~mongoose/SDL_Console).
96
+ -Better Makefile ('install' is possible now).
97
+ -Added sge_Bezier(), draws a bezier curve.
98
+ -Updated documentation.
99
+
100
+
101
+ 010101:
102
+ -Clipping now also works in newer versions of SDL, but stay away from SDL 1.1.5!
103
+ -Fix for MDK7.2 include error.
104
+ -Some fixes for RedHat7 (the infamous gcc 2.96) from Chuck (clc@alum.mit.edu).
105
+ -Cleaned up the makefiles, everything is now configured in Makefile.conf.
106
+ -Some fixes for MS VisC/C++ from Seung Chan Lim (limsc@maya.com or slim@djslim.com).
107
+ -Updated SFont support.
108
+
109
+
110
+ 000930:
111
+ -This is a hack to get SGE working with SDL 1.1.5. When using the new version of
112
+ SDL SGE will not perform pixel clipping (for now). The "Big Alpha Flip" in SDL
113
+ also changes how SGE handles alpha!!! SDL_ALPHA_OPAQUE and SDL_ALPHA_TRANSPARENT
114
+ is always set to the correct values (even under old versions of SDL).
115
+ * THIS VERSION OF SGE IS NOT WELL TESTED! * Use SGE000714 if you don't have SDL
116
+ 1.1.5 and don't feel lucky (this version of SGE should work with older versions of
117
+ SDL - I think...). The documentation is not yet updated. I think you need a new
118
+ version of SDL_img if you want SFont support.
119
+
120
+
121
+ 000714:
122
+ -Improved performance in sge_HLine().
123
+ -Changed all Sint32 coords to Sint16 (SDL uses Sint16).
124
+ -Added delay functions: sge_CalibrateDelay() and sge_Delay() [sge_misc].
125
+ -Johan E. Th�lin has contributed a new part to SGE: [sge_blib] (Tadaa!).
126
+ -Nuked the old sge_sprite class and did it better this time [sge_shape].
127
+ -A new class: sge_screen, a tool class when working with shapes [sge_shape].
128
+ -sge_CalcYPitch() and sge_pPutPixel() added. Used for precalculating the y pitch
129
+ offset [sge_draw].
130
+ -Some new routines for rotating and scaling bitmaps [sge_rotation].
131
+ -Updated and added some examples.
132
+ -Updated documentation.
133
+
134
+
135
+ 000418:
136
+ -Improved the makefiles.
137
+ * Always link your code against libSGE.a or libSGE.so *
138
+ -Fixed freetype.h include problem.
139
+ -Added sge.h - use it instead of the sge_*.h files.
140
+ -Separated the TT and bitmap code.
141
+ -Added some alpha component support:
142
+ -sge_CreateAlphaSurface()
143
+ Creates a 32bit alpha surface (RGBA - 8/8/8/8). The alpha channel is
144
+ blended on blitting. *SGE only supports 32bit alpha surfaces*
145
+ -sge_MapAlpha()
146
+ Use this function to map Uint32 color values (RGBA) for alpha surfaces.
147
+ The color value can then be used with any of SGEs functions.
148
+ -The TTF functions now support alpha blending. Use sge_TTF_AA_Alpha() to
149
+ turn this feature on.
150
+ -sge_AlphaFader()
151
+ Fades from (sR,sG,sB,sA) to (dR,dG,dB,dA).
152
+ -Added SFont (Karl Bartel's font format) support to the bitmapfont routines.
153
+ Open the sfont with sge_BF_OpenFont("filename",SGE_BFSFONT). Note that most
154
+ sfonts need a alpha channel to look good which means it can't be loaded as
155
+ a .bmp file (they do not support alpha). To enable SGE to load .png files
156
+ uncomment 'USE_IMG = y' in the makefile (requires the SDL_img library!),
157
+ this will enable SGE to load any image format SDL_img supports. If you do
158
+ this, remember to link your code with SDL_img (not necessary if you use
159
+ libSGE.so).
160
+
161
+
162
+ 000312:
163
+ -Fixed a bug in sge_Line().
164
+ -Added (still testing, no documentation) collision routines.
165
+ -More work on the sprite class.
166
+
167
+
168
+ 000115:
169
+ -Added this text file.
170
+ -The TTF routines can now draw non anti-aliased text also. Control this with
171
+ sge_TTF_AAOff() - Turns anti-aliasing OFF
172
+ sge_TTF_AAOn() - Turns anti-aliasing ON -DEFAULT-
173
+ -A new flagsystem (finally). The following routines are effected:
174
+ sge_tt_input... - 'int type' replaced by 'Uint8 flags'
175
+ sge_BF_OpenFont - 'int flags' replaced by 'Uint8 flags' (no API change)
176
+ sge_BF_input - 'Uint8 flags' added *PLEASE UPDATE YOUR SOURCE*
177
+ The following flags can be used: SGE_FLAG1 - SGE_FLAG8 (defined in sge_draw.h), but
178
+ routine specific flags are also provided. The flags can be ORed, eg.
179
+ SGE_FLAG1|SGE_FLAG2|...
180
+ The input functions has the following flags:
181
+ SGE_IBG - Preserve background (only in tt, BF always preserves the background)
182
+ SGE_IDEL - Delete text when finished
183
+ SGE_INOKR - No keyrepeat
184
+ NOTE! sge_tt_input: The old ('type') and the new ('flags') flags are not the same!
185
+ If you do not update your source code, this will happend:
186
+ type=0 => flags=0 - OK, same
187
+ type=1 => flags=SGE_IBG - OK, same
188
+ type=2 => flags=SGE_IDEL - NOT THE SAME! (should be SGE_IBG|SGE_IDEL)
189
+ -TrueType font support optional, check the README.
190
+
191
+
192
+ 000102:
193
+ SGE now supports win32 crosscompiling. Support for bitmap fonts added. Some printf()
194
+ like functions added.
195
+
196
+
197
+ 991222:
198
+ Fixed a small bug in sge_UpdateRect, more work on the circle routines. SGE can now
199
+ be linked to both C and C++ code, check the README file for more information.
200
+
201
+
202
+ 991219:
203
+ Fixes some problems with lines and adds some ellipse routines. Update: Oops, the
204
+ sge_FilledEllipse function was missing - fixed.
205
+
206
+
207
+ 991208:
208
+ SGE now has a sprite class *VERY BETA* and a nice surface rotation function. This
209
+ version is tested with SDL 0.10 and 1.0.
210
+
211
+
212
+ 990905:
213
+ New version, with a completed text edit class.
214
+
215
+
216
+ 990827:
217
+ Released a new version, now with documentation.
218
+
219
+
220
+ 990826:
221
+ First public release of SGE (r990826). Have fun!
222
+
223
+
224
+ /Anders Lindstr�m