[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash ./ChangeLog backend/sound_handler_sdl.cpp...
From: |
Jim Garrison |
Subject: |
[Gnash-commit] gnash ./ChangeLog backend/sound_handler_sdl.cpp... |
Date: |
Sat, 25 Feb 2006 03:54:04 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Branch:
Changes by: Jim Garrison <address@hidden> 06/02/25 03:54:03
Modified files:
. : ChangeLog
backend : sound_handler_sdl.cpp
libbase : container.h grid_index.h image_filters.cpp
triangulate.h triangulate_float.cpp
triangulate_impl.h triangulate_sint32.cpp
libgeometry : kd_tree_dynamic.cpp kd_tree_dynamic.h tqt.h
server : Function.cpp Function.h Movie.cpp Movie.h
MovieClipLoader.cpp Sprite.cpp Sprite.h
action.cpp action.h button.cpp button.h dlist.h
font.cpp font.h fontlib.cpp fontlib.h impl.cpp
impl.h shape.cpp shape.h stream.cpp stream.h
styles.h tesselate.cpp text.cpp text.h
textformat.cpp timers.cpp timers.h xml.cpp
xmlsocket.cpp xmlsocket.h
utilities : processor.cpp
Log message:
2006-02-24 Jim Garrison <address@hidden>
* backend/sound_handler_sdl.cpp: substituted array<> with
std::vector<>
* libbase/container.h: removed array<> definition
* libbase/grid_index.h: substituted array<> with std::vector<>
* libbase/image_filters.cpp: substituted array<> with std::vector<>
* libbase/triangulate.h: substituted array<> with std::vector<>
* libbase/triangulate_float.cpp: substituted array<> with
std::vector<>
* libbase/triangulate_impl.h: substituted array<> with
std::vector<>
* libbase/triangulate_sint32.cpp: substituted array<> with
std::vector<>
* libgeometry/kd_tree_dynamic.cpp: substituted array<> with
std::vector<>
* libgeometry/kd_tree_dynamic.h: substituted array<> with
std::vector<>
* libgeometry/tqt.h: substituted array<> with std::vector<>
* server/Function.cpp: substituted array<> with std::vector<>
* server/Function.h: substituted array<> with std::vector<>
* server/Movie.cpp: substituted array<> with std::vector<>
* server/Movie.h: substituted array<> with std::vector<>
* server/MovieClipLoader.cpp: substituted array<> with std::vector<>
* server/Sprite.cpp: substituted array<> with std::vector<>
* server/Sprite.h: substituted array<> with std::vector<>
* server/action.cpp: substituted array<> with std::vector<>
* server/action.h: substituted array<> with std::vector<>
* server/button.cpp: substituted array<> with std::vector<>
* server/button.h: substituted array<> with std::vector<>
* server/dlist.h: substituted array<> with std::vector<>
* server/font.cpp: substituted array<> with std::vector<>
* server/font.h: substituted array<> with std::vector<>
* server/fontlib.cpp: substituted array<> with std::vector<>
* server/fontlib.h: substituted array<> with std::vector<>
* server/impl.cpp: substituted array<> with std::vector<>
* server/impl.h: substituted array<> with std::vector<>
* server/shape.cpp: substituted array<> with std::vector<>
* server/shape.h: substituted array<> with std::vector<>
* server/stream.cpp: substituted array<> with std::vector<>
* server/stream.h: substituted array<> with std::vector<>
* server/styles.h: substituted array<> with std::vector<>
* server/tesselate.cpp: substituted array<> with std::vector<>
* server/text.cpp: substituted array<> with std::vector<>
* server/text.h: substituted array<> with std::vector<>
* server/textformat.cpp: substituted array<> with std::vector<>
* server/timers.cpp: substituted array<> with std::vector<>
* server/timers.h: substituted array<> with std::vector<>
* server/xml.cpp: substituted array<> with std::vector<>
* server/xmlsocket.cpp: substituted array<> with std::vector<>
* server/xmlsocket.h: substituted array<> with std::vector<>
* utilities/processor.cpp: substituted array<> with std::vector<>
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/ChangeLog.diff?tr1=1.155&tr2=1.156&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/backend/sound_handler_sdl.cpp.diff?tr1=1.5&tr2=1.6&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/libbase/container.h.diff?tr1=1.5&tr2=1.6&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/libbase/grid_index.h.diff?tr1=1.3&tr2=1.4&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/libbase/image_filters.cpp.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/libbase/triangulate.h.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/libbase/triangulate_float.cpp.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/libbase/triangulate_impl.h.diff?tr1=1.6&tr2=1.7&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/libbase/triangulate_sint32.cpp.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/libgeometry/kd_tree_dynamic.cpp.diff?tr1=1.3&tr2=1.4&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/libgeometry/kd_tree_dynamic.h.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/libgeometry/tqt.h.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/server/Function.cpp.diff?tr1=1.6&tr2=1.7&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/server/Function.h.diff?tr1=1.4&tr2=1.5&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/server/Movie.cpp.diff?tr1=1.6&tr2=1.7&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/server/Movie.h.diff?tr1=1.5&tr2=1.6&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/server/MovieClipLoader.cpp.diff?tr1=1.8&tr2=1.9&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/server/Sprite.cpp.diff?tr1=1.13&tr2=1.14&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/server/Sprite.h.diff?tr1=1.7&tr2=1.8&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/server/action.cpp.diff?tr1=1.50&tr2=1.51&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/server/action.h.diff?tr1=1.21&tr2=1.22&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/server/button.cpp.diff?tr1=1.4&tr2=1.5&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/server/button.h.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/server/dlist.h.diff?tr1=1.3&tr2=1.4&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/server/font.cpp.diff?tr1=1.4&tr2=1.5&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/server/font.h.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/server/fontlib.cpp.diff?tr1=1.3&tr2=1.4&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/server/fontlib.h.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/server/impl.cpp.diff?tr1=1.19&tr2=1.20&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/server/impl.h.diff?tr1=1.11&tr2=1.12&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/server/shape.cpp.diff?tr1=1.7&tr2=1.8&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/server/shape.h.diff?tr1=1.3&tr2=1.4&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/server/stream.cpp.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/server/stream.h.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/server/styles.h.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/server/tesselate.cpp.diff?tr1=1.4&tr2=1.5&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/server/text.cpp.diff?tr1=1.6&tr2=1.7&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/server/text.h.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/server/textformat.cpp.diff?tr1=1.5&tr2=1.6&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/server/timers.cpp.diff?tr1=1.4&tr2=1.5&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/server/timers.h.diff?tr1=1.3&tr2=1.4&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/server/xml.cpp.diff?tr1=1.12&tr2=1.13&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/server/xmlsocket.cpp.diff?tr1=1.7&tr2=1.8&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/server/xmlsocket.h.diff?tr1=1.5&tr2=1.6&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/utilities/processor.cpp.diff?tr1=1.3&tr2=1.4&r1=text&r2=text
Patches:
Index: gnash/ChangeLog
diff -u gnash/ChangeLog:1.155 gnash/ChangeLog:1.156
--- gnash/ChangeLog:1.155 Sat Feb 25 03:15:51 2006
+++ gnash/ChangeLog Sat Feb 25 03:54:03 2006
@@ -1,5 +1,58 @@
2006-02-24 Jim Garrison <address@hidden>
+ * backend/sound_handler_sdl.cpp: substituted array<> with
+ std::vector<>
+ * libbase/container.h: removed array<> definition
+ * libbase/grid_index.h: substituted array<> with std::vector<>
+ * libbase/image_filters.cpp: substituted array<> with std::vector<>
+ * libbase/triangulate.h: substituted array<> with std::vector<>
+ * libbase/triangulate_float.cpp: substituted array<> with
+ std::vector<>
+ * libbase/triangulate_impl.h: substituted array<> with
+ std::vector<>
+ * libbase/triangulate_sint32.cpp: substituted array<> with
+ std::vector<>
+ * libgeometry/kd_tree_dynamic.cpp: substituted array<> with
+ std::vector<>
+ * libgeometry/kd_tree_dynamic.h: substituted array<> with
+ std::vector<>
+ * libgeometry/tqt.h: substituted array<> with std::vector<>
+ * server/Function.cpp: substituted array<> with std::vector<>
+ * server/Function.h: substituted array<> with std::vector<>
+ * server/Movie.cpp: substituted array<> with std::vector<>
+ * server/Movie.h: substituted array<> with std::vector<>
+ * server/MovieClipLoader.cpp: substituted array<> with std::vector<>
+ * server/Sprite.cpp: substituted array<> with std::vector<>
+ * server/Sprite.h: substituted array<> with std::vector<>
+ * server/action.cpp: substituted array<> with std::vector<>
+ * server/action.h: substituted array<> with std::vector<>
+ * server/button.cpp: substituted array<> with std::vector<>
+ * server/button.h: substituted array<> with std::vector<>
+ * server/dlist.h: substituted array<> with std::vector<>
+ * server/font.cpp: substituted array<> with std::vector<>
+ * server/font.h: substituted array<> with std::vector<>
+ * server/fontlib.cpp: substituted array<> with std::vector<>
+ * server/fontlib.h: substituted array<> with std::vector<>
+ * server/impl.cpp: substituted array<> with std::vector<>
+ * server/impl.h: substituted array<> with std::vector<>
+ * server/shape.cpp: substituted array<> with std::vector<>
+ * server/shape.h: substituted array<> with std::vector<>
+ * server/stream.cpp: substituted array<> with std::vector<>
+ * server/stream.h: substituted array<> with std::vector<>
+ * server/styles.h: substituted array<> with std::vector<>
+ * server/tesselate.cpp: substituted array<> with std::vector<>
+ * server/text.cpp: substituted array<> with std::vector<>
+ * server/text.h: substituted array<> with std::vector<>
+ * server/textformat.cpp: substituted array<> with std::vector<>
+ * server/timers.cpp: substituted array<> with std::vector<>
+ * server/timers.h: substituted array<> with std::vector<>
+ * server/xml.cpp: substituted array<> with std::vector<>
+ * server/xmlsocket.cpp: substituted array<> with std::vector<>
+ * server/xmlsocket.h: substituted array<> with std::vector<>
+ * utilities/processor.cpp: substituted array<> with std::vector<>
+
+2006-02-24 Jim Garrison <address@hidden>
+
* backend/sound_handler_sdl.cpp: fixed int, unsigned int comparisions
* libbase/grid_index.h: fixed int, unsigned int comparisions
* libbase/image_filters.cpp: fixed int, unsigned int comparisions
Index: gnash/backend/sound_handler_sdl.cpp
diff -u gnash/backend/sound_handler_sdl.cpp:1.5
gnash/backend/sound_handler_sdl.cpp:1.6
--- gnash/backend/sound_handler_sdl.cpp:1.5 Sat Feb 25 03:15:51 2006
+++ gnash/backend/sound_handler_sdl.cpp Sat Feb 25 03:54:03 2006
@@ -24,7 +24,7 @@
bool m_stereo;
int m_sample_rate;
Uint16 m_format;
- array<Mix_Chunk*> m_samples;
+ std::vector<Mix_Chunk*> m_samples;
#define SAMPLE_RATE 44100
#define MIX_CHANNELS 8
Index: gnash/libbase/container.h
diff -u gnash/libbase/container.h:1.5 gnash/libbase/container.h:1.6
--- gnash/libbase/container.h:1.5 Sun Feb 12 02:12:07 2006
+++ gnash/libbase/container.h Sat Feb 25 03:54:03 2006
@@ -18,9 +18,10 @@
#include <stdlib.h>
#include <string.h> // for strcmp and friends
#include <new> // for placement new
+#include <vector>
-// If you prefer STL implementations of array<> (i.e. std::vector) and
+// If you prefer STL implementations of
// hash<> (i.e. std::hash_map) instead of home cooking, then put
// -D_TU_USE_STL=1 in your compiler flags, or do it in tu_config.h, or do
// it right here:
@@ -73,11 +74,6 @@
#include <string>
-// array<> is much like std::vector<>
-//
-// @@ move this towards a strict subset of std::vector ? Compatibility is
good.
-
-
// hash<> is similar to std::hash_map<>
//
// @@ move this towards a strict subset of std::hash_map<> ?
@@ -157,15 +153,6 @@
-#include <vector>
-
-template<class T> class array : public std::vector<T>
-{
-public:
- //int size() const { return (int) std::vector<T>::size(); }
-};
-
-
template<class T, class U, class hash_functor = fixed_size_hash<T> >
class hash {
/// Hash table, linear probing, internal chaining.
Index: gnash/libbase/grid_index.h
diff -u gnash/libbase/grid_index.h:1.3 gnash/libbase/grid_index.h:1.4
--- gnash/libbase/grid_index.h:1.3 Sat Feb 25 03:15:51 2006
+++ gnash/libbase/grid_index.h Sat Feb 25 03:54:03 2006
@@ -424,7 +424,7 @@
assert(bound.min.y <= bound.max.y);
// Allocate the grid.
- m_grid = new array<grid_entry_t*>[x_cells * y_cells];
+ m_grid = new std::vector<grid_entry_t*>[x_cells * y_cells];
}
~grid_index_box()
@@ -526,7 +526,7 @@
// element, and return true.
{
int query_id = m_index->get_query_id();
- array<grid_entry_t*>* cell_array =
m_index->get_cell(m_current_cell_x, m_current_cell_y);
+ std::vector<grid_entry_t*>* cell_array =
m_index->get_cell(m_current_cell_x, m_current_cell_y);
while (++m_current_cell_array_index < (int)
cell_array->size())
{
@@ -590,7 +590,7 @@
int cell_count = m_x_cells * m_y_cells;
for (int i = 0; i < cell_count; i++)
{
- array<grid_entry_t*>* cell_array = &m_grid[i];
+ std::vector<grid_entry_t*>* cell_array =
&m_grid[i];
for (int j = 0, n = cell_array->size(); j < n;
j++)
{
(*cell_array)[j]->m_last_query_id = 0;
@@ -645,7 +645,7 @@
{
for (int ix = ib.min.x; ix <= ib.max.x; ix++)
{
- array<grid_entry_t*>* cell_array =
get_cell(ix, iy);
+ std::vector<grid_entry_t*>* cell_array =
get_cell(ix, iy);
cell_array->push_back(new_entry);
}
}
@@ -664,7 +664,7 @@
{
for (int ix = ib.min.x; ix <= ib.max.x; ix++)
{
- array<grid_entry_t*>* cell_array =
get_cell(ix, iy);
+ std::vector<grid_entry_t*>* cell_array =
get_cell(ix, iy);
int i, n;
for (i = 0, n = cell_array->size(); i < n; i++)
@@ -708,7 +708,7 @@
// Should be relatively quick, assuming payload is unique.
{
index_point<int> ip = get_containing_cell_clamped(loc);
- array<grid_entry_t*>* cell_array = get_cell(ip.x, ip.y);
+ std::vector<grid_entry_t*>* cell_array = get_cell(ip.x,
ip.y);
for (int i = 0, n = cell_array->size(); i < n; i++)
{
@@ -726,7 +726,7 @@
private:
- array<grid_entry_t*>* get_cell(int x, int y)
+ std::vector<grid_entry_t*>* get_cell(int x, int y)
{
assert(x >= 0 && x < m_x_cells);
assert(y >= 0 && y < m_y_cells);
@@ -762,7 +762,7 @@
int m_x_cells;
int m_y_cells;
int m_query_id;
- array<grid_entry_t*>* m_grid;
+ std::vector<grid_entry_t*>* m_grid;
};
Index: gnash/libbase/image_filters.cpp
diff -u gnash/libbase/image_filters.cpp:1.2 gnash/libbase/image_filters.cpp:1.3
--- gnash/libbase/image_filters.cpp:1.2 Sat Feb 25 03:15:51 2006
+++ gnash/libbase/image_filters.cpp Sat Feb 25 03:54:03 2006
@@ -395,7 +395,7 @@
float width, fscale, weight; /* filter calculation variables */
Uint8* raster; /* a row or column of pixels */
- array< array<CONTRIB> > contrib;
+ std::vector< std::vector<CONTRIB> > contrib;
int out_width = out_x1 - out_x0 + 1;
int out_height = out_y1 - out_y0 + 1;
@@ -561,7 +561,7 @@
float width, fscale, weight; /* filter calculation variables */
Uint8* raster; /* a row or column of pixels */
- array< array<CONTRIB> > contrib;
+ std::vector< std::vector<CONTRIB> > contrib;
int out_width = out_x1 - out_x0 + 1;
int out_height = out_y1 - out_y0 + 1;
Index: gnash/libbase/triangulate.h
diff -u gnash/libbase/triangulate.h:1.2 gnash/libbase/triangulate.h:1.3
--- gnash/libbase/triangulate.h:1.2 Thu Jan 5 18:28:32 2006
+++ gnash/libbase/triangulate.h Sat Feb 25 03:54:03 2006
@@ -29,27 +29,27 @@
// Version using float coords
void compute(
- array<float>* results,
+ std::vector<float>* results,
int path_count,
- const array<float> paths[],
+ const std::vector<float> paths[],
int debug_halt_step = -1,
- array<float>* debug_remaining_loop = NULL);
+ std::vector<float>* debug_remaining_loop = NULL);
// Version using short coords
void compute(
- array<sint16>* results, // indexed trilist
+ std::vector<sint16>* results, // indexed trilist
int path_count,
- const array<sint16> paths[],
+ const std::vector<sint16> paths[],
int debug_halt_step = -1,
- array<sint16>* debug_remaining_loop = NULL);
+ std::vector<sint16>* debug_remaining_loop = NULL);
// Version using int coords
void compute(
- array<sint32>* results, // indexed trilist
+ std::vector<sint32>* results, // indexed trilist
int path_count,
- const array<sint32> paths[],
+ const std::vector<sint32> paths[],
int debug_halt_step = -1,
- array<sint32>* debug_remaining_loop = NULL);
+ std::vector<sint32>* debug_remaining_loop = NULL);
}
Index: gnash/libbase/triangulate_float.cpp
diff -u gnash/libbase/triangulate_float.cpp:1.2
gnash/libbase/triangulate_float.cpp:1.3
--- gnash/libbase/triangulate_float.cpp:1.2 Thu Jan 5 18:28:32 2006
+++ gnash/libbase/triangulate_float.cpp Sat Feb 25 03:54:03 2006
@@ -14,11 +14,11 @@
{
// Version using float coords
void compute(
- array<float>* result, // trilist
+ std::vector<float>* result, // trilist
int path_count,
- const array<float> paths[],
+ const std::vector<float> paths[],
int debug_halt_step /* = -1 */,
- array<float>* debug_remaining_loop /* = NULL */)
+ std::vector<float>* debug_remaining_loop /* = NULL */)
{
compute_triangulation<float>(result, path_count, paths,
debug_halt_step, debug_remaining_loop);
}
@@ -40,8 +40,8 @@
void test_square()
// A very minimal, easy test.
{
- array<float> result;
- array<array<float> > paths;
+ std::vector<float> result;
+ std::vector<std::vector<float> > paths;
// Make a square.
paths.resize(1);
Index: gnash/libbase/triangulate_impl.h
diff -u gnash/libbase/triangulate_impl.h:1.6
gnash/libbase/triangulate_impl.h:1.7
--- gnash/libbase/triangulate_impl.h:1.6 Sat Feb 25 03:15:51 2006
+++ gnash/libbase/triangulate_impl.h Sat Feb 25 03:54:03 2006
@@ -174,7 +174,7 @@
{
}
- void remap(const array<int>& remap_table)
+ void remap(const std::vector<int>& remap_table)
{
m_my_index = remap_table[m_my_index];
m_next = remap_table[m_next];
@@ -218,7 +218,7 @@
template<class coord_t>
-inline bool edges_intersect_sub(const array<poly_vert<coord_t> >&
sorted_verts, int e0v0, int e0v1, int e1v0, int e1v1)
+inline bool edges_intersect_sub(const std::vector<poly_vert<coord_t> >&
sorted_verts, int e0v0, int e0v1, int e1v0, int e1v1)
// Return true if edge (e0v0,e0v1) intersects (e1v0,e1v1).
{
// Need to specialize this on coord_t, in order to get it
@@ -229,7 +229,7 @@
template<>
-inline bool edges_intersect_sub(const array<poly_vert<float> >&
sorted_verts, int e0v0i, int e0v1i, int e1v0i, int e1v1i)
+inline bool edges_intersect_sub(const std::vector<poly_vert<float> >&
sorted_verts, int e0v0i, int e0v1i, int e1v0i, int e1v1i)
// Return true if edge (e0v0,e0v1) intersects (e1v0,e1v1).
//
// Specialized for float.
@@ -295,7 +295,7 @@
template<>
-inline bool edges_intersect_sub(const array<poly_vert<sint32> >&
sorted_verts, int e0v0i, int e0v1i, int e1v0i, int e1v1i)
+inline bool edges_intersect_sub(const std::vector<poly_vert<sint32> >&
sorted_verts, int e0v0i, int e0v1i, int e1v0i, int e1v1i)
// Return true if edge (e0v0,e0v1) intersects (e1v0,e1v1).
//
// Specialized for sint32
@@ -358,7 +358,7 @@
template<class coord_t>
-bool edges_intersect(const array<poly_vert<coord_t> >& sorted_verts, int
e0v0, int e0v1, int e1v0, int e1v1)
+bool edges_intersect(const std::vector<poly_vert<coord_t> >& sorted_verts,
int e0v0, int e0v1, int e1v0, int e1v1)
// Return true if edge (e0v0,e0v1) intersects (e1v0,e1v1).
{
// Deal with special case: edges that share exactly one vert.
@@ -396,7 +396,7 @@
template<class coord_t>
-bool is_convex_vert(const array<poly_vert<coord_t> >& sorted_verts, int vi)
+bool is_convex_vert(const std::vector<poly_vert<coord_t> >& sorted_verts,
int vi)
// Return true if vert vi is convex.
{
const poly_vert<coord_t>* pvi = &(sorted_verts[vi]);
@@ -412,7 +412,7 @@
{
typedef poly_vert<coord_t> vert_t;
- poly(/*@@ TODO array<vert_t>* sorted_verts*/)
+ poly(/*@@ TODO std::vector<vert_t>* sorted_verts*/)
:
// @@ TODO m_sorted_verts(sorted_verts),
m_loop(-1),
@@ -433,43 +433,43 @@
m_reflex_point_index = NULL;
}
- bool is_valid(const array<vert_t>& sorted_verts, bool
check_consecutive_dupes = true) const;
+ bool is_valid(const std::vector<vert_t>& sorted_verts, bool
check_consecutive_dupes = true) const;
// init/prep
- void append_vert(array<vert_t>* sorted_verts, int vert_index);
- void remap(const array<int>& remap_table);
- void remap_for_duped_verts(const array<vert_t>& sorted_verts, int
v0, int v1);
-
- void init_edge_index(const array<vert_t>& sorted_verts,
index_box<coord_t>& bound_of_all_verts);
- int find_valid_bridge_vert(const array<vert_t>& sorted_verts, int
v1);
- void update_connected_sub_poly(array<vert_t>* sorted_verts, int
v_start, int v_stop);
- void init_for_ear_clipping(array<vert_t>* sorted_verts);
+ void append_vert(std::vector<vert_t>* sorted_verts, int vert_index);
+ void remap(const std::vector<int>& remap_table);
+ void remap_for_duped_verts(const std::vector<vert_t>& sorted_verts,
int v0, int v1);
+
+ void init_edge_index(const std::vector<vert_t>& sorted_verts,
index_box<coord_t>& bound_of_all_verts);
+ int find_valid_bridge_vert(const std::vector<vert_t>& sorted_verts,
int v1);
+ void update_connected_sub_poly(std::vector<vert_t>* sorted_verts,
int v_start, int v_stop);
+ void init_for_ear_clipping(std::vector<vert_t>* sorted_verts);
// Edges are indexed using their first vert (i.e. edge (v1,v2) is
indexed using v1)
- void add_edge(const array<vert_t>& sorted_verts, int vi);
- void remove_edge(const array<vert_t>& sorted_verts, int vi);
+ void add_edge(const std::vector<vert_t>& sorted_verts, int vi);
+ void remove_edge(const std::vector<vert_t>& sorted_verts, int vi);
// tests/queries
- bool any_edge_intersection(const array<vert_t>& sorted_verts, int
external_vert, int v2);
- bool vert_can_see_cone_a(const array<vert_t>& sorted_verts, int v,
int cone_a_vert, int cone_b_vert);
- bool vert_in_cone(const array<vert_t>& sorted_verts, int vert, int
cone_v0, int cone_v1, int cone_v2);
- bool vert_is_duplicated(const array<vert_t>& sorted_verts, int v0);
- bool ear_contains_reflex_vertex(const array<vert_t>& sorted_verts,
int v0, int v1, int v2);
+ bool any_edge_intersection(const std::vector<vert_t>& sorted_verts,
int external_vert, int v2);
+ bool vert_can_see_cone_a(const std::vector<vert_t>& sorted_verts,
int v, int cone_a_vert, int cone_b_vert);
+ bool vert_in_cone(const std::vector<vert_t>& sorted_verts, int vert,
int cone_v0, int cone_v1, int cone_v2);
+ bool vert_is_duplicated(const std::vector<vert_t>& sorted_verts, int
v0);
+ bool ear_contains_reflex_vertex(const std::vector<vert_t>&
sorted_verts, int v0, int v1, int v2);
- void classify_vert(array<vert_t>* sorted_verts, int vi);
- void dirty_vert(array<vert_t>* sorted_verts, int vi);
+ void classify_vert(std::vector<vert_t>* sorted_verts, int vi);
+ void dirty_vert(std::vector<vert_t>* sorted_verts, int vi);
int get_vertex_count() const { return m_vertex_count; }
int get_ear_count() const { return m_ear_count; }
- int get_next_ear(const array<vert_t>& sorted_verts,
tu_random::generator* rg);
- int remove_degenerate_chain(array<vert_t>* sorted_verts, int vi);
- void emit_and_remove_ear(array<coord_t>* result, array<vert_t>*
sorted_verts, int v0, int v1, int v2);
- bool build_ear_list(array<vert_t>* sorted_verts,
tu_random::generator* rg);
+ int get_next_ear(const std::vector<vert_t>& sorted_verts,
tu_random::generator* rg);
+ int remove_degenerate_chain(std::vector<vert_t>* sorted_verts, int
vi);
+ void emit_and_remove_ear(std::vector<coord_t>* result,
std::vector<vert_t>* sorted_verts, int v0, int v1, int v2);
+ bool build_ear_list(std::vector<vert_t>* sorted_verts,
tu_random::generator* rg);
- void invalidate(const array<vert_t>& sorted_verts);
+ void invalidate(const std::vector<vert_t>& sorted_verts);
//data:
-//@@ TODO array<vert_t>* m_sorted_verts;
+//@@ TODO std::vector<vert_t>* m_sorted_verts;
int m_loop; // index of first vert
int m_leftmost_vert;
int m_vertex_count;
@@ -490,7 +490,7 @@
template<class coord_t>
-bool poly<coord_t>::is_valid(const array<vert_t>& sorted_verts, bool
check_consecutive_dupes /* = true */) const
+bool poly<coord_t>::is_valid(const std::vector<vert_t>& sorted_verts, bool
check_consecutive_dupes /* = true */) const
// Assert validity.
{
#ifndef NDEBUG
@@ -595,7 +595,7 @@
template<class coord_t>
-void poly<coord_t>::invalidate(const array<vert_t>& sorted_verts)
+void poly<coord_t>::invalidate(const std::vector<vert_t>& sorted_verts)
// Mark as invalid/empty. Do this after linking into another poly,
// for safety/debugging.
{
@@ -633,7 +633,7 @@
template<class coord_t>
-void poly<coord_t>::append_vert(array<vert_t>* sorted_verts, int vert_index)
+void poly<coord_t>::append_vert(std::vector<vert_t>* sorted_verts, int
vert_index)
// Link the specified vert into our loop.
{
assert(vert_index >= 0 && vert_index < (int) sorted_verts->size());
@@ -679,7 +679,7 @@
template<class coord_t>
-int poly<coord_t>::find_valid_bridge_vert(const array<vert_t>&
sorted_verts, int v1)
+int poly<coord_t>::find_valid_bridge_vert(const std::vector<vert_t>&
sorted_verts, int v1)
// Find a vert v, in this poly, such that v is to the left of v1, and
// the edge (v,v1) doesn't intersect any edges in this poly.
{
@@ -733,7 +733,7 @@
template<class coord_t>
-void poly<coord_t>::remap(const array<int>& remap_table)
+void poly<coord_t>::remap(const std::vector<int>& remap_table)
{
assert(m_loop > -1);
assert(m_leftmost_vert > -1);
@@ -744,7 +744,7 @@
template<class coord_t>
-void poly<coord_t>::remap_for_duped_verts(const array<vert_t>& sorted_verts,
int v0, int v1)
+void poly<coord_t>::remap_for_duped_verts(const std::vector<vert_t>&
sorted_verts, int v0, int v1)
// Remap for the case of v0 and v1 being duplicated, and subsequent
// verts being shifted up.
{
@@ -779,7 +779,7 @@
template<class coord_t>
-void poly<coord_t>::classify_vert(array<vert_t>* sorted_verts, int vi)
+void poly<coord_t>::classify_vert(std::vector<vert_t>* sorted_verts, int vi)
// Decide if vi is an ear, and mark its m_is_ear flag & update counts.
{
poly_vert<coord_t>* pvi = &((*sorted_verts)[vi]);
@@ -804,7 +804,7 @@
template<class coord_t>
-void poly<coord_t>::dirty_vert(array<vert_t>* sorted_verts, int vi)
+void poly<coord_t>::dirty_vert(std::vector<vert_t>* sorted_verts, int vi)
// Call when an adjacent vert gets clipped. Recomputes
// m_convex_result and clears m_is_ear for the vert.
{
@@ -841,7 +841,7 @@
template<class coord_t>
-bool poly<coord_t>::build_ear_list(array<vert_t>* sorted_verts,
tu_random::generator* rg)
+bool poly<coord_t>::build_ear_list(std::vector<vert_t>* sorted_verts,
tu_random::generator* rg)
// Initialize our ear loop with all the ears that can be clipped.
//
// Returns true if we clipped any degenerates while looking for ears.
@@ -930,7 +930,7 @@
template<class coord_t>
-int poly<coord_t>::get_next_ear(const array<vert_t>& sorted_verts,
tu_random::generator* rg)
+int poly<coord_t>::get_next_ear(const std::vector<vert_t>& sorted_verts,
tu_random::generator* rg)
// Return the next ear to be clipped.
{
assert(m_ear_count > 0);
@@ -984,8 +984,8 @@
template<class coord_t>
void poly<coord_t>::emit_and_remove_ear(
- array<coord_t>* result,
- array<vert_t>* sorted_verts,
+ std::vector<coord_t>* result,
+ std::vector<vert_t>* sorted_verts,
int v0,
int v1,
int v2)
@@ -1077,7 +1077,7 @@
template<class coord_t>
-int poly<coord_t>::remove_degenerate_chain(array<vert_t>* sorted_verts, int
vi)
+int poly<coord_t>::remove_degenerate_chain(std::vector<vert_t>*
sorted_verts, int vi)
// Remove the degenerate ear at vi, and any degenerate ear formed as
// we remove the previous one.
//
@@ -1176,7 +1176,7 @@
template<class coord_t>
-void poly<coord_t>::update_connected_sub_poly(array<vert_t>* sorted_verts,
int v_first_in_subloop, int v_first_after_subloop)
+void poly<coord_t>::update_connected_sub_poly(std::vector<vert_t>*
sorted_verts, int v_first_in_subloop, int v_first_after_subloop)
// Given the beginning and end of a sub-loop that has just been linked
// into our loop, update the verts on the sub-loop to have the correct
// owner, update our m_leftmost_vert and our m_vert_count.
@@ -1210,7 +1210,7 @@
template<class coord_t>
-void poly<coord_t>::init_edge_index(const array<vert_t>& sorted_verts,
index_box<coord_t>& bound_of_all_verts)
+void poly<coord_t>::init_edge_index(const std::vector<vert_t>& sorted_verts,
index_box<coord_t>& bound_of_all_verts)
// Initialize our edge-search structure, for quickly finding possible
// intersecting edges (when constructing bridges to join polys).
{
@@ -1270,7 +1270,7 @@
template<class coord_t>
-void poly<coord_t>::init_for_ear_clipping(array<vert_t>* sorted_verts)
+void poly<coord_t>::init_for_ear_clipping(std::vector<vert_t>* sorted_verts)
// Classify all verts for convexity.
//
// Initialize our point-search structure, for quickly finding reflex
@@ -1383,7 +1383,7 @@
template<class coord_t>
-void poly<coord_t>::add_edge(const array<vert_t>& sorted_verts, int vi)
+void poly<coord_t>::add_edge(const std::vector<vert_t>& sorted_verts, int vi)
// Insert the edge (vi, vi->m_next) into the index.
{
index_box<coord_t> ib(sorted_verts[vi].get_index_point());
@@ -1399,7 +1399,7 @@
template<class coord_t>
-void poly<coord_t>::remove_edge(const array<vert_t>& sorted_verts, int vi)
+void poly<coord_t>::remove_edge(const std::vector<vert_t>& sorted_verts, int
vi)
// Remove the edge (vi, vi->m_next) from the index.
{
assert(m_edge_index);
@@ -1412,7 +1412,7 @@
template<class coord_t>
-bool poly<coord_t>::vert_can_see_cone_a(const array<vert_t>& sorted_verts,
int v, int cone_a_vert, int cone_b_vert)
+bool poly<coord_t>::vert_can_see_cone_a(const std::vector<vert_t>&
sorted_verts, int v, int cone_a_vert, int cone_b_vert)
// Return true if v can see cone_a_vert, without logically crossing cone_b.
// cone_a_vert and cone_b_vert are coincident.
{
@@ -1550,7 +1550,7 @@
template<class coord_t>
-bool poly<coord_t>::any_edge_intersection(const array<vert_t>& sorted_verts,
int external_vert, int my_vert)
+bool poly<coord_t>::any_edge_intersection(const std::vector<vert_t>&
sorted_verts, int external_vert, int my_vert)
// Return true if edge (external_vert,my_vert) intersects any edge in our poly.
{
// Check the edge index for potentially overlapping edges.
@@ -1593,7 +1593,7 @@
template<class coord_t>
-bool poly<coord_t>::ear_contains_reflex_vertex(const array<vert_t>&
sorted_verts, int v0, int v1, int v2)
+bool poly<coord_t>::ear_contains_reflex_vertex(const std::vector<vert_t>&
sorted_verts, int v0, int v1, int v2)
// Return true if any of this poly's reflex verts are inside the
// specified ear. The definition of inside is: a reflex vertex in the
// interior of the triangle (v0,v1,v2), or on the segments [v1,v0) or
@@ -1707,7 +1707,7 @@
template<class coord_t>
-bool poly<coord_t>::vert_in_cone(const array<vert_t>& sorted_verts, int
vert, int cone_v0, int cone_v1, int cone_v2)
+bool poly<coord_t>::vert_in_cone(const std::vector<vert_t>& sorted_verts,
int vert, int cone_v0, int cone_v1, int cone_v2)
// Returns true if vert is within the cone defined by [v0,v1,v2].
/*
// (out) v0
@@ -1739,7 +1739,7 @@
template<class coord_t>
-bool poly<coord_t>::vert_is_duplicated(const array<vert_t>& sorted_verts,
int vert)
+bool poly<coord_t>::vert_is_duplicated(const std::vector<vert_t>&
sorted_verts, int vert)
// Return true if there's another vertex in this poly, coincident with vert.
{
// Scan backwards.
@@ -1787,14 +1787,14 @@
// Struct that holds the state of a triangulation.
{
//data:
- array<poly_vert<coord_t> > m_sorted_verts;
- array<poly<coord_t>*> m_polys;
+ std::vector<poly_vert<coord_t> > m_sorted_verts;
+ std::vector<poly<coord_t>*> m_polys;
index_box<coord_t> m_bound;
int m_estimated_triangle_count;
//code:
- void init(int path_count, const array<coord_t> paths[]);
+ void init(int path_count, const std::vector<coord_t> paths[]);
void join_paths_into_one_poly();
int get_estimated_triangle_count() const { return
m_estimated_triangle_count; }
@@ -1827,7 +1827,7 @@
template<class coord_t>
-void poly_env<coord_t>::init(int path_count, const array<coord_t> paths[])
+void poly_env<coord_t>::init(int path_count, const std::vector<coord_t>
paths[])
// Initialize our state, from the given set of paths. Sort vertices
// and component polys.
{
@@ -1853,7 +1853,7 @@
for (int i = 0; i < path_count; i++)
{
// Create a poly for this path.
- const array<coord_t>& path = paths[i];
+ const std::vector<coord_t>& path = paths[i];
if (path.size() < 3)
{
@@ -1925,7 +1925,7 @@
// sorted_verts have the correct, sorted, indices. We can
// then use vert indices to judge the left/right relationship
// of two verts.
- array<int> vert_remap; // vert_remap[i] == new index of
original vert[i]
+ std::vector<int> vert_remap; // vert_remap[i] == new index
of original vert[i]
vert_remap.resize(m_sorted_verts.size());
for (int i = 0, n = m_sorted_verts.size(); i < n; i++)
{
@@ -2163,16 +2163,16 @@
template<class coord_t>
static void recovery_process(
- array<poly<coord_t>*>* polys, // polys waiting to be processed
+ std::vector<poly<coord_t>*>* polys, // polys waiting to be processed
poly<coord_t>* P, // current poly
- array<poly_vert<coord_t> >* sorted_verts,
+ std::vector<poly_vert<coord_t> >* sorted_verts,
tu_random::generator* rg);
template<class coord_t>
inline void debug_emit_poly_loop(
- array<coord_t>* result,
- const array<poly_vert<coord_t> >& sorted_verts,
+ std::vector<coord_t>* result,
+ const std::vector<poly_vert<coord_t> >& sorted_verts,
poly<coord_t>* P)
// Fill *result with a poly loop representing P.
{
@@ -2200,11 +2200,11 @@
template<class coord_t>
static void compute_triangulation(
- array<coord_t>* result,
+ std::vector<coord_t>* result,
int path_count,
- const array<coord_t> paths[],
+ const std::vector<coord_t> paths[],
int debug_halt_step,
- array<coord_t>* debug_remaining_loop)
+ std::vector<coord_t>* debug_remaining_loop)
// Compute triangulation.
//
// The debug_ args are optional; they're for terminating early and
@@ -2389,9 +2389,9 @@
template<class coord_t>
void recovery_process(
- array<poly<coord_t>*>* polys,
+ std::vector<poly<coord_t>*>* polys,
poly<coord_t>* P,
- array<poly_vert<coord_t> >* sorted_verts,
+ std::vector<poly_vert<coord_t> >* sorted_verts,
tu_random::generator* rg)
{
// recovery_process:
Index: gnash/libbase/triangulate_sint32.cpp
diff -u gnash/libbase/triangulate_sint32.cpp:1.2
gnash/libbase/triangulate_sint32.cpp:1.3
--- gnash/libbase/triangulate_sint32.cpp:1.2 Thu Jan 5 18:28:32 2006
+++ gnash/libbase/triangulate_sint32.cpp Sat Feb 25 03:54:03 2006
@@ -14,11 +14,11 @@
{
// Version using sint32 coords
void compute(
- array<sint32>* result, // trilist
+ std::vector<sint32>* result, // trilist
int path_count,
- const array<sint32> paths[],
+ const std::vector<sint32> paths[],
int debug_halt_step /* = -1 */,
- array<sint32>* debug_remaining_loop /* = NULL */)
+ std::vector<sint32>* debug_remaining_loop /* = NULL */)
{
compute_triangulation<sint32>(result, path_count, paths,
debug_halt_step, debug_remaining_loop);
}
Index: gnash/libgeometry/kd_tree_dynamic.cpp
diff -u gnash/libgeometry/kd_tree_dynamic.cpp:1.3
gnash/libgeometry/kd_tree_dynamic.cpp:1.4
--- gnash/libgeometry/kd_tree_dynamic.cpp:1.3 Sat Feb 25 03:15:51 2006
+++ gnash/libgeometry/kd_tree_dynamic.cpp Sat Feb 25 03:54:03 2006
@@ -30,7 +30,7 @@
// time to do the sort, though.
-float kd_tree_dynamic::face::get_min_coord(int axis, const array<vec3>&
verts) const
+float kd_tree_dynamic::face::get_min_coord(int axis, const std::vector<vec3>&
verts) const
{
float minval = verts[m_vi[0]][axis];
minval = fmin(minval, verts[m_vi[1]][axis]);
@@ -39,7 +39,7 @@
}
-float kd_tree_dynamic::face::get_max_coord(int axis, const array<vec3>&
verts) const
+float kd_tree_dynamic::face::get_max_coord(int axis, const std::vector<vec3>&
verts) const
{
float maxval = verts[m_vi[0]][axis];
maxval = fmax(maxval, verts[m_vi[1]][axis]);
@@ -49,10 +49,10 @@
void split_mesh(
- array<vec3>* verts0,
- array<int>* tris0,
- array<vec3>* verts1,
- array<int>* tris1,
+ std::vector<vec3>* verts0,
+ std::vector<int>* tris0,
+ std::vector<vec3>* verts1,
+ std::vector<int>* tris1,
int vert_count,
const vec3 verts[],
int triangle_count,
@@ -168,7 +168,7 @@
/*static*/ void kd_tree_dynamic::build_trees(
- array<kd_tree_dynamic*>* treelist,
+ std::vector<kd_tree_dynamic*>* treelist,
int vert_count,
const vec3 verts[],
int triangle_count,
@@ -185,8 +185,8 @@
int longest_axis = bound.get_longest_axis();
float offset = bound.get_center()[longest_axis];
- array<vec3> verts0, verts1;
- array<int> tris0, tris1;
+ std::vector<vec3> verts0, verts1;
+ std::vector<int> tris0, tris1;
split_mesh(
&verts0,
&tris0,
@@ -234,7 +234,7 @@
// Make a mutable array of faces, and also compute our bounds.
axial_box bounds(axial_box::INVALID, vec3::flt_max,
vec3::minus_flt_max);
- array<face> faces;
+ std::vector<face> faces;
for (int i = 0; i < triangle_count; i++)
{
face f;
@@ -267,7 +267,7 @@
assert(new_vertex_count == m_verts.size());
// Make the re-ordered vertex buffer.
- array<vec3> new_verts;
+ std::vector<vec3> new_verts;
new_verts.resize(new_vertex_count);
for (int i = 0; i < m_verts.size(); i++)
{
@@ -567,8 +567,8 @@
assert(*front_end == face_count);
#if 0
- array<face> back_faces;
- array<face> front_faces;
+ std::vector<face> back_faces;
+ std::vector<face> front_faces;
for (int i = 0; i < face_count; i++)
{
@@ -779,7 +779,7 @@
}
-void kd_tree_dynamic::clip_faces(array<face>* faces, int axis, float offset)
+void kd_tree_dynamic::clip_faces(std::vector<face>* faces, int axis, float
offset)
// Clip the given faces against the plane [axis]=offset. Update the
// *faces array with the newly clipped faces; add faces and verts as
// necessary.
@@ -992,9 +992,9 @@
postscript* m_ps;
int m_depth;
int m_max_depth;
- array<int> m_width; // width of the tree at each level
- array<int> m_max_width;
- array<int> m_count; // width so far, during drawing
+ std::vector<int> m_width; // width of the tree at each
level
+ std::vector<int> m_max_width;
+ std::vector<int> m_count; // width so far, during drawing
// Some stats.
int m_leaf_count;
@@ -1199,7 +1199,7 @@
int axis,
kd_tree_dynamic::node* node,
const axial_box& bound,
- const array<vec3>& verts)
+ const std::vector<vec3>& verts)
// Draw faces under node, projected onto given axis plane. Scale to fit paper.
{
if (node == NULL) return;
Index: gnash/libgeometry/kd_tree_dynamic.h
diff -u gnash/libgeometry/kd_tree_dynamic.h:1.2
gnash/libgeometry/kd_tree_dynamic.h:1.3
--- gnash/libgeometry/kd_tree_dynamic.h:1.2 Wed Feb 1 23:58:32 2006
+++ gnash/libgeometry/kd_tree_dynamic.h Sat Feb 25 03:54:03 2006
@@ -23,7 +23,7 @@
{
// Build tree(s) from the given mesh.
static void build_trees(
- array<kd_tree_dynamic*>* treelist,
+ std::vector<kd_tree_dynamic*>* treelist,
int vert_count,
const vec3 verts[],
int triangle_count,
@@ -44,13 +44,13 @@
Uint16 m_vi[3]; // indices of verts
Uint16 m_flags;
- float get_min_coord(int axis, const array<vec3>& verts) const;
- float get_max_coord(int axis, const array<vec3>& verts) const;
+ float get_min_coord(int axis, const std::vector<vec3>& verts)
const;
+ float get_max_coord(int axis, const std::vector<vec3>& verts)
const;
};
struct leaf
{
- array<face> m_faces;
+ std::vector<face> m_faces;
};
// Internal node. Not too tidy; would use unions etc. if it were
@@ -94,7 +94,7 @@
void dump(tu_file* out, int depth) const;
};
- const array<vec3>& get_verts() const { return m_verts; }
+ const std::vector<vec3>& get_verts() const { return m_verts; }
const node* get_root() const { return m_root; }
const axial_box& get_bound() const { return m_bound; }
@@ -131,9 +131,9 @@
// Utility, for testing a clipping non-loose kdtree. Duping
// is probably much preferable to clipping though.
- void clip_faces(array<face>* faces, int axis, float offset);
+ void clip_faces(std::vector<face>* faces, int axis, float offset);
- array<vec3> m_verts;
+ std::vector<vec3> m_verts;
node* m_root;
axial_box m_bound;
};
Index: gnash/libgeometry/tqt.h
diff -u gnash/libgeometry/tqt.h:1.2 gnash/libgeometry/tqt.h:1.3
--- gnash/libgeometry/tqt.h:1.2 Wed Feb 1 23:58:32 2006
+++ gnash/libgeometry/tqt.h Sat Feb 25 03:54:03 2006
@@ -33,7 +33,7 @@
static int node_index(int level, int col, int row);
private:
- array<unsigned int> m_toc;
+ std::vector<unsigned int> m_toc;
int m_depth;
int m_tile_size;
tu_file* m_source;
Index: gnash/server/Function.cpp
diff -u gnash/server/Function.cpp:1.6 gnash/server/Function.cpp:1.7
--- gnash/server/Function.cpp:1.6 Mon Feb 13 12:09:16 2006
+++ gnash/server/Function.cpp Sat Feb 25 03:54:03 2006
@@ -96,7 +96,7 @@
}
function_as_object::function_as_object(action_buffer* ab, as_environment* env,
- int start, const array<with_stack_entry>& with_stack)
+ int start, const std::vector<with_stack_entry>& with_stack)
:
as_object(getFunctionPrototype()),
m_action_buffer(ab),
@@ -264,7 +264,7 @@
if (m_function2_flags & 0x80)
{
// Put '_parent' in a register.
- array<with_stack_entry> dummy;
+ std::vector<with_stack_entry> dummy;
as_value parent =
our_env->get_variable("_parent", dummy);
(*(our_env->local_register_ptr(current_reg))) = parent;
current_reg++;
Index: gnash/server/Function.h
diff -u gnash/server/Function.h:1.4 gnash/server/Function.h:1.5
--- gnash/server/Function.h:1.4 Mon Feb 13 10:44:12 2006
+++ gnash/server/Function.h Sat Feb 25 03:54:03 2006
@@ -42,7 +42,7 @@
as_environment* m_env;
/// initial with-stack on function entry.
- array<with_stack_entry> m_with_stack;
+ std::vector<with_stack_entry> m_with_stack;
int m_start_pc;
int m_length;
@@ -51,7 +51,7 @@
int m_register;
tu_string m_name;
};
- array<arg_spec> m_args;
+ std::vector<arg_spec> m_args;
bool m_is_function2;
uint8 m_local_register_count;
@@ -77,7 +77,7 @@
/// environment, rather than the environment where they
/// were defined.
function_as_object(action_buffer* ab, as_environment* env,
- int start, const array<with_stack_entry>& with_stack);
+ int start, const std::vector<with_stack_entry>&
with_stack);
void set_is_function2() { m_is_function2 = true; }
void set_local_register_count(uint8 ct) { assert(m_is_function2);
m_local_register_count = ct; }
Index: gnash/server/Movie.cpp
diff -u gnash/server/Movie.cpp:1.6 gnash/server/Movie.cpp:1.7
--- gnash/server/Movie.cpp:1.6 Sat Feb 25 03:15:51 2006
+++ gnash/server/Movie.cpp Sat Feb 25 03:54:03 2006
@@ -391,13 +391,13 @@
/* movie_def_impl */
- void movie_def_impl::get_owned_fonts(array<font*>* fonts)
+ void movie_def_impl::get_owned_fonts(std::vector<font*>* fonts)
// Fill up *fonts with fonts that we own.
{
assert(fonts);
fonts->resize(0);
- array<int> font_ids;
+ std::vector<int> font_ids;
for (hash<int, smart_ptr<font> >::iterator it = m_fonts.begin();
it != m_fonts.end();
@@ -432,7 +432,7 @@
// Generate bitmaps for our fonts, if necessary.
{
// Collect list of fonts.
- array<font*> fonts;
+ std::vector<font*> fonts;
get_owned_fonts(&fonts);
fontlib::generate_font_bitmaps(fonts, this);
}
@@ -455,7 +455,7 @@
out->write_bytes(header, 4);
// Write font data.
- array<font*> fonts;
+ std::vector<font*> fonts;
get_owned_fonts(&fonts);
fontlib::output_cached_data(out, fonts, this, options);
@@ -493,7 +493,7 @@
}
// Read the cached font data.
- array<font*> fonts;
+ std::vector<font*> fonts;
get_owned_fonts(&fonts);
fontlib::input_cached_data(in, fonts, this);
Index: gnash/server/Movie.h
diff -u gnash/server/Movie.h:1.5 gnash/server/Movie.h:1.6
--- gnash/server/Movie.h:1.5 Fri Feb 3 12:53:38 2006
+++ gnash/server/Movie.h Sat Feb 25 03:54:03 2006
@@ -93,10 +93,10 @@
hash<int, smart_ptr<sound_sample> > m_sound_samples;
/// A list of movie control events for each frame.
- array<array<execute_tag*> > m_playlist;
+ std::vector<std::vector<execute_tag*> >
m_playlist;
/// Init actions for each frame.
- array<array<execute_tag*> > m_init_action_list;
+ std::vector<std::vector<execute_tag*> > m_init_action_list;
/// 0-based frame #'s
stringi_hash<int> m_named_frames;
@@ -104,15 +104,15 @@
stringi_hash<smart_ptr<resource> > m_exports;
/// Items we import.
- array<import_info> m_imports;
+ std::vector<import_info> m_imports;
/// Movies we import from; hold a ref on these,
/// to keep them alive
- array<smart_ptr<movie_definition> > m_import_source_movies;
+ std::vector<smart_ptr<movie_definition> >
m_import_source_movies;
/// Bitmaps used in this movie; collected in one place to make
/// it possible for the host to manage them as textures.
- array<smart_ptr<bitmap_info> > m_bitmap_list;
+ std::vector<smart_ptr<bitmap_info> > m_bitmap_list;
create_bitmaps_flag m_create_bitmaps;
create_font_shapes_flag m_create_font_shapes;
@@ -304,9 +304,9 @@
return m_jpeg_in;
}
- virtual const array<execute_tag*>& get_playlist(int
frame_number) { return m_playlist[frame_number]; }
+ virtual const std::vector<execute_tag*>& get_playlist(int
frame_number) { return m_playlist[frame_number]; }
- virtual const array<execute_tag*>*get_init_actions(int
frame_number) { return &m_init_action_list[frame_number]; }
+ virtual const std::vector<execute_tag*>*get_init_actions(int
frame_number) { return &m_init_action_list[frame_number]; }
/// Read Movie definition from an SWF file.
//
@@ -316,7 +316,7 @@
void read(tu_file *in);
/// Fill up *fonts with fonts that we own.
- void get_owned_fonts(array<font*>* fonts);
+ void get_owned_fonts(std::vector<font*>* fonts);
/// Generate bitmaps for our fonts, if necessary.
void generate_font_bitmaps();
@@ -362,7 +362,7 @@
bool m_on_event_xmlsocket_ondata_called;
bool m_on_event_xmlsocket_onxml_called;
bool m_on_event_load_progress_called;
- array<Timer *> m_interval_timers;
+ std::vector<Timer *> m_interval_timers;
movie_root(movie_def_impl* def);
Index: gnash/server/MovieClipLoader.cpp
diff -u gnash/server/MovieClipLoader.cpp:1.8
gnash/server/MovieClipLoader.cpp:1.9
--- gnash/server/MovieClipLoader.cpp:1.8 Mon Feb 13 10:44:12 2006
+++ gnash/server/MovieClipLoader.cpp Sat Feb 25 03:54:03 2006
@@ -281,7 +281,7 @@
{
//log_msg("FIXME: Found onLoadStart!\n");
as_c_function_ptr func = method.to_c_function();
- fn.env->set_variable("success", true,
array<with_stack_entry>());
+ fn.env->set_variable("success", true,
std::vector<with_stack_entry>());
if (func)
{
// It's a C function. Call it.
@@ -311,7 +311,7 @@
{
//log_msg("FIXME: Found onLoadStart!\n");
as_c_function_ptr func = method.to_c_function();
- fn.env->set_variable("success", true,
array<with_stack_entry>());
+ fn.env->set_variable("success", true,
std::vector<with_stack_entry>());
if (func)
{
// It's a C function. Call it.
@@ -489,7 +489,7 @@
matrix mat = tar->get_matrix();
//float ratio = tar->get_ratio();
//Uint16 clip_depth = tar->get_clip_depth();
- array<swf_event*> dummy_event_handlers;
+ std::vector<swf_event*> dummy_event_handlers;
movie* parent = tar->get_parent();
character *newch = new character(parent, id);
@@ -637,7 +637,7 @@
if (fn.this_ptr->get_member("onLoadComplete", &method)) {
//log_msg("FIXME: Found onLoadComplete!\n");
as_c_function_ptr func = method.to_c_function();
- fn.env->set_variable("success", true, array<with_stack_entry>());
+ fn.env->set_variable("success", true, std::vector<with_stack_entry>());
if (func)
{
// It's a C function. Call it.
@@ -676,7 +676,7 @@
if (fn.this_ptr->get_member("onLoadError", &method)) {
//log_msg("FIXME: Found onLoadError!\n");
as_c_function_ptr func = method.to_c_function();
- fn.env->set_variable("success", true, array<with_stack_entry>());
+ fn.env->set_variable("success", true, std::vector<with_stack_entry>());
if (func)
{
// It's a C function. Call it.
Index: gnash/server/Sprite.cpp
diff -u gnash/server/Sprite.cpp:1.13 gnash/server/Sprite.cpp:1.14
--- gnash/server/Sprite.cpp:1.13 Sat Feb 25 03:15:51 2006
+++ gnash/server/Sprite.cpp Sat Feb 25 03:54:03 2006
@@ -636,7 +636,7 @@
// Execute the execute_tag actions
- const array<execute_tag*>&playlist =
m_def->get_playlist(frame_number);
+ const std::vector<execute_tag*>&playlist =
m_def->get_playlist(frame_number);
for (int i=0, n=playlist.size(); i<n; ++i)
{
execute_tag* e = playlist[i];
@@ -665,7 +665,7 @@
character* ch = m_display_list.get_character_by_name(name);
if (ch)
{
- array<swf_event*> dummy_event_handlers;
+ std::vector<swf_event*> dummy_event_handlers;
add_display_object(
ch->get_id(),
@@ -933,7 +933,7 @@
{
assert(m_parent == NULL); // should only be called on the root
movie.
- array<with_stack_entry> empty_with_stack;
+ std::vector<with_stack_entry> empty_with_stack;
tu_string path(path_to_var);
// NOTE: this is static so that the string
@@ -965,7 +965,7 @@
// should only be called on the root movie.
assert(m_parent == NULL);
- array<with_stack_entry> empty_with_stack;
+ std::vector<with_stack_entry> empty_with_stack;
tu_string path(path_to_var);
as_value val(new_value);
@@ -988,7 +988,7 @@
return;
}
- array<with_stack_entry> empty_with_stack;
+ std::vector<with_stack_entry> empty_with_stack;
tu_string path(path_to_var);
as_value val(new_value);
@@ -1061,7 +1061,7 @@
// Execute this frame's init actions, if necessary.
if (m_init_actions_executed[frame] == false)
{
- const array<execute_tag*>* init_actions =
m_def->get_init_actions(frame);
+ const std::vector<execute_tag*>* init_actions =
m_def->get_init_actions(frame);
if (init_actions && init_actions->size() > 0)
{
// Need to execute these actions.
@@ -1077,7 +1077,7 @@
}
}
- const array<execute_tag*>& playlist = m_def->get_playlist(frame);
+ const std::vector<execute_tag*>& playlist =
m_def->get_playlist(frame);
for (unsigned int i = 0; i < playlist.size(); i++)
{
execute_tag* e = playlist[i];
@@ -1100,7 +1100,7 @@
assert(frame >= 0);
assert(frame < m_def->get_frame_count());
- const array<execute_tag*>& playlist = m_def->get_playlist(frame);
+ const std::vector<execute_tag*>& playlist =
m_def->get_playlist(frame);
for (unsigned int i = 0; i < playlist.size(); i++)
{
execute_tag* e = playlist[i];
@@ -1113,7 +1113,7 @@
assert(frame >= 0);
assert(frame < m_def->get_frame_count());
- const array<execute_tag*>& playlist =
m_def->get_playlist(frame);
+ const std::vector<execute_tag*>& playlist =
m_def->get_playlist(frame);
for (unsigned int i = 0; i < playlist.size(); i++)
{
execute_tag* e = playlist[i];
@@ -1132,7 +1132,7 @@
for (int f = frame - 1; f >= 0; f--)
{
- const array<execute_tag*>& playlist =
m_def->get_playlist(f);
+ const std::vector<execute_tag*>& playlist =
m_def->get_playlist(f);
for (int i = playlist.size() - 1; i >= 0; i--)
{
execute_tag* e = playlist[i];
@@ -1212,7 +1212,7 @@
character*
sprite_instance::add_display_object(Uint16 character_id,
const char* name,
- const array<swf_event*>& event_handlers,
+ const std::vector<swf_event*>& event_handlers,
Uint16 depth, bool replace_if_depth_is_occupied,
const cxform& color_transform, const matrix& matrix,
float ratio, Uint16 clip_depth)
Index: gnash/server/Sprite.h
diff -u gnash/server/Sprite.h:1.7 gnash/server/Sprite.h:1.8
--- gnash/server/Sprite.h:1.7 Mon Feb 13 10:44:12 2006
+++ gnash/server/Sprite.h Sat Feb 25 03:54:03 2006
@@ -62,7 +62,7 @@
struct sprite_definition : public movie_definition_sub
{
movie_definition_sub* m_movie_def; // parent movie.
- array<array<execute_tag*> > m_playlist; // movie control events
for each frame.
+ std::vector<std::vector<execute_tag*> > m_playlist; //
movie control events for each frame.
stringi_hash<int> m_named_frames; // stores 0-based frame
#'s
int m_frame_count;
int m_loading_frame;
@@ -190,7 +190,7 @@
return m_named_frames.get(label, frame_number);
}
- const array<execute_tag*>& get_playlist(int frame_number)
+ const std::vector<execute_tag*>& get_playlist(int frame_number)
// frame_number is 0-based
{
return m_playlist[frame_number];
@@ -199,7 +199,7 @@
// Sprites do not have init actions in their
// playlists! Only the root movie
// (movie_def_impl) does (@@ correct?)
- virtual const array<execute_tag*>*get_init_actions(int
frame_number)
+ virtual const std::vector<execute_tag*>*get_init_actions(int
frame_number)
{
return NULL;
}
@@ -264,7 +264,7 @@
display_list m_display_list;
- //array<action_buffer*> m_action_list;
+ //std::vector<action_buffer*> m_action_list;
std::vector<action_buffer*> m_action_list;
play_state m_play_state;
@@ -278,7 +278,7 @@
bool m_accept_anim_moves;
// a bit-array class would be ideal for this
- array<bool> m_init_actions_executed;
+ std::vector<bool> m_init_actions_executed;
as_environment m_as_environment;
@@ -319,7 +319,7 @@
// Initialize the flags for init action executed.
m_init_actions_executed.resize(m_def->get_frame_count());
- for (array<bool>::iterator p =
m_init_actions_executed.begin(); p != m_init_actions_executed.end(); ++p)
+ for (std::vector<bool>::iterator p =
m_init_actions_executed.begin(); p != m_init_actions_executed.end(); ++p)
{
*p = false;
}
@@ -501,7 +501,7 @@
character* add_display_object(
Uint16 character_id,
const char* name,
- const array<swf_event*>& event_handlers,
+ const std::vector<swf_event*>& event_handlers,
Uint16 depth,
bool replace_if_depth_is_occupied,
const cxform& color_transform,
@@ -713,7 +713,7 @@
// should only be called on the root movie.
assert(m_parent == NULL);
- array<with_stack_entry> dummy;
+ std::vector<with_stack_entry> dummy;
as_value obj =
m_as_environment.get_variable(tu_string(path_to_object), dummy);
as_object* as_obj = obj.to_object();
if (as_obj)
Index: gnash/server/action.cpp
diff -u gnash/server/action.cpp:1.50 gnash/server/action.cpp:1.51
--- gnash/server/action.cpp:1.50 Sat Feb 25 03:15:51 2006
+++ gnash/server/action.cpp Sat Feb 25 03:54:03 2006
@@ -281,7 +281,7 @@
#if 0
static const int BUFSIZE = 1000;
char buffer[BUFSIZE];
- array<const char*> tokens;
+ std::vector<const char*> tokens;
// Brutal crap parsing. Basically null out any
// delimiter characters, so that the method name and
@@ -428,7 +428,7 @@
}
}
- array<with_stack_entry> dummy_with_stack;
+ std::vector<with_stack_entry> dummy_with_stack;
as_value method = env->get_variable(method_name,
dummy_with_stack);
// check method
@@ -669,7 +669,7 @@
struct key_as_object : public as_object
{
Uint8 m_keymap[key::KEYCOUNT / 8 + 1]; // bit-array
- array<weak_ptr<as_object> > m_listeners;
+ std::vector<weak_ptr<as_object> > m_listeners;
int m_last_key_pressed;
key_as_object()
@@ -1743,7 +1743,7 @@
int local_stack_top = env->get_local_frame_top();
env->add_frame_barrier();
- array<with_stack_entry> empty_with_stack;
+ std::vector<with_stack_entry> empty_with_stack;
execute(env, 0, m_buffer.size(), NULL, empty_with_stack, false
/* not function2 */);
env->set_local_frame_top(local_stack_top);
@@ -1753,7 +1753,7 @@
/*private*/
void
action_buffer::doActionNew(as_environment* env,
- array<with_stack_entry>& with_stack)
+ std::vector<with_stack_entry>& with_stack)
{
as_value classname = env->pop();
IF_VERBOSE_ACTION(log_msg("---new object: %s\n",
@@ -1935,7 +1935,7 @@
/*private*/
void
action_buffer::doActionCallFunction(as_environment* env,
- array<with_stack_entry>& with_stack)
+ std::vector<with_stack_entry>& with_stack)
{
as_value function;
if (env->top(0).get_type() == as_value::STRING)
@@ -1969,7 +1969,7 @@
/*private*/
void
action_buffer::doActionDefineFunction(as_environment* env,
- array<with_stack_entry>& with_stack, int pc, int*
next_pc)
+ std::vector<with_stack_entry>& with_stack, int pc, int*
next_pc)
{
// Create a new function_as_object
@@ -2019,7 +2019,7 @@
/*private*/
void
action_buffer::doActionDefineFunction2(as_environment* env,
- array<with_stack_entry>& with_stack, int pc, int*
next_pc)
+ std::vector<with_stack_entry>& with_stack, int pc, int*
next_pc)
{
function_as_object* func = new function_as_object(this,
env, *next_pc, with_stack);
func->set_is_function2();
@@ -2140,14 +2140,14 @@
/*private*/
void action_buffer::doActionDelete(as_environment* env,
- array<with_stack_entry>& with_stack)
+ std::vector<with_stack_entry>& with_stack)
{
log_error("todo opcode: %02X\n", SWF::ACTION_DELETEVAR);
}
/*private*/
void action_buffer::doActionDelete2(as_environment* env,
- array<with_stack_entry>& with_stack)
+ std::vector<with_stack_entry>& with_stack)
{
as_value var = env->top(0);
@@ -2179,7 +2179,7 @@
int start_pc,
int exec_bytes,
as_value* retval,
- const array<with_stack_entry>& initial_with_stack,
+ const std::vector<with_stack_entry>& initial_with_stack,
bool is_function2)
// Interpret the specified subset of the actions in our
// buffer. Caller is responsible for cleaning up our local
@@ -2192,7 +2192,7 @@
assert(env);
- array<with_stack_entry> with_stack(initial_with_stack);
+ std::vector<with_stack_entry> with_stack(initial_with_stack);
// Some corner case behaviors depend on the SWF file version.
int version =
env->get_target()->get_movie_definition()->get_version();
@@ -3899,7 +3899,7 @@
//
- as_value as_environment::get_variable(const tu_string& varname,
const array<with_stack_entry>& with_stack) const
+ as_value as_environment::get_variable(const tu_string& varname,
const std::vector<with_stack_entry>& with_stack) const
// Return the value of the given var, if it's defined.
{
// Path lookup rigamarole.
@@ -3930,7 +3930,7 @@
as_value as_environment::get_variable_raw(
const tu_string& varname,
- const array<with_stack_entry>& with_stack) const
+ const std::vector<with_stack_entry>& with_stack) const
// varname must be a plain variable name; no path parsing.
{
assert(strchr(varname.c_str(), ':') == NULL);
@@ -3994,7 +3994,7 @@
void as_environment::set_variable(
const tu_string& varname,
const as_value& val,
- const array<with_stack_entry>& with_stack)
+ const std::vector<with_stack_entry>& with_stack)
// Given a path to variable, set its value.
{
IF_VERBOSE_ACTION(log_msg("-------------- %s = %s\n",
varname.c_str(), val.to_string()));//xxxxxxxxxx
@@ -4021,7 +4021,7 @@
void as_environment::set_variable_raw(
const tu_string& varname,
const as_value& val,
- const array<with_stack_entry>& with_stack)
+ const std::vector<with_stack_entry>& with_stack)
// No path rigamarole.
{
// Check the with-stack.
Index: gnash/server/action.h
diff -u gnash/server/action.h:1.21 gnash/server/action.h:1.22
--- gnash/server/action.h:1.21 Wed Feb 15 23:35:53 2006
+++ gnash/server/action.h Sat Feb 25 03:54:03 2006
@@ -180,7 +180,7 @@
int start_pc,
int exec_bytes,
as_value* retval,
- const array<with_stack_entry>& initial_with_stack,
+ const std::vector<with_stack_entry>& initial_with_stack,
bool is_function2);
bool is_null()
@@ -191,7 +191,7 @@
int get_length() const { return m_buffer.size(); }
private:
- // Don't put these as values in array<>! They contain
+ // Don't put these as values in std::vector<>! They contain
// internal pointers and cannot be moved or copied.
// If you need to keep an array of them, keep pointers
// to new'd instances.
@@ -201,12 +201,12 @@
void process_decl_dict(int start_pc, int stop_pc);
// data:
- array<unsigned char> m_buffer;
- array<const char*> m_dictionary;
+ std::vector<unsigned char> m_buffer;
+ std::vector<const char*> m_dictionary;
int m_decl_dict_processed_at;
void doActionNew(as_environment* env,
- array<with_stack_entry>& with_stack);
+ std::vector<with_stack_entry>& with_stack);
void doActionInstanceOf(as_environment* env);
@@ -215,13 +215,13 @@
void doActionCallMethod(as_environment* env);
void doActionCallFunction(as_environment* env,
- array<with_stack_entry>& with_stack);
+ std::vector<with_stack_entry>& with_stack);
void doActionDefineFunction(as_environment* env,
- array<with_stack_entry>& with_stack, int pc, int*
next_pc);
+ std::vector<with_stack_entry>& with_stack, int pc, int*
next_pc);
void doActionDefineFunction2(as_environment* env,
- array<with_stack_entry>& with_stack, int pc, int*
next_pc);
+ std::vector<with_stack_entry>& with_stack, int pc, int*
next_pc);
void doActionGetMember(as_environment* env);
@@ -230,10 +230,10 @@
void doActionEquals(as_environment* env);
void doActionDelete(as_environment* env,
- array<with_stack_entry>& with_stack);
+ std::vector<with_stack_entry>& with_stack);
void doActionDelete2(as_environment* env,
- array<with_stack_entry>& with_stack);
+ std::vector<with_stack_entry>& with_stack);
};
@@ -284,12 +284,12 @@
struct as_environment
{
/// Stack of as_values in this environment
- array<as_value> m_stack;
+ std::vector<as_value> m_stack;
as_value m_global_register[4];
/// function2 uses this
- array<as_value> m_local_register;
+ std::vector<as_value> m_local_register;
movie* m_target;
@@ -305,7 +305,7 @@
frame_slot() {}
frame_slot(const tu_string& name, const as_value& val)
: m_name(name), m_value(val) {}
};
- array<frame_slot> m_local_frames;
+ std::vector<frame_slot> m_local_frames;
as_environment()
@@ -351,17 +351,17 @@
/// Variable name can contain path elements.
///
as_value get_variable(const tu_string& varname,
- const array<with_stack_entry>& with_stack) const;
+ const std::vector<with_stack_entry>& with_stack) const;
/// Same of the above, but no support for path.
as_value get_variable_raw(const tu_string& varname,
- const array<with_stack_entry>& with_stack) const;
+ const std::vector<with_stack_entry>& with_stack) const;
/// Given a path to variable, set its value.
- void set_variable(const tu_string& path, const as_value&
val, const array<with_stack_entry>& with_stack);
+ void set_variable(const tu_string& path, const as_value&
val, const std::vector<with_stack_entry>& with_stack);
/// Same of the above, but no support for path
- void set_variable_raw(const tu_string& path, const as_value&
val, const array<with_stack_entry>& with_stack);
+ void set_variable_raw(const tu_string& path, const as_value&
val, const std::vector<with_stack_entry>& with_stack);
/// Set/initialize the value of the local variable.
void set_local(const tu_string& varname, const as_value&
val);
Index: gnash/server/button.cpp
diff -u gnash/server/button.cpp:1.4 gnash/server/button.cpp:1.5
--- gnash/server/button.cpp:1.4 Sat Feb 25 03:15:51 2006
+++ gnash/server/button.cpp Sat Feb 25 03:54:03 2006
@@ -266,7 +266,7 @@
struct button_character_instance : public character
{
button_character_definition* m_def;
- array< smart_ptr<character> > m_record_character;
+ std::vector< smart_ptr<character> > m_record_character;
enum mouse_flags
{
Index: gnash/server/button.h
diff -u gnash/server/button.h:1.1 gnash/server/button.h:1.2
--- gnash/server/button.h:1.1 Tue Dec 20 21:01:18 2005
+++ gnash/server/button.h Sat Feb 25 03:54:03 2006
@@ -81,7 +81,7 @@
OVER_DOWN_TO_IDLE = 1 << 8,
};
int m_conditions;
- array<action_buffer*> m_actions;
+ std::vector<action_buffer*> m_actions;
~button_action();
void read(stream* in, int tag_type);
@@ -110,7 +110,7 @@
Uint32 m_in_point;
Uint32 m_out_point;
Uint16 m_loop_count;
- array<sound_envelope> m_envelopes;
+ std::vector<sound_envelope> m_envelopes;
};
struct button_sound_info
@@ -128,8 +128,8 @@
bool m_menu;
- array<button_record> m_button_records;
- array<button_action> m_button_actions;
+ std::vector<button_record> m_button_records;
+ std::vector<button_action> m_button_actions;
button_sound_def* m_sound;
button_character_definition();
Index: gnash/server/dlist.h
diff -u gnash/server/dlist.h:1.3 gnash/server/dlist.h:1.4
--- gnash/server/dlist.h:1.3 Mon Jan 30 10:29:28 2006
+++ gnash/server/dlist.h Sat Feb 25 03:54:03 2006
@@ -181,7 +181,7 @@
// void set_character_position(character* ch, float x, float y);
private:
- array<display_object_info> m_display_object_array;
+ std::vector<display_object_info> m_display_object_array;
};
Index: gnash/server/font.cpp
diff -u gnash/server/font.cpp:1.4 gnash/server/font.cpp:1.5
--- gnash/server/font.cpp:1.4 Sat Feb 25 03:15:51 2006
+++ gnash/server/font.cpp Sat Feb 25 03:54:03 2006
@@ -115,7 +115,7 @@
// Read the glyph offsets. Offsets
// are measured from the start of the
// offset table.
- array<int> offsets;
+ std::vector<int> offsets;
offsets.push_back(in->read_u16());
IF_VERBOSE_PARSE(log_msg("offset[0] = %d\n",
offsets[0]));
int count = offsets[0] >> 1;
@@ -171,7 +171,7 @@
// Read the glyph offsets. Offsets
// are measured from the start of the
// offset table.
- array<int> offsets;
+ std::vector<int> offsets;
int font_code_offset;
if (wide_offsets)
{
Index: gnash/server/font.h
diff -u gnash/server/font.h:1.1 gnash/server/font.h:1.2
--- gnash/server/font.h:1.1 Tue Dec 20 21:01:18 2005
+++ gnash/server/font.h Sat Feb 25 03:54:03 2006
@@ -85,8 +85,8 @@
private:
void read_code_table(stream* in);
- array< smart_ptr<shape_character_def> > m_glyphs;
- array< texture_glyph > m_texture_glyphs; // cached info,
built by gnash_fontlib.
+ std::vector< smart_ptr<shape_character_def> > m_glyphs;
+ std::vector< texture_glyph > m_texture_glyphs; //
cached info, built by gnash_fontlib.
int m_texture_glyph_nominal_size;
char* m_name;
@@ -115,9 +115,9 @@
float m_ascent;
float m_descent;
float m_leading;
- array<float> m_advance_table;
+ std::vector<float> m_advance_table;
// @@ we don't seem to use this thing at all, so don't bother
keeping it.
- // array<rect> m_bounds_table; // @@ this thing should be
optional.
+ // std::vector<rect> m_bounds_table; // @@ this thing should
be optional.
// @@ replace this with a flat hash, or else a sorted array
(binary search)
struct kerning_pair
Index: gnash/server/fontlib.cpp
diff -u gnash/server/fontlib.cpp:1.3 gnash/server/fontlib.cpp:1.4
--- gnash/server/fontlib.cpp:1.3 Sat Feb 25 03:15:51 2006
+++ gnash/server/fontlib.cpp Sat Feb 25 03:54:03 2006
@@ -21,7 +21,7 @@
namespace gnash {
namespace fontlib {
- array< smart_ptr<font> > s_fonts;
+ std::vector< smart_ptr<font> > s_fonts;
// Size (in TWIPS) of the box that the glyph should
// stay within.
@@ -118,7 +118,7 @@
{
}
};
- static array< pending_glyph_info > s_pending_glyphs;
+ static std::vector< pending_glyph_info > s_pending_glyphs;
// Integer-bounded 2D rectangle.
@@ -165,7 +165,7 @@
}
};
// Rects already on the texture.
- static array<recti> s_covered_rects;
+ static std::vector<recti> s_covered_rects;
// 2d integer point.
struct pointi
@@ -187,7 +187,7 @@
};
// Candidates for upper-left corner of a new rectangle. Use
// lower-left and upper-right of previously placed rects.
- static array<pointi> s_anchor_points;
+ static std::vector<pointi> s_anchor_points;
static bool s_saving = false;
@@ -741,7 +741,7 @@
}
- void pack_and_assign_glyphs(array<rendered_glyph_info>* glyph_info,
movie_definition_sub* owner)
+ void pack_and_assign_glyphs(std::vector<rendered_glyph_info>*
glyph_info, movie_definition_sub* owner)
// Pack the given glyphs into textures, and push the
// texture_glyph info into the source fonts.
//
@@ -769,7 +769,7 @@
}
// Flag for whether we've processed this glyph yet.
- array<bool> packed;
+ std::vector<bool> packed;
packed.resize(glyph_info->size());
for (int i = 0, n = packed.size(); i < n; i++)
{
@@ -873,7 +873,7 @@
}
- static void generate_font_bitmaps(array<rendered_glyph_info>*
glyph_info, font* f, movie_definition_sub* owner)
+ static void generate_font_bitmaps(std::vector<rendered_glyph_info>*
glyph_info, font* f, movie_definition_sub* owner)
// Render images for each of the font's glyphs, and put the
// info about them in the given array.
{
@@ -922,7 +922,7 @@
}
- static void wipe_font_textures(const array<font*>& fonts)
+ static void wipe_font_textures(const std::vector<font*>& fonts)
{
for (int i = 0, n = fonts.size(); i < n; i++)
{
@@ -937,14 +937,14 @@
//
- void generate_font_bitmaps(const array<font*>& fonts,
movie_definition_sub* owner)
+ void generate_font_bitmaps(const std::vector<font*>& fonts,
movie_definition_sub* owner)
// Build cached textures from glyph outlines.
{
assert(s_render_buffer == NULL);
s_render_buffer = new Uint8[s_glyph_render_size *
s_glyph_render_size];
// Build the glyph images.
- array<rendered_glyph_info> glyph_info;
+ std::vector<rendered_glyph_info> glyph_info;
for (unsigned int i = 0; i < fonts.size(); i++)
{
generate_font_bitmaps(&glyph_info, fonts[i], owner);
@@ -982,7 +982,7 @@
void output_cached_data(
tu_file* out,
- const array<font*>& fonts,
+ const std::vector<font*>& fonts,
movie_definition_sub* owner,
const cache_options& options)
// Save cached font data, including glyph textures, to a
@@ -1086,7 +1086,7 @@
}
- void input_cached_data(tu_file* in, const array<font*>& fonts,
movie_definition_sub* owner)
+ void input_cached_data(tu_file* in, const std::vector<font*>& fonts,
movie_definition_sub* owner)
// Load a stream containing previously-saved font glyph textures.
{
// load number of bitmaps.
@@ -1327,8 +1327,8 @@
// Host-driven text rendering function. This not-tested and unfinished.
{
// Dummy arrays with a white fill style. For passing to
shape_character::display().
- static array<fill_style> s_dummy_style;
- static array<line_style> s_dummy_line_style;
+ static std::vector<fill_style> s_dummy_style;
+ static std::vector<line_style> s_dummy_line_style;
static display_info s_dummy_display_info;
if (s_dummy_style.size() < 1)
{
Index: gnash/server/fontlib.h
diff -u gnash/server/fontlib.h:1.1 gnash/server/fontlib.h:1.2
--- gnash/server/fontlib.h:1.1 Tue Dec 20 21:01:18 2005
+++ gnash/server/fontlib.h Sat Feb 25 03:54:03 2006
@@ -32,19 +32,19 @@
float get_texture_glyph_max_height(const font* f);
// Builds cached glyph textures from shape info.
- void generate_font_bitmaps(const array<font*>& fonts,
movie_definition_sub* owner);
+ void generate_font_bitmaps(const std::vector<font*>& fonts,
movie_definition_sub* owner);
// Save cached font data, including glyph textures, to a
// stream.
void output_cached_data(
tu_file* out,
- const array<font*>& fonts,
+ const std::vector<font*>& fonts,
movie_definition_sub* owner,
const cache_options& options);
// Load a stream containing previously-saved cachded font
// data, including glyph texture info.
- void input_cached_data(tu_file* in, const array<font*>&
fonts, movie_definition_sub* owner);
+ void input_cached_data(tu_file* in, const
std::vector<font*>& fonts, movie_definition_sub* owner);
} // end namespace fontlib
} // end namespace gnash
Index: gnash/server/impl.cpp
diff -u gnash/server/impl.cpp:1.19 gnash/server/impl.cpp:1.20
--- gnash/server/impl.cpp:1.19 Sat Feb 25 03:15:51 2006
+++ gnash/server/impl.cpp Sat Feb 25 03:54:03 2006
@@ -524,7 +524,7 @@
static stringi_hash< smart_ptr<movie_definition_sub> > s_movie_library;
static hash< movie_definition_sub*, smart_ptr<movie_interface> >
s_movie_library_inst;
-static array<movie_interface*> s_extern_sprites;
+static std::vector<movie_interface*> s_extern_sprites;
static movie_interface* s_current_root;
static tu_string s_workdir;
@@ -1459,7 +1459,7 @@
}
// Create a function to execute the actions.
- array<with_stack_entry> empty_with_stack;
+ std::vector<with_stack_entry> empty_with_stack;
function_as_object* func = new function_as_object(&m_action_buffer,
NULL, 0, empty_with_stack);
func->set_length(m_action_buffer.get_length());
@@ -1486,7 +1486,7 @@
MOVE,
REPLACE,
} m_place_type;
- array<swf_event*> m_event_handlers;
+ std::vector<swf_event*> m_event_handlers;
place_object_2()
Index: gnash/server/impl.h
diff -u gnash/server/impl.h:1.11 gnash/server/impl.h:1.12
--- gnash/server/impl.h:1.11 Sat Feb 11 01:57:03 2006
+++ gnash/server/impl.h Sat Feb 25 03:54:03 2006
@@ -56,8 +56,8 @@
struct movie_definition_sub : public movie_definition
// @@@ why not adding to movie_definition instead ?
{
- virtual const array<execute_tag*>& get_playlist(int
frame_number) = 0;
- virtual const array<execute_tag*>* get_init_actions(int
frame_number) = 0;
+ virtual const std::vector<execute_tag*>&
get_playlist(int frame_number) = 0;
+ virtual const std::vector<execute_tag*>*
get_init_actions(int frame_number) = 0;
virtual smart_ptr<resource> get_exported_resource(const
tu_string& symbol) = 0;
virtual character_def* get_character_def(int id) = 0;
@@ -130,7 +130,7 @@
virtual character* add_display_object(
Uint16 character_id,
const char* name,
- const array<swf_event*>& event_handlers,
+ const std::vector<swf_event*>& event_handlers,
Uint16 depth,
bool replace_if_depth_is_occupied,
const cxform& color_transform,
@@ -699,7 +699,7 @@
struct swf_event
{
// NOTE: DO NOT USE THESE AS VALUE TYPES IN AN
- // array<>! They cannot be moved! The private
+ // std::vector<>! They cannot be moved! The private
// operator=(const swf_event&) should help guard
// against that.
Index: gnash/server/shape.cpp
diff -u gnash/server/shape.cpp:1.7 gnash/server/shape.cpp:1.8
--- gnash/server/shape.cpp:1.7 Sat Feb 25 03:15:51 2006
+++ gnash/server/shape.cpp Sat Feb 25 03:54:03 2006
@@ -317,7 +317,7 @@
// Utility.
- void write_coord_array(tu_file* out, const array<Sint16>& pt_array)
+ void write_coord_array(tu_file* out, const std::vector<Sint16>&
pt_array)
// Dump the given coordinate array into the given stream.
{
int n = pt_array.size();
@@ -330,7 +330,7 @@
}
- void read_coord_array(tu_file* in, array<Sint16>* pt_array)
+ void read_coord_array(tu_file* in, std::vector<Sint16>* pt_array)
// Read the coordinate array data from the stream into *pt_array.
{
int n = in->read_le32();
@@ -400,7 +400,7 @@
line_strip::line_strip()
- // Default constructor, for array<>.
+ // Default constructor, for std::vector<>.
:
m_style(-1)
{}
@@ -462,7 +462,7 @@
{
// A set of strips; we'll join them together into one
// strip during the flush.
- array< array<point> > m_strips;
+ std::vector< std::vector<point> > m_strips;
int m_last_strip_used;
tri_stripper()
@@ -484,7 +484,7 @@
int i = m_last_strip_used + 1, n =
m_strips.size();
for ( ; i < n; i++)
{
- array<point>& str = m_strips[i];
+ std::vector<point>& str =
m_strips[i];
assert(str.size() >= 3); //
should have at least one tri already.
int last = str.size() - 1;
@@ -499,7 +499,7 @@
}
for (i = 0; i <= m_last_strip_used; i++)
{
- array<point>& str = m_strips[i];
+ std::vector<point>& str =
m_strips[i];
assert(str.size() >= 3); //
should have at least one tri already.
int last = str.size() - 1;
@@ -534,7 +534,7 @@
{
if (m_strips.size())
{
- array<point> big_strip;
+ std::vector<point> big_strip;
big_strip = m_strips[0];
assert(big_strip.size() >= 3);
@@ -542,7 +542,7 @@
for (unsigned int i = 1, n = m_strips.size(); i
< n; i++)
{
// Append to the big strip.
- const array<point>& str =
m_strips[i];
+ const std::vector<point>& str =
m_strips[i];
assert(str.size() >= 3); //
should have at least one tri already.
int last = big_strip.size() - 1;
@@ -661,8 +661,8 @@
void mesh_set::display(
const matrix& mat,
const cxform& cx,
- const array<fill_style>& fills,
- const array<line_style>& line_styles) const
+ const std::vector<fill_style>& fills,
+ const std::vector<line_style>& line_styles) const
// Throw our meshes at the renderer.
{
assert(m_error_tolerance > 0);
@@ -688,8 +688,8 @@
void mesh_set::display(
const matrix& mat,
const cxform& cx,
- const array<morph_fill_style>& fills,
- const array<morph_line_style>& line_styles,
+ const std::vector<morph_fill_style>& fills,
+ const std::vector<morph_line_style>& line_styles,
float ratio) const
// Throw our meshes at the renderer.
{
@@ -789,7 +789,7 @@
//
- static void read_fill_styles(array<fill_style>* styles, stream* in,
int tag_type, movie_definition_sub* m)
+ static void read_fill_styles(std::vector<fill_style>* styles,
stream* in, int tag_type, movie_definition_sub* m)
// Read fill styles, and push them onto the given style array.
{
assert(styles);
@@ -815,7 +815,7 @@
}
- static void read_line_styles(array<line_style>* styles, stream* in,
int tag_type)
+ static void read_line_styles(std::vector<line_style>* styles,
stream* in, int tag_type)
// Read line styles and push them onto the back of the given array.
{
// Get the count.
@@ -1156,9 +1156,9 @@
static void debug_display_shape_paths(
const matrix& mat,
float object_space_max_error,
- const array<path>& paths,
- const array<fill_style>& fill_styles,
- const array<line_style>& line_styles)
+ const std::vector<path>& paths,
+ const std::vector<fill_style>& fill_styles,
+ const std::vector<line_style>& line_styles)
{
for (unsigned int i = 0; i < paths.size(); i++)
{
@@ -1251,8 +1251,8 @@
const matrix& mat,
const cxform& cx,
float pixel_scale,
- const array<fill_style>& fill_styles,
- const array<line_style>& line_styles) const
+ const std::vector<fill_style>& fill_styles,
+ const std::vector<line_style>& line_styles) const
// Display our shape. Use the fill_styles arg to
// override our default set of fill styles (e.g. when
// rendering text).
Index: gnash/server/shape.h
diff -u gnash/server/shape.h:1.3 gnash/server/shape.h:1.4
--- gnash/server/shape.h:1.3 Sat Feb 11 01:57:03 2006
+++ gnash/server/shape.h Sat Feb 25 03:54:03 2006
@@ -61,7 +61,7 @@
//private:
int m_fill0, m_fill1, m_line;
float m_ax, m_ay; // starting point
- array<edge> m_edges;
+ std::vector<edge> m_edges;
bool m_new_shape;
};
@@ -77,7 +77,7 @@
void output_cached_data(tu_file* out);
void input_cached_data(tu_file* in);
private:
- array<Sint16> m_triangle_strip;
+ std::vector<Sint16> m_triangle_strip;
};
@@ -94,7 +94,7 @@
void input_cached_data(tu_file* in);
private:
int m_style;
- array<Sint16> m_coords;
+ std::vector<Sint16> m_coords;
};
@@ -112,14 +112,14 @@
void display(
const matrix& m,
const cxform& cx,
- const array<fill_style>& fills,
- const array<line_style>& line_styles) const;
+ const std::vector<fill_style>& fills,
+ const std::vector<line_style>& line_styles) const;
void display(
const matrix& m,
const cxform& cx,
- const array<morph_fill_style>& fills,
- const array<morph_line_style>& line_styles,
+ const std::vector<morph_fill_style>& fills,
+ const std::vector<morph_line_style>& line_styles,
float ratio) const;
void set_tri_strip(int style, const point pts[], int count);
@@ -131,8 +131,8 @@
private:
// int m_last_frame_rendered; // @@ Hm, we shouldn't
spontaneously drop cached data I don't think...
float m_error_tolerance;
- array<mesh> m_meshes; // One mesh per style.
- array<line_strip> m_line_strips;
+ std::vector<mesh> m_meshes; // One mesh per style.
+ std::vector<line_strip> m_line_strips;
};
@@ -155,8 +155,8 @@
const matrix& mat,
const cxform& cx,
float pixel_scale,
- const array<fill_style>& fill_styles,
- const array<line_style>& line_styles) const;
+ const std::vector<fill_style>& fill_styles,
+ const std::vector<line_style>& line_styles) const;
virtual void tesselate(float error_tolerance,
tesselate::trapezoid_accepter* accepter) const;
const rect& get_bound() const { return m_bound; }
void compute_bound(rect* r) const; // @@ what's the
difference between this and get_bound?
@@ -164,9 +164,9 @@
void output_cached_data(tu_file* out, const cache_options&
options);
void input_cached_data(tu_file* in);
- const array<fill_style>& get_fill_styles() const {
return m_fill_styles; }
- const array<line_style>& get_line_styles() const {
return m_line_styles; }
- const array<path>& get_paths() const { return m_paths; }
+ const std::vector<fill_style>& get_fill_styles() const {
return m_fill_styles; }
+ const std::vector<line_style>& get_line_styles() const {
return m_line_styles; }
+ const std::vector<path>& get_paths() const { return
m_paths; }
// morph uses this
void set_bound(const rect& r) { m_bound = r; /* should do
some verifying */ }
@@ -175,9 +175,9 @@
friend struct morph2_character_def;
// derived morph classes changes these
- array<fill_style> m_fill_styles;
- array<line_style> m_line_styles;
- array<path> m_paths;
+ std::vector<fill_style> m_fill_styles;
+ std::vector<line_style> m_line_styles;
+ std::vector<path> m_paths;
private:
void sort_and_clean_meshes() const;
@@ -185,7 +185,7 @@
rect m_bound;
// Cached pre-tesselated meshes.
- mutable array<mesh_set*> m_cached_meshes;
+ mutable std::vector<mesh_set*> m_cached_meshes;
};
} // end namespace gnash
Index: gnash/server/stream.cpp
diff -u gnash/server/stream.cpp:1.1 gnash/server/stream.cpp:1.2
--- gnash/server/stream.cpp:1.1 Tue Dec 20 21:01:18 2005
+++ gnash/server/stream.cpp Sat Feb 25 03:54:03 2006
@@ -151,7 +151,7 @@
{
align();
- array<char> buffer;
+ std::vector<char> buffer;
char c;
while ((c = read_u8()) != 0)
{
Index: gnash/server/stream.h
diff -u gnash/server/stream.h:1.1 gnash/server/stream.h:1.2
--- gnash/server/stream.h:1.1 Tue Dec 20 21:01:18 2005
+++ gnash/server/stream.h Sat Feb 25 03:54:03 2006
@@ -57,7 +57,7 @@
Uint8 m_current_byte;
Uint8 m_unused_bits;
- array<int> m_tag_stack; // position of end of tag
+ std::vector<int> m_tag_stack; // position of end of
tag
};
Index: gnash/server/styles.h
diff -u gnash/server/styles.h:1.2 gnash/server/styles.h:1.3
--- gnash/server/styles.h:1.2 Sat Feb 11 01:57:03 2006
+++ gnash/server/styles.h Sat Feb 25 03:54:03 2006
@@ -56,7 +56,7 @@
int m_type;
rgba m_color;
matrix m_gradient_matrix;
- array<gradient_record> m_gradients;
+ std::vector<gradient_record> m_gradients;
smart_ptr<gnash::bitmap_info> m_gradient_bitmap_info;
smart_ptr<bitmap_character_def> m_bitmap_character;
matrix m_bitmap_matrix;
@@ -79,7 +79,7 @@
int m_type;
rgba m_color[2];
matrix m_gradient_matrix[2];
- array<gradient_record> m_gradients[2];
+ std::vector<gradient_record> m_gradients[2];
smart_ptr<bitmap_info> m_gradient_bitmap_info[2];
smart_ptr<bitmap_character_def> m_bitmap_character;
matrix m_bitmap_matrix[2];
Index: gnash/server/tesselate.cpp
diff -u gnash/server/tesselate.cpp:1.4 gnash/server/tesselate.cpp:1.5
--- gnash/server/tesselate.cpp:1.4 Sat Feb 25 03:15:51 2006
+++ gnash/server/tesselate.cpp Sat Feb 25 03:54:03 2006
@@ -138,8 +138,8 @@
// More Renderer state.
- static array<fill_segment> s_current_segments; // @@ should
not dynamically resize this thing!
- static array<point> s_current_path; // @@ should
not dynamically resize this thing!
+ static std::vector<fill_segment> s_current_segments; // @@
should not dynamically resize this thing!
+ static std::vector<point> s_current_path; // @@
should not dynamically resize this thing!
static point s_last_point;
static int s_current_left_style;
static int s_current_right_style;
@@ -342,7 +342,7 @@
}
// Peel off first.
- array<fill_segment> slab; // @@ make this use static
storage
+ std::vector<fill_segment> slab; // @@ make this use
static storage
for (int i = i0; i < i1; i++)
{
fill_segment* f = &s_current_segments[i];
Index: gnash/server/text.cpp
diff -u gnash/server/text.cpp:1.6 gnash/server/text.cpp:1.7
--- gnash/server/text.cpp:1.6 Sat Feb 25 03:15:51 2006
+++ gnash/server/text.cpp Sat Feb 25 03:54:03 2006
@@ -49,11 +49,11 @@
static void display_glyph_records(
const matrix& this_mat,
character* inst,
- const array<text_glyph_record>& records,
+ const std::vector<text_glyph_record>& records,
movie_definition_sub* root_def)
{
- static array<fill_style> s_dummy_style; // used to pass
a color on to shape_character::display()
- static array<line_style> s_dummy_line_style;
+ static std::vector<fill_style> s_dummy_style; // used to pass
a color on to shape_character::display()
+ static std::vector<line_style> s_dummy_line_style;
s_dummy_style.resize(1);
matrix mat = inst->get_world_matrix();
Index: gnash/server/text.h
diff -u gnash/server/text.h:1.2 gnash/server/text.h:1.3
--- gnash/server/text.h:1.2 Tue Jan 31 16:45:38 2006
+++ gnash/server/text.h Sat Feb 25 03:54:03 2006
@@ -71,7 +71,7 @@
float m_glyph_advance;
};
text_style m_style;
- array<glyph_entry> m_glyphs;
+ std::vector<glyph_entry> m_glyphs;
void read(stream* in, int glyph_count,
int glyph_bits, int advance_bits);
@@ -87,7 +87,7 @@
movie_definition_sub* m_root_def;
rect m_rect;
matrix m_matrix;
- array<text_glyph_record> m_text_glyph_records;
+ std::vector<text_glyph_record> m_text_glyph_records;
text_character_def(movie_definition_sub* root_def)
:
@@ -240,12 +240,12 @@
struct edit_text_character : public character
{
edit_text_character_def* m_def;
- array<text_glyph_record> m_text_glyph_records;
+ std::vector<text_glyph_record> m_text_glyph_records;
/// used to pass a color on to shape_character::display()
- array<fill_style> m_dummy_style;
+ std::vector<fill_style> m_dummy_style;
- array<line_style> m_dummy_line_style;
+ std::vector<line_style> m_dummy_line_style;
/// bounds of dynamic text, as laid out
rect m_text_bounding_box;
Index: gnash/server/textformat.cpp
diff -u gnash/server/textformat.cpp:1.5 gnash/server/textformat.cpp:1.6
--- gnash/server/textformat.cpp:1.5 Mon Feb 13 10:44:12 2006
+++ gnash/server/textformat.cpp Sat Feb 25 03:54:03 2006
@@ -123,7 +123,7 @@
//
// TODO we should handle setTextFormat as a method on TextField,
// instead of doing this.
- fn.env->set_variable("setTextFormat", &textformat_setformat,
array<with_stack_entry>());
+ fn.env->set_variable("setTextFormat", &textformat_setformat,
std::vector<with_stack_entry>());
fn.result->set_as_object(text_obj);
}
Index: gnash/server/timers.cpp
diff -u gnash/server/timers.cpp:1.4 gnash/server/timers.cpp:1.5
--- gnash/server/timers.cpp:1.4 Sun Feb 12 02:12:07 2006
+++ gnash/server/timers.cpp Sat Feb 25 03:54:03 2006
@@ -72,7 +72,7 @@
return 0;
}
int
- Timer::setInterval(as_value obj, int ms, array<struct variable *> *locals)
+ Timer::setInterval(as_value obj, int ms, std::vector<struct variable *>
*locals)
{
_function = obj;
_interval = ms * 0.01;
@@ -158,7 +158,7 @@
tu_string local_name;
as_value local_val;
- array<with_stack_entry> dummy_with_stack;
+ std::vector<with_stack_entry> dummy_with_stack;
fn.env->add_frame_barrier();
//method = env->get_variable("loopvar", dummy_with_stack);
@@ -178,7 +178,7 @@
{
local_name = fn.env->m_local_frames[i].m_name;
local_val = fn.env->m_local_frames[i].m_value;
- fn.env->set_variable(local_name, local_val,
array<with_stack_entry>());
+ fn.env->set_variable(local_name, local_val,
std::vector<with_stack_entry>());
}
}
}
Index: gnash/server/timers.h
diff -u gnash/server/timers.h:1.3 gnash/server/timers.h:1.4
--- gnash/server/timers.h:1.3 Wed Jan 25 16:32:45 2006
+++ gnash/server/timers.h Sat Feb 25 03:54:03 2006
@@ -43,7 +43,7 @@
int setInterval(as_value obj, int ms);
int setInterval(as_value obj, int ms, as_object *this_ptr,
as_environment *env);
int setInterval(as_value obj, int ms, as_environment *env);
- int setInterval(as_value obj, int ms, array<variable *> *locals);
+ int setInterval(as_value obj, int ms, std::vector<variable *> *locals);
void setInterval(int ms)
{
_interval = ms * 0.000001;
@@ -59,7 +59,7 @@
const as_value& getASFunction() { return _function; }
as_environment *getASEnvironment() { return _env; }
as_object *getASObject() { return _object; }
- array<struct variable *> *getLocals() { return _locals; }
+ std::vector<struct variable *> *getLocals() { return _locals; }
int getIntervalID() { return _which; }
void add_local(tu_string name, as_value value) {
struct variable *var = new struct variable;
@@ -77,7 +77,7 @@
as_value _function;
as_object *_object;
as_environment *_env;
- array<struct variable *> *_locals;
+ std::vector<struct variable *> *_locals;
};
Index: gnash/server/xml.cpp
diff -u gnash/server/xml.cpp:1.12 gnash/server/xml.cpp:1.13
--- gnash/server/xml.cpp:1.12 Wed Feb 15 23:35:53 2006
+++ gnash/server/xml.cpp Sat Feb 25 03:54:03 2006
@@ -910,7 +910,7 @@
#if 1
if (fn.this_ptr->get_member("onLoad", &method)) {
// log_msg("FIXME: Found onLoad!\n");
- fn.env->set_variable("success", true, array<with_stack_entry>());
+ fn.env->set_variable("success", true, std::vector<with_stack_entry>());
fn.env->bottom(fn.first_arg_bottom_index) = true;
as_c_function_ptr func = method.to_c_function();
if (func)
@@ -1008,7 +1008,7 @@
if (fn.this_ptr->get_member("onData", &method)) {
log_msg("FIXME: Found onData!\n");
as_c_function_ptr func = method.to_c_function();
- fn.env->set_variable("success", true, array<with_stack_entry>());
+ fn.env->set_variable("success", true,
std::vector<with_stack_entry>());
if (func)
{
// It's a C function. Call it.
Index: gnash/server/xmlsocket.cpp
diff -u gnash/server/xmlsocket.cpp:1.7 gnash/server/xmlsocket.cpp:1.8
--- gnash/server/xmlsocket.cpp:1.7 Sat Feb 25 03:15:51 2006
+++ gnash/server/xmlsocket.cpp Sat Feb 25 03:54:03 2006
@@ -516,7 +516,7 @@
as_value val;
static bool first = true; // This event handler should only be executed
once.
bool ret;
- const array<with_stack_entry> with_stack;
+ const std::vector<with_stack_entry> with_stack;
if (!first) {
fn.result->set_bool(true);
@@ -678,7 +678,7 @@
as_value method;
as_value val;
as_value datain;
- array<const char *> msgs;
+ std::vector<const char *> msgs;
char *messages[200];
int i;
as_c_function_ptr func;
Index: gnash/server/xmlsocket.h
diff -u gnash/server/xmlsocket.h:1.5 gnash/server/xmlsocket.h:1.6
--- gnash/server/xmlsocket.h:1.5 Mon Feb 13 10:44:12 2006
+++ gnash/server/xmlsocket.h Sat Feb 25 03:54:03 2006
@@ -82,8 +82,8 @@
bool _closed;
bool _connect;
bool _processing;
- array<tu_string> _messages;
- array<as_object *> _nodes;
+ std::vector<tu_string> _messages;
+ std::vector<as_object *> _nodes;
};
Index: gnash/utilities/processor.cpp
diff -u gnash/utilities/processor.cpp:1.3 gnash/utilities/processor.cpp:1.4
--- gnash/utilities/processor.cpp:1.3 Wed Feb 1 23:58:32 2006
+++ gnash/utilities/processor.cpp Sat Feb 25 03:54:03 2006
@@ -117,7 +117,7 @@
{
assert(tu_types_validate());
- array<const char*> infiles;
+ std::vector<const char*> infiles;
for (int arg = 1; arg < argc; arg++)
{
@@ -171,7 +171,7 @@
gnash::register_log_callback(log_callback);
gnash::set_use_cache_files(false); // don't load old cache files!
- array<movie_data> data;
+ std::vector<movie_data> data;
// Play through all the movies.
for (int i = 0, n = infiles.size(); i < n; i++)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] gnash ./ChangeLog backend/sound_handler_sdl.cpp...,
Jim Garrison <=