[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash ./ChangeLog ./configure.ac backend/gnash....
From: |
Bastiaan Jacques |
Subject: |
[Gnash-commit] gnash ./ChangeLog ./configure.ac backend/gnash.... |
Date: |
Mon, 08 May 2006 21:12:25 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Branch:
Changes by: Bastiaan Jacques <address@hidden> 06/05/08 21:12:24
Modified files:
. : ChangeLog configure.ac
backend : gnash.cpp render_handler_cairo.cpp
render_handler_d3d.cpp render_handler_ogl.cpp
render_handler_xbox.cpp sound_handler_sdl.cpp
gui : sdl.cpp
libbase : container.cpp image.cpp image.h
image_filters.cpp tu_file.cpp tu_file.h
tu_random.cpp tu_random.h tu_swap.h
tu_types.cpp tu_types.h utf8.cpp utf8.h
libgeometry : cull.h kd_tree_dynamic.h
plugin : player.cpp
plugin/klash : klash.cpp
server : Key.h Math.cpp MovieClipLoader.cpp action.cpp
as_value.h button.h character.h dlist.cpp
dlist.h font.cpp font.h fontlib.cpp gnash.h
impl.cpp impl.h morph2.cpp movie.h
movie_def_impl.cpp network.cpp render.cpp
render.h shape.cpp shape.h sound.cpp
sound_handler_mp3.cpp sprite_definition.cpp
sprite_instance.cpp sprite_instance.h
stream.cpp stream.h styles.cpp styles.h
text.cpp tools.cpp types.cpp types.h
xmlsocket.cpp
utilities : parser.cpp
Log message:
* configure.ac: Build with -ansi by default.
* libbase/tu_types.h: No longer depend on SDL for the endianness
macros.
* all over the place: Switch to the int types from inttypes.h rather
than SDL.h. This will allow us to remove the dependency on SDL when
sound is disabled and a frontend for Gnash other than SDL is used.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/ChangeLog.diff?tr1=1.275&tr2=1.276&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/configure.ac.diff?tr1=1.64&tr2=1.65&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/backend/gnash.cpp.diff?tr1=1.30&tr2=1.31&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/backend/render_handler_cairo.cpp.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/backend/render_handler_d3d.cpp.diff?tr1=1.3&tr2=1.4&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/backend/render_handler_ogl.cpp.diff?tr1=1.11&tr2=1.12&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/backend/render_handler_xbox.cpp.diff?tr1=1.3&tr2=1.4&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/backend/sound_handler_sdl.cpp.diff?tr1=1.8&tr2=1.9&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/gui/sdl.cpp.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/libbase/container.cpp.diff?tr1=1.5&tr2=1.6&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/libbase/image.cpp.diff?tr1=1.6&tr2=1.7&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/libbase/image.h.diff?tr1=1.4&tr2=1.5&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/libbase/image_filters.cpp.diff?tr1=1.6&tr2=1.7&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/libbase/tu_file.cpp.diff?tr1=1.5&tr2=1.6&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/libbase/tu_file.h.diff?tr1=1.5&tr2=1.6&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/libbase/tu_random.cpp.diff?tr1=1.3&tr2=1.4&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/libbase/tu_random.h.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/libbase/tu_swap.h.diff?tr1=1.3&tr2=1.4&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/libbase/tu_types.cpp.diff?tr1=1.3&tr2=1.4&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/libbase/tu_types.h.diff?tr1=1.6&tr2=1.7&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/libbase/utf8.cpp.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/libbase/utf8.h.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/libgeometry/cull.h.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/libgeometry/kd_tree_dynamic.h.diff?tr1=1.4&tr2=1.5&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/plugin/player.cpp.diff?tr1=1.13&tr2=1.14&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/plugin/klash/klash.cpp.diff?tr1=1.3&tr2=1.4&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/server/Key.h.diff?tr1=1.3&tr2=1.4&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/server/Math.cpp.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/server/MovieClipLoader.cpp.diff?tr1=1.17&tr2=1.18&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/server/action.cpp.diff?tr1=1.69&tr2=1.70&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/server/as_value.h.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/server/button.h.diff?tr1=1.5&tr2=1.6&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/server/character.h.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/server/dlist.cpp.diff?tr1=1.8&tr2=1.9&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/server/dlist.h.diff?tr1=1.4&tr2=1.5&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/server/font.cpp.diff?tr1=1.10&tr2=1.11&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/server/font.h.diff?tr1=1.4&tr2=1.5&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/server/fontlib.cpp.diff?tr1=1.9&tr2=1.10&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/server/gnash.h.diff?tr1=1.20&tr2=1.21&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/server/impl.cpp.diff?tr1=1.32&tr2=1.33&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/server/impl.h.diff?tr1=1.23&tr2=1.24&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/server/morph2.cpp.diff?tr1=1.10&tr2=1.11&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/server/movie.h.diff?tr1=1.4&tr2=1.5&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/server/movie_def_impl.cpp.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/server/network.cpp.diff?tr1=1.8&tr2=1.9&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/server/render.cpp.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/server/render.h.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/server/shape.cpp.diff?tr1=1.17&tr2=1.18&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/server/shape.h.diff?tr1=1.8&tr2=1.9&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/server/sound.cpp.diff?tr1=1.5&tr2=1.6&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/server/sound_handler_mp3.cpp.diff?tr1=1.7&tr2=1.8&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/server/sprite_definition.cpp.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/server/sprite_instance.cpp.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/server/sprite_instance.h.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/server/stream.cpp.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/server/stream.h.diff?tr1=1.3&tr2=1.4&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/server/styles.cpp.diff?tr1=1.9&tr2=1.10&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/server/styles.h.diff?tr1=1.7&tr2=1.8&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/server/text.cpp.diff?tr1=1.15&tr2=1.16&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/server/tools.cpp.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/server/types.cpp.diff?tr1=1.4&tr2=1.5&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/server/types.h.diff?tr1=1.4&tr2=1.5&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/server/xmlsocket.cpp.diff?tr1=1.13&tr2=1.14&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/utilities/parser.cpp.diff?tr1=1.5&tr2=1.6&r1=text&r2=text
Patches:
Index: gnash/ChangeLog
diff -u gnash/ChangeLog:1.275 gnash/ChangeLog:1.276
--- gnash/ChangeLog:1.275 Mon May 8 18:00:50 2006
+++ gnash/ChangeLog Mon May 8 21:12:24 2006
@@ -1,3 +1,12 @@
+2006-05-08 Bastiaan Jacques <address@hidden>
+
+ * configure.ac: Build with -ansi by default.
+ * libbase/tu_types.h: No longer depend on SDL for the endianness
+ macros.
+ * all over the place: Switch to the int types from inttypes.h rather
+ than SDL.h. This will allow us to remove the dependency on SDL when
+ sound is disabled and a frontend for Gnash other than SDL is used.
+
2006-05-08 Sandro Santilli <address@hidden>
* server/as_value.h, server/button.h, server/impl.cpp,
@@ -12,25 +21,25 @@
2006-05-08 Sandro Santilli <address@hidden>
- * server/ASSound.h, server/Global.cpp, server/Global.h,
- server/Key.h, server/Makefile.am, server/Object.cpp,
- server/Object.h, server/action.cpp, server/action.h,
- server/as_member.h, server/as_object.cpp, server/as_object.h,
- server/as_prop_flags.h, server/as_value.h, server/gnash.h,
- server/movie_interface.h, server/ref_counted.h,
- server/textformat.cpp, server/textformat.h, server/types.cpp:
-
- * server/bitmap_character_def.h, server/character.cpp,
- server/character_def.h, server/character.h,
- server/generic_character.h, server/movie.h, server/ref_counted.h,
- server/resource.h, server/shape_character_def.cpp,
- server/shape_character_def.h, server/as_object.h, server/button.h,
- server/character_def.h, server/font.cpp, server/fontlib.cpp,
- server/gnash.h, server/impl.cpp, server/impl.h,
- server/Makefile.am, server/morph2.cpp, server/morph2.h,
- server/movie_def_impl.cpp, server/movie_def_impl.h,
- server/Object.h, server/shape.cpp, server/shape.h,
- server/styles.h, server/tesselate.h, server/text.cpp:
+ * server/ASSound.h, server/Global.cpp, server/Global.h,
+ server/Key.h, server/Makefile.am, server/Object.cpp,
+ server/Object.h, server/action.cpp, server/action.h,
+ server/as_member.h, server/as_object.cpp, server/as_object.h,
+ server/as_prop_flags.h, server/as_value.h, server/gnash.h,
+ server/movie_interface.h, server/ref_counted.h,
+ server/textformat.cpp, server/textformat.h, server/types.cpp:
+
+ * server/bitmap_character_def.h, server/character.cpp,
+ server/character_def.h, server/character.h,
+ server/generic_character.h, server/movie.h, server/ref_counted.h,
+ server/resource.h, server/shape_character_def.cpp,
+ server/shape_character_def.h, server/as_object.h, server/button.h,
+ server/character_def.h, server/font.cpp, server/fontlib.cpp,
+ server/gnash.h, server/impl.cpp, server/impl.h,
+ server/Makefile.am, server/morph2.cpp, server/morph2.h,
+ server/movie_def_impl.cpp, server/movie_def_impl.h,
+ server/Object.h, server/shape.cpp, server/shape.h,
+ server/styles.h, server/tesselate.h, server/text.cpp:
new class files for as_member, as_object, as_prop_flags,
as_value, character, shape_character_def, movie.
Index: gnash/backend/gnash.cpp
diff -u gnash/backend/gnash.cpp:1.30 gnash/backend/gnash.cpp:1.31
--- gnash/backend/gnash.cpp:1.30 Sun May 7 12:02:39 2006
+++ gnash/backend/gnash.cpp Mon May 8 21:12:24 2006
@@ -618,12 +618,12 @@
// Mouse state.
float speed_scale = 1.0f;
- Uint32 start_ticks = 0;
+ uint32_t start_ticks = 0;
if (do_render) {
start_ticks = SDL_GetTicks();
}
- Uint32 last_ticks = start_ticks;
+ uint32_t last_ticks = start_ticks;
int frame_counter = 0;
int last_logged_fps = last_ticks;
@@ -638,12 +638,12 @@
for (;;) {
- Uint32 ticks;
+ uint32_t ticks;
if (do_render) {
ticks = SDL_GetTicks();
} else {
// Simulate time.
- ticks = last_ticks + (Uint32) (1000.0f / movie_fps);
+ ticks = last_ticks + (uint32_t) (1000.0f / movie_fps);
}
int delta_ticks = ticks - last_ticks;
float delta_t = delta_ticks / 1000.f;
@@ -651,7 +651,7 @@
// Check auto timeout counter.
if (exit_timeout > 0
- && ticks - start_ticks > (Uint32) (exit_timeout * 1000)) {
+ && ticks - start_ticks > (uint32_t) (exit_timeout * 1000)) {
// Auto exit now.
break;
}
Index: gnash/backend/render_handler_cairo.cpp
diff -u gnash/backend/render_handler_cairo.cpp:1.1
gnash/backend/render_handler_cairo.cpp:1.2
--- gnash/backend/render_handler_cairo.cpp:1.1 Tue May 2 20:51:59 2006
+++ gnash/backend/render_handler_cairo.cpp Mon May 8 21:12:24 2006
@@ -30,7 +30,7 @@
cairo_pattern_t* m_pattern;
bitmap_info_cairo();
- bitmap_info_cairo(int width, int height, Uint8* data);
+ bitmap_info_cairo(int width, int height, uint8_t* data);
bitmap_info_cairo(image::rgb* im);
bitmap_info_cairo(image::rgba* im);
@@ -202,10 +202,10 @@
m_bitmap_color_transform.clamp();
m_color = gnash::rgba(
- Uint8(m_bitmap_color_transform.m_[0][0] * 255.0f),
- Uint8(m_bitmap_color_transform.m_[1][0] * 255.0f),
- Uint8(m_bitmap_color_transform.m_[2][0] * 255.0f),
- Uint8(m_bitmap_color_transform.m_[3][0] * 255.0f));
+ uint8_t(m_bitmap_color_transform.m_[0][0] * 255.0f),
+ uint8_t(m_bitmap_color_transform.m_[1][0] * 255.0f),
+ uint8_t(m_bitmap_color_transform.m_[2][0] * 255.0f),
+ uint8_t(m_bitmap_color_transform.m_[3][0] * 255.0f));
if (m_bitmap_color_transform.m_[0][1] > 1.0f
|| m_bitmap_color_transform.m_[1][1] > 1.0f
@@ -265,7 +265,7 @@
return new bitmap_info_cairo;
}
- gnash::bitmap_info* create_bitmap_info_alpha(int w, int h, Uint8*
data)
+ gnash::bitmap_info* create_bitmap_info_alpha(int w, int h, uint8_t*
data)
// Create a bitmap_info so that it contains an alpha texture
// with the given data (1 byte per texel).
{
@@ -474,7 +474,7 @@
apply_matrix(m_current_matrix);
// Draw the tris in cairo
- Sint16* vertex = (Sint16*)coords;
+ int16_t* vertex = (int16_t*)coords;
for (; vertex_count > 2; vertex_count--, vertex += 2)
{
cairo_move_to(g_cr, vertex[0], vertex[1]);
@@ -491,7 +491,7 @@
if (m_current_styles[LEFT_STYLE].needs_second_pass())
{
m_current_styles[LEFT_STYLE].apply_second_pass();
- vertex = (Sint16*)coords;
+ vertex = (int16_t*)coords;
for (; vertex_count > 2; vertex_count--, vertex += 2)
{
cairo_move_to(g_cr, vertex[0], vertex[1]);
@@ -518,7 +518,7 @@
apply_matrix(m_current_matrix);
// Draw the line-strip in cairo
- Sint16* vertex = (Sint16*)coords;
+ int16_t* vertex = (int16_t*)coords;
cairo_move_to(g_cr, vertex[0], vertex[1]);
for (vertex += 2; vertex_count > 1; vertex_count--, vertex += 2)
cairo_line_to(g_cr, vertex[0], vertex[1]);
@@ -626,7 +626,7 @@
}
-bitmap_info_cairo::bitmap_info_cairo(int width, int height, Uint8* data)
+bitmap_info_cairo::bitmap_info_cairo(int width, int height, uint8_t* data)
// Initialize this bitmap_info to an alpha image
// containing the specified data (1 byte per texel).
{
@@ -665,7 +665,7 @@
unsigned char* dst = m_buffer;
for (int y = 0; y < im->m_height; y++)
{
- Uint8* src = image::scanline(im, y);
+ uint8_t* src = image::scanline(im, y);
for (int x = 0; x < im->m_width; x++, src += 3)
{
*dst++ = src[2]; // blue
@@ -698,7 +698,7 @@
unsigned char* dst = m_buffer;
for (int y = 0; y < im->m_height; y++)
{
- Uint8* src = image::scanline(im, y);
+ uint8_t* src = image::scanline(im, y);
for (int x = 0; x < im->m_width; x++, src += 4)
{
*dst++ = src[3]; // blue
Index: gnash/backend/render_handler_d3d.cpp
diff -u gnash/backend/render_handler_d3d.cpp:1.3
gnash/backend/render_handler_d3d.cpp:1.4
--- gnash/backend/render_handler_d3d.cpp:1.3 Sat Feb 25 15:27:35 2006
+++ gnash/backend/render_handler_d3d.cpp Mon May 8 21:12:24 2006
@@ -95,7 +95,7 @@
void convert_to_argb(image::rgba* im);
bitmap_info_d3d(image::rgb* im);
bitmap_info_d3d(image::rgba* im);
- bitmap_info_d3d(int width, int height, Uint8* data);
+ bitmap_info_d3d(int width, int height, uint8_t* data);
};
@@ -123,7 +123,7 @@
// not supported
}
- static void make_next_miplevel(int* width, int* height, Uint8* data)
+ static void make_next_miplevel(int* width, int* height, uint8_t* data)
// Utility. Mutates *width, *height and *data to create the
// next mip level.
{
@@ -149,12 +149,12 @@
{
// Resample. Simple average 2x2 --> 1, in-place.
for (int j = 0; j < new_h; j++) {
- Uint8* out = ((Uint8*) data) + j * new_w;
- Uint8* in = ((Uint8*) data) + (j << 1) * *width;
+ uint8_t* out = ((uint8_t*) data) + j * new_w;
+ uint8_t* in = ((uint8_t*) data) + (j << 1) * *width;
for (int i = 0; i < new_w; i++) {
int a;
a = (*(in + 0) + *(in + 1) + *(in + 0 + *width) + *(in + 1 +
*width));
- *(out) = (Uint8) (a >> 2);
+ *(out) = (uint8_t) (a >> 2);
out++;
in += 2;
}
@@ -299,10 +299,10 @@
// Additive color.
apply_color(gameswf::rgba(
- Uint8(m_bitmap_color_transform.m_[0][1]),
- Uint8(m_bitmap_color_transform.m_[1][1]),
- Uint8(m_bitmap_color_transform.m_[2][1]),
- Uint8(m_bitmap_color_transform.m_[3][1])));
+ uint8_t(m_bitmap_color_transform.m_[0][1]),
+ uint8_t(m_bitmap_color_transform.m_[1][1]),
+ uint8_t(m_bitmap_color_transform.m_[2][1]),
+ uint8_t(m_bitmap_color_transform.m_[3][1])));
m_pd3dDevice->SetTextureStageState(0, D3DTSS_COLOROP, D3DTOP_SELECTARG2);
m_pd3dDevice->SetTextureStageState(0, D3DTSS_ALPHAOP, D3DTOP_SELECTARG2);
@@ -341,10 +341,10 @@
m_bitmap_color_transform.m_[3][1] = clamp(color_transform.m_[3][1],
-255.0f, 255.0f);
m_color = gameswf::rgba(
- Uint8(m_bitmap_color_transform.m_[0][0]*255.0f),
- Uint8(m_bitmap_color_transform.m_[1][0]*255.0f),
- Uint8(m_bitmap_color_transform.m_[2][0]*255.0f),
- Uint8(m_bitmap_color_transform.m_[3][0]*255.0f));
+ uint8_t(m_bitmap_color_transform.m_[0][0]*255.0f),
+ uint8_t(m_bitmap_color_transform.m_[1][0]*255.0f),
+ uint8_t(m_bitmap_color_transform.m_[2][0]*255.0f),
+ uint8_t(m_bitmap_color_transform.m_[3][0]*255.0f));
if (m_bitmap_color_transform.m_[0][1] > 1.0f
|| m_bitmap_color_transform.m_[1][1] > 1.0f
@@ -504,7 +504,7 @@
}
- void set_alpha_image(gameswf::bitmap_info* bi, int w, int h, Uint8* data)
+ void set_alpha_image(gameswf::bitmap_info* bi, int w, int h, uint8_t* data)
// Set the specified bitmap_info so that it contains an alpha
// texture with the given data (1 byte per texel).
//
@@ -523,7 +523,7 @@
delete bi;
}
- void prepare_vertex_buffer(const Sint16* coords, int vertex_count)
+ void prepare_vertex_buffer(const int16_t* coords, int vertex_count)
{
HRESULT hr;
@@ -697,11 +697,11 @@
}
else
{
- const Sint16 backgroundCoords[] = {
- (Sint16)x0,(Sint16)y0,
- (Sint16)x1,(Sint16)y0,
- (Sint16)x0,(Sint16)y1,
- (Sint16)x1,(Sint16)y1};
+ const int16_t backgroundCoords[] = {
+ (int16_t)x0,(int16_t)y0,
+ (int16_t)x1,(int16_t)y0,
+ (int16_t)x0,(int16_t)y1,
+ (int16_t)x1,(int16_t)y1};
apply_color(background_color);
set_matrix(gameswf::matrix::identity);
apply_matrix(m_current_matrix);
@@ -831,7 +831,7 @@
m_current_styles[LEFT_STYLE].apply(m_current_matrix);
apply_matrix(m_current_matrix);
- prepare_vertex_buffer((Sint16*)coords, vertex_count);
+ prepare_vertex_buffer((int16_t*)coords, vertex_count);
HRESULT hr = m_pd3dDevice->DrawPrimitive( D3DPT_TRIANGLESTRIP, 0,
vertex_count - 2);
assert(hr==S_OK);
@@ -853,7 +853,7 @@
m_current_styles[LINE_STYLE].apply(m_current_matrix);
apply_matrix(m_current_matrix);
- prepare_vertex_buffer((Sint16*)coords, vertex_count);
+ prepare_vertex_buffer((int16_t*)coords, vertex_count);
HRESULT hr = m_pd3dDevice->DrawPrimitive( D3DPT_LINESTRIP, 0,
vertex_count-1);
assert(hr==S_OK);
}
@@ -1060,11 +1060,11 @@
// Need to insert a dummy alpha byte in the image data, for
// D3DXLoadSurfaceFromMemory.
// @@ this sucks :(
- Uint8* expanded_data = new Uint8[m_original_width * m_original_height * 4];
- Uint8* pdata = expanded_data;
+ uint8_t* expanded_data = new uint8_t[m_original_width * m_original_height *
4];
+ uint8_t* pdata = expanded_data;
for (int y = 0; y < m_original_height; y++)
{
- Uint8* scanline = image::scanline(im, y);
+ uint8_t* scanline = image::scanline(im, y);
for (int x = 0; x < m_original_width; x++)
{
*pdata++ = scanline[x * 3 + 2]; // blue
@@ -1124,10 +1124,10 @@
typedef struct
{
- Uint8 r;
- Uint8 g;
- Uint8 b;
- Uint8 a;
+ uint8_t r;
+ uint8_t g;
+ uint8_t b;
+ uint8_t a;
} RGBA;
void bitmap_info_d3d::convert_to_argb(image::rgba* im)
@@ -1216,7 +1216,7 @@
}
-bitmap_info_d3d::bitmap_info_d3d(int width, int height, Uint8* data)
+bitmap_info_d3d::bitmap_info_d3d(int width, int height, uint8_t* data)
// Initialize this bitmap_info to an alpha image
// containing the specified data (1 byte per texel).
//
Index: gnash/backend/render_handler_ogl.cpp
diff -u gnash/backend/render_handler_ogl.cpp:1.11
gnash/backend/render_handler_ogl.cpp:1.12
--- gnash/backend/render_handler_ogl.cpp:1.11 Mon May 8 18:00:50 2006
+++ gnash/backend/render_handler_ogl.cpp Mon May 8 21:12:24 2006
@@ -38,7 +38,7 @@
struct bitmap_info_ogl : public gnash::bitmap_info
{
bitmap_info_ogl();
- bitmap_info_ogl(int width, int height, Uint8* data);
+ bitmap_info_ogl(int width, int height, uint8_t* data);
bitmap_info_ogl(image::rgb* im);
bitmap_info_ogl(image::rgba* im);
@@ -68,7 +68,7 @@
// Utility. Mutates *width, *height and *data to create the
// next mip level.
- static void make_next_miplevel(int* width, int* height, Uint8* data)
+ static void make_next_miplevel(int* width, int* height, uint8_t* data)
{
assert(width);
assert(height);
@@ -89,8 +89,8 @@
} else {
// Resample. Simple average 2x2 --> 1, in-place.
for (int j = 0; j < new_h; j++) {
- Uint8* out = ((Uint8*) data) + j * new_w;
- Uint8* in = ((Uint8*) data) + (j << 1) * *width;
+ uint8_t* out = ((uint8_t*) data) + j * new_w;
+ uint8_t* in = ((uint8_t*) data) + (j << 1) * *width;
for (int i = 0; i < new_w; i++) {
int a;
a = (*(in + 0) + *(in + 1) + *(in + 0 + *width) + *(in
+ 1 + *width));
@@ -251,10 +251,10 @@
m_bitmap_color_transform.clamp();
m_color = gnash::rgba(
- Uint8(m_bitmap_color_transform.m_[0][0] * 255.0f),
- Uint8(m_bitmap_color_transform.m_[1][0] * 255.0f),
- Uint8(m_bitmap_color_transform.m_[2][0] * 255.0f),
- Uint8(m_bitmap_color_transform.m_[3][0] * 255.0f));
+ uint8_t(m_bitmap_color_transform.m_[0][0] * 255.0f),
+ uint8_t(m_bitmap_color_transform.m_[1][0] * 255.0f),
+ uint8_t(m_bitmap_color_transform.m_[2][0] * 255.0f),
+ uint8_t(m_bitmap_color_transform.m_[3][0] * 255.0f));
if (m_bitmap_color_transform.m_[0][1] > 1.0f
|| m_bitmap_color_transform.m_[1][1] > 1.0f
@@ -314,7 +314,7 @@
return new bitmap_info_ogl;
}
- gnash::bitmap_info* create_bitmap_info_alpha(int w, int h, Uint8*
data)
+ gnash::bitmap_info* create_bitmap_info_alpha(int w, int h, uint8_t*
data)
// Create a bitmap_info so that it contains an alpha texture
// with the given data (1 byte per texel).
//
@@ -541,7 +541,7 @@
// Send the tris to OpenGL
glEnableClientState(GL_VERTEX_ARRAY);
- glVertexPointer(2, GL_SHORT, sizeof(Sint16) * 2, coords);
+ glVertexPointer(2, GL_SHORT, sizeof(int16_t) * 2, coords);
glDrawArrays(GL_TRIANGLE_STRIP, 0, vertex_count);
if (m_current_styles[LEFT_STYLE].needs_second_pass())
@@ -607,7 +607,7 @@
// antialiased alpha mask of the mesh shape, in the
// destination alpha channel.
glEnableClientState(GL_VERTEX_ARRAY);
- glVertexPointer(2, GL_SHORT, sizeof(Sint16) * 2, coords);
+ glVertexPointer(2, GL_SHORT, sizeof(int16_t) * 2, coords);
glDrawArrays(GL_TRIANGLE_STRIP, 0, vertex_count);
glDisableClientState(GL_VERTEX_ARRAY);
@@ -655,7 +655,7 @@
// Send the line-strip to OpenGL
glEnableClientState(GL_VERTEX_ARRAY);
- glVertexPointer(2, GL_SHORT, sizeof(Sint16) * 2, coords);
+ glVertexPointer(2, GL_SHORT, sizeof(int16_t) * 2, coords);
glDrawArrays(GL_LINE_STRIP, 0, vertex_count);
glDisableClientState(GL_VERTEX_ARRAY);
@@ -842,12 +842,12 @@
// FAST bi-linear filtering
// the code here is designed to be fast, not readable
- Uint8* rescaled = new Uint8[dst_width * dst_height * bytes_per_pixel];
+ uint8_t* rescaled = new uint8_t[dst_width * dst_height * bytes_per_pixel];
float Uf, Vf; // fractional parts
float Ui, Vi; // integral parts
float w1, w2, w3, w4; // weighting
- Uint8* psrc;
- Uint8* pdst = rescaled;
+ uint8_t* psrc;
+ uint8_t* pdst = rescaled;
// i1,i2,i3,i4 are the offsets of the surrounding 4 pixels
const int i1 = 0;
const int i2 = bytes_per_pixel;
@@ -861,7 +861,7 @@
float V=0;
#define BYTE_SAMPLE(offset) \
- (Uint8) (w1 * psrc[i1 + (offset)] + w2 * psrc[i2 + (offset)] + w3 *
psrc[i3 + (offset)] + w4 * psrc[i4 + (offset)])
+ (uint8_t) (w1 * psrc[i1 + (offset)] + w2 * psrc[i2 + (offset)] + w3 *
psrc[i3 + (offset)] + w4 * psrc[i4 + (offset)])
if (bytes_per_pixel == 3)
{
@@ -957,7 +957,7 @@
}
-bitmap_info_ogl::bitmap_info_ogl(int width, int height, Uint8* data)
+bitmap_info_ogl::bitmap_info_ogl(int width, int height, uint8_t* data)
// Initialize this bitmap_info to an alpha image
// containing the specified data (1 byte per texel).
//
Index: gnash/backend/render_handler_xbox.cpp
diff -u gnash/backend/render_handler_xbox.cpp:1.3
gnash/backend/render_handler_xbox.cpp:1.4
--- gnash/backend/render_handler_xbox.cpp:1.3 Sat Feb 25 15:27:35 2006
+++ gnash/backend/render_handler_xbox.cpp Mon May 8 21:12:24 2006
@@ -87,7 +87,7 @@
bitmap_info_xbox(create_empty e);
bitmap_info_xbox(image::rgb* im);
bitmap_info_xbox(image::rgba* im);
- virtual void set_alpha_image(int width, int height, Uint8* data);
+ virtual void set_alpha_image(int width, int height, uint8_t* data);
};
@@ -104,7 +104,7 @@
// not supported
}
- static void make_next_miplevel(int* width, int* height, Uint8* data)
+ static void make_next_miplevel(int* width, int* height, uint8_t* data)
// Utility. Mutates *width, *height and *data to create the
// next mip level.
{
@@ -130,12 +130,12 @@
{
// Resample. Simple average 2x2 --> 1, in-place.
for (int j = 0; j < new_h; j++) {
- Uint8* out = ((Uint8*) data) + j * new_w;
- Uint8* in = ((Uint8*) data) + (j << 1) *
*width;
+ uint8_t* out = ((uint8_t*) data) + j *
new_w;
+ uint8_t* in = ((uint8_t*) data) + (j <<
1) * *width;
for (int i = 0; i < new_w; i++) {
int a;
a = (*(in + 0) + *(in + 1) + *(in + 0 +
*width) + *(in + 1 + *width));
- *(out) = (Uint8) (a >> 2);
+ *(out) = (uint8_t) (a >> 2);
out++;
in += 2;
}
@@ -396,7 +396,7 @@
}
- void set_alpha_image(gnash::bitmap_info* bi, int w, int h, Uint8*
data)
+ void set_alpha_image(gnash::bitmap_info* bi, int w, int h, uint8_t*
data)
// Set the specified bitmap_info so that it contains an alpha
// texture with the given data (1 byte per texel).
//
@@ -647,13 +647,13 @@
// @@ we'd like to use a VB instead, and use DrawPrimitive().
// Draw the mesh.
- IDirect3DDevice8::DrawPrimitiveUP(D3DPT_TRIANGLESTRIP,
vertex_count - 2, coords, sizeof(Sint16) * 2);
+ IDirect3DDevice8::DrawPrimitiveUP(D3DPT_TRIANGLESTRIP,
vertex_count - 2, coords, sizeof(int16_t) * 2);
if (m_current_styles[LEFT_STYLE].needs_second_pass())
{
// 2nd pass, if necessary.
m_current_styles[LEFT_STYLE].apply_second_pass();
- IDirect3DDevice8::DrawPrimitiveUP(D3DPT_TRIANGLESTRIP,
vertex_count - 2, coords, sizeof(Sint16) * 2);
+ IDirect3DDevice8::DrawPrimitiveUP(D3DPT_TRIANGLESTRIP,
vertex_count - 2, coords, sizeof(int16_t) * 2);
m_current_styles[LEFT_STYLE].cleanup_second_pass();
}
@@ -664,7 +664,7 @@
// Send the tris to OpenGL
glEnableClientState(GL_VERTEX_ARRAY);
- glVertexPointer(2, GL_SHORT, sizeof(Sint16) * 2, coords);
+ glVertexPointer(2, GL_SHORT, sizeof(int16_t) * 2, coords);
glDrawArrays(GL_TRIANGLE_STRIP, 0, vertex_count);
if (m_current_styles[LEFT_STYLE].needs_second_pass())
@@ -689,7 +689,7 @@
apply_matrix(m_current_matrix);
- IDirect3DDevice8::DrawPrimitiveUP(D3DPT_LINESTRIP, vertex_count
- 1, coords, sizeof(Sint16) * 2);
+ IDirect3DDevice8::DrawPrimitiveUP(D3DPT_LINESTRIP, vertex_count
- 1, coords, sizeof(int16_t) * 2);
}
@@ -836,10 +836,10 @@
// D3DXLoadSurfaceFromMemory.
// @@ this sucks :(
int pixel_count = w * h;
- Uint8* expanded_data = new Uint8[pixel_count * 4];
+ uint8_t* expanded_data = new uint8_t[pixel_count * 4];
for (int y = 0; y < h; y++)
{
- Uint8* scanline = image::scanline(rescaled, y);
+ uint8_t* scanline = image::scanline(rescaled, y);
for (int x = 0; x < w; x++)
{
expanded_data[((y * w) + x) * 4 + 0] = scanline[x * 3 +
0]; // red
@@ -1066,7 +1066,7 @@
}
-void bitmap_info_xbox::set_alpha_image(int width, int height, Uint8* data)
+void bitmap_info_xbox::set_alpha_image(int width, int height, uint8_t* data)
// Initialize this bitmap_info to an alpha image
// containing the specified data (1 byte per texel).
//
Index: gnash/backend/sound_handler_sdl.cpp
diff -u gnash/backend/sound_handler_sdl.cpp:1.8
gnash/backend/sound_handler_sdl.cpp:1.9
--- gnash/backend/sound_handler_sdl.cpp:1.8 Thu Apr 20 17:21:40 2006
+++ gnash/backend/sound_handler_sdl.cpp Mon May 8 21:12:24 2006
@@ -23,7 +23,7 @@
bool m_opened;
bool m_stereo;
int m_sample_rate;
- Uint16 m_format;
+ uint16_t m_format;
std::vector<Mix_Chunk*> m_samples;
#define SAMPLE_RATE 44100
@@ -114,7 +114,7 @@
return 0;
}
- Sint16* adjusted_data = 0;
+ int16_t* adjusted_data = 0;
int adjusted_size = 0;
Mix_Chunk* sample = 0;
@@ -130,9 +130,9 @@
case FORMAT_MP3:
#ifdef HAVE_MAD_H
- extern void convert_mp3_data(Sint16 **adjusted_data,
int *adjusted_size, void *data, const int sample_count, const int sample_size,
const int sample_rate, const bool stereo);
+ extern void convert_mp3_data(int16_t **adjusted_data,
int *adjusted_size, void *data, const int sample_count, const int sample_size,
const int sample_rate, const bool stereo);
if (1) {
- Sint16* x_adjusted_data = 0;
+ int16_t* x_adjusted_data = 0;
int x_adjusted_size = 0;
// Mix_Chunk* x_sample = 0;
convert_mp3_data(&x_adjusted_data,
&x_adjusted_size, data, sample_count, 0, sample_rate, stereo);
@@ -218,7 +218,7 @@
}
virtual void convert_raw_data(
- Sint16** adjusted_data,
+ int16_t** adjusted_data,
int* adjusted_size,
void* data,
int sample_count,
@@ -232,7 +232,7 @@
// // xxxxx debug pass-thru
// {
// int output_sample_count = sample_count * (stereo ?
2 : 1);
-// Sint16* out_data = new Sint16[output_sample_count];
+// int16_t* out_data = new
int16_t[output_sample_count];
// *adjusted_data = out_data;
// *adjusted_size = output_sample_count * 2; // 2
bytes per sample
// memcpy(out_data, data, *adjusted_size);
@@ -266,17 +266,17 @@
}
int output_sample_count = (sample_count * dup) / inc;
- Sint16* out_data = new Sint16[output_sample_count];
+ int16_t* out_data = new int16_t[output_sample_count];
*adjusted_data = out_data;
*adjusted_size = output_sample_count * 2; // 2 bytes per
sample
if (sample_size == 1)
{
// Expand from 8 bit to 16 bit.
- Uint8* in = (Uint8*) data;
+ uint8_t* in = (uint8_t*) data;
for (int i = 0; i < output_sample_count; i++)
{
- Uint8 val = *in;
+ uint8_t val = *in;
for (int j = 0; j < dup; j++)
{
*out_data++ = (int(val) - 128);
@@ -287,10 +287,10 @@
else
{
// 16-bit to 16-bit conversion.
- Sint16* in = (Sint16*) data;
+ int16_t* in = (int16_t*) data;
for (int i = 0; i < output_sample_count; i += dup)
{
- Sint16 val = *in;
+ int16_t val = *in;
for (int j = 0; j < dup; j++)
{
*out_data++ = val;
Index: gnash/configure.ac
diff -u gnash/configure.ac:1.64 gnash/configure.ac:1.65
--- gnash/configure.ac:1.64 Thu May 4 14:32:13 2006
+++ gnash/configure.ac Mon May 8 21:12:24 2006
@@ -317,6 +317,16 @@
# We want warnings, lots of warnings :-)
if test "$GCC" = "yes"; then
+ CXXFLAGS="$CXXFLAGS \
+ -ansi \
+ -Wall \
+ "
+
+ CFLAGS="$CFLAGS \
+ -ansi \
+ -Wall \
+ "
+
if test x"$lotsa" = x"yes"; then
# Source do not build with -ansi -pedantic yet
CXXFLAGS="$CXXFLAGS \
@@ -338,9 +348,6 @@
-Wmissing-prototypes \
-Wstrict-prototypes \
"
- else
- CXXFLAGS="$CXXFLAGS -Wall"
- CFLAGS="$CFLAGS -Wall"
fi
fi
Index: gnash/gui/sdl.cpp
diff -u gnash/gui/sdl.cpp:1.1 gnash/gui/sdl.cpp:1.2
--- gnash/gui/sdl.cpp:1.1 Sun May 7 15:33:08 2006
+++ gnash/gui/sdl.cpp Mon May 8 21:12:24 2006
@@ -193,7 +193,7 @@
_width = width;
_height = height;
- Uint32 sdl_flags;
+ uint32_t sdl_flags;
#ifdef RENDERER_CAIRO
sdl_flags = SDL_SWSURFACE;
#elif defined(RENDERER_OPENGL)
@@ -254,7 +254,7 @@
GNASH_REPORT_FUNCTION;
#ifdef RENDERER_CAIRO
- Uint32 rmask, gmask, bmask, amask;
+ uint32_t rmask, gmask, bmask, amask;
rmask = 0x00ff0000;
gmask = 0x0000ff00;
Index: gnash/libbase/container.cpp
diff -u gnash/libbase/container.cpp:1.5 gnash/libbase/container.cpp:1.6
--- gnash/libbase/container.cpp:1.5 Mon Mar 6 01:43:26 2006
+++ gnash/libbase/container.cpp Mon May 8 21:12:24 2006
@@ -119,7 +119,7 @@
int offset;
for (;;)
{
- Uint32 uc = *in++;
+ uint32_t uc = *in++;
offset = 0;
utf8::encode_unicode_character(dummy, &offset, uc);
bytes_needed += offset;
@@ -141,7 +141,7 @@
{
assert(offset < bytes_needed);
- Uint32 uc = *in++;
+ uint32_t uc = *in++;
utf8::encode_unicode_character(out, &offset, uc);
assert(offset <= bytes_needed);
@@ -348,14 +348,14 @@
void test_hash()
{
// Collect a bunch of random key/value pairs.
- std::vector<Uint32> data;
+ std::vector<uint32_t> data;
for (int i = 0; i < 1000; i++)
{
data.push_back(tu_random::next_random());
}
// Push into hash.
- hash<Uint32, Uint32> h;
+ hash<uint32_t, uint32_t> h;
{for (int i = 0; i < data.size() / 2; i++)
{
h.add(data[i*2], data[i*2 + 1]);
@@ -363,8 +363,8 @@
// Verify the contents of the hash so far.
for (int j = 0; j < i; j++)
{
- Uint32 key = data[j*2];
- Uint32 val;
+ uint32_t key = data[j*2];
+ uint32_t val;
bool got = h.get(key, &val);
assert(got);
assert(val == data[j*2 + 1]);
@@ -372,15 +372,15 @@
}}
// Manually copy stuff over to h2, using iterator interface.
- hash<Uint32, Uint32> h2;
- {for (hash<Uint32, Uint32>::iterator it = h.begin(); it != h.end();
++it)
+ hash<uint32_t, uint32_t> h2;
+ {for (hash<uint32_t, uint32_t>::iterator it = h.begin(); it != h.end();
++it)
{
//printf("first = 0x%X, second = 0x%X\n", it->first,
it->second);//xxxxx
assert(h.get(it->first, NULL) == true);
h2.add(it->first, it->second);
- Uint32 val;
+ uint32_t val;
bool got = h2.get(it->first, &val);
assert(got);
assert(val == it->second);
@@ -389,8 +389,8 @@
// Verify the contents of h2.
{for (int i = 0; i < data.size() / 2; i++)
{
- Uint32 key = data[i*2];
- Uint32 val;
+ uint32_t key = data[i*2];
+ uint32_t val;
bool got = h.get(key, &val);
assert(got);
assert(val == data[i*2 + 1]);
@@ -400,7 +400,7 @@
assert(h.size() == 0);
// Verify that h really is missing the stuff it had before, and h2
really has it.
- {for (hash<Uint32, Uint32>::iterator it = h2.begin(); it != h2.end();
++it)
+ {for (hash<uint32_t, uint32_t>::iterator it = h2.begin(); it !=
h2.end(); ++it)
{
assert(h.get(it->first, NULL) == false);
assert(h2.get(it->first, NULL) == true);
Index: gnash/libbase/image.cpp
diff -u gnash/libbase/image.cpp:1.6 gnash/libbase/image.cpp:1.7
--- gnash/libbase/image.cpp:1.6 Mon Apr 24 14:42:52 2006
+++ gnash/libbase/image.cpp Mon May 8 21:12:24 2006
@@ -20,7 +20,7 @@
//
// image_base
//
- image_base::image_base(Uint8* data, int width, int height, int pitch)
+ image_base::image_base(uint8_t* data, int width, int height, int pitch)
:
m_data(data),
m_width(width),
@@ -30,19 +30,19 @@
}
- Uint8* scanline(image_base* surf, int y)
+ uint8_t* scanline(image_base* surf, int y)
{
assert(surf);
assert(y >= 0 && y < surf->m_height);
- return ((Uint8*) surf->m_data) + surf->m_pitch * y;
+ return ((uint8_t*) surf->m_data) + surf->m_pitch * y;
}
- const Uint8* scanline(const image_base* surf, int y)
+ const uint8_t* scanline(const image_base* surf, int y)
{
assert(surf);
assert(y >= 0 && y < surf->m_height);
- return ((const Uint8*) surf->m_data) + surf->m_pitch * y;
+ return ((const uint8_t*) surf->m_data) + surf->m_pitch * y;
}
@@ -63,8 +63,8 @@
assert(m_pitch >= m_width * 3);
assert((m_pitch & 3) == 0);
-// m_data = (Uint8*) dlmalloc(m_pitch * m_height);
- m_data = new Uint8[m_pitch * m_height];
+// m_data = (uint8_t*) dlmalloc(m_pitch * m_height);
+ m_data = new uint8_t[m_pitch * m_height];
}
rgb::~rgb()
@@ -102,8 +102,8 @@
assert(m_pitch >= m_width * 4);
assert((m_pitch & 3) == 0);
-// m_data = (Uint8*) dlmalloc(m_pitch * m_height);
- m_data = new Uint8[m_pitch * m_height];
+// m_data = (uint8_t*) dlmalloc(m_pitch * m_height);
+ m_data = new uint8_t[m_pitch * m_height];
}
rgba::~rgba()
@@ -127,13 +127,13 @@
}
- void rgba::set_pixel(int x, int y, Uint8 r, Uint8 g, Uint8 b, Uint8
a)
+ void rgba::set_pixel(int x, int y, uint8_t r, uint8_t g, uint8_t b,
uint8_t a)
// Set the pixel at the given position.
{
assert(x >= 0 && x < m_width);
assert(y >= 0 && y < m_height);
- Uint8* data = scanline(this, y) + 4 * x;
+ uint8_t* data = scanline(this, y) + 4 * x;
data[0] = r;
data[1] = g;
@@ -163,8 +163,8 @@
assert(width > 0);
assert(height > 0);
-// m_data = (Uint8*) dlmalloc(m_pitch * m_height);
- m_data = new Uint8[m_pitch * m_height];
+// m_data = (uint8_t*) dlmalloc(m_pitch * m_height);
+ m_data = new uint8_t[m_pitch * m_height];
}
@@ -178,13 +178,13 @@
}
- void alpha::set_pixel(int x, int y, Uint8 a)
+ void alpha::set_pixel(int x, int y, uint8_t a)
// Set the pixel at the given position.
{
assert(x >= 0 && x < m_width);
assert(y >= 0 && y < m_height);
- Uint8* data = scanline(this, y) + x;
+ uint8_t* data = scanline(this, y) + x;
data[0] = a;
}
@@ -314,13 +314,13 @@
rgba* im = image::create_rgba(j_in->get_width(),
j_in->get_height());
- Uint8* line = new Uint8[3*j_in->get_width()];
+ uint8_t* line = new uint8_t[3*j_in->get_width()];
for (int y = 0; y < j_in->get_height(); y++)
{
j_in->read_scanline(line);
- Uint8* data = scanline(im, y);
+ uint8_t* data = scanline(im, y);
for (int x = 0; x < j_in->get_width(); x++)
{
data[4*x+0] = line[3*x+0];
@@ -375,7 +375,7 @@
//
// DELETES image!!!
{
- assert(image->m_pitch < 65536); // SDL_Surface only uses Uint16
for pitch!!!
+ assert(image->m_pitch < 65536); // SDL_Surface only uses
uint16_t for pitch!!!
SDL_Surface* s = SDL_CreateRGBSurfaceFrom(image->m_data,
image->m_width,
image->m_height, 24, image->m_pitch,
@@ -428,8 +428,8 @@
// Resample. Simple average 2x2 --> 1, in-place.
int pitch = image->m_pitch;
for (int j = 0; j < new_h; j++) {
- Uint8* out = ((Uint8*) image->m_data) + j *
new_pitch;
- Uint8* in = ((Uint8*) image->m_data) + (j <<
1) * pitch;
+ uint8_t* out = ((uint8_t*)
image->m_data) + j * new_pitch;
+ uint8_t* in = ((uint8_t*) image->m_data)
+ (j << 1) * pitch;
for (int i = 0; i < new_w; i++) {
int r, g, b;
r = (*(in + 0) + *(in + 3) + *(in + 0 +
pitch) + *(in + 3 + pitch));
@@ -478,8 +478,8 @@
// Resample. Simple average 2x2 --> 1, in-place.
int pitch = image->m_pitch;
for (int j = 0; j < new_h; j++) {
- Uint8* out = ((Uint8*) image->m_data) + j *
new_pitch;
- Uint8* in = ((Uint8*) image->m_data) + (j <<
1) * pitch;
+ uint8_t* out = ((uint8_t*)
image->m_data) + j * new_pitch;
+ uint8_t* in = ((uint8_t*) image->m_data)
+ (j << 1) * pitch;
for (int i = 0; i < new_w; i++) {
int r, g, b, a;
r = (*(in + 0) + *(in + 4) + *(in + 0 +
pitch) + *(in + 4 + pitch));
Index: gnash/libbase/image.h
diff -u gnash/libbase/image.h:1.4 gnash/libbase/image.h:1.5
--- gnash/libbase/image.h:1.4 Wed Feb 15 13:53:27 2006
+++ gnash/libbase/image.h Mon May 8 21:12:24 2006
@@ -21,12 +21,12 @@
/// Base class for different types of images
struct image_base
{
- Uint8* m_data;
+ uint8_t* m_data;
int m_width;
int m_height;
int m_pitch; // byte offset from one row to the next
- image_base(Uint8* data, int width, int height, int pitch);
+ image_base(uint8_t* data, int width, int height, int pitch);
};
/// 24-bit RGB image. Packed data, red byte first (RGBRGB...)
@@ -42,7 +42,7 @@
rgba(int width, int height);
~rgba();
- void set_pixel(int x, int y, Uint8 r, Uint8 g, Uint8 b,
Uint8 a);
+ void set_pixel(int x, int y, uint8_t r, uint8_t g, uint8_t
b, uint8_t a);
};
/// 8-bit alpha image.
@@ -51,7 +51,7 @@
alpha(int width, int height);
~alpha();
- void set_pixel(int x, int y, Uint8 a);
+ void set_pixel(int x, int y, uint8_t a);
// Bitwise content comparison.
bool operator==(const alpha& a) const;
@@ -76,8 +76,8 @@
alpha* create_alpha(int width, int height);
- Uint8* scanline(image_base* surf, int y);
- const Uint8* scanline(const image_base* surf, int y);
+ uint8_t* scanline(image_base* surf, int y);
+ const uint8_t* scanline(const image_base* surf, int y);
void resample(rgb* out, int out_x0, int out_y0, int out_x1, int
out_y1,
Index: gnash/libbase/image_filters.cpp
diff -u gnash/libbase/image_filters.cpp:1.6 gnash/libbase/image_filters.cpp:1.7
--- gnash/libbase/image_filters.cpp:1.6 Tue Apr 4 20:42:56 2006
+++ gnash/libbase/image_filters.cpp Mon May 8 21:12:24 2006
@@ -39,7 +39,7 @@
}
-void get_row(Uint8* row, image::rgb* image, int x0, int xsize, int y)
+void get_row(uint8_t* row, image::rgb* image, int x0, int xsize, int y)
// Copy RGB data from the specified row into the given buffer.
{
y = iclamp(y, 0, image->m_height - 1);
@@ -47,11 +47,11 @@
if (x1 >= image->m_width) {
// clip, then extend.
int extra_pixels = x1 - image->m_width + 1;
- Uint8* p = ((Uint8*) image->m_data) + (y * image->m_pitch);
+ uint8_t* p = ((uint8_t*) image->m_data) + (y * image->m_pitch);
memcpy(row, p + x0 * 3, (3 * (image->m_width - x0)));
// repeat last pixel
p = p + (image->m_width - 1) * 3;
- Uint8* q = row + (image->m_width - x0) * 3;
+ uint8_t* q = row + (image->m_width - x0) * 3;
while (extra_pixels > 0) {
*(q + 0) = *(p + 0);
*(q + 1) = *(p + 1);
@@ -62,12 +62,12 @@
}
else
{
- memcpy(row, ((Uint8*) image->m_data) + (y * image->m_pitch) + x0 *
3, (3 * xsize));
+ memcpy(row, ((uint8_t*) image->m_data) + (y * image->m_pitch) + x0
* 3, (3 * xsize));
}
}
-void get_row(Uint8* row, image::rgba* image, int x0, int xsize, int y)
+void get_row(uint8_t* row, image::rgba* image, int x0, int xsize, int y)
// Copy RGBA data from the specified row into the given buffer.
{
y = iclamp(y, 0, image->m_height - 1);
@@ -75,11 +75,11 @@
if (x1 >= image->m_width) {
// clip, then extend.
int extra_pixels = x1 - image->m_width + 1;
- Uint8* p = ((Uint8*) image->m_data) + (y * image->m_pitch);
+ uint8_t* p = ((uint8_t*) image->m_data) + (y * image->m_pitch);
memcpy(row, p + x0 * 4, (4 * (image->m_width - x0)));
// repeat last pixel
p = p + (image->m_width - 1) * 4;
- Uint8* q = row + (image->m_width - x0) * 4;
+ uint8_t* q = row + (image->m_width - x0) * 4;
while (extra_pixels > 0) {
*(q + 0) = *(p + 0);
*(q + 1) = *(p + 1);
@@ -91,16 +91,16 @@
}
else
{
- memcpy(row, ((Uint8*) image->m_data) + (y * image->m_pitch) + x0 *
4, (4 * xsize));
+ memcpy(row, ((uint8_t*) image->m_data) + (y * image->m_pitch) + x0
* 4, (4 * xsize));
}
}
-void get_column(Uint8* column, image::rgb* image, int x)
+void get_column(uint8_t* column, image::rgb* image, int x)
// Copy RGB data from the specified column into the given buffer.
{
int i, d;
- Uint8* p;
+ uint8_t* p;
if ((x < 0) || (x >= image->m_width)) {
assert(0);
@@ -108,7 +108,7 @@
}
d = image->m_pitch;
- for (i = image->m_height, p = ((Uint8*) image->m_data) + x * 3; i-- > 0; p
+= d) {
+ for (i = image->m_height, p = ((uint8_t*) image->m_data) + x * 3; i-- > 0;
p += d) {
*column++ = *p;
*column++ = *(p + 1);
*column++ = *(p + 2);
@@ -116,11 +116,11 @@
}
-void get_column(Uint8* column, image::rgba* image, int x)
+void get_column(uint8_t* column, image::rgba* image, int x)
// Copy RGBA data from the specified column into the given buffer.
{
int i, d;
- Uint8* p;
+ uint8_t* p;
if ((x < 0) || (x >= image->m_width)) {
assert(0);
@@ -128,7 +128,7 @@
}
d = image->m_pitch;
- for (i = image->m_height, p = ((Uint8*) image->m_data) + x * 4; i-- > 0; p
+= d) {
+ for (i = image->m_height, p = ((uint8_t*) image->m_data) + x * 4; i-- > 0;
p += d) {
*column++ = *p;
*column++ = *(p + 1);
*column++ = *(p + 2);
@@ -143,7 +143,7 @@
{
static image::rgb* im = NULL;
static int yy = -1;
- static Uint8* p = NULL;
+ static uint8_t* p = NULL;
if ((x < 0) || (x >= image->m_width) || (y < 0) || (y >= image->m_height))
{
assert(0);
@@ -152,7 +152,7 @@
if ((im != image) || (yy != y)) {
im = image;
yy = y;
- p = ((Uint8*) image->m_data) + (y * image->m_pitch);
+ p = ((uint8_t*) image->m_data) + (y * image->m_pitch);
}
p[x * 3 + 0] = iclamp(frnd(r), 0, 255);
p[x * 3 + 1] = iclamp(frnd(g), 0, 255);
@@ -166,7 +166,7 @@
{
static image::rgba* im = NULL;
static int yy = -1;
- static Uint8* p = NULL;
+ static uint8_t* p = NULL;
if ((x < 0) || (x >= image->m_width) || (y < 0) || (y >= image->m_height))
{
assert(0);
@@ -175,7 +175,7 @@
if ((im != image) || (yy != y)) {
im = image;
yy = y;
- p = ((Uint8*) image->m_data) + (y * image->m_pitch);
+ p = ((uint8_t*) image->m_data) + (y * image->m_pitch);
}
p[x * 4 + 0] = iclamp(frnd(r), 0, 255);
p[x * 4 + 1] = iclamp(frnd(g), 0, 255);
@@ -396,7 +396,7 @@
int n; /* pixel number */
float center; int left, right; /* filter calculation variables */
float width, fscale, weight; /* filter calculation variables */
- Uint8* raster; /* a row or column of pixels */
+ uint8_t* raster; /* a row or column of pixels */
std::vector< std::vector<CONTRIB> > contrib;
@@ -456,7 +456,7 @@
}
/* apply filter to zoom horizontally from src to tmp */
- raster = (Uint8*) my_calloc(in_window_w, 3);
+ raster = (uint8_t*) my_calloc(in_window_w, 3);
for (k = 0; k < tmp->m_height; ++k) {
get_row(raster, in, int(floorf(in_x0)), in_window_w, k);
for (i = 0; i < tmp->m_width; ++i) {
@@ -508,7 +508,7 @@
}
/* apply filter to zoom vertically from tmp to dst */
- raster = (Uint8*) my_calloc(tmp->m_height, 3);
+ raster = (uint8_t*) my_calloc(tmp->m_height, 3);
for (k = 0; k < tmp->m_width; ++k) {
get_column(raster, tmp, k);
for (i = 0; i < out_height; ++i) {
@@ -563,7 +563,7 @@
int n; /* pixel number */
float center; int left, right; /* filter calculation variables */
float width, fscale, weight; /* filter calculation variables */
- Uint8* raster; /* a row or column of pixels */
+ uint8_t* raster; /* a row or column of pixels */
std::vector< std::vector<CONTRIB> > contrib;
@@ -623,7 +623,7 @@
}
/* apply filter to zoom horizontally from src to tmp */
- raster = (Uint8*) my_calloc(in_window_w, 4);
+ raster = (uint8_t*) my_calloc(in_window_w, 4);
for (k = 0; k < tmp->m_height; ++k) {
get_row(raster, in, int(floorf(in_x0)), in_window_w, k);
for (i = 0; i < tmp->m_width; ++i) {
@@ -677,7 +677,7 @@
}
/* apply filter to zoom vertically from tmp to dst */
- raster = (Uint8*) my_calloc(tmp->m_height, 4);
+ raster = (uint8_t*) my_calloc(tmp->m_height, 4);
for (k = 0; k < tmp->m_width; ++k) {
get_column(raster, tmp, k);
for (i = 0; i < out_height; ++i) {
@@ -715,10 +715,10 @@
GNASH_REPORT_FUNCTION;
typedef struct
{
- Uint8 r;
- Uint8 g;
- Uint8 b;
- Uint8 a;
+ uint8_t r;
+ uint8_t g;
+ uint8_t b;
+ uint8_t a;
}
rgba;
@@ -732,8 +732,8 @@
sy = (int) (65536.0 * (float) (src->m_height - 1) / (float) dst->m_height);
/* Allocate memory for row increments */
- sax = (int*) malloc ((dst->m_width + 1) * sizeof (Uint32));
- say = (int*) malloc ((dst->m_height + 1) * sizeof (Uint32));
+ sax = (int*) malloc ((dst->m_width + 1) * sizeof (uint32_t));
+ say = (int*) malloc ((dst->m_height + 1) * sizeof (uint32_t));
/* Precalculate row increments */
csx = 0;
@@ -770,7 +770,7 @@
c00 = csp;
c01 = csp;
c01++;
- c10 = (rgba *) ((Uint8 *) csp + src->m_pitch);
+ c10 = (rgba *) ((uint8_t *) csp + src->m_pitch);
c11 = c10;
c11++;
csax = sax;
@@ -805,9 +805,9 @@
}
/* Advance source pointer */
csay++;
- csp = (rgba *) ((Uint8 *) csp + (*csay >> 16) * src->m_pitch);
+ csp = (rgba *) ((uint8_t *) csp + (*csay >> 16) * src->m_pitch);
/* Advance destination pointers */
- dp = (rgba *) ((Uint8 *) dp + dgap);
+ dp = (rgba *) ((uint8_t *) dp + dgap);
}
/* Remove temp arrays */
Index: gnash/libbase/tu_file.cpp
diff -u gnash/libbase/tu_file.cpp:1.5 gnash/libbase/tu_file.cpp:1.6
--- gnash/libbase/tu_file.cpp:1.5 Thu Mar 30 19:12:53 2006
+++ gnash/libbase/tu_file.cpp Mon May 8 21:12:24 2006
@@ -404,7 +404,7 @@
{
// @@ bah, should buffer this!
while (src->get_eof() == false) {
- Uint8 b = src->read8();
+ uint8_t b = src->read8();
if (src->get_error()) {
break;
}
Index: gnash/libbase/tu_file.h
diff -u gnash/libbase/tu_file.h:1.5 gnash/libbase/tu_file.h:1.6
--- gnash/libbase/tu_file.h:1.5 Mon May 8 15:06:33 2006
+++ gnash/libbase/tu_file.h Mon May 8 21:12:24 2006
@@ -86,21 +86,21 @@
int copy_bytes(tu_file* in, int bytes);
uint64 read_le64();
- Uint32 read_le32();
- Uint16 read_le16();
+ uint32_t read_le32();
+ uint16_t read_le16();
uint64 read_be64();
- Uint32 read_be32();
- Uint16 read_be16();
+ uint32_t read_be32();
+ uint16_t read_be16();
void write_le64(uint64 u);
- void write_le32(Uint32 u);
- void write_le16(Uint16 u);
+ void write_le32(uint32_t u);
+ void write_le16(uint16_t u);
void write_be64(uint64 u);
- void write_be32(Uint32 u);
- void write_be16(Uint16 u);
+ void write_be32(uint32_t u);
+ void write_be16(uint16_t u);
// read/write a single byte
- Uint8 read_byte() { return read8(); }
- void write_byte(Uint8 u) { write8(u); }
+ uint8_t read_byte() { return read8(); }
+ void write_byte(uint8_t u) { write8(u); }
// Read/write a byte buffer.
// Returns number of bytes read/written.
@@ -145,18 +145,18 @@
m_read(&u, 8, m_data);
return u;
}
- Uint32 read32() {
- Uint32 u;
+ uint32_t read32() {
+ uint32_t u;
m_read(&u, 4, m_data);
return u;
}
- Uint16 read16() {
- Uint16 u;
+ uint16_t read16() {
+ uint16_t u;
m_read(&u, 2, m_data);
return u;
}
- Uint8 read8() {
- Uint8 u;
+ uint8_t read8() {
+ uint8_t u;
m_read(&u, 1, m_data);
return u;
}
@@ -164,13 +164,13 @@
void write64(uint64 u) {
m_write(&u, 8, m_data);
}
- void write32(Uint32 u) {
+ void write32(uint32_t u) {
m_write(&u, 4, m_data);
}
- void write16(Uint16 u) {
+ void write16(uint16_t u) {
m_write(&u, 2, m_data);
}
- void write8(Uint8 u) {
+ void write8(uint8_t u) {
m_write(&u, 1, m_data);
}
@@ -195,30 +195,30 @@
#if _TU_LITTLE_ENDIAN_
inline uint64 tu_file::read_le64() { return read64(); }
-inline Uint32 tu_file::read_le32() { return read32(); }
-inline Uint16 tu_file::read_le16() { return read16(); }
+inline uint32_t tu_file::read_le32() { return read32(); }
+inline uint16_t tu_file::read_le16() { return read16(); }
inline uint64 tu_file::read_be64() { return swap64(read64()); }
-inline Uint32 tu_file::read_be32() { return swap32(read32()); }
-inline Uint16 tu_file::read_be16() { return swap16(read16()); }
+inline uint32_t tu_file::read_be32() { return swap32(read32()); }
+inline uint16_t tu_file::read_be16() { return swap16(read16()); }
inline void tu_file::write_le64(uint64 u) { write64(u); }
-inline void tu_file::write_le32(Uint32 u) { write32(u); }
-inline void tu_file::write_le16(Uint16 u) { write16(u); }
+inline void tu_file::write_le32(uint32_t u) { write32(u); }
+inline void tu_file::write_le16(uint16_t u) { write16(u); }
inline void tu_file::write_be64(uint64 u) { write64(swap64(u)); }
-inline void tu_file::write_be32(Uint32 u) { write32(swap32(u)); }
-inline void tu_file::write_be16(Uint16 u) { write16(swap16(u)); }
+inline void tu_file::write_be32(uint32_t u) { write32(swap32(u)); }
+inline void tu_file::write_be16(uint16_t u) { write16(swap16(u)); }
#else // not _TU_LITTLE_ENDIAN_
inline uint64 tu_file::read_le64() { return swap64(read64()); }
-inline Uint32 tu_file::read_le32() { return swap32(read32()); }
-inline Uint16 tu_file::read_le16() { return swap16(read16()); }
+inline uint32_t tu_file::read_le32() { return swap32(read32()); }
+inline uint16_t tu_file::read_le16() { return swap16(read16()); }
inline uint64 tu_file::read_be64() { return read64(); }
-inline Uint32 tu_file::read_be32() { return read32(); }
-inline Uint16 tu_file::read_be16() { return read16(); }
+inline uint32_t tu_file::read_be32() { return read32(); }
+inline uint16_t tu_file::read_be16() { return read16(); }
inline void tu_file::write_le64(uint64 u) { write64(swap64(u)); }
-inline void tu_file::write_le32(Uint32 u) { write32(swap32(u)); }
-inline void tu_file::write_le16(Uint16 u) { write16(swap16(u)); }
+inline void tu_file::write_le32(uint32_t u) { write32(swap32(u)); }
+inline void tu_file::write_le16(uint16_t u) { write16(swap16(u)); }
inline void tu_file::write_be64(uint64 u) { write64(u); }
-inline void tu_file::write_be32(Uint32 u) { write32(u); }
-inline void tu_file::write_be16(Uint16 u) { write16(u); }
+inline void tu_file::write_be32(uint32_t u) { write32(u); }
+inline void tu_file::write_be16(uint16_t u) { write16(u); }
#endif // not _TU_LITTLE_ENDIAN_
@@ -227,9 +227,9 @@
{
union alias {
float f;
- Uint32 i;
+ uint32_t i;
} u;
- compiler_assert(sizeof(alias) == sizeof(Uint32));
+ compiler_assert(sizeof(alias) == sizeof(uint32_t));
u.f = value;
write_le32(u.i);
@@ -241,7 +241,7 @@
{
union {
float f;
- Uint32 i;
+ uint32_t i;
} u;
compiler_assert(sizeof(u) == sizeof(u.i));
Index: gnash/libbase/tu_random.cpp
diff -u gnash/libbase/tu_random.cpp:1.3 gnash/libbase/tu_random.cpp:1.4
--- gnash/libbase/tu_random.cpp:1.3 Mon May 8 15:06:34 2006
+++ gnash/libbase/tu_random.cpp Mon May 8 21:12:24 2006
@@ -14,12 +14,12 @@
// Global generator.
static generator s_generator;
- Uint32 next_random()
+ uint32_t next_random()
{
return s_generator.next_random();
}
- void seed_random(Uint32 seed)
+ void seed_random(uint32_t seed)
{
s_generator.seed_random(seed);
}
@@ -68,11 +68,11 @@
}
- void generator::seed_random(Uint32 seed)
+ void generator::seed_random(uint32_t seed)
{
// Simple pseudo-random to reseed the seeds.
// Suggested by the above article.
- Uint32 j = seed;
+ uint32_t j = seed;
for (int i = 0; i < SEED_COUNT; i++)
{
j = j ^ (j << 13);
@@ -83,27 +83,27 @@
}
- Uint32 generator::next_random()
+ uint32_t generator::next_random()
// Return the next pseudo-random number in the sequence.
{
uint64 t;
- Uint32 x;
+ uint32_t x;
- //static Uint32 c = 362436;
- //static Uint32 i = SEED_COUNT - 1;
- const Uint32 r = 0xFFFFFFFE;
+ //static uint32_t c = 362436;
+ //static uint32_t i = SEED_COUNT - 1;
+ const uint32_t r = 0xFFFFFFFE;
i = (i+1) & (SEED_COUNT - 1);
t = a * Q[i] + c;
- c = (Uint32) (t >> 32);
- x = (Uint32) (t + c);
+ c = (uint32_t) (t >> 32);
+ x = (uint32_t) (t + c);
if (x < c)
{
x++;
c++;
}
- Uint32 val = r - x;
+ uint32_t val = r - x;
Q[i] = val;
return val;
}
@@ -111,7 +111,7 @@
float generator::get_unit_float()
{
- Uint32 r = next_random();
+ uint32_t r = next_random();
// 24 bits of precision.
return float(r >> 8) / (16777216.0f - 1.0f);
@@ -133,7 +133,7 @@
for (int i = 0; i < COUNT; i++)
{
- Uint32 val = tu_random::next_random();
+ uint32_t val = tu_random::next_random();
fwrite(&val, sizeof(val), 1, stdout);
}
}
Index: gnash/libbase/tu_random.h
diff -u gnash/libbase/tu_random.h:1.1 gnash/libbase/tu_random.h:1.2
--- gnash/libbase/tu_random.h:1.1 Tue Dec 20 20:57:00 2005
+++ gnash/libbase/tu_random.h Mon May 8 21:12:24 2006
@@ -17,8 +17,8 @@
namespace tu_random
{
// Global generator.
- Uint32 next_random();
- void seed_random(Uint32 seed);
+ uint32_t next_random();
+ void seed_random(uint32_t seed);
float get_unit_float();
// In case you need independent generators. The global
@@ -27,14 +27,14 @@
struct generator
{
generator();
- void seed_random(Uint32 seed); // not necessary
- Uint32 next_random();
+ void seed_random(uint32_t seed); // not necessary
+ uint32_t next_random();
float get_unit_float();
private:
- Uint32 Q[SEED_COUNT];
- Uint32 c;
- Uint32 i;
+ uint32_t Q[SEED_COUNT];
+ uint32_t c;
+ uint32_t i;
};
} // end namespace tu_random
Index: gnash/libbase/tu_swap.h
diff -u gnash/libbase/tu_swap.h:1.3 gnash/libbase/tu_swap.h:1.4
--- gnash/libbase/tu_swap.h:1.3 Mon May 8 15:06:34 2006
+++ gnash/libbase/tu_swap.h Mon May 8 21:12:24 2006
@@ -32,7 +32,7 @@
#undef swap16
#endif
-inline Uint16 swap16(Uint16 u)
+inline uint16_t swap16(uint16_t u)
{
return ((u & 0x00FF) << 8) |
((u & 0xFF00) >> 8);
@@ -41,7 +41,7 @@
#ifdef swap32
#undef swap32
#endif
-inline Uint32 swap32(Uint32 u)
+inline uint32_t swap32(uint32_t u)
{
return ((u & 0x000000FF) << 24) |
((u & 0x0000FF00) << 8) |
@@ -89,7 +89,7 @@
}
-inline Uint32 swap_le32(Uint32 le_32)
+inline uint32_t swap_le32(uint32_t le_32)
// Given a 32-bit little-endian piece of data, return it as a 32-bit
// integer in native endian-ness. I.e. on a little-endian machine,
// this just returns the input; on a big-endian machine, this swaps
@@ -103,7 +103,7 @@
}
-inline Uint16 swap_le16(Uint16 le_16)
+inline uint16_t swap_le16(uint16_t le_16)
// Given a 16-bit little-endian piece of data, return it as a 16-bit
// integer in native endianness.
{
@@ -115,7 +115,7 @@
}
-inline Uint32 swap_be32(Uint32 le_32)
+inline uint32_t swap_be32(uint32_t le_32)
// Given a 32-bit big-endian piece of data, return it as a 32-bit
// integer in native endian-ness. I.e. on a little-endian machine,
// this swaps the bytes around; on a big-endian machine, it just
@@ -129,7 +129,7 @@
}
-inline Uint16 swap_be16(Uint16 le_16)
+inline uint16_t swap_be16(uint16_t le_16)
// Given a 16-bit big-endian piece of data, return it as a 16-bit
// integer in native endianness.
{
Index: gnash/libbase/tu_types.cpp
diff -u gnash/libbase/tu_types.cpp:1.3 gnash/libbase/tu_types.cpp:1.4
--- gnash/libbase/tu_types.cpp:1.3 Mon May 8 15:06:34 2006
+++ gnash/libbase/tu_types.cpp Mon May 8 21:12:24 2006
@@ -14,13 +14,13 @@
bool tu_types_validate()
{
// Check typedef sizes.
- if (sizeof(Uint8) != 1
- || sizeof(Uint16) != 2
- || sizeof(Uint32) != 4
+ if (sizeof(uint8_t) != 1
+ || sizeof(uint16_t) != 2
+ || sizeof(uint32_t) != 4
|| sizeof(uint64) != 8
- || sizeof(Sint8) != 1
- || sizeof(Sint16) != 2
- || sizeof(Sint32) != 4
+ || sizeof(int8_t) != 1
+ || sizeof(int16_t) != 2
+ || sizeof(int32_t) != 4
|| sizeof(sint64) != 8)
{
// No good.
@@ -32,14 +32,14 @@
char* buf = "1234";
#ifdef _TU_LITTLE_ENDIAN_
- if (*(Uint32*) buf != 0x34333231)
+ if (*(uint32_t*) buf != 0x34333231)
{
// No good.
assert(0);
return false;
}
#else // not _TU_LITTLE_ENDIAN_
- if (*(Uint32*) buf != 0x31323334)
+ if (*(uint32_t*) buf != 0x31323334)
{
// No good.
assert(0);
Index: gnash/libbase/tu_types.h
diff -u gnash/libbase/tu_types.h:1.6 gnash/libbase/tu_types.h:1.7
--- gnash/libbase/tu_types.h:1.6 Mon May 8 15:06:34 2006
+++ gnash/libbase/tu_types.h Mon May 8 21:12:24 2006
@@ -45,24 +45,31 @@
#include "tu_config.h"
#include <stdio.h>
-#include <SDL.h>
#include <inttypes.h>
-#if SDL_BYTEORDER == SDL_LIL_ENDIAN
+#ifndef BYTE_ORDER
+# include <endian.h>
+# ifndef BYTE_ORDER
+# error BYTE_ORDER not defined by endian.h. :(
+# endif // BYTE_ORDER
+#endif // BYTE_ORDER
+
+#if BYTE_ORDER == __LITTLE_ENDIAN
#define _TU_LITTLE_ENDIAN_ 1
#else
#undef _TU_LITTLE_ENDIAN_
-#endif // SDL_BYTEORDER == SDL_LIL_ENDIAN
+#endif //BYTE_ORDER == SDL_LIL_ENDIAN
+
-typedef Uint8 uint8;
-typedef Sint8 sint8;
-typedef Sint8 int8;
-typedef Uint16 uint16;
-typedef Sint16 sint16;
-typedef Sint16 int16;
-typedef Uint32 uint32;
-typedef Sint32 sint32;
-typedef Sint32 int32;
+typedef uint8_t uint8;
+typedef int8_t sint8;
+typedef int8_t int8;
+typedef uint16_t uint16;
+typedef int16_t sint16;
+typedef int16_t int16;
+typedef uint32_t uint32;
+typedef int32_t sint32;
+typedef int32_t int32;
#ifndef PROTYPES_H
typedef uint64_t uint64;
Index: gnash/libbase/utf8.cpp
diff -u gnash/libbase/utf8.cpp:1.2 gnash/libbase/utf8.cpp:1.3
--- gnash/libbase/utf8.cpp:1.2 Sun Feb 26 15:49:30 2006
+++ gnash/libbase/utf8.cpp Mon May 8 21:12:24 2006
@@ -11,9 +11,9 @@
#include "utf8.h"
-Uint32 utf8::decode_next_unicode_character(const char** utf8_buffer)
+uint32_t utf8::decode_next_unicode_character(const char** utf8_buffer)
{
- Uint32 uc;
+ uint32_t uc;
char c;
// Security considerations:
@@ -48,7 +48,7 @@
if (c == 0) return 0; // End of buffer. Do not advance.
(*utf8_buffer)++;
- if ((c & 0x80) == 0) return (Uint32) c; // Conventional 7-bit ASCII.
+ if ((c & 0x80) == 0) return (uint32_t) c; // Conventional 7-bit
ASCII.
// Multi-byte sequences.
if ((c & 0xE0) == 0xC0)
@@ -111,7 +111,7 @@
}
-void utf8::encode_unicode_character(char* buffer, int* index, Uint32
ucs_character)
+void utf8::encode_unicode_character(char* buffer, int* index, uint32_t
ucs_character)
{
if (ucs_character <= 0x7F)
{
@@ -188,12 +188,12 @@
#include <stdio.h>
-bool check_equal(const char* utf8_in, const Uint32* ucs_in)
+bool check_equal(const char* utf8_in, const uint32_t* ucs_in)
{
for (;;)
{
- Uint32 next_ucs = *ucs_in++;
- Uint32 next_ucs_from_utf8 =
utf8::decode_next_unicode_character(&utf8_in);
+ uint32_t next_ucs = *ucs_in++;
+ uint32_t next_ucs_from_utf8 =
utf8::decode_next_unicode_character(&utf8_in);
if (next_ucs != next_ucs_from_utf8)
{
return false;
@@ -233,11 +233,11 @@
}
-void log_ucs(const Uint32* line)
+void log_ucs(const uint32_t* line)
{
for (;;)
{
- Uint32 uc = *line++;
+ uint32_t uc = *line++;
if (uc == 0)
{
// End of line.
@@ -262,7 +262,7 @@
// Simple canned test.
{
const char* test8 = "Ignacio Castaño";
- const Uint32 test32[] =
+ const uint32_t test32[] =
{
0x49, 0x67, 0x6E, 0x61, 0x63,
0x69, 0x6F, 0x20, 0x43, 0x61,
@@ -288,7 +288,7 @@
const int LINE_SIZE = 200; // max line size
char line_buffer_utf8[LINE_SIZE];
char reencoded_utf8[6 * LINE_SIZE];
- Uint32 line_buffer_ucs[LINE_SIZE];
+ uint32_t line_buffer_ucs[LINE_SIZE];
int byte_counter = 0;
for (;;)
@@ -307,10 +307,10 @@
// Decode into UCS.
const char* p = line_buffer_utf8;
- Uint32* q = line_buffer_ucs;
+ uint32_t* q = line_buffer_ucs;
for (;;)
{
- Uint32 uc =
utf8::decode_next_unicode_character(&p);
+ uint32_t uc =
utf8::decode_next_unicode_character(&p);
*q++ = uc;
assert(q < line_buffer_ucs + LINE_SIZE);
@@ -324,7 +324,7 @@
int index = 0;
for (;;)
{
- Uint32 uc = *q++;
+ uint32_t uc = *q++;
assert(index < LINE_SIZE * 6 - 6);
int last_index = index;
utf8::encode_unicode_character(reencoded_utf8, &index, uc);
Index: gnash/libbase/utf8.h
diff -u gnash/libbase/utf8.h:1.1 gnash/libbase/utf8.h:1.2
--- gnash/libbase/utf8.h:1.1 Tue Dec 20 20:57:00 2005
+++ gnash/libbase/utf8.h Mon May 8 21:12:24 2006
@@ -20,7 +20,7 @@
// as output. Advances *utf8_buffer past the character
// returned, unless the returned character is '\0', in which
// case the buffer does not advance.
- Uint32 decode_next_unicode_character(const char** utf8_buffer);
+ uint32_t decode_next_unicode_character(const char** utf8_buffer);
// Encodes the given UCS character into the given UTF-8
// buffer. Writes the data starting at buffer[offset], and
@@ -28,7 +28,7 @@
//
// May write up to 6 bytes, so make sure there's room in the
// buffer!
- void encode_unicode_character(char* buffer, int* offset, Uint32
ucs_character);
+ void encode_unicode_character(char* buffer, int* offset, uint32_t
ucs_character);
}
Index: gnash/libgeometry/cull.h
diff -u gnash/libgeometry/cull.h:1.2 gnash/libgeometry/cull.h:1.3
--- gnash/libgeometry/cull.h:1.2 Wed Feb 1 23:58:32 2006
+++ gnash/libgeometry/cull.h Mon May 8 21:12:24 2006
@@ -17,9 +17,9 @@
struct result_info {
bool culled; // true when the volume is not visible
- Uint8 active_planes; // one bit per frustum plane
+ uint8_t active_planes; // one bit per frustum plane
- result_info(bool c = false, Uint8 a = 0x3f) : culled(c),
active_planes(a) {}
+ result_info(bool c = false, uint8_t a = 0x3f) : culled(c),
active_planes(a) {}
};
Index: gnash/libgeometry/kd_tree_dynamic.h
diff -u gnash/libgeometry/kd_tree_dynamic.h:1.4
gnash/libgeometry/kd_tree_dynamic.h:1.5
--- gnash/libgeometry/kd_tree_dynamic.h:1.4 Sun Feb 26 15:49:30 2006
+++ gnash/libgeometry/kd_tree_dynamic.h Mon May 8 21:12:24 2006
@@ -41,8 +41,8 @@
struct face
{
- Uint16 m_vi[3]; // indices of verts
- Uint16 m_flags;
+ uint16_t m_vi[3]; // indices of verts
+ uint16_t m_flags;
float get_min_coord(int axis, const std::vector<vec3>& verts)
const;
float get_max_coord(int axis, const std::vector<vec3>& verts)
const;
Index: gnash/plugin/klash/klash.cpp
diff -u gnash/plugin/klash/klash.cpp:1.3 gnash/plugin/klash/klash.cpp:1.4
--- gnash/plugin/klash/klash.cpp:1.3 Sun May 7 22:20:19 2006
+++ gnash/plugin/klash/klash.cpp Mon May 8 21:12:24 2006
@@ -495,22 +495,22 @@
// Mouse state.
float speed_scale = 1.0f;
- Uint32 start_ticks = 0;
+ uint32_t start_ticks = 0;
if (do_render) {
start_ticks = SDL_GetTicks();
}
- Uint32 last_ticks = start_ticks;
+ uint32_t last_ticks = start_ticks;
int frame_counter = 0;
int last_logged_fps = last_ticks;
for (;;) {
- Uint32 ticks;
+ uint32_t ticks;
if (do_render) {
ticks = SDL_GetTicks();
} else {
// Simulate time.
- ticks = last_ticks + (Uint32) (1000.0f / movie_fps);
+ ticks = last_ticks + (uint32_t) (1000.0f / movie_fps);
}
int delta_ticks = ticks - last_ticks;
float delta_t = delta_ticks / 1000.f;
@@ -518,7 +518,7 @@
// Check auto timeout counter.
if (exit_timeout > 0
- && ticks - start_ticks > (Uint32) (exit_timeout * 1000)) {
+ && ticks - start_ticks > (uint32_t) (exit_timeout * 1000)) {
// Auto exit now.
break;
}
Index: gnash/plugin/player.cpp
diff -u gnash/plugin/player.cpp:1.13 gnash/plugin/player.cpp:1.14
--- gnash/plugin/player.cpp:1.13 Mon Apr 24 23:05:55 2006
+++ gnash/plugin/player.cpp Mon May 8 21:12:24 2006
@@ -403,9 +403,9 @@
int mouse_buttons = 0;
float speed_scale = 1.0f;
- Uint32 start_ticks = 0;
+ uint32_t start_ticks = 0;
start_ticks = SDL_GetTicks();
- Uint32 last_ticks = start_ticks;
+ uint32_t last_ticks = start_ticks;
int frame_counter = 0;
// int last_logged_fps = last_ticks;
@@ -415,7 +415,7 @@
// sigaction (SIGINT, &act, NULL);
for (;;) {
- Uint32 ticks;
+ uint32_t ticks;
ticks = SDL_GetTicks();
int delta_ticks = ticks - last_ticks;
float delta_t = delta_ticks / 1000.f;
@@ -423,7 +423,7 @@
// Check auto timeout counter.
if (exit_timeout > 0
- && ticks - start_ticks > (Uint32) (exit_timeout * 1000)) {
+ && ticks - start_ticks > (uint32_t) (exit_timeout * 1000)) {
dbglogfile << "Auto exiting now..." << endl;
break;
}
Index: gnash/server/Key.h
diff -u gnash/server/Key.h:1.3 gnash/server/Key.h:1.4
--- gnash/server/Key.h:1.3 Mon May 8 11:43:58 2006
+++ gnash/server/Key.h Mon May 8 21:12:24 2006
@@ -85,7 +85,7 @@
{
private:
- Uint8 m_keymap[key::KEYCOUNT / 8 + 1]; // bit-array
+ uint8_t m_keymap[key::KEYCOUNT / 8 + 1]; // bit-array
std::vector<weak_ptr<as_object> > m_listeners;
int m_last_key_pressed;
Index: gnash/server/Math.cpp
diff -u gnash/server/Math.cpp:1.1 gnash/server/Math.cpp:1.2
--- gnash/server/Math.cpp:1.1 Wed Apr 26 22:10:09 2006
+++ gnash/server/Math.cpp Mon May 8 21:12:24 2006
@@ -214,7 +214,7 @@
void math_random(const fn_call& fn)
{
// Random number between 0 and 1.
- fn.result->set_double(tu_random::next_random() /
double(Uint32(0x0FFFFFFFF)));
+ fn.result->set_double(tu_random::next_random() /
double(uint32_t(0x0FFFFFFFF)));
}
void math_round(const fn_call& fn)
{
Index: gnash/server/MovieClipLoader.cpp
diff -u gnash/server/MovieClipLoader.cpp:1.17
gnash/server/MovieClipLoader.cpp:1.18
--- gnash/server/MovieClipLoader.cpp:1.17 Sun May 7 12:19:06 2006
+++ gnash/server/MovieClipLoader.cpp Mon May 8 21:12:24 2006
@@ -382,13 +382,13 @@
character* tar = (character*)target;
const char* name = tar->get_name().c_str();
- Uint16 depth = tar->get_depth();
+ uint16_t depth = tar->get_depth();
bool use_cxform = false;
cxform color_transform = tar->get_cxform();
bool use_matrix = false;
matrix mat = tar->get_matrix();
float ratio = tar->get_ratio();
- Uint16 clip_depth = tar->get_clip_depth();
+ uint16_t clip_depth = tar->get_clip_depth();
movie* parent = tar->get_parent();
movie* new_movie =
static_cast<movie*>(extern_movie)->get_root_movie();
@@ -472,7 +472,7 @@
character* tar = (character*)mov;
const char* name = tar->get_name().c_str();
- Uint16 id = tar->get_id();
+ uint16_t id = tar->get_id();
//log_msg("Target name is: %s, ID: %d\n", name, id);
// FIXME: none of this works yet
@@ -508,13 +508,13 @@
mov->on_event(event_id::LOAD);
//add_display_object();
- //Uint16 depth = tar->get_depth();
+ //uint16_t depth = tar->get_depth();
bool use_cxform = false;
//cxform color_transform = tar->get_cxform();
bool use_matrix = false;
matrix mat = tar->get_matrix();
//float ratio = tar->get_ratio();
- //Uint16 clip_depth = tar->get_clip_depth();
+ //uint16_t clip_depth = tar->get_clip_depth();
std::vector<swf_event*> dummy_event_handlers;
movie* parent = tar->get_parent();
@@ -522,7 +522,7 @@
#if 0
parent->clone_display_object(name, "album_image", depth);
- parent->add_display_object((Uint16)id,
+ parent->add_display_object((uint16_t)id,
name,
dummy_event_handlers,
tar->get_depth(),
Index: gnash/server/action.cpp
diff -u gnash/server/action.cpp:1.69 gnash/server/action.cpp:1.70
--- gnash/server/action.cpp:1.69 Mon May 8 15:06:34 2006
+++ gnash/server/action.cpp Mon May 8 21:12:24 2006
@@ -182,13 +182,13 @@
const character* tar = (const character*)target;
const char* name = tar->get_name().c_str();
- Uint16 depth = tar->get_depth();
+ uint16_t depth = tar->get_depth();
bool use_cxform = false;
cxform color_transform = tar->get_cxform();
bool use_matrix = false;
matrix mat = tar->get_matrix();
float ratio = tar->get_ratio();
- Uint16 clip_depth = tar->get_clip_depth();
+ uint16_t clip_depth = tar->get_clip_depth();
movie* parent = tar->get_parent();
movie* new_movie = extern_movie->get_root_movie();
@@ -2230,7 +2230,7 @@
// float (little-endian)
union {
float f;
- Uint32 i;
+ uint32_t i;
} u;
compiler_assert(sizeof(u) ==
sizeof(u.i));
@@ -2302,8 +2302,8 @@
double d;
uint64 i;
struct {
- Uint32 lo;
- Uint32 hi;
+ uint32_t lo;
+ uint32_t hi;
} sub;
} u;
compiler_assert(sizeof(u) ==
sizeof(u.i));
@@ -2320,7 +2320,7 @@
else if (type == 7)
{
// int32
- Sint32 val = m_buffer[3 + i]
+ int32_t val = m_buffer[3 + i]
| (m_buffer[3 + i + 1] << 8)
| (m_buffer[3 + i + 2] << 16)
| (m_buffer[3 + i + 3] << 24);
@@ -2370,7 +2370,7 @@
}
case SWF::ACTION_BRANCHALWAYS: // branch
always (goto)
{
- Sint16 offset = m_buffer[pc + 3] |
(m_buffer[pc + 4] << 8);
+ int16_t offset = m_buffer[pc + 3] |
(m_buffer[pc + 4] << 8);
next_pc += offset;
// @@ TODO range checks
break;
@@ -2420,7 +2420,7 @@
case SWF::ACTION_BRANCHIFTRUE: // branch if
true
{
- Sint16 offset = m_buffer[pc + 3] |
(m_buffer[pc + 4] << 8);
+ int16_t offset = m_buffer[pc + 3] |
(m_buffer[pc + 4] << 8);
bool test = env->top(0).to_bool();
env->drop(1);
@@ -3753,7 +3753,7 @@
// float (little-endian)
union {
float f;
- Uint32 i;
+ uint32_t i;
} u;
compiler_assert(sizeof(u) == sizeof(u.i));
@@ -3792,8 +3792,8 @@
double d;
uint64 i;
struct {
- Uint32 lo;
- Uint32 hi;
+ uint32_t lo;
+ uint32_t hi;
} sub;
} u;
compiler_assert(sizeof(u) == sizeof(u.i));
@@ -3808,7 +3808,7 @@
else if (type == 7)
{
// int32
- Sint32 val = instruction_data[3 + i]
+ int32_t val = instruction_data[3 + i]
| (instruction_data[3 + i + 1] << 8)
| (instruction_data[3 + i + 2] << 16)
| (instruction_data[3 + i + 3] << 24);
Index: gnash/server/as_value.h
diff -u gnash/server/as_value.h:1.2 gnash/server/as_value.h:1.3
--- gnash/server/as_value.h:1.2 Mon May 8 15:43:54 2006
+++ gnash/server/as_value.h Mon May 8 21:12:24 2006
@@ -327,7 +327,7 @@
void operator^=(const as_value& v) { set_int(int(this->to_number())
^ int(v.to_number())); }
void shl(const as_value& v) { set_int(int(this->to_number()) <<
int(v.to_number())); }
void asr(const as_value& v) { set_int(int(this->to_number()) >>
int(v.to_number())); }
- void lsr(const as_value& v) { set_int((Uint32(this->to_number()) >>
int(v.to_number()))); }
+ void lsr(const as_value& v) { set_int((uint32_t(this->to_number())
>> int(v.to_number()))); }
/// Sets this value to this string plus the given string.
void string_concat(const tu_string& str);
Index: gnash/server/button.h
diff -u gnash/server/button.h:1.5 gnash/server/button.h:1.6
--- gnash/server/button.h:1.5 Mon May 8 15:43:54 2006
+++ gnash/server/button.h Mon May 8 21:12:24 2006
@@ -93,9 +93,9 @@
{
struct sound_envelope
{
- Uint32 m_mark44;
- Uint16 m_level0;
- Uint16 m_level1;
+ uint32_t m_mark44;
+ uint16_t m_level0;
+ uint16_t m_level1;
};
struct sound_info
@@ -108,15 +108,15 @@
bool m_has_loops;
bool m_has_out_point;
bool m_has_in_point;
- Uint32 m_in_point;
- Uint32 m_out_point;
- Uint16 m_loop_count;
+ uint32_t m_in_point;
+ uint32_t m_out_point;
+ uint16_t m_loop_count;
std::vector<sound_envelope> m_envelopes;
};
struct button_sound_info
{
- Uint16 m_sound_id;
+ uint16_t m_sound_id;
sound_sample_impl* m_sam;
sound_info m_sound_style;
};
Index: gnash/server/character.h
diff -u gnash/server/character.h:1.1 gnash/server/character.h:1.2
--- gnash/server/character.h:1.1 Mon May 8 13:59:07 2006
+++ gnash/server/character.h Mon May 8 21:12:24 2006
@@ -68,7 +68,7 @@
cxform m_color_transform;
matrix m_matrix;
float m_ratio;
- Uint16 m_clip_depth;
+ uint16_t m_clip_depth;
bool m_enabled;
hash<event_id, as_value> m_event_handlers;
void (*m_display_callback)(void*);
@@ -121,8 +121,8 @@
void concatenate_matrix(const matrix& m) { m_matrix.concatenate(m); }
float get_ratio() const { return m_ratio; }
void set_ratio(float f) { m_ratio = f; }
- Uint16 get_clip_depth() const { return m_clip_depth; }
- void set_clip_depth(Uint16 d) { m_clip_depth = d; }
+ uint16_t get_clip_depth() const { return m_clip_depth; }
+ void set_clip_depth(uint16_t d) { m_clip_depth = d; }
void set_name(const char* name) { m_name = name; }
const tu_string& get_name() const { return m_name; }
Index: gnash/server/dlist.cpp
diff -u gnash/server/dlist.cpp:1.8 gnash/server/dlist.cpp:1.9
--- gnash/server/dlist.cpp:1.8 Thu Mar 30 19:12:53 2006
+++ gnash/server/dlist.cpp Mon May 8 21:12:24 2006
@@ -161,12 +161,12 @@
void display_list::add_display_object(
character* ch,
- Uint16 depth,
+ uint16_t depth,
bool replace_if_depth_is_occupied,
const cxform& color_xform,
const matrix& mat,
float ratio,
- Uint16 clip_depth)
+ uint16_t clip_depth)
{
// GNASH_REPORT_FUNCTION;
// IF_VERBOSE_DEBUG(log_msg("dl::add(%d, '%s')\n", depth,
ch->get_name()));//xxxxx
@@ -224,13 +224,13 @@
void display_list::move_display_object(
- Uint16 depth,
+ uint16_t depth,
bool use_cxform,
const cxform& color_xform,
bool use_matrix,
const matrix& mat,
float ratio,
- Uint16 clip_depth)
+ uint16_t clip_depth)
// Updates the transform properties of the object at
// the specified depth.
{
@@ -289,13 +289,13 @@
void display_list::replace_display_object(
character* ch,
- Uint16 depth,
+ uint16_t depth,
bool use_cxform,
const cxform& color_xform,
bool use_matrix,
const matrix& mat,
float ratio,
- Uint16 clip_depth)
+ uint16_t clip_depth)
// Puts a new character at the specified depth, replacing any
// existing character. If use_cxform or use_matrix are false,
// then keep those respective properties from the existing
@@ -358,7 +358,7 @@
}
- void display_list::remove_display_object(Uint16 depth, int id)
+ void display_list::remove_display_object(uint16_t depth, int id)
// Removes the object at the specified depth.
{
// IF_VERBOSE_DEBUG(log_msg("dl::remove(%d)\n", depth));//xxxxx
Index: gnash/server/dlist.h
diff -u gnash/server/dlist.h:1.4 gnash/server/dlist.h:1.5
--- gnash/server/dlist.h:1.4 Sat Feb 25 03:54:03 2006
+++ gnash/server/dlist.h Mon May 8 21:12:24 2006
@@ -103,23 +103,23 @@
///
void add_display_object(
character* ch,
- Uint16 depth,
+ uint16_t depth,
bool replace_if_depth_is_occupied,
const cxform& color_xform,
const matrix& mat,
float ratio,
- Uint16 clip_depth);
+ uint16_t clip_depth);
/// Updates the transform properties of the object at
/// the specified depth.
void move_display_object(
- Uint16 depth,
+ uint16_t depth,
bool use_cxform,
const cxform& color_xform,
bool use_matrix,
const matrix& mat,
float ratio,
- Uint16 clip_depth);
+ uint16_t clip_depth);
/// Puts a new character at the specified depth, replacing any
/// existing character. If use_cxform or use_matrix are false,
@@ -127,16 +127,16 @@
/// character.
void replace_display_object(
character* ch,
- Uint16 depth,
+ uint16_t depth,
bool use_cxform,
const cxform& color_xform,
bool use_matrix,
const matrix& mat,
float ratio,
- Uint16 clip_depth);
+ uint16_t clip_depth);
/// Removes the object at the specified depth.
- void remove_display_object(Uint16 depth, int id);
+ void remove_display_object(uint16_t depth, int id);
/// clear the display list.
void clear();
Index: gnash/server/font.cpp
diff -u gnash/server/font.cpp:1.10 gnash/server/font.cpp:1.11
--- gnash/server/font.cpp:1.10 Mon May 8 13:59:07 2006
+++ gnash/server/font.cpp Mon May 8 21:12:24 2006
@@ -157,7 +157,7 @@
m_wide_codes = (in->read_uint(1) != 0);
m_is_italic = (in->read_uint(1) != 0);
m_is_bold = (in->read_uint(1) != 0);
- Uint8 reserved = in->read_u8();
+ uint8_t reserved = in->read_u8();
// Inhibit warning.
reserved = reserved;
@@ -262,7 +262,7 @@
int kerning_count = in->read_u16();
{for (int i = 0; i < kerning_count; i++)
{
- Uint16 char0, char1;
+ uint16_t char0, char1;
if (m_wide_codes)
{
char0 = in->read_u16();
@@ -322,7 +322,7 @@
if (m_wide_codes)
{
- // Code table is made of Uint16's.
+ // Code table is made of uint16_t's.
for (unsigned int i = 0; i < m_glyphs.size(); i++)
{
m_code_table.add(in->read_u16(), i);
@@ -338,7 +338,7 @@
}
}
- int font::get_glyph_index(Uint16 code) const
+ int font::get_glyph_index(uint16_t code) const
{
int glyph_index;
if (m_code_table.get(code, &glyph_index))
Index: gnash/server/font.h
diff -u gnash/server/font.h:1.4 gnash/server/font.h:1.5
--- gnash/server/font.h:1.4 Sun Apr 23 14:40:10 2006
+++ gnash/server/font.h Mon May 8 21:12:24 2006
@@ -77,7 +77,7 @@
void set_texture_glyph_nominal_size(int size) {
m_texture_glyph_nominal_size = imax(1, size); }
int get_texture_glyph_nominal_size() const { return
m_texture_glyph_nominal_size; }
- int get_glyph_index(Uint16 code) const;
+ int get_glyph_index(uint16_t code) const;
float get_advance(int glyph_index) const;
float get_kerning_adjustment(int last_code, int this_code)
const;
float get_leading() const { return m_leading; }
@@ -110,7 +110,7 @@
{
size_t operator()(const T& data) const { return data; }
};
- hash<Uint16, int, simple_code_hash<Uint16> > m_code_table;
+ hash<uint16_t, int, simple_code_hash<uint16_t> > m_code_table;
// Layout stuff.
float m_ascent;
@@ -123,7 +123,7 @@
// @@ replace this with a flat hash, or else a sorted array
(binary search)
struct kerning_pair
{
- Uint16 m_char0, m_char1;
+ uint16_t m_char0, m_char1;
bool operator==(const kerning_pair& k) const
{
Index: gnash/server/fontlib.cpp
diff -u gnash/server/fontlib.cpp:1.9 gnash/server/fontlib.cpp:1.10
--- gnash/server/fontlib.cpp:1.9 Mon May 8 13:59:07 2006
+++ gnash/server/fontlib.cpp Mon May 8 21:12:24 2006
@@ -93,10 +93,10 @@
// State for the glyph packer.
//
- static Uint8* s_render_buffer = NULL;
+ static uint8_t* s_render_buffer = NULL;
static matrix s_render_matrix;
- static Uint8* s_current_cache_image = NULL;
+ static uint8_t* s_current_cache_image = NULL;
// for setting the bitmap_info after they're packed.
struct pending_glyph_info
@@ -204,7 +204,7 @@
// Set up a cache.
if (s_current_cache_image == NULL)
{
- s_current_cache_image = new
Uint8[GLYPH_CACHE_TEXTURE_SIZE * GLYPH_CACHE_TEXTURE_SIZE];
+ s_current_cache_image = new
uint8_t[GLYPH_CACHE_TEXTURE_SIZE * GLYPH_CACHE_TEXTURE_SIZE];
}
memset(s_current_cache_image, 0,
GLYPH_CACHE_TEXTURE_SIZE * GLYPH_CACHE_TEXTURE_SIZE);
@@ -572,7 +572,7 @@
int max_x = 0;
int min_y = s_glyph_nominal_size;
int max_y = 0;
- Uint8* output = new Uint8[s_glyph_nominal_size *
s_glyph_nominal_size];
+ uint8_t* output = new uint8_t[s_glyph_nominal_size *
s_glyph_nominal_size];
for (int j = 0; j < s_glyph_nominal_size; j++)
{
for (int i = 0; i < s_glyph_nominal_size; i++)
@@ -583,7 +583,7 @@
{
for (int ii = 0; ii <
OVERSAMPLE_FACTOR; ii++)
{
- Uint8 texel = s_render_buffer[
+ uint8_t texel = s_render_buffer[
((j << OVERSAMPLE_BITS)
+ jj) * s_glyph_render_size
+ ((i <<
OVERSAMPLE_BITS) + ii)];
sum += texel;
@@ -599,7 +599,7 @@
min_y = imin(min_y, j);
max_y = imax(max_y, j);
}
- output[j * s_glyph_nominal_size + i] = (Uint8)
sum;
+ output[j * s_glyph_nominal_size + i] =
(uint8_t) sum;
}
}
@@ -943,7 +943,7 @@
// Build cached textures from glyph outlines.
{
assert(s_render_buffer == NULL);
- s_render_buffer = new Uint8[s_glyph_render_size *
s_glyph_render_size];
+ s_render_buffer = new uint8_t[s_glyph_render_size *
s_glyph_render_size];
// Build the glyph images.
std::vector<rendered_glyph_info> glyph_info;
@@ -1056,7 +1056,7 @@
assert(bi >= bitmaps_used_base
&& bi <
owner->get_bitmap_info_count());
- out->write_le16((Uint16) (bi -
bitmaps_used_base));
+ out->write_le16((uint16_t) (bi -
bitmaps_used_base));
// save rect, position.
out->write_float32(tg.m_uv_bounds.m_x_min);
@@ -1119,7 +1119,7 @@
if (s_current_cache_image == NULL || w != pw ||
h != ph)
{
delete [] s_current_cache_image;
- s_current_cache_image = new Uint8[w*h];
+ s_current_cache_image = new
uint8_t[w*h];
pw = w;
ph = h;
}
Index: gnash/server/gnash.h
diff -u gnash/server/gnash.h:1.20 gnash/server/gnash.h:1.21
--- gnash/server/gnash.h:1.20 Mon May 8 11:43:58 2006
+++ gnash/server/gnash.h Mon May 8 21:12:24 2006
@@ -669,7 +669,7 @@
///
/// coords is a list of (x,y) coordinate pairs, in
/// triangle-strip order. The type of the array should
- /// be Sint16[vertex_count*2]
+ /// be int16_t[vertex_count*2]
///
virtual void draw_mesh_strip(const void* coords, int vertex_count) =
0;
Index: gnash/server/impl.cpp
diff -u gnash/server/impl.cpp:1.32 gnash/server/impl.cpp:1.33
--- gnash/server/impl.cpp:1.32 Mon May 8 15:43:54 2006
+++ gnash/server/impl.cpp Mon May 8 21:12:24 2006
@@ -306,10 +306,10 @@
return;
}
- Uint32 file_start_pos = in->get_position();
- Uint32 header = in->read_le32();
- Uint32 file_length = in->read_le32();
- Uint32 file_end_pos = file_start_pos + file_length;
+ uint32_t file_start_pos = in->get_position();
+ uint32_t header = in->read_le32();
+ uint32_t file_length = in->read_le32();
+ uint32_t file_end_pos = file_start_pos + file_length;
int local_version = (header >> 24) & 255;
if ((header & 0x0FFFFFF) != 0x00535746
@@ -357,7 +357,7 @@
{
// Count tags.
int local_tag_count = 0;
- while ((Uint32) str.get_position() < file_end_pos)
+ while ((uint32_t) str.get_position() < file_end_pos)
{
str.open_tag();
str.close_tag();
@@ -821,7 +821,7 @@
{
assert(tag_type == 6);
- Uint16 character_id = in->read_u16();
+ uint16_t character_id = in->read_u16();
//
// Read the image data.
@@ -860,7 +860,7 @@
{
assert(tag_type == 21);
- Uint16 character_id = in->read_u16();
+ uint16_t character_id = in->read_u16();
IF_VERBOSE_PARSE(log_msg(" define_bits_jpeg2_loader: charid = %d pos =
0x%x\n", character_id, in->get_position()));
@@ -923,7 +923,7 @@
return;
}
- Uint8 buf[1];
+ uint8_t buf[1];
for (;;) {
// Fill a one-byte (!) buffer.
@@ -954,12 +954,12 @@
{
assert(tag_type == 35);
- Uint16 character_id = in->read_u16();
+ uint16_t character_id = in->read_u16();
IF_VERBOSE_PARSE(log_msg(" define_bits_jpeg3_loader: charid = %d pos =
0x%x\n", character_id, in->get_position()));
- Uint32 jpeg_size = in->read_u32();
- Uint32 alpha_position = in->get_position() + jpeg_size;
+ uint32_t jpeg_size = in->read_u32();
+ uint32_t alpha_position = in->get_position() + jpeg_size;
bitmap_info* bi = NULL;
@@ -980,7 +980,7 @@
in->set_position(alpha_position);
int buffer_bytes = im->m_width * im->m_height;
- Uint8* buffer = new Uint8[buffer_bytes];
+ uint8_t* buffer = new uint8_t[buffer_bytes];
inflate_wrapper(in->get_underlying_stream(), buffer, buffer_bytes);
@@ -1013,10 +1013,10 @@
{
assert(tag_type == 20 || tag_type == 36);
- Uint16 character_id = in->read_u16();
- Uint8 bitmap_format = in->read_u8(); // 3 == 8 bit, 4 == 16 bit, 5
== 32 bit
- Uint16 width = in->read_u16();
- Uint16 height = in->read_u16();
+ uint16_t character_id = in->read_u16();
+ uint8_t bitmap_format = in->read_u8(); // 3 == 8 bit, 4 == 16 bit, 5
== 32 bit
+ uint16_t width = in->read_u16();
+ uint16_t height = in->read_u16();
IF_VERBOSE_PARSE(log_msg(" defbitslossless2: tag_type = %d, id = %d, fmt
= %d, w = %d, h = %d\n",
tag_type,
@@ -1048,20 +1048,20 @@
int pitch = (width * bytes_per_pixel + 3) & ~3;
int buffer_bytes = color_table_size * 3 + pitch *
height;
- Uint8* buffer = new Uint8[buffer_bytes];
+ uint8_t* buffer = new uint8_t[buffer_bytes];
inflate_wrapper(in->get_underlying_stream(),
buffer, buffer_bytes);
assert(in->get_position() <=
in->get_tag_end_position());
- Uint8* color_table = buffer;
+ uint8_t* color_table = buffer;
for (int j = 0; j < height; j++)
{
- Uint8* image_in_row = buffer +
color_table_size * 3 + j * pitch;
- Uint8* image_out_row =
image::scanline(image, j);
+ uint8_t* image_in_row = buffer +
color_table_size * 3 + j * pitch;
+ uint8_t* image_out_row =
image::scanline(image, j);
for (int i = 0; i < width; i++)
{
- Uint8 pixel = image_in_row[i
* bytes_per_pixel];
+ uint8_t pixel = image_in_row[i
* bytes_per_pixel];
image_out_row[i * 3 + 0] =
color_table[pixel * 3 + 0];
image_out_row[i * 3 + 1] =
color_table[pixel * 3 + 1];
image_out_row[i * 3 + 2] =
color_table[pixel * 3 + 2];
@@ -1077,18 +1077,18 @@
int pitch = (width * bytes_per_pixel + 3) & ~3;
int buffer_bytes = pitch * height;
- Uint8* buffer = new Uint8[buffer_bytes];
+ uint8_t* buffer = new uint8_t[buffer_bytes];
inflate_wrapper(in->get_underlying_stream(),
buffer, buffer_bytes);
assert(in->get_position() <=
in->get_tag_end_position());
for (int j = 0; j < height; j++)
{
- Uint8* image_in_row = buffer + j *
pitch;
- Uint8* image_out_row =
image::scanline(image, j);
+ uint8_t* image_in_row = buffer + j *
pitch;
+ uint8_t* image_out_row =
image::scanline(image, j);
for (int i = 0; i < width; i++)
{
- Uint16 pixel = image_in_row[i
* 2] | (image_in_row[i * 2 + 1] << 8);
+ uint16_t pixel = image_in_row[i
* 2] | (image_in_row[i * 2 + 1] << 8);
// @@ How is the data packed???
I'm just guessing here that it's 565!
image_out_row[i * 3 + 0] = (pixel
>> 8) & 0xF8; // red
@@ -1106,7 +1106,7 @@
int pitch = width * bytes_per_pixel;
int buffer_bytes = pitch * height;
- Uint8* buffer = new Uint8[buffer_bytes];
+ uint8_t* buffer = new uint8_t[buffer_bytes];
inflate_wrapper(in->get_underlying_stream(),
buffer, buffer_bytes);
assert(in->get_position() <=
in->get_tag_end_position());
@@ -1114,14 +1114,14 @@
// Need to re-arrange ARGB into RGB.
for (int j = 0; j < height; j++)
{
- Uint8* image_in_row = buffer + j *
pitch;
- Uint8* image_out_row =
image::scanline(image, j);
+ uint8_t* image_in_row = buffer + j *
pitch;
+ uint8_t* image_out_row =
image::scanline(image, j);
for (int i = 0; i < width; i++)
{
- Uint8 a = image_in_row[i * 4
+ 0];
- Uint8 r = image_in_row[i * 4
+ 1];
- Uint8 g = image_in_row[i * 4
+ 2];
- Uint8 b = image_in_row[i * 4
+ 3];
+ uint8_t a = image_in_row[i * 4
+ 0];
+ uint8_t r = image_in_row[i * 4
+ 1];
+ uint8_t g = image_in_row[i * 4
+ 2];
+ uint8_t b = image_in_row[i * 4
+ 3];
image_out_row[i * 3 + 0] = r;
image_out_row[i * 3 + 1] = g;
image_out_row[i * 3 + 2] = b;
@@ -1157,20 +1157,20 @@
int pitch = (width * bytes_per_pixel + 3) & ~3;
int buffer_bytes = color_table_size * 4 + pitch *
height;
- Uint8* buffer = new Uint8[buffer_bytes];
+ uint8_t* buffer = new uint8_t[buffer_bytes];
inflate_wrapper(in->get_underlying_stream(),
buffer, buffer_bytes);
assert(in->get_position() <=
in->get_tag_end_position());
- Uint8* color_table = buffer;
+ uint8_t* color_table = buffer;
for (int j = 0; j < height; j++)
{
- Uint8* image_in_row = buffer +
color_table_size * 4 + j * pitch;
- Uint8* image_out_row =
image::scanline(image, j);
+ uint8_t* image_in_row = buffer +
color_table_size * 4 + j * pitch;
+ uint8_t* image_out_row =
image::scanline(image, j);
for (int i = 0; i < width; i++)
{
- Uint8 pixel = image_in_row[i
* bytes_per_pixel];
+ uint8_t pixel = image_in_row[i
* bytes_per_pixel];
image_out_row[i * 4 + 0] =
color_table[pixel * 4 + 0];
image_out_row[i * 4 + 1] =
color_table[pixel * 4 + 1];
image_out_row[i * 4 + 2] =
color_table[pixel * 4 + 2];
@@ -1187,18 +1187,18 @@
int pitch = (width * bytes_per_pixel + 3) & ~3;
int buffer_bytes = pitch * height;
- Uint8* buffer = new Uint8[buffer_bytes];
+ uint8_t* buffer = new uint8_t[buffer_bytes];
inflate_wrapper(in->get_underlying_stream(),
buffer, buffer_bytes);
assert(in->get_position() <=
in->get_tag_end_position());
for (int j = 0; j < height; j++)
{
- Uint8* image_in_row = buffer + j *
pitch;
- Uint8* image_out_row =
image::scanline(image, j);
+ uint8_t* image_in_row = buffer + j *
pitch;
+ uint8_t* image_out_row =
image::scanline(image, j);
for (int i = 0; i < width; i++)
{
- Uint16 pixel = image_in_row[i
* 2] | (image_in_row[i * 2 + 1] << 8);
+ uint16_t pixel = image_in_row[i
* 2] | (image_in_row[i * 2 + 1] << 8);
// @@ How is the data packed???
I'm just guessing here that it's 565!
image_out_row[i * 4 + 0] = 255;
// alpha
@@ -1220,13 +1220,13 @@
// Need to re-arrange ARGB into RGBA.
for (int j = 0; j < height; j++)
{
- Uint8* image_row =
image::scanline(image, j);
+ uint8_t* image_row =
image::scanline(image, j);
for (int i = 0; i < width; i++)
{
- Uint8 a = image_row[i * 4 +
0];
- Uint8 r = image_row[i * 4 +
1];
- Uint8 g = image_row[i * 4 +
2];
- Uint8 b = image_row[i * 4 +
3];
+ uint8_t a = image_row[i * 4 +
0];
+ uint8_t r = image_row[i * 4 +
1];
+ uint8_t g = image_row[i * 4 +
2];
+ uint8_t b = image_row[i * 4 +
3];
image_row[i * 4 + 0] = r;
image_row[i * 4 + 1] = g;
image_row[i * 4 + 2] = b;
@@ -1269,7 +1269,7 @@
|| tag_type == 22
|| tag_type == 32);
- Uint16 character_id = in->read_u16();
+ uint16_t character_id = in->read_u16();
IF_VERBOSE_PARSE(log_msg(" shape_loader: id = %d\n", character_id));
shape_character_def* ch = new shape_character_def;
@@ -1283,7 +1283,7 @@
void define_shape_morph_loader(stream* in, int tag_type, movie_definition* m)
{
assert(tag_type == 46);
- Uint16 character_id = in->read_u16();
+ uint16_t character_id = in->read_u16();
IF_VERBOSE_PARSE(log_msg(" shape_morph_loader: id = %d\n", character_id));
morph2_character_def* morph = new morph2_character_def;
morph->read(in, tag_type, true, m);
@@ -1300,7 +1300,7 @@
{
assert(tag_type == 10 || tag_type == 48);
- Uint16 font_id = in->read_u16();
+ uint16_t font_id = in->read_u16();
font* f = new font;
f->read(in, tag_type, m);
@@ -1320,7 +1320,7 @@
{
assert(tag_type == 13);
- Uint16 font_id = in->read_u16();
+ uint16_t font_id = in->read_u16();
font* f = m->get_font(font_id);
if (f)
@@ -1333,7 +1333,7 @@
}
}
-void swf_event::read(stream* in, Uint32 flags)
+void swf_event::read(stream* in, uint32_t flags)
{
assert(flags != 0);
@@ -1390,7 +1390,7 @@
log_error("swf_event::read -- KEY_PRESS found, not handled yet,
flags = 0x%x\n", flags);
}
- Uint32 event_length = in->read_u32();
+ uint32_t event_length = in->read_u32();
UNUSED(event_length);
// Read the actions.
@@ -1425,9 +1425,9 @@
matrix m_matrix;
bool m_has_matrix;
bool m_has_cxform;
- Uint16 m_depth;
- Uint16 m_character_id;
- Uint16 m_clip_depth;
+ uint16_t m_depth;
+ uint16_t m_character_id;
+ uint16_t m_clip_depth;
enum place_type {
PLACE,
MOVE,
@@ -1536,12 +1536,12 @@
}
if (has_actions)
{
- Uint16 reserved = in->read_u16();
+ uint16_t reserved = in->read_u16();
UNUSED(reserved);
// The logical 'or' of all the following handlers.
// I don't think we care about this...
- Uint32 all_flags = 0;
+ uint32_t all_flags = 0;
if (movie_version >= 6)
{
all_flags = in->read_u32();
@@ -1560,7 +1560,7 @@
// Read event.
in->align();
- Uint32 this_flags = 0;
+ uint32_t this_flags = 0;
if (movie_version >= 6)
{
this_flags = in->read_u32();
@@ -1868,7 +1868,7 @@
// Read the exports.
for (int i = 0; i < count; i++)
{
- Uint16 id = in->read_u16();
+ uint16_t id = in->read_u16();
char* symbol_name = in->read_string();
IF_VERBOSE_PARSE(log_msg(" export: id = %d, name = %s\n", id,
symbol_name));
@@ -1929,7 +1929,7 @@
// Get the imports.
for (int i = 0; i < count; i++)
{
- Uint16 id = in->read_u16();
+ uint16_t id = in->read_u16();
char* symbol_name = in->read_string();
IF_VERBOSE_PARSE(log_msg(" import: id = %d, name = %s\n", id,
symbol_name));
Index: gnash/server/impl.h
diff -u gnash/server/impl.h:1.23 gnash/server/impl.h:1.24
--- gnash/server/impl.h:1.23 Mon May 8 13:59:07 2006
+++ gnash/server/impl.h Mon May 8 21:12:24 2006
@@ -98,7 +98,7 @@
cxform m_color_transform;
matrix m_matrix;
float m_ratio;
- Uint16 m_clip_depth;
+ uint16_t m_clip_depth;
display_info()
:
@@ -211,7 +211,7 @@
ch->set_event_handler(m_event, m_method);
}
- void read(stream* in, Uint32 flags);
+ void read(stream* in, uint32_t flags);
private:
// DON'T USE THESE
Index: gnash/server/morph2.cpp
diff -u gnash/server/morph2.cpp:1.10 gnash/server/morph2.cpp:1.11
--- gnash/server/morph2.cpp:1.10 Mon May 8 13:59:07 2006
+++ gnash/server/morph2.cpp Mon May 8 21:12:24 2006
@@ -56,7 +56,7 @@
line_style& ls = m_line_styles[i];
const line_style& ls1 = m_shape1->get_line_styles()[i];
const line_style& ls2 = m_shape2->get_line_styles()[i];
- ls.m_width = (Uint16)frnd(flerp(ls1.get_width(),
ls2.get_width(), ratio));
+ ls.m_width = (uint16_t)frnd(flerp(ls1.get_width(),
ls2.get_width(), ratio));
ls.m_color.set_lerp(ls1.get_color(), ls2.get_color(),
ratio);
}
Index: gnash/server/movie.h
diff -u gnash/server/movie.h:1.4 gnash/server/movie.h:1.5
--- gnash/server/movie.h:1.4 Mon May 8 13:59:07 2006
+++ gnash/server/movie.h Mon May 8 21:12:24 2006
@@ -87,57 +87,57 @@
}
virtual character* add_display_object(
- Uint16 character_id,
+ uint16_t character_id,
const char* name,
const std::vector<swf_event*>& event_handlers,
- Uint16 depth,
+ uint16_t depth,
bool replace_if_depth_is_occupied,
const cxform& color_transform,
const matrix& mat,
float ratio,
- Uint16 clip_depth)
+ uint16_t clip_depth)
{
return NULL;
}
virtual void move_display_object(
- Uint16 depth,
+ uint16_t depth,
bool use_cxform,
const cxform& color_transform,
bool use_matrix,
const matrix& mat,
float ratio,
- Uint16 clip_depth)
+ uint16_t clip_depth)
{
}
virtual void replace_display_object(
- Uint16 character_id,
+ uint16_t character_id,
const char* name,
- Uint16 depth,
+ uint16_t depth,
bool use_cxform,
const cxform& color_transform,
bool use_matrix,
const matrix& mat,
float ratio,
- Uint16 clip_depth)
+ uint16_t clip_depth)
{
}
virtual void replace_display_object(
character* ch,
const char* name,
- Uint16 depth,
+ uint16_t depth,
bool use_cxform,
const cxform& color_transform,
bool use_matrix,
const matrix& mat,
float ratio,
- Uint16 clip_depth)
+ uint16_t clip_depth)
{
}
- virtual void remove_display_object(Uint16 depth, int id) {}
+ virtual void remove_display_object(uint16_t depth, int id) {}
virtual void set_background_color(const rgba& color) {}
virtual void set_background_alpha(float alpha) {}
@@ -271,7 +271,7 @@
virtual float get_timer() const { return 0.0f; }
virtual movie* to_movie() { return this; }
- virtual void clone_display_object(const tu_string& name, const
tu_string& newname, Uint16 depth)
+ virtual void clone_display_object(const tu_string& name, const
tu_string& newname, uint16_t depth)
{ assert(0); }
virtual void remove_display_object(const tu_string& name)
Index: gnash/server/movie_def_impl.cpp
diff -u gnash/server/movie_def_impl.cpp:1.2 gnash/server/movie_def_impl.cpp:1.3
--- gnash/server/movie_def_impl.cpp:1.2 Sun May 7 19:40:43 2006
+++ gnash/server/movie_def_impl.cpp Mon May 8 21:12:24 2006
@@ -309,10 +309,10 @@
// Read a .SWF movie.
void movie_def_impl::read(tu_file* in)
{
- Uint32 file_start_pos = in->get_position();
- Uint32 header = in->read_le32();
+ uint32_t file_start_pos = in->get_position();
+ uint32_t header = in->read_le32();
m_file_length = in->read_le32();
- Uint32 file_end_pos = file_start_pos + m_file_length;
+ uint32_t file_end_pos = file_start_pos + m_file_length;
m_version = (header >> 24) & 255;
if ((header & 0x0FFFFFF) != 0x00535746
@@ -358,13 +358,13 @@
IF_VERBOSE_PARSE(m_frame_size.print());
IF_VERBOSE_PARSE(log_msg("frame rate = %f, frames = %d\n", m_frame_rate,
m_frame_count));
- while ((Uint32) str.get_position() < file_end_pos)
+ while ((uint32_t) str.get_position() < file_end_pos)
{
int tag_type = str.open_tag();
if (s_progress_function != NULL)
{
- s_progress_function((Uint32) str.get_position(),
file_end_pos);
+ s_progress_function((uint32_t) str.get_position(),
file_end_pos);
}
loader_function lf = NULL;
@@ -488,7 +488,7 @@
it->second->output_cached_data(out, options);
}}
- out->write_le16((Sint16) -1); // end of characters marker
+ out->write_le16((int16_t) -1); // end of characters marker
}
@@ -530,8 +530,8 @@
return;
}
- Sint16 id = in->read_le16();
- if (id == (Sint16) -1) { break; } // done
+ int16_t id = in->read_le16();
+ if (id == (int16_t) -1) { break; } // done
smart_ptr<character_def> ch;
m_characters.get(id, &ch);
Index: gnash/server/network.cpp
diff -u gnash/server/network.cpp:1.8 gnash/server/network.cpp:1.9
--- gnash/server/network.cpp:1.8 Mon Apr 24 23:05:56 2006
+++ gnash/server/network.cpp Mon May 8 21:12:24 2006
@@ -40,8 +40,6 @@
#include "config.h"
#endif
-#include <SDL.h>
-
#include "utility.h"
#include "log.h"
#include "xml.h"
Index: gnash/server/render.cpp
diff -u gnash/server/render.cpp:1.1 gnash/server/render.cpp:1.2
--- gnash/server/render.cpp:1.1 Tue Dec 20 21:01:18 2005
+++ gnash/server/render.cpp Mon May 8 21:12:24 2006
@@ -104,7 +104,7 @@
// coords is a list of (x,y) coordinate pairs, in
// triangle-strip order. The type of the array should
// be float[vertex_count*2]
- void draw_mesh_strip(const Sint16 coords[], int vertex_count)
+ void draw_mesh_strip(const int16_t coords[], int
vertex_count)
{
if (s_render_handler)
s_render_handler->draw_mesh_strip(coords, vertex_count);
}
@@ -114,7 +114,7 @@
//
// Coords is a list of (x,y) coordinate pairs, in
// sequence.
- void draw_line_strip(const Sint16 coords[], int vertex_count)
+ void draw_line_strip(const int16_t coords[], int
vertex_count)
{
if (s_render_handler)
s_render_handler->draw_line_strip(coords, vertex_count);
}
Index: gnash/server/render.h
diff -u gnash/server/render.h:1.1 gnash/server/render.h:1.2
--- gnash/server/render.h:1.1 Tue Dec 20 21:01:18 2005
+++ gnash/server/render.h Mon May 8 21:12:24 2006
@@ -46,14 +46,14 @@
// coords is a list of (x,y) coordinate pairs, in
// triangle-strip order. The type of the array should
// be float[vertex_count*2]
- void draw_mesh_strip(const Sint16 coords[], int
vertex_count);
+ void draw_mesh_strip(const int16_t coords[], int
vertex_count);
// Draw a line-strip using the current line style.
// Clear the style list after rendering.
//
// Coords is a list of (x,y) coordinate pairs, in
// sequence.
- void draw_line_strip(const Sint16 coords[], int
vertex_count);
+ void draw_line_strip(const int16_t coords[], int
vertex_count);
void fill_style_disable(int fill_side);
void fill_style_color(int fill_side, rgba color);
Index: gnash/server/shape.cpp
diff -u gnash/server/shape.cpp:1.17 gnash/server/shape.cpp:1.18
--- gnash/server/shape.cpp:1.17 Mon May 8 13:59:07 2006
+++ gnash/server/shape.cpp Mon May 8 21:12:24 2006
@@ -276,26 +276,26 @@
// Utility.
-void write_coord_array(tu_file* out, const std::vector<Sint16>& pt_array)
+void write_coord_array(tu_file* out, const std::vector<int16_t>& pt_array)
// Dump the given coordinate array into the given stream.
{
int n = pt_array.size();
out->write_le32(n);
for (int i = 0; i < n; i++) {
- out->write_le16((Uint16) pt_array[i]);
+ out->write_le16((uint16_t) pt_array[i]);
}
}
-void read_coord_array(tu_file* in, std::vector<Sint16>* pt_array)
+void read_coord_array(tu_file* in, std::vector<int16_t>* pt_array)
// Read the coordinate array data from the stream into *pt_array.
{
int n = in->read_le32();
pt_array->resize(n);
for (int i = 0; i < n; i ++) {
- (*pt_array)[i] = (Sint16) in->read_le16();
+ (*pt_array)[i] = (int16_t) in->read_le16();
}
}
@@ -316,8 +316,8 @@
// convert to ints.
for (int i = 0; i < count; i++) {
- m_triangle_strip[i * 2] = Sint16(pts[i].m_x);
- m_triangle_strip[i * 2 + 1] = Sint16(pts[i].m_y);
+ m_triangle_strip[i * 2] = int16_t(pts[i].m_x);
+ m_triangle_strip[i * 2 + 1] = int16_t(pts[i].m_y);
}
// m_triangle_strip.resize(count);
@@ -378,8 +378,8 @@
// convert to ints.
for (int i = 0; i < coord_count; i++) {
- m_coords[i * 2] = Sint16(coords[i].m_x);
- m_coords[i * 2 + 1] = Sint16(coords[i].m_y);
+ m_coords[i * 2] = int16_t(coords[i].m_x);
+ m_coords[i * 2 + 1] = int16_t(coords[i].m_y);
}
}
Index: gnash/server/shape.h
diff -u gnash/server/shape.h:1.8 gnash/server/shape.h:1.9
--- gnash/server/shape.h:1.8 Mon May 8 13:59:07 2006
+++ gnash/server/shape.h Mon May 8 21:12:24 2006
@@ -75,7 +75,7 @@
void output_cached_data(tu_file* out);
void input_cached_data(tu_file* in);
private:
- std::vector<Sint16> m_triangle_strip;
+ std::vector<int16_t> m_triangle_strip;
};
@@ -93,7 +93,7 @@
void input_cached_data(tu_file* in);
private:
int m_style;
- std::vector<Sint16> m_coords;
+ std::vector<int16_t> m_coords;
};
Index: gnash/server/sound.cpp
diff -u gnash/server/sound.cpp:1.5 gnash/server/sound.cpp:1.6
--- gnash/server/sound.cpp:1.5 Sun May 7 12:19:06 2006
+++ gnash/server/sound.cpp Mon May 8 21:12:24 2006
@@ -54,7 +54,7 @@
{
assert(tag_type == 14);
- Uint16 character_id = in->read_u16();
+ uint16_t character_id = in->read_u16();
sound_handler::format_type format =
(sound_handler::format_type) in->read_uint(4);
int sample_rate = in->read_uint(2); // multiples of 5512.5
@@ -126,7 +126,7 @@
/// SWF Tag StartSound (15)
struct start_sound_tag : public execute_tag
{
- Uint16 m_handler_id;
+ uint16_t m_handler_id;
int m_loop_count;
bool m_stop_playback;
@@ -156,8 +156,8 @@
UNUSED(no_multiple);
UNUSED(has_envelope);
- Uint32 in_point = 0;
- Uint32 out_point = 0;
+ uint32_t in_point = 0;
+ uint32_t out_point = 0;
if (has_in_point) { in_point = in->read_u32(); }
if (has_out_point) { out_point = in->read_u32(); }
if (has_loops) { m_loop_count = in->read_u16(); }
@@ -190,7 +190,7 @@
{
assert(tag_type == 15);
- Uint16 sound_id = in->read_u16();
+ uint16_t sound_id = in->read_u16();
sound_sample_impl* sam = (sound_sample_impl*)
m->get_sound_sample(sound_id);
if (sam)
@@ -315,24 +315,24 @@
};
-// void DO_MONO_BLOCK(Sint16** out_data, int n_bits, int sample_count,
stream* in, int sample, int stepsize_index)
+// void DO_MONO_BLOCK(int16_t** out_data, int n_bits, int sample_count,
stream* in, int sample, int stepsize_index)
#define DO_MONO_BLOCK(out_data, n_bits, sample_count, in, sample,
stepsize_index) \
{
\
/* First sample doesn't need to be decompressed. */
\
sample_count--;
\
- *(*out_data)++ = (Sint16) sample;
\
+ *(*out_data)++ = (int16_t) sample;
\
\
while (sample_count--)
\
{
\
int raw_code = in->read_uint(n_bits);
\
DO_SAMPLE(n_bits, sample, stepsize_index, raw_code);
/* sample & stepsize_index are in/out params */ \
- *(*out_data)++ = (Sint16) sample;
\
+ *(*out_data)++ = (int16_t) sample;
\
}
\
}
// void do_stereo_block(
-// Sint16** out_data, // in/out param
+// int16_t** out_data, // in/out param
// int n_bits,
// int sample_count,
// stream* in,
@@ -346,18 +346,18 @@
{
\
/* First samples don't need to be decompressed. */
\
sample_count--;
\
- *(*out_data)++ = (Sint16) left_sample;
\
- *(*out_data)++ = (Sint16) right_sample;
\
+ *(*out_data)++ = (int16_t) left_sample;
\
+ *(*out_data)++ = (int16_t) right_sample;
\
\
while (sample_count--)
\
{
\
int left_raw_code = in->read_uint(n_bits);
\
DO_SAMPLE(n_bits, left_sample, left_stepsize_index,
left_raw_code); \
- *(*out_data)++ = (Sint16) left_sample;
\
+ *(*out_data)++ = (int16_t) left_sample;
\
\
int right_raw_code = in->read_uint(n_bits);
\
DO_SAMPLE(n_bits, right_sample, right_stepsize_index,
right_raw_code); \
- *(*out_data)++ = (Sint16) right_sample;
\
+ *(*out_data)++ = (int16_t) right_sample;
\
}
\
}
@@ -371,7 +371,7 @@
// out_data[]. The output buffer must have (sample_count*2)
// bytes for mono, or (sample_count*4) bytes for stereo.
{
- Sint16* out_data = (Sint16*) out_data_void;
+ int16_t* out_data = (int16_t*) out_data_void;
// Read header.
int n_bits = in->read_uint(2) + 2; // 2 to 5 bits
Index: gnash/server/sound_handler_mp3.cpp
diff -u gnash/server/sound_handler_mp3.cpp:1.7
gnash/server/sound_handler_mp3.cpp:1.8
--- gnash/server/sound_handler_mp3.cpp:1.7 Thu Apr 20 17:21:40 2006
+++ gnash/server/sound_handler_mp3.cpp Mon May 8 21:12:24 2006
@@ -76,7 +76,7 @@
}
#endif
- template <const unsigned int stride> static void
pcm_fixed_to_native(const mad_fixed_t *src, Sint16 *dst, const unsigned int
count) {
+ template <const unsigned int stride> static void
pcm_fixed_to_native(const mad_fixed_t *src, int16_t *dst, const unsigned int
count) {
assert(count > 0);
unsigned int
dec = count,
@@ -93,7 +93,7 @@
// fugly.
struct pcm_buff_t {
//enum { frame_payload = 1152 };
- Sint16 *samples;
+ int16_t *samples;
unsigned int count;
~pcm_buff_t() {
@@ -104,13 +104,13 @@
unsigned int transmogrify(const mad_synth &synth, const bool stereo) {
count = synth.pcm.length;
if (stereo) {
- samples = new Sint16[count*2];
+ samples = new int16_t[count*2];
mad_helpers::pcm_fixed_to_native<2>(&synth.pcm.samples[0][0], &samples[0],
count);
mad_helpers::pcm_fixed_to_native<2>(&synth.pcm.samples[1][0], &samples[1],
count);
return count * 2;
}
else {
- samples = new Sint16[count];
+ samples = new int16_t[count];
mad_helpers::pcm_fixed_to_native<1>(&synth.pcm.samples[0][0], samples, count);
return count;
}
@@ -118,14 +118,14 @@
void *collate(void *p, const bool stereo) const
{
- const unsigned int bytes = count * (stereo ? 2 : 1) *
sizeof(Sint16);
+ const unsigned int bytes = count * (stereo ? 2 : 1) *
sizeof(int16_t);
memcpy(p, samples, bytes);
return (void *) (((char *)p) + bytes); // geez
}
};
// there's quite some (useless) copying around since there's no infrastructure
for streaming and we need to decode it all at once
-void convert_mp3_data(Sint16 **adjusted_data, int *adjusted_size, void *data,
const int sample_count, const int sample_size, const int sample_rate, const
bool stereo)
+void convert_mp3_data(int16_t **adjusted_data, int *adjusted_size, void *data,
const int sample_count, const int sample_size, const int sample_rate, const
bool stereo)
{
//log_msg("convert_mp3_data sample count %d rate %d stereo %s\n",
sample_count, sample_rate, stereo?"yes":"no");
@@ -192,9 +192,9 @@
// assemble together all decoded frames. another round of memcpy.
{
- void *p = new Sint16[total];
- *adjusted_data = (Sint16*) p;
- *adjusted_size = total * sizeof(Sint16);
+ void *p = new int16_t[total];
+ *adjusted_data = (int16_t*) p;
+ *adjusted_size = total * sizeof(int16_t);
// stuff all that crap together
{for (unsigned int i=0; i<out.size(); ++i)
p = out[i]->collate(p,stereo);
Index: gnash/server/sprite_definition.cpp
diff -u gnash/server/sprite_definition.cpp:1.2
gnash/server/sprite_definition.cpp:1.3
--- gnash/server/sprite_definition.cpp:1.2 Sun May 7 12:19:06 2006
+++ gnash/server/sprite_definition.cpp Mon May 8 21:12:24 2006
@@ -99,7 +99,7 @@
m_loading_frame = 0;
- while ((Uint32) in->get_position() < (Uint32) tag_end)
+ while ((uint32_t) in->get_position() < (uint32_t) tag_end)
{
int tag_type = in->open_tag();
loader_function lf = NULL;
Index: gnash/server/sprite_instance.cpp
diff -u gnash/server/sprite_instance.cpp:1.1
gnash/server/sprite_instance.cpp:1.2
--- gnash/server/sprite_instance.cpp:1.1 Sat May 6 22:10:47 2006
+++ gnash/server/sprite_instance.cpp Mon May 8 21:12:24 2006
@@ -716,7 +716,7 @@
}
void sprite_instance::clone_display_object(const tu_string& name,
- const tu_string& newname, Uint16 depth)
+ const tu_string& newname, uint16_t depth)
{
// GNASH_REPORT_FUNCTION;
@@ -1270,12 +1270,12 @@
}
character*
-sprite_instance::add_display_object(Uint16 character_id,
+sprite_instance::add_display_object(uint16_t character_id,
const char* name,
const std::vector<swf_event*>& event_handlers,
- Uint16 depth, bool replace_if_depth_is_occupied,
+ uint16_t depth, bool replace_if_depth_is_occupied,
const cxform& color_transform, const matrix& matrix,
- float ratio, Uint16 clip_depth)
+ float ratio, uint16_t clip_depth)
{
// GNASH_REPORT_FUNCTION;
assert(m_def != NULL);
@@ -1331,15 +1331,15 @@
void
sprite_instance::replace_display_object(
- Uint16 character_id,
+ uint16_t character_id,
const char* name,
- Uint16 depth,
+ uint16_t depth,
bool use_cxform,
const cxform& color_transform,
bool use_matrix,
const matrix& mat,
float ratio,
- Uint16 clip_depth)
+ uint16_t clip_depth)
{
assert(m_def != NULL);
// printf("%s: character %s, id is %d\n", __FUNCTION__, name,
character_id); // FIXME: debugging crap
@@ -1374,13 +1374,13 @@
void sprite_instance::replace_display_object(
character* ch,
const char* name,
- Uint16 depth,
+ uint16_t depth,
bool use_cxform,
const cxform& color_transform,
bool use_matrix,
const matrix& mat,
float ratio,
- Uint16 clip_depth)
+ uint16_t clip_depth)
{
printf("%s: character %s, id is %d\n", __FUNCTION__, name, ch->get_id());
// FIXME:
Index: gnash/server/sprite_instance.h
diff -u gnash/server/sprite_instance.h:1.2 gnash/server/sprite_instance.h:1.3
--- gnash/server/sprite_instance.h:1.2 Sun May 7 12:02:39 2006
+++ gnash/server/sprite_instance.h Mon May 8 21:12:24 2006
@@ -237,60 +237,60 @@
/// Add an object to the DisplayList.
character* add_display_object(
- Uint16 character_id,
+ uint16_t character_id,
const char* name,
const std::vector<swf_event*>& event_handlers,
- Uint16 depth,
+ uint16_t depth,
bool replace_if_depth_is_occupied,
const cxform& color_transform,
const matrix& matrix,
float ratio,
- Uint16 clip_depth);
+ uint16_t clip_depth);
/// Updates the transform properties of the object at
/// the specified depth.
void move_display_object(
- Uint16 depth,
+ uint16_t depth,
bool use_cxform,
const cxform& color_xform,
bool use_matrix,
const matrix& mat,
float ratio,
- Uint16 clip_depth)
+ uint16_t clip_depth)
{
m_display_list.move_display_object(depth, use_cxform, color_xform,
use_matrix, mat, ratio, clip_depth);
}
void replace_display_object(
- Uint16 character_id,
+ uint16_t character_id,
const char* name,
- Uint16 depth,
+ uint16_t depth,
bool use_cxform,
const cxform& color_transform,
bool use_matrix,
const matrix& mat,
float ratio,
- Uint16 clip_depth);
+ uint16_t clip_depth);
void replace_display_object(
character* ch,
const char* name,
- Uint16 depth,
+ uint16_t depth,
bool use_cxform,
const cxform& color_transform,
bool use_matrix,
const matrix& mat,
float ratio,
- Uint16 clip_depth);
+ uint16_t clip_depth);
/// Remove the object at the specified depth.
/// If id != -1, then only remove the object
/// at depth with matching id.
- void remove_display_object(Uint16 depth, int id)
+ void remove_display_object(uint16_t depth, int id)
{
m_display_list.remove_display_object(depth, id);
}
@@ -389,7 +389,7 @@
/// Duplicate the object with the specified name
/// and add it with a new name at a new depth.
void clone_display_object(const tu_string& name,
- const tu_string& newname, Uint16 depth);
+ const tu_string& newname, uint16_t depth);
/// Remove the object with the specified name.
void remove_display_object(const tu_string& name);
Index: gnash/server/stream.cpp
diff -u gnash/server/stream.cpp:1.2 gnash/server/stream.cpp:1.3
--- gnash/server/stream.cpp:1.2 Sat Feb 25 03:54:03 2006
+++ gnash/server/stream.cpp Mon May 8 21:12:24 2006
@@ -56,7 +56,7 @@
{
assert(bitcount <= 32 && bitcount >= 0);
- Uint32 value = 0;
+ uint32_t value = 0;
int bits_needed = bitcount;
while (bits_needed > 0)
@@ -102,7 +102,7 @@
{
assert(bitcount <= 32 && bitcount >= 0);
- Sint32 value = (Sint32) read_uint(bitcount);
+ int32_t value = (int32_t) read_uint(bitcount);
// Sign extend...
if (value & (1 << (bitcount - 1))) {
@@ -118,15 +118,15 @@
float stream::read_fixed()
{
m_unused_bits = 0;
- Sint32 val = m_input->read_le32();
+ int32_t val = m_input->read_le32();
return (float) val / 65536.0f;
}
void stream::align() { m_unused_bits = 0; m_current_byte = 0; }
- Uint8 stream::read_u8() { align(); return m_input->read_byte(); }
- Sint8 stream::read_s8() { align(); return m_input->read_byte(); }
- Uint16 stream::read_u16()
+ uint8_t stream::read_u8() { align(); return m_input->read_byte(); }
+ int8_t stream::read_s8() { align(); return m_input->read_byte(); }
+ uint16_t stream::read_u16()
{
align();
// IF_DEBUG(printf("filepos = %d ", SDL_RWtell(m_input)));
@@ -134,14 +134,14 @@
// IF_DEBUG(log_msg("val = 0x%X\n", val));
return val;
}
- Sint16 stream::read_s16() { align(); return m_input->read_le16(); }
- Uint32 stream::read_u32()
+ int16_t stream::read_s16() { align(); return m_input->read_le16(); }
+ uint32_t stream::read_u32()
{
align();
- Uint32 val = m_input->read_le32();
+ uint32_t val = m_input->read_le32();
return val;
}
- Sint32 stream::read_s32() { align(); return m_input->read_le32(); }
+ int32_t stream::read_s32() { align(); return m_input->read_le32(); }
char* stream::read_string()
Index: gnash/server/stream.h
diff -u gnash/server/stream.h:1.3 gnash/server/stream.h:1.4
--- gnash/server/stream.h:1.3 Sun Apr 23 14:40:10 2006
+++ gnash/server/stream.h Mon May 8 21:12:24 2006
@@ -25,12 +25,12 @@
float read_fixed();
void align();
- Uint8 read_u8();
- Sint8 read_s8();
- Uint16 read_u16();
- Sint16 read_s16();
- Uint32 read_u32();
- Sint32 read_s32();
+ uint8_t read_u8();
+ int8_t read_s8();
+ uint16_t read_u16();
+ int16_t read_s16();
+ uint32_t read_u32();
+ int32_t read_s32();
int read_variable_count()
{
int count = read_u8();
@@ -55,8 +55,8 @@
private:
tu_file* m_input;
- Uint8 m_current_byte;
- Uint8 m_unused_bits;
+ uint8_t m_current_byte;
+ uint8_t m_unused_bits;
std::vector<int> m_tag_stack; // position of end of
tag
};
Index: gnash/server/styles.cpp
diff -u gnash/server/styles.cpp:1.9 gnash/server/styles.cpp:1.10
--- gnash/server/styles.cpp:1.9 Sun May 7 12:19:06 2006
+++ gnash/server/styles.cpp Mon May 8 21:12:24 2006
@@ -288,7 +288,7 @@
assert(m_gradients.size() == b.m_gradients.size());
for (unsigned int j=0; j < m_gradients.size(); j++) {
m_gradients[j].m_ratio =
- (Uint8) frnd(
+ (uint8_t) frnd(
flerp(a.m_gradients[j].m_ratio, b.m_gradients[j].m_ratio, t)
);
m_gradients[j].m_color.set_lerp(a.m_gradients[j].m_color,
b.m_gradients[j].m_color, t);
Index: gnash/server/styles.h
diff -u gnash/server/styles.h:1.7 gnash/server/styles.h:1.8
--- gnash/server/styles.h:1.7 Sun May 7 19:40:43 2006
+++ gnash/server/styles.h Mon May 8 21:12:24 2006
@@ -23,7 +23,7 @@
void read(stream* in, int tag_type);
//data:
- Uint8 m_ratio;
+ uint8_t m_ratio;
rgba m_color;
};
@@ -102,13 +102,13 @@
void read(stream* in, int tag_type);
virtual void apply(float ratio) const;
- Uint16 get_width() const { return m_width; }
+ uint16_t get_width() const { return m_width; }
const rgba& get_color() const { return m_color; }
private:
friend struct morph2_character_def;
- Uint16 m_width; // in TWIPS
+ uint16_t m_width; // in TWIPS
rgba m_color;
};
@@ -122,7 +122,7 @@
virtual void apply(float morph) const;
private:
- Uint16 m_width[2];
+ uint16_t m_width[2];
rgba m_color[2];
};
}
Index: gnash/server/text.cpp
diff -u gnash/server/text.cpp:1.15 gnash/server/text.cpp:1.16
--- gnash/server/text.cpp:1.15 Mon May 8 13:59:07 2006
+++ gnash/server/text.cpp Mon May 8 21:12:24 2006
@@ -138,7 +138,7 @@
// We'll use about half the width, and
around 3/4 the height.
// Values adjusted by eye.
// The Y baseline is at 0; negative Y
is up.
- static const Sint16
s_empty_char_box[5 * 2] =
+ static const int16_t
s_empty_char_box[5 * 2] =
{
32, 32,
480, 32,
@@ -223,7 +223,7 @@
if (has_font)
{
- Uint16 font_id = in->read_u16();
+ uint16_t font_id =
in->read_u16();
style.m_font_id = font_id;
IF_VERBOSE_PARSE(log_msg(" has_font:
font id = %d\n", font_id));
}
@@ -304,7 +304,7 @@
{
assert(tag_type == 11 || tag_type == 33);
- Uint16 character_id = in->read_u16();
+ uint16_t character_id = in->read_u16();
text_character_def* ch = new text_character_def(m);
IF_VERBOSE_PARSE(log_msg("text_character, id = %d\n",
character_id));
@@ -473,7 +473,7 @@
//else if (name == "textColor")
{
// The arg is 0xRRGGBB format.
- Uint32 rgb = (Uint32) val.to_number();
+ uint32_t rgb = (uint32_t) val.to_number();
cxform cx = get_cxform();
cx.m_[0][0] = fclamp(((rgb >> 16) & 255) / 255.0f, 0,
1);
@@ -689,7 +689,7 @@
int last_line_start_record = 0;
const char* text = &m_text[0];
- while (Uint32 code = utf8::decode_next_unicode_character(&text))
+ while (uint32_t code =
utf8::decode_next_unicode_character(&text))
{
// @@ try to truncate overflow text??
#if 0
@@ -701,7 +701,7 @@
}
#endif // 0
- //Uint16 code = m_text[j];
+ //uint16_t code = m_text[j];
x += m_def->m_font->get_kerning_adjustment(last_code,
(int) code) * scale;
last_code = (int) code;
@@ -774,7 +774,7 @@
last_space_glyph = rec.m_glyphs.size();
}
- int index = m_def->m_font->get_glyph_index((Uint16)
code);
+ int index =
m_def->m_font->get_glyph_index((uint16_t) code);
if (index == -1)
{
// error -- missing glyph!
@@ -890,20 +890,20 @@
coords[2] = m_def->m_rect.get_corner(3);
coords[3] = m_def->m_rect.get_corner(2);
- Sint16 icoords[18] =
+ int16_t icoords[18] =
{
// strip (fill in)
- (Sint16) coords[0].m_x, (Sint16) coords[0].m_y,
- (Sint16) coords[1].m_x, (Sint16) coords[1].m_y,
- (Sint16) coords[2].m_x, (Sint16) coords[2].m_y,
- (Sint16) coords[3].m_x, (Sint16) coords[3].m_y,
+ (int16_t) coords[0].m_x, (int16_t)
coords[0].m_y,
+ (int16_t) coords[1].m_x, (int16_t)
coords[1].m_y,
+ (int16_t) coords[2].m_x, (int16_t)
coords[2].m_y,
+ (int16_t) coords[3].m_x, (int16_t)
coords[3].m_y,
// outline
- (Sint16) coords[0].m_x, (Sint16) coords[0].m_y,
- (Sint16) coords[1].m_x, (Sint16) coords[1].m_y,
- (Sint16) coords[3].m_x, (Sint16) coords[3].m_y,
- (Sint16) coords[2].m_x, (Sint16) coords[2].m_y,
- (Sint16) coords[0].m_x, (Sint16) coords[0].m_y,
+ (int16_t) coords[0].m_x, (int16_t)
coords[0].m_y,
+ (int16_t) coords[1].m_x, (int16_t)
coords[1].m_y,
+ (int16_t) coords[3].m_x, (int16_t)
coords[3].m_y,
+ (int16_t) coords[2].m_x, (int16_t)
coords[2].m_y,
+ (int16_t) coords[0].m_x, (int16_t)
coords[0].m_y,
};
render::fill_style_color(0, rgba(255, 255, 255, 255));
@@ -946,7 +946,7 @@
{
assert(tag_type == 37);
- Uint16 character_id = in->read_u16();
+ uint16_t character_id = in->read_u16();
edit_text_character_def* ch = new
edit_text_character_def(m);
IF_VERBOSE_PARSE(log_msg("edit_text_char, id = %d\n",
character_id));
Index: gnash/server/tools.cpp
diff -u gnash/server/tools.cpp:1.1 gnash/server/tools.cpp:1.2
--- gnash/server/tools.cpp:1.1 Tue Dec 20 21:01:18 2005
+++ gnash/server/tools.cpp Mon May 8 21:12:24 2006
@@ -86,7 +86,7 @@
};
- void write_placeholder_bitmap(tu_file* out, Uint16 character_id)
+ void write_placeholder_bitmap(tu_file* out, uint16_t character_id)
// Write a minimal bitmap character tag into the given stream,
// with the given character_id.
{
@@ -162,10 +162,10 @@
// @@ Copied & adapted from movie_def_impl::read()
// @@ TODO share this wrapper code somehow (also with parser)
- Uint32 file_start_pos = in->get_position();
- Uint32 header = in->read_le32();
- Uint32 file_length = in->read_le32();
- Uint32 file_end_pos = file_start_pos + file_length;
+ uint32_t file_start_pos = in->get_position();
+ uint32_t header = in->read_le32();
+ uint32_t file_length = in->read_le32();
+ uint32_t file_end_pos = file_start_pos + file_length;
int version = (header >> 24) & 255;
if ((header & 0x0FFFFFF) != 0x00535746
@@ -244,7 +244,7 @@
// IF_VERBOSE_PARSE(m_frame_size.print());
IF_VERBOSE_PARSE(log_msg("frame rate = %f, frames = %d\n", frame_rate,
frame_count));
- while ((Uint32) str.get_position() < file_end_pos)
+ while ((uint32_t) str.get_position() < file_end_pos)
{
copy_helper cp(in, swf_out);
@@ -263,7 +263,7 @@
|| tag_type == 36))
{
// Some type of bitmap character tag; replace it with a
minimal stand-in.
- Uint16 cid = str.read_u16();
+ uint16_t cid = str.read_u16();
str.close_tag();
// Insert substitute tag.
Index: gnash/server/types.cpp
diff -u gnash/server/types.cpp:1.4 gnash/server/types.cpp:1.5
--- gnash/server/types.cpp:1.4 Mon May 8 11:43:58 2006
+++ gnash/server/types.cpp Mon May 8 21:12:24 2006
@@ -343,10 +343,10 @@
{
rgba result;
- result.m_r = (Uint8) fclamp(in.m_r * m_[0][0] + m_[0][1], 0,
255);
- result.m_g = (Uint8) fclamp(in.m_g * m_[1][0] + m_[1][1], 0,
255);
- result.m_b = (Uint8) fclamp(in.m_b * m_[2][0] + m_[2][1], 0,
255);
- result.m_a = (Uint8) fclamp(in.m_a * m_[3][0] + m_[3][1], 0,
255);
+ result.m_r = (uint8_t) fclamp(in.m_r * m_[0][0] + m_[0][1], 0,
255);
+ result.m_g = (uint8_t) fclamp(in.m_g * m_[1][0] + m_[1][1], 0,
255);
+ result.m_b = (uint8_t) fclamp(in.m_b * m_[2][0] + m_[2][1], 0,
255);
+ result.m_a = (uint8_t) fclamp(in.m_a * m_[3][0] + m_[3][1], 0,
255);
return result;
}
@@ -472,10 +472,10 @@
void rgba::set_lerp(const rgba& a, const rgba& b, float f)
{
- m_r = (Uint8) frnd(flerp(a.m_r, b.m_r, f));
- m_g = (Uint8) frnd(flerp(a.m_g, b.m_g, f));
- m_b = (Uint8) frnd(flerp(a.m_b, b.m_b, f));
- m_a = (Uint8) frnd(flerp(a.m_a, b.m_a, f));
+ m_r = (uint8_t) frnd(flerp(a.m_r, b.m_r, f));
+ m_g = (uint8_t) frnd(flerp(a.m_g, b.m_g, f));
+ m_b = (uint8_t) frnd(flerp(a.m_b, b.m_b, f));
+ m_a = (uint8_t) frnd(flerp(a.m_a, b.m_a, f));
}
Index: gnash/server/types.h
diff -u gnash/server/types.h:1.4 gnash/server/types.h:1.5
--- gnash/server/types.h:1.4 Wed Feb 15 23:35:53 2006
+++ gnash/server/types.h Mon May 8 21:12:24 2006
@@ -34,7 +34,7 @@
/// RGBA record
struct rgba
{
- Uint8 m_r, m_g, m_b, m_a;
+ uint8_t m_r, m_g, m_b, m_a;
/// Default RGBA value is FF.FF.FF.FF
rgba() : m_r(255), m_g(255), m_b(255), m_a(255) {}
@@ -46,7 +46,7 @@
/// @param b Blue
/// @param a Alpha (transparency)
///
- rgba(Uint8 r, Uint8 g, Uint8 b, Uint8 a)
+ rgba(uint8_t r, uint8_t g, uint8_t b, uint8_t a)
:
m_r(r), m_g(g), m_b(b), m_a(a)
{
@@ -72,7 +72,7 @@
void read_rgb(stream* in);
/// Set r,g,b.a values
- void set(Uint8 r, Uint8 g, Uint8 b, Uint8 a)
+ void set(uint8_t r, uint8_t g, uint8_t b, uint8_t a)
{
m_r = r;
m_g = g;
Index: gnash/server/xmlsocket.cpp
diff -u gnash/server/xmlsocket.cpp:1.13 gnash/server/xmlsocket.cpp:1.14
--- gnash/server/xmlsocket.cpp:1.13 Mon Apr 24 23:05:56 2006
+++ gnash/server/xmlsocket.cpp Mon May 8 21:12:24 2006
@@ -40,8 +40,6 @@
#include "config.h"
#endif
-#include <SDL.h>
-
#include "utility.h"
#include "log.h"
#include "xml.h"
Index: gnash/utilities/parser.cpp
diff -u gnash/utilities/parser.cpp:1.5 gnash/utilities/parser.cpp:1.6
--- gnash/utilities/parser.cpp:1.5 Sat Mar 11 19:24:27 2006
+++ gnash/utilities/parser.cpp Mon May 8 21:12:24 2006
@@ -147,7 +147,7 @@
struct rect
{
- static Uint32 x_min,x_max,y_min,y_max;
+ static uint32_t x_min,x_max,y_min,y_max;
static void parse(stream* in)
{
in->align();
@@ -165,14 +165,14 @@
ident--;
}
};
- Uint32 rect::x_min;
- Uint32 rect::y_min;
- Uint32 rect::x_max;
- Uint32 rect::y_max;
+ uint32_t rect::x_min;
+ uint32_t rect::y_min;
+ uint32_t rect::x_max;
+ uint32_t rect::y_max;
struct rgb
{
- static Uint8 m_r, m_g, m_b;
+ static uint8_t m_r, m_g, m_b;
static void parse(stream* in)
{
m_r = in->read_u8();
@@ -186,13 +186,13 @@
ident--;
}
};
- Uint8 rgb::m_r;
- Uint8 rgb::m_g;
- Uint8 rgb::m_b;
+ uint8_t rgb::m_r;
+ uint8_t rgb::m_g;
+ uint8_t rgb::m_b;
struct rgba
{
- static Uint8 m_r, m_g, m_b, m_a;
+ static uint8_t m_r, m_g, m_b, m_a;
static void parse(stream* in)
{
m_r = in->read_u8();
@@ -207,10 +207,10 @@
ident--;
}
};
- Uint8 rgba::m_r;
- Uint8 rgba::m_g;
- Uint8 rgba::m_b;
- Uint8 rgba::m_a;
+ uint8_t rgba::m_r;
+ uint8_t rgba::m_g;
+ uint8_t rgba::m_b;
+ uint8_t rgba::m_a;
struct cxform
{
@@ -473,11 +473,11 @@
log_msg("define a new sprite:\n");
ident++;
int tag_end = input->get_tag_end_position();
- Uint32 char_id = input->read_u16();
- Uint32 sprite_frame_count = input->read_u16();
+ uint32_t char_id = input->read_u16();
+ uint32_t sprite_frame_count = input->read_u16();
log_msg("character ID: %i\n", char_id);
log_msg("frame count of sprite: %i\n", sprite_frame_count);
- Uint32 old_current_frame = current_frame;
+ uint32_t old_current_frame = current_frame;
current_frame = 0;
ident++;
@@ -485,7 +485,7 @@
log_msg("starting frame 0\n\n");
ident++;
- while ((Uint32) input->get_position() < (Uint32) tag_end) {
+ while ((uint32_t) input->get_position() < (uint32_t) tag_end) {
int tag_type = input->open_tag();
loader_function lf = NULL;
@@ -543,10 +543,10 @@
{
ident = 1;
- Uint32 header = file->read_le32();
- Uint32 file_length = file->read_le32();
+ uint32_t header = file->read_le32();
+ uint32_t file_length = file->read_le32();
- Uint32 version = (header >> 24) & 255;
+ uint32_t version = (header >> 24) & 255;
if ((header & 0x0FFFFFF) != 0x00535746 && (header & 0x0FFFFFF) !=
0x00535743) {
log_msg("\nNo valid SWF file, header is incorrect!\n");
return;
@@ -579,7 +579,7 @@
log_msg("starting frame 0\n\n");
ident++;
- while ((Uint32) str.get_position() < file_length) {
+ while ((uint32_t) str.get_position() < file_length) {
int tag_type = str.open_tag();
loader_function lf = NULL;
- [Gnash-commit] gnash ./ChangeLog ./configure.ac backend/gnash....,
Bastiaan Jacques <=