[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash ./ChangeLog ./configure.ac backend/render...
From: |
Rob Savoye |
Subject: |
[Gnash-commit] gnash ./ChangeLog ./configure.ac backend/render... |
Date: |
Fri, 03 Feb 2006 20:50:28 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Branch:
Changes by: Rob Savoye <address@hidden> 06/02/03 20:50:27
Modified files:
. : ChangeLog configure.ac
backend : render_handler_ogl.cpp
libbase : Makefile.am
libgeometry : Makefile.am
macros : opengl.m4
plugin : Makefile.am ogl_sdl.cpp player.cpp plugin.cpp
server : Makefile.am action.cpp
testsuite/actionscript.all: Makefile.am
utilities : Makefile.am
Log message:
* configure.ac: Add --enable-sdk-install to install headers for
those who want to use Gnash as a development library.
* plugin/ogl_sdl.cpp: Drop old demo code.
* libbase/Makefile.am: Rename libbase to libgnashbase to
reduce the chance of name collision.
* libgeometry/Makefile.am: Rename libgeometry to libgnashgeo to
reduce the chance of name collision.
* server/Makefile.am: Rename libserver to libgnashserver, and
libasobjs to libgnashasobjs to reduce the chance of name
collision.
* backend/Makefile.am: Rename libgbackend to libgnashbackend to
reduce the chance of name collision. Use the new library names to
link.
* utilities/Makefile.am: Use the new library names to link.
* plugin/Makefile.am: Rename libgnash to be libgnashplugin to
reduce the chance of name collision. Use the new library names to
link.
* server/action.cpp: Add missing opcodes to dissasembler table,a
and rename the unsupported ones to have a "_fixme" attached when
printing debug information.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/ChangeLog.diff?tr1=1.75&tr2=1.76&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/configure.ac.diff?tr1=1.28&tr2=1.29&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/backend/render_handler_ogl.cpp.diff?tr1=1.4&tr2=1.5&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/libbase/Makefile.am.diff?tr1=1.10&tr2=1.11&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/libgeometry/Makefile.am.diff?tr1=1.8&tr2=1.9&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/macros/opengl.m4.diff?tr1=1.7&tr2=1.8&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/plugin/Makefile.am.diff?tr1=1.8&tr2=1.9&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/plugin/ogl_sdl.cpp.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/plugin/player.cpp.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/plugin/plugin.cpp.diff?tr1=1.10&tr2=1.11&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/server/Makefile.am.diff?tr1=1.15&tr2=1.16&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/server/action.cpp.diff?tr1=1.15&tr2=1.16&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/testsuite/actionscript.all/Makefile.am.diff?tr1=1.8&tr2=1.9&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/utilities/Makefile.am.diff?tr1=1.8&tr2=1.9&r1=text&r2=text
Patches:
Index: gnash/ChangeLog
diff -u gnash/ChangeLog:1.75 gnash/ChangeLog:1.76
--- gnash/ChangeLog:1.75 Fri Feb 3 19:26:51 2006
+++ gnash/ChangeLog Fri Feb 3 20:50:27 2006
@@ -1,5 +1,26 @@
2006-02-03 Rob Savoye <address@hidden>
+ * configure.ac: Add --enable-sdk-install to install headers for
+ those who want to use Gnash as a development library.
+ * plugin/ogl_sdl.cpp: Drop old demo code.
+ * libbase/Makefile.am: Rename libbase to libgnashbase to
+ reduce the chance of name collision.
+ * libgeometry/Makefile.am: Rename libgeometry to libgnashgeo to
+ reduce the chance of name collision.
+ * server/Makefile.am: Rename libserver to libgnashserver, and
+ libasobjs to libgnashasobjs to reduce the chance of name
+ collision.
+ * backend/Makefile.am: Rename libgbackend to libgnashbackend to
+ reduce the chance of name collision. Use the new library names to
+ link.
+ * utilities/Makefile.am: Use the new library names to link.
+ * plugin/Makefile.am: Rename libgnash to be libgnashplugin to
+ reduce the chance of name collision. Use the new library names to
+ link.
+
+ * server/action.cpp: Add missing opcodes to dissasembler table,a
+ and rename the unsupported ones to have a "_fixme" attached when
+ printing debug information.
* backend/Makefile.am (AM_LDFLAGS): Add $(X_LIBS) so we can link
with libraries in /usr/X11R6/lib.
@@ -72,7 +93,7 @@
* testsuite/actionscript.all/swf_exists.exp: Test driver for
DejaGnu to run the new test cases.
* testsuite/actionscript.all/Boolean.as, Date.as, Microphone.as,
- SharedObject.as, Camera.as, Error.as, Mouse.as, Stage.as, Color.as,
+ SharedObject.as, Camera.as, Error.as, Mouse.as, Stage.as, Color.as,
server/Makefile.am, backend/Makefile.am,
Function.as, NetConnection.as, System.as, ContextMenu.as,
LoadVars.as, NetStream.as, TextSnapshot.as, CustomActions.as,
LocalConnection.as, Selection.as, Video.as: New Ming based test
Index: gnash/backend/render_handler_ogl.cpp
diff -u gnash/backend/render_handler_ogl.cpp:1.4
gnash/backend/render_handler_ogl.cpp:1.5
--- gnash/backend/render_handler_ogl.cpp:1.4 Fri Feb 3 17:20:12 2006
+++ gnash/backend/render_handler_ogl.cpp Fri Feb 3 20:50:27 2006
@@ -1164,7 +1164,5 @@
// Local Variables:
// mode: C++
-// c-basic-offset: 8
-// tab-width: 8
// indent-tabs-mode: t
// End:
Index: gnash/configure.ac
diff -u gnash/configure.ac:1.28 gnash/configure.ac:1.29
--- gnash/configure.ac:1.28 Thu Feb 2 16:39:05 2006
+++ gnash/configure.ac Fri Feb 3 20:50:27 2006
@@ -53,6 +53,16 @@
AC_DEFINE([FIX_I810_LOD_BIAS], [], [Fix i810 LOD bias problem])
fi
+dnl Fix the Intel 810 LOD bias problem
+AC_ARG_ENABLE(sdkinstall, [ --enable-sdk-install Enable installing the
libraries and headers as an SDK],
+[case "${enableval}" in
+ yes) sdkinstall=yes ;;
+ no) sdkinstall=no ;;
+ *) AC_MSG_ERROR([bad value ${enableval} for enable-i810-lod-bias option])
;;
+esac], sdkinstall=no)
+
+AM_CONDITIONAL(SDKINSTALL, test x$sdkinstall = xyes)
+
dnl Use the Dom parser from libxml2, not the xmlReader one
dnl The default is to use the Dom parser
dom=yes
Index: gnash/libbase/Makefile.am
diff -u gnash/libbase/Makefile.am:1.10 gnash/libbase/Makefile.am:1.11
--- gnash/libbase/Makefile.am:1.10 Sat Jan 28 01:14:33 2006
+++ gnash/libbase/Makefile.am Fri Feb 3 20:50:27 2006
@@ -24,7 +24,7 @@
# AM_LDFLAGS = $(OPENGL_LIBS) $(GLU_LIBS) $(SDL_LIBS)
# noinst_LTLIBRARIES = libbase.la
-lib_LTLIBRARIES = libbase.la
+lib_LTLIBRARIES = libgnashbase.la
# noinst_LIBRARIES = libbase.a
# These headers get installed
@@ -43,7 +43,7 @@
$(OPENGL_CFLAGS) \
-I$(top_srcdir)
-libbase_la_SOURCES = \
+libgnashbase_la_SOURCES = \
config.cpp \
container.cpp \
demo.cpp \
Index: gnash/libgeometry/Makefile.am
diff -u gnash/libgeometry/Makefile.am:1.8 gnash/libgeometry/Makefile.am:1.9
--- gnash/libgeometry/Makefile.am:1.8 Wed Feb 1 23:58:32 2006
+++ gnash/libgeometry/Makefile.am Fri Feb 3 20:50:27 2006
@@ -24,7 +24,7 @@
# AM_LDFLAGS = $(OPENGL_LIBNS) $(SDL_LIBS)
# noinst_LTLIBRARIES = libgeometry.la
-lib_LTLIBRARIES = libgeometry.la
+lib_LTLIBRARIES = libgnashgeo.la
# noinst_LIBRARIES = libgeometry.a
# These headers get installed
@@ -40,7 +40,7 @@
$(ZLIB_CFLAGS) \
$(JPEGLIB_CFLAGS)
-libgeometry_la_SOURCES = \
+libgnashgeo_la_SOURCES = \
axial_box.cpp \
bsp.cpp \
collision.cpp \
Index: gnash/macros/opengl.m4
diff -u gnash/macros/opengl.m4:1.7 gnash/macros/opengl.m4:1.8
--- gnash/macros/opengl.m4:1.7 Wed Feb 1 23:58:31 2006
+++ gnash/macros/opengl.m4 Fri Feb 3 20:50:27 2006
@@ -88,7 +88,7 @@
if test x"${ac_cv_path_opengl_libraries}" = x; then
AC_CHECK_LIB(GL, glBegin, [ac_cv_path_opengl_libraries="-lGL -lGLU"],[
AC_MSG_CHECKING([for libGL library])
- libslist="/usr/lib /usr/local/lib /opt/lib /usr/X11R6/lib /usr/pkg/lib
.. ../.."
+ libslist="/usr/X11R6/lib /usr/lib /usr/local/lib /opt/lib /usr/pkg/lib
.. ../.."
for i in $libslist; do
if test -f $i/libGL.a -o -f $i/libGL.so; then
if test x"$i" != x"/usr/lib"; then
Index: gnash/plugin/Makefile.am
diff -u gnash/plugin/Makefile.am:1.8 gnash/plugin/Makefile.am:1.9
--- gnash/plugin/Makefile.am:1.8 Sat Jan 28 01:14:33 2006
+++ gnash/plugin/Makefile.am Fri Feb 3 20:50:27 2006
@@ -67,28 +67,26 @@
# $(X_LIBS)\
# $(X_EXTRA_LIBS)
-plugin_LTLIBRARIES = libgnash.la
+plugin_LTLIBRARIES = libgnashplugin.la
noinst_HEADERS = plugin.h player.h ogl_sdl.h
-libgnash_la_SOURCES = plugin.cpp player.cpp ogl_sdl.cpp
-libgnash_la_LIBADD = $(AM_LDFLAGS) \
+libgnashplugin_la_SOURCES = plugin.cpp player.cpp ogl_sdl.cpp
+libgnashplugin_la_LIBADD = $(AM_LDFLAGS) \
mozilla-sdk/libmozsdk.la\
- ../backend/libgbackend.la\
- ../server/libserver.la\
- ../libgeometry/libgeometry.la\
- ../libbase/libbase.la
-
-
-libgnash_la_DEPENDENCIES = mozilla-sdk/libmozsdk.la
../backend/libgbackend.la ../server/libserver.la ../libgeometry/libgeometry.la
../libbase/libbase.la
-libgnash_la_LDFLAGS = -module -avoid-version -no-undefined
+ ../backend/libgnashbackend.la\
+ ../server/libgnashasobjs.la \
+ ../server/libgnashserver.la\
+ ../libgeometry/libgnashgeo.la\
+ ../libbase/libgnashbase.la
+libgnashplugin_la_LDFLAGS = -module -avoid-version -no-undefined
# For now the plugin has to be installed in the root plugin
# directory for Firefox. For some reason if the same file is
# installed in the users $(HOME)/.firefox.plugins, the plugin
# won't load due to errors with an undefined MaiAtkObject.
install-pluginLTLIBRARIES: $(plugin_LIBRARIES)
- cp .libs/libgnash.so $(plugindir)/libgnash.so
+ cp .libs/libgnashplugin.so $(plugindir)/libgnashplugin.so
# install-pluginLTLIBRARIES: $(plugin_LIBRARIES)
# if test -d $(HOME)/.firefox ; then \
@@ -100,4 +98,4 @@
# fi
uninstall-pluginLTLIBRARIES: $(plugin_LIBRARIES)
- rm -f $(plugindir)/libgnash.so
+ rm -f $(plugindir)/libgnashplugin.so
Index: gnash/plugin/ogl_sdl.cpp
diff -u gnash/plugin/ogl_sdl.cpp:1.2 gnash/plugin/ogl_sdl.cpp:1.3
--- gnash/plugin/ogl_sdl.cpp:1.2 Sat Jan 28 01:14:33 2006
+++ gnash/plugin/ogl_sdl.cpp Fri Feb 3 20:50:27 2006
@@ -99,214 +99,6 @@
GLuint blend; // Turn blending on/off
GLuint filter; // Which Filter To Use
-// sweepLine animates a line on a surface based on the
-// elapsed time.
-
-class sweepLine
-{
-private:
- SDL_Surface *s; // The surface to draw on.
- Uint32 color; // The color of the line.
- int last; // last time update() was
- // called.
- int maxx; // Maximum valid X value.
- int maxy; // Maximum valid Y value.
- float x1, y1; // The current location
- float dx1, dy1; // and velocity of the line
- float x2, y2; // end points.
- float dx2, dy2;
-
- // movePoint computes the new location of a point based
- // on its initial location, its velocity, and the
- // elapsed time.
-
- void movePoint(float &x, float &y,
- float &dx, float &dy,
- int dt)
- {
- // Compute the new X location.
-
- x += (dx * dt);
-
- // if the X value is off of the screen, move it back
- // on and reverse the velocity in the X direction.
-
- if (x >= maxx)
- {
- x = maxx;
- dx = -dx;
- }
- else if (x <= 0)
- {
- x = 0;
- dx = -dx;
- }
-
- // Same thing for Y.
- y += (dy * dt);
- if (y >= maxy)
- {
- y = maxy;
- dy = -dy;
- }
- else if (y <= 0)
- {
- y = 0;
- dy = -dy;
- }
- }
-
-public:
-
- // sweepLine animates a line on a surface. It is
- // initialized with a pointer to the surface to draw the
- // line on, a pixel value that specifies the color of
- // the line, the current time, and the initial locations
- // of the line end points and their
- // velocities. Velocities are specified in
- // pixels/millisecond.
-
- // This method initializes the class and forces the end
- // points of the lines to be inside the boundaries of
- // the surface. If it didn't do that the line drawing
- // code would try to write outside of the surface and
- // crash the program.
-
- sweepLine(SDL_Surface *s,
- Uint32 color,
- int time,
- float x1, float y1,
- float dx1, float dy1,
- float x2, float y2,
- float dx2, float dy2):
- s(s),
- color(color),
- last(time),
- x1(x1), y1(y1),
- dx1(dx1), dy1(dy1),
- x2(x2), y2(y2),
- dx2(dx2), dy2(dy2)
- {
-
- // Set the values of maxx and maxy to one less than
- // the width and height. Do this makes clipping easier
- // to code.
-
- maxx = 0;
- maxy = 0;
-
- if (NULL != s)
- {
- maxx = s->w - 1;
- maxy = s->h - 1;
- }
-
- // Force the line end points onto the screen.
-
- x1 = max(x1, 0);
- y1 = max(y1, 0);
-
- x2 = max(x2, 0);
- y2 = max(y2, 0);
-
- x1 = min(x1, maxx);
- y1 = min(y1, maxy);
-
- x2 = min(x2, maxx);
- y2 = min(y2, maxy);
- }
-
- void update(long now)
- {
- int dt = now - last;
- last = now;
-
- // Update the locations of the line end points.
-
- movePoint(x1, y1, dx1, dy1, dt);
- movePoint(x2, y2, dx2, dy2, dt);
-
- // Draw the line at its new location.
-
- line(s,
- (int)x1, (int)y1,
- (int)x2, (int)y2,
- color);
- }
-
-};
-
-// gameTime keeps track of game time as opposed to real
-// time. Game time can start and stop and even change its
-// speed while real time just keeps ticking along.
-
-class gameTime
-{
-private:
- int startTime; // Last time the clock was
- // started.
- int baseTime; // How much game time passed
- // before the last time the
- // clock was started.
- bool running; // Is the clock running or
- // not?
-
-public:
-
- // Initialize the class variables. At this point no game
- // time has elapsed and the clock is not running.
-
- gameTime()
- {
- startTime = 0;
- baseTime = 0;
- running = false;
- }
-
- // Start the clock.
-
- void start()
- {
- if (!running)
- {
- startTime = SDL_GetTicks();
- running = true;
- }
- }
-
- // stop the clock
-
- void stop()
- {
- if (running)
- {
- baseTime = baseTime + (SDL_GetTicks() - startTime);
- running = false;
- }
- }
-
- // True if the clock is paused.
-
- bool stopped()
- {
- return !running;
- }
-
- // Get this clocks current time in milliseconds.
-
- int time()
- {
- if (running)
- {
- return baseTime + (SDL_GetTicks() - startTime);
- }
- else
- {
- return baseTime;
- }
- }
-};
-
// function to release/destroy our resources and restoring the old desktop
void
Quit( int returnCode )
@@ -441,8 +233,6 @@
return;
}
-// general OpenGL initialization function
-// http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=02
int
initGL(nsPluginInstance *winst)
{
@@ -463,7 +253,7 @@
id, width, height, depth);
char SDL_windowhack[32];
- sprintf (SDL_windowhack,"SDL_WINDOWID=%ld", id);
+ sprintf (SDL_windowhack,"SDL_WINDOWID=%d", id);
putenv (SDL_windowhack);
SDL_mutexP(mutex);
@@ -479,7 +269,7 @@
// reasonable state.
//atexit(SDL_Quit);
-#if 0
+#if 1
// 16-bit color, surface creation is likely to succeed.
SDL_GL_SetAttribute(SDL_GL_RED_SIZE, 5);
SDL_GL_SetAttribute(SDL_GL_GREEN_SIZE, 5);
@@ -502,9 +292,9 @@
// the flags to pass to SDL_SetVideoMode
videoFlags = SDL_OPENGL; // Enable OpenGL in SDL
videoFlags |= SDL_GL_DOUBLEBUFFER;
- videoFlags |= SDL_RESIZABLE; // Enable window resizing
+ videoFlags |= SDL_RESIZABLE; // /var/www/html/gnashEnable window
resizing
videoFlags |= SDL_HWPALETTE; // Store the palette in hardware
-// videoFlags |= SDL_ANYFORMAT;
+ videoFlags |= SDL_ANYFORMAT;
// This checks to see if surfaces can be stored in memory
if ( videoInfo->hw_available ) {
@@ -559,14 +349,11 @@
return( true );
}
-// Here goes our drawing code
int
drawGLScene( void )
{
- static gameTime gt;
printf("%s: \n", __PRETTY_FUNCTION__);
-
-#if 1
+
SDL_mutexP(mutex);
// Clear The Screen And The Depth Buffer
@@ -596,475 +383,10 @@
SDL_GL_SwapBuffers( );
SDL_mutexV(mutex);
-
- int t = gt.time();
-#else
- Uint32 black;
- Uint32 red;
- Uint32 green;
- Uint32 blue;
- bool done = false;
- bool init = false;
- static gameTime gt;
-
- // Start the game clock.
- if (!init) {
- init = true;
- gt.start();
- }
-
- sweepLine *rl = NULL;
- sweepLine *gl = NULL;
- sweepLine *bl = NULL;
-
- //Create the pixel values used in the program. Black is
- //for clearing the background and the other three are
- //for line colors. Note that in SDL you specify color
- //intensities in the rang 0 to 255 (hex ff). That
- //doesn't mean that you always get 24 or 32 bits of
- //color. If the format doesn't support the full color
- //range, SDL scales it to the range that is correct for
- //the pixel format.
- black = SDL_MapRGB(pixelformat, 0x00, 0x00, 0x00);
- red = SDL_MapRGB(pixelformat, 0xff, 0x00, 0x00);
- green = SDL_MapRGB(pixelformat, 0x00, 0xff, 0x00);
- blue = SDL_MapRGB(pixelformat, 0x00, 0x00, 0xff);
-
- // Create the three animating lines. It is amazing to
- // see the different kinds of behavior you can get from
- // such a simple animation object.
-
- rl = new sweepLine(surface,
- red,
- gt.time(),
- surface->w - 1, 0,
- -0.3, 0,
- 0, surface->h - 1,
- 0.3, 0);
- gl = new sweepLine(surface,
- green,
- gt.time(),
- 0, 0,
- 0, 0.1,
- surface->w - 1, surface->h - 1,
- 0, -0.1);
- bl = new sweepLine(surface,
- blue,
- gt.time(),
- surface->w - 1, 0,
- -0.1, -0.5,
- 0, surface->h - 1,
- 0.4, 0.2);
-
- // Erase the old picture by painting the whole buffer
- // black.
- SDL_FillRect(surface, NULL, black);
-
- // Get the current game time. Note that if the clock
- // is stopped this method will return the same value
- // over and over.
- int t = gt.time();
-
- printf("%s(%d): t is %d\n", __PRETTY_FUNCTION__, __LINE__, t);
-
- // Based on the current time update the location of
- // each line and draw the line into the buffer.
- rl->update(t);
- gl->update(t);
- bl->update(t);
-
-#if 1
- // Since I'm using a software buffer the call to
- // SDL_Flip() copies the software buffer to the
- // display. That gives you the effect of double
- // buffering without asking for it and without the
- // speed you would get from a hardware double buffered
- // display.
- SDL_Flip(surface);
-#else
- // Swap the front and back buffers
- SDL_GL_SwapBuffers();
-#endif
-#endif
return(true);
}
-//----------------------------------------------------------
-
-// The following code implements a Bresenham line drawing
-// algorithm. There are 4 separate routines each optimized
-// for one of the four pixel depths supported by SDL. SDL
-// support many pixel formats, but it only support 8, 16,
-// 24, and 32 bit pixels.
-
-//----------------------------------------------------------
-
-// Draw lines in 8 bit surfaces.
-
-static void line8(SDL_Surface *s,
- int x1, int y1,
- int x2, int y2,
- Uint32 color)
-{
- printf("%s(%d): Entering\n", __PRETTY_FUNCTION__, __LINE__);
- int d;
- int x;
- int y;
- int ax;
- int ay;
- int sx;
- int sy;
- int dx;
- int dy;
-
- Uint8 *lineAddr;
- Sint32 yOffset;
-
- dx = x2 - x1;
- ax = abs(dx) << 1;
- sx = sign(dx);
-
- dy = y2 - y1;
- ay = abs(dy) << 1;
- sy = sign(dy);
- yOffset = sy * s->pitch;
-
- x = x1;
- y = y1;
-
- lineAddr = ((Uint8 *)(s->pixels)) + (y * s->pitch);
- if (ax>ay)
- { /* x dominant */
- d = ay - (ax >> 1);
- for (;;)
- {
- *(lineAddr + x) = (Uint8)color;
-
- if (x == x2)
- {
- return;
- }
- if (d>=0)
- {
- y += sy;
- lineAddr += yOffset;
- d -= ax;
- }
- x += sx;
- d += ay;
- }
- }
- else
- { /* y dominant */
- d = ax - (ay >> 1);
- for (;;)
- {
- *(lineAddr + x) = (Uint8)color;
-
- if (y == y2)
- {
- return;
- }
- if (d>=0)
- {
- x += sx;
- d -= ay;
- }
- y += sy;
- lineAddr += yOffset;
- d += ax;
- }
- }
-}
-
-//----------------------------------------------------------
-
-// Draw lines in 16 bit surfaces. Note that this code will
-// also work on 15 bit surfaces.
-
-static void line16(SDL_Surface *s,
- int x1, int y1,
- int x2, int y2,
- Uint32 color)
-{
- printf("%s(%d): Entering\n", __PRETTY_FUNCTION__, __LINE__);
- int d;
- int x;
- int y;
- int ax;
- int ay;
- int sx;
- int sy;
- int dx;
- int dy;
-
- Uint8 *lineAddr;
- Sint32 yOffset;
-
- dx = x2 - x1;
- ax = abs(dx) << 1;
- sx = sign(dx);
-
- dy = y2 - y1;
- ay = abs(dy) << 1;
- sy = sign(dy);
- yOffset = sy * s->pitch;
-
- x = x1;
- y = y1;
-
- lineAddr = ((Uint8 *)s->pixels) + (y * s->pitch);
- if (ax>ay)
- { /* x dominant */
- d = ay - (ax >> 1);
- for (;;)
- {
- *((Uint16 *)(lineAddr + (x << 1))) = (Uint16)color;
-
- if (x == x2)
- {
- return;
- }
- if (d>=0)
- {
- y += sy;
- lineAddr += yOffset;
- d -= ax;
- }
- x += sx;
- d += ay;
- }
- }
- else
- { /* y dominant */
- d = ax - (ay >> 1);
- for (;;)
- {
- *((Uint16 *)(lineAddr + (x << 1))) = (Uint16)color;
-
- if (y == y2)
- {
- return;
- }
- if (d>=0)
- {
- x += sx;
- d -= ay;
- }
- y += sy;
- lineAddr += yOffset;
- d += ax;
- }
- }
-}
-
-//----------------------------------------------------------
-
-// Draw lines in 24 bit surfaces. 24 bit surfaces require
-// special handling because the pixels don't fall on even
-// address boundaries. Instead of being able to store a
-// single byte, word, or long you have to store 3
-// individual bytes. As a result 24 bit graphics is slower
-// than the other pixel sizes.
-
-static void line24(SDL_Surface *s,
- int x1, int y1,
- int x2, int y2,
- Uint32 color)
-{
- printf("%s(%d): Entering\n", __PRETTY_FUNCTION__, __LINE__);
- int d;
- int x;
- int y;
- int ax;
- int ay;
- int sx;
- int sy;
- int dx;
- int dy;
-
- Uint8 *lineAddr;
- Sint32 yOffset;
-
-#if (SDL_BYTEORDER == SDL_BIG_ENDIAN)
- color <<= 8;
-#endif
-
- dx = x2 - x1;
- ax = abs(dx) << 1;
- sx = sign(dx);
-
- dy = y2 - y1;
- ay = abs(dy) << 1;
- sy = sign(dy);
- yOffset = sy * s->pitch;
-
- x = x1;
- y = y1;
-
- lineAddr = ((Uint8 *)(s->pixels)) + (y * s->pitch);
- if (ax>ay)
- { /* x dominant */
- d = ay - (ax >> 1);
- for (;;)
- {
- Uint8 *p = (lineAddr + (x * 3));
- memcpy(p, &color, 3);
-
- if (x == x2)
- {
- return;
- }
- if (d>=0)
- {
- y += sy;
- lineAddr += yOffset;
- d -= ax;
- }
- x += sx;
- d += ay;
- }
- }
- else
- { /* y dominant */
- d = ax - (ay >> 1);
- for (;;)
- {
- Uint8 *p = (lineAddr + (x * 3));
- memcpy(p, &color, 3);
-
- if (y == y2)
- {
- return;
- }
- if (d>=0)
- {
- x += sx;
- d -= ay;
- }
- y += sy;
- lineAddr += yOffset;
- d += ax;
- }
- }
-}
-
-//----------------------------------------------------------
-
-// Draw lines in 32 bit surfaces. Note that this routine
-// ignores alpha values. It writes them into the surface
-// if they are included in the pixel, but does nothing
-// else with them.
-
-static void line32(SDL_Surface *s,
- int x1, int y1,
- int x2, int y2,
- Uint32 color)
-{
- printf("%s(%d): Entering\n", __PRETTY_FUNCTION__, __LINE__);
- int d;
- int x;
- int y;
- int ax;
- int ay;
- int sx;
- int sy;
- int dx;
- int dy;
-
- Uint8 *lineAddr;
- Sint32 yOffset;
-
- dx = x2 - x1;
- ax = abs(dx) << 1;
- sx = sign(dx);
-
- dy = y2 - y1;
- ay = abs(dy) << 1;
- sy = sign(dy);
- yOffset = sy * s->pitch;
-
- x = x1;
- y = y1;
-
- lineAddr = ((Uint8 *)(s->pixels)) + (y * s->pitch);
- if (ax>ay)
- { /* x dominant */
- d = ay - (ax >> 1);
- for (;;)
- {
- *((Uint32 *)(lineAddr + (x << 2))) = (Uint32)color;
-
- if (x == x2)
- {
- return;
- }
- if (d>=0)
- {
- y += sy;
- lineAddr += yOffset;
- d -= ax;
- }
- x += sx;
- d += ay;
- }
- }
- else
- { /* y dominant */
- d = ax - (ay >> 1);
- for (;;)
- {
- *((Uint32 *)(lineAddr + (x << 2))) = (Uint32)color;
-
- if (y == y2)
- {
- return;
- }
- if (d>=0)
- {
- x += sx;
- d -= ay;
- }
- y += sy;
- lineAddr += yOffset;
- d += ax;
- }
- }
-}
-
-//----------------------------------------------------------
-
-// Examine the depth of a surface and select a line
-// drawing routine optimized for the bytes/pixel of the
-// surface.
-
-static void line(SDL_Surface *s,
- int x1, int y1,
- int x2, int y2,
- Uint32 color)
-{
- printf("%s(%d): Entering\n", __PRETTY_FUNCTION__, __LINE__);
-
-#if 0
- switch (s->format->BytesPerPixel)
- {
- case 1:
- line8(s, x1, y1, x2, y2, color);
- break;
- case 2:
- line16(s, x1, y1, x2, y2, color);
- break;
- case 3:
- line24(s, x1, y1, x2, y2, color);
- break;
- case 4:
- line32(s, x1, y1, x2, y2, color);
- break;
- }
-#endif
-}
-
// Local Variables:
// mode: C++
// indent-tabs-mode: t
Index: gnash/plugin/player.cpp
diff -u gnash/plugin/player.cpp:1.2 gnash/plugin/player.cpp:1.3
--- gnash/plugin/player.cpp:1.2 Sat Jan 28 01:14:33 2006
+++ gnash/plugin/player.cpp Fri Feb 3 20:50:27 2006
@@ -121,10 +121,9 @@
{
assert(tu_types_validate());
float exit_timeout = 0;
- bool do_render = true;
bool do_sound = false;
bool do_loop = true;
- bool sdl_abort = true;
+ bool sdl_abort = false;
int delay = 31;
float tex_lod_bias;
@@ -159,14 +158,14 @@
gnash::sound_handler *sound = NULL;
gnash::render_handler *render = NULL;
- if (do_render) {
- if (do_sound) {
- sound = gnash::create_sound_handler_sdl();
- gnash::set_sound_handler(sound);
- }
- render = gnash::create_render_handler_ogl();
- gnash::set_render_handler(render);
+#ifdef HAVE_SDL_MIXER_H
+ if (do_sound) {
+ sound = gnash::create_sound_handler_sdl();
+ gnash::set_sound_handler(sound);
}
+#endif
+ render = gnash::create_render_handler_ogl();
+ gnash::set_render_handler(render);
// Get info about the width & height of the movie.
int movie_version = 0;
@@ -213,22 +212,14 @@
float speed_scale = 1.0f;
Uint32 start_ticks = 0;
- if (do_render) {
- start_ticks = SDL_GetTicks();
-
- }
+ start_ticks = SDL_GetTicks();
Uint32 last_ticks = start_ticks;
int frame_counter = 0;
int last_logged_fps = last_ticks;
for (;;) {
Uint32 ticks;
- if (do_render) {
- ticks = SDL_GetTicks();
- } else {
- // Simulate time.
- ticks = last_ticks + (Uint32) (1000.0f / movie_fps);
- }
+ ticks = SDL_GetTicks();
int delta_ticks = ticks - last_ticks;
float delta_t = delta_ticks / 1000.f;
last_ticks = ticks;
@@ -240,55 +231,44 @@
break;
}
-#if 0
- drawGLScene();
-#else
+// drawGLScene();
m = gnash::get_current_root();
gnash::delete_unused_root();
-// m->set_display_viewport(0, 0, width, height);
- m->set_background_alpha(s_background ? 1.0f : 0.05f);
+ m->set_display_viewport(0, 0, width, height);
+// m->set_background_alpha(s_background ? 1.0f : 0.05f);
m->notify_mouse_state(mouse_x, mouse_y, mouse_buttons);
-// SDL_mutexP(mutex);
-
m->advance(delta_t * speed_scale);
// if (do_render) {
// glDisable(GL_DEPTH_TEST); // Disable depth testing.
// glDrawBuffer(GL_BACK);
// }
+
+ SDL_mutexP(mutex);
m->display();
-// SDL_mutexV(mutex);
- frame_counter++;
-
- if (do_render) {
- SDL_GL_SwapBuffers();
- //glPopAttrib ();
-
- // Don't hog the CPU.
- }
-#endif
- SDL_Delay(delay);
-
- // See if we should exit.
- if (do_loop == false
- && m->get_current_frame() + 1 == md->get_frame_count())
- {
- // We're reached the end of the movie; exit.
- break;
- }
- }
-
- done:
- doneYet = 1;
+ frame_counter++;
+ SDL_GL_SwapBuffers();
+ SDL_mutexV(mutex);
+ //glPopAttrib ();
+
+ // Don't hog the CPU.
+ SDL_Delay(delay);
+ }
+
// SDL_KillThread(thread); // kill the network read thread
-// SDL_Quit();
+// SDL_Quit();
+
+ if (md) {
+ md->drop_ref();
+ }
+ if (m) {
+ m->drop_ref();
+ }
- if (md) md->drop_ref();
- if (m) m->drop_ref();
delete sound;
delete render;
-
+
// Clean up as much as possible, so valgrind will help find actual leaks.
gnash::clear();
@@ -370,7 +350,7 @@
}
while (retries++ < 2) {
-#if 1
+#if 0
drawGLScene();
#else
main_loop(inst);
Index: gnash/plugin/plugin.cpp
diff -u gnash/plugin/plugin.cpp:1.10 gnash/plugin/plugin.cpp:1.11
--- gnash/plugin/plugin.cpp:1.10 Sat Jan 28 01:14:33 2006
+++ gnash/plugin/plugin.cpp Fri Feb 3 20:50:27 2006
@@ -25,12 +25,10 @@
// plugin version to load.
#define PLUGIN_NAME "Shockwave Flash 7.0"
#define MIME_TYPES_DESCRIPTION MIME_TYPES_HANDLED":swf:"PLUGIN_NAME
-#define PLUGIN_DESCRIPTION PLUGIN_NAME
+#define PLUGIN_DESCRIPTION "Gnash, a GPL\'d FLash Player. More details at
http://www.gnu.org/software/gnash/"
-//"Copyright 2005, 2006 Free Software Foundation, Inc. This is free software
with ABSOLUTELY NO WARRANTY. For details type see the file COPYING in the
sources."
-
-#include <GL/gl.h> // Header File For The OpenGL32 Library
-#include <GL/glu.h> // Header File For The GLu32 Library
+#include <GL/gl.h>
+#include <GL/glu.h>
#include <unistd.h>
#include <stdio.h>
@@ -221,8 +219,8 @@
// get rid of all other exposure events
if (plugin) {
if (GLinitialized) {
-// drawGLScene();
- printf("HACK ALERT! ignoring expose event!\n");
+ drawGLScene();
+// printf("HACK ALERT! ignoring expose event!\n");
} else {
printf("GL Surface not initialized yet, ignoring expose
event!\n");
}
@@ -265,33 +263,6 @@
}
}
-// This draws a box weith some text using the X intrinsics.
-void
-nsPluginInstance::draw()
-{
- unsigned int h = mHeight/2;
- unsigned int w = 3 * mWidth/4;
- int x = (mWidth - w)/2; // center
- int y = h/2;
- if (x >= 0 && y >= 0) {
- GC gc = XCreateGC(mDisplay, mWindow, 0, NULL);
- if (!gc)
- return;
- XDrawRectangle(mDisplay, mWindow, gc, x, y, w, h);
- const char *string = getVersion();
- if (string && *string) {
- int l = strlen(string);
- int fmba = mFontInfo->max_bounds.ascent;
- int fmbd = mFontInfo->max_bounds.descent;
- int fh = fmba + fmbd;
- y += fh;
- x += 32;
- XDrawString(mDisplay, mWindow, gc, x, y, string, l);
- }
- XFreeGC(mDisplay, gc);
- }
-}
-
NPBool nsPluginInstance::init(NPWindow* aWindow)
{
printf("%s(%d): Entering\n", __PRETTY_FUNCTION__, __LINE__);
@@ -318,23 +289,23 @@
mInitialized = FALSE;
- GLinitialized = false;
-
- thr_count--;
+ GLinitialized = false;
#if 0
if (cond) {
SDL_DestroyCond(cond);
}
- if (thread) {
- SDL_KillThread(thread);
- }
-
+#endif
if (mutex) {
SDL_DestroyMutex(mutex);
+ mutex = NULL;
}
-#endif
- if (thr_count <= 1) {
+ if (thread) {
+ SDL_KillThread(thread);
+ thread = NULL;
+ }
+
+ if (thr_count-- >= 1) {
SDL_Quit();
}
}
@@ -532,15 +503,12 @@
#if 1
drawGLScene();
#else
-// playswf(inst);
main_loop(inst);
#endif
SDL_Delay(20); // don't trash the CPU
- // So we don't run forever for now.
- printf("%s(%d): FIXME: loop timed out\n",
- __PRETTY_FUNCTION__, __LINE__);
- break;
}
+ printf("%s(%d): FIXME: loop timed out\n",
+ __PRETTY_FUNCTION__, __LINE__);
return 0;
}
Index: gnash/server/Makefile.am
diff -u gnash/server/Makefile.am:1.15 gnash/server/Makefile.am:1.16
--- gnash/server/Makefile.am:1.15 Wed Feb 1 23:52:44 2006
+++ gnash/server/Makefile.am Fri Feb 3 20:50:27 2006
@@ -21,8 +21,8 @@
AM_CPPFLAGS = -Wall
-# noinst_LTLIBRARIES = libserver.la
-lib_LTLIBRARIES = libserver.la libasobjs.la
+# noinst_LTLIBRARIES = libserver.la libasobjs.la
+lib_LTLIBRARIES = libgnashserver.la libgnashasobjs.la
# Only enable if we're configured with --enable-mp3
INCLUDES = -I.. \
@@ -45,7 +45,7 @@
MP3_HANDLER = sound_handler_mp3.cpp
endif
-libasobjs_la_SOURCES = \
+libgnashasobjs_la_SOURCES = \
Boolean.cpp \
Camera.cpp \
Color.cpp \
@@ -89,7 +89,7 @@
TextSnapshot.h \
Video.h
-libserver_la_SOURCES = \
+libgnashserver_la_SOURCES = \
textformat.cpp \
timers.cpp \
xml.cpp \
@@ -116,8 +116,7 @@
array.cpp \
types.cpp $(MP3_HANDLER)
-noinst_HEADERS = \
- $(as_incls) \
+noinst_HEADERS = $(as_incls)
action.h \
array.h \
button.h \
Index: gnash/server/action.cpp
diff -u gnash/server/action.cpp:1.15 gnash/server/action.cpp:1.16
--- gnash/server/action.cpp:1.15 Fri Feb 3 16:36:22 2006
+++ gnash/server/action.cpp Fri Feb 3 20:50:27 2006
@@ -4240,17 +4240,19 @@
{ 0x27, "start_drag", ARG_NONE },
{ 0x28, "stop_drag", ARG_NONE },
{ 0x29, "str_lt", ARG_NONE },
- { 0x2B, "cast_object", ARG_NONE },
+ { 0x2A, "throw_fixme", ARG_NONE },
+ { 0x2B, "cast_fixme", ARG_NONE },
+ { 0x2C, "implements_fixme", ARG_NONE },
{ 0x30, "random", ARG_NONE },
- { 0x31, "mb_length", ARG_NONE },
+ { 0x31, "mb_length_fixme", ARG_NONE },
{ 0x32, "ord", ARG_NONE },
{ 0x33, "chr", ARG_NONE },
{ 0x34, "get_timer", ARG_NONE },
- { 0x35, "substr_mb", ARG_NONE },
+ { 0x35, "substr_mb_fixme", ARG_NONE },
{ 0x36, "ord_mb", ARG_NONE },
- { 0x37, "chr_mb", ARG_NONE },
- { 0x3A, "delete", ARG_NONE },
- { 0x3B, "delete_all", ARG_NONE },
+ { 0x37, "chr_mb_fixme", ARG_NONE },
+ { 0x3A, "delete_fixme", ARG_NONE },
+ { 0x3B, "delete_all_fixme", ARG_NONE },
{ 0x3C, "set_local", ARG_NONE },
{ 0x3D, "call_func", ARG_NONE },
{ 0x3E, "return", ARG_NONE },
@@ -4258,9 +4260,9 @@
{ 0x40, "new", ARG_NONE },
{ 0x41, "decl_local", ARG_NONE },
{ 0x42, "decl_array", ARG_NONE },
- { 0x43, "decl_obj", ARG_NONE },
+ { 0x43, "decl_obj_fixme", ARG_NONE },
{ 0x44, "type_of", ARG_NONE },
- { 0x45, "get_target", ARG_NONE },
+ { 0x45, "get_target_fixme", ARG_NONE },
{ 0x46, "enumerate", ARG_NONE },
{ 0x47, "add_t", ARG_NONE },
{ 0x48, "lt_t", ARG_NONE },
@@ -4274,9 +4276,9 @@
{ 0x50, "inc", ARG_NONE },
{ 0x51, "dec", ARG_NONE },
{ 0x52, "call_method", ARG_NONE },
- { 0x53, "new_method", ARG_NONE },
- { 0x54, "is_inst_of", ARG_NONE },
- { 0x55, "enum_object", ARG_NONE },
+ { 0x53, "new_method_fixme", ARG_NONE },
+ { 0x54, "is_inst_of_fixme", ARG_NONE },
+ { 0x55, "enum_object_fixme", ARG_NONE },
{ 0x60, "bit_and", ARG_NONE },
{ 0x61, "bit_or", ARG_NONE },
{ 0x62, "bit_xor", ARG_NONE },
@@ -4285,7 +4287,7 @@
{ 0x65, "lsr", ARG_NONE },
{ 0x66, "eq_strict", ARG_NONE },
{ 0x67, "gt_t", ARG_NONE },
- { 0x68, "gt_str", ARG_NONE },
+ { 0x69, "extends_fixme", ARG_NONE },
{ 0x81, "goto_frame", ARG_U16 },
{ 0x83, "get_url", ARG_STR },
@@ -4296,11 +4298,11 @@
{ 0x8C, "goto_frame_lbl", ARG_STR },
{ 0x8D, "wait_for_fr_exp", ARG_HEX },
{ 0x8E, "function2", ARG_FUNCTION2 },
+ { 0x8F, "try_fixme", ARG_FUNCTION2 },
{ 0x94, "with", ARG_U16 },
{ 0x96, "push_data", ARG_PUSH_DATA },
{ 0x99, "goto", ARG_S16 },
{ 0x9A, "get_url2", ARG_HEX },
- // { 0x8E, "function2", ARG_HEX },
{ 0x9B, "func", ARG_HEX },
{ 0x9D, "branch_if_true", ARG_S16 },
{ 0x9E, "call_frame", ARG_HEX },
Index: gnash/testsuite/actionscript.all/Makefile.am
diff -u gnash/testsuite/actionscript.all/Makefile.am:1.8
gnash/testsuite/actionscript.all/Makefile.am:1.9
--- gnash/testsuite/actionscript.all/Makefile.am:1.8 Fri Feb 3 19:22:41 2006
+++ gnash/testsuite/actionscript.all/Makefile.am Fri Feb 3 20:50:27 2006
@@ -16,6 +16,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#
+
AUTOMAKE_OPTIONS = dejagnu
# We don't need --tool anymore
@@ -37,10 +38,10 @@
noinst_PROGRAMS = moviecliploader_test definebitsjpeg2
-definebitsjpeg2_SOURCES = moviecliploader_test.c
+definebitsjpeg2_SOURCES = definebitsjpeg2.c
definebitsjpeg2_LDADD = $(MING_LIBS)
-moviecliploader_test_SOURCES = definebitsjpeg2.c
+moviecliploader_test_SOURCES = moviecliploader_test.c
moviecliploader_test_LDADD = $(MING_LIBS)
# @@ Is this still needed ?
Index: gnash/utilities/Makefile.am
diff -u gnash/utilities/Makefile.am:1.8 gnash/utilities/Makefile.am:1.9
--- gnash/utilities/Makefile.am:1.8 Wed Feb 1 23:58:32 2006
+++ gnash/utilities/Makefile.am Fri Feb 3 20:50:27 2006
@@ -27,13 +27,15 @@
AM_CPPFLAGS = -Wall
AM_LDFLAGS = \
- ../server/libserver.la \
- ../server/libasobjs.la \
- ../libgeometry/libgeometry.la \
- ../libbase/libbase.la \
+ ../backend/libgnashbackend.la \
+ ../server/libgnashserver.la \
+ ../server/libgnashasobjs.la \
+ ../libgeometry/libgnashgeo.la \
+ ../libbase/libgnashbase.la \
$(OPENGL_LIBS) \
$(SDL_LIBS) \
$(SDL_MIXER_LIBS) \
+ $(X_LIBS) \
$(JPEG_LIBS) \
$(PNG_LIBS) \
$(LIBXML_LIBS) \
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] gnash ./ChangeLog ./configure.ac backend/render...,
Rob Savoye <=