renamed old poly_manager to legacy_poly_manager

This commit is contained in:
Oliver Stöneberg 2014-03-19 13:31:50 +00:00
parent bfde3d514b
commit b018751a9a
14 changed files with 39 additions and 40 deletions

View File

@ -123,7 +123,7 @@ union work_unit
/* polygon_info describes a single polygon, which includes the poly_params */
struct polygon_info
{
poly_manager * poly; /* pointer back to the poly manager */
legacy_poly_manager * poly; /* pointer back to the poly manager */
void * dest; /* pointer to the destination we are rendering to */
void * extra; /* extra data pointer */
UINT8 numparams; /* number of parameters for this polygon */
@ -136,7 +136,7 @@ struct polygon_info
/* full poly manager description */
struct poly_manager
struct legacy_poly_manager
{
/* queue management */
osd_work_queue * queue; /* work queue */
@ -194,7 +194,7 @@ struct poly_manager
static void **allocate_array(running_machine &machine, size_t *itemsize, UINT32 itemcount);
static void *poly_item_callback(void *param, int threadid);
static void poly_state_presave(poly_manager *poly);
static void poly_state_presave(legacy_poly_manager *poly);
@ -274,7 +274,7 @@ INLINE void copy_vertex(poly_vertex *outv, const poly_vertex *v, int paramcount)
object, blocking if we run out
-------------------------------------------------*/
INLINE polygon_info *allocate_polygon(poly_manager *poly, int miny, int maxy)
INLINE polygon_info *allocate_polygon(legacy_poly_manager *poly, int miny, int maxy)
{
/* wait for a work item if we have to */
if (poly->polygon_next + 1 > poly->polygon_count)
@ -308,12 +308,12 @@ INLINE polygon_info *allocate_polygon(poly_manager *poly, int miny, int maxy)
manager
-------------------------------------------------*/
poly_manager *poly_alloc(running_machine &machine, int max_polys, size_t extra_data_size, UINT8 flags)
legacy_poly_manager *poly_alloc(running_machine &machine, int max_polys, size_t extra_data_size, UINT8 flags)
{
poly_manager *poly;
legacy_poly_manager *poly;
/* allocate the manager itself */
poly = auto_alloc_clear(machine, poly_manager);
poly = auto_alloc_clear(machine, legacy_poly_manager);
poly->flags = flags;
/* allocate polygons */
@ -348,7 +348,7 @@ poly_manager *poly_alloc(running_machine &machine, int max_polys, size_t extra_d
poly_free - free a polygon manager
-------------------------------------------------*/
void poly_free(poly_manager *poly)
void poly_free(legacy_poly_manager *poly)
{
#if KEEP_STATISTICS
{
@ -387,7 +387,7 @@ void poly_free(poly_manager *poly)
to complete
-------------------------------------------------*/
void poly_wait(poly_manager *poly, const char *debug_reason)
void poly_wait(legacy_poly_manager *poly, const char *debug_reason)
{
osd_ticks_t time;
@ -431,7 +431,7 @@ void poly_wait(poly_manager *poly, const char *debug_reason)
extra data for the next polygon
-------------------------------------------------*/
void *poly_get_extra_data(poly_manager *poly)
void *poly_get_extra_data(legacy_poly_manager *poly)
{
/* wait for a work item if we have to */
if (poly->extra_next + 1 > poly->extra_count)
@ -460,7 +460,7 @@ void *poly_get_extra_data(poly_manager *poly)
triangle given 3 vertexes
-------------------------------------------------*/
UINT32 poly_render_triangle(poly_manager *poly, void *dest, const rectangle &cliprect, poly_draw_scanline_func callback, int paramcount, const poly_vertex *v1, const poly_vertex *v2, const poly_vertex *v3)
UINT32 poly_render_triangle(legacy_poly_manager *poly, void *dest, const rectangle &cliprect, poly_draw_scanline_func callback, int paramcount, const poly_vertex *v1, const poly_vertex *v2, const poly_vertex *v3)
{
float dxdy_v1v2, dxdy_v1v3, dxdy_v2v3;
const poly_vertex *tv;
@ -643,7 +643,7 @@ UINT32 poly_render_triangle(poly_manager *poly, void *dest, const rectangle &cli
triangles in a fan
-------------------------------------------------*/
UINT32 poly_render_triangle_fan(poly_manager *poly, void *dest, const rectangle &cliprect, poly_draw_scanline_func callback, int paramcount, int numverts, const poly_vertex *v)
UINT32 poly_render_triangle_fan(legacy_poly_manager *poly, void *dest, const rectangle &cliprect, poly_draw_scanline_func callback, int paramcount, int numverts, const poly_vertex *v)
{
UINT32 pixels = 0;
int vertnum;
@ -660,7 +660,7 @@ UINT32 poly_render_triangle_fan(poly_manager *poly, void *dest, const rectangle
render of an object, given specific extents
-------------------------------------------------*/
UINT32 poly_render_triangle_custom(poly_manager *poly, void *dest, const rectangle &cliprect, poly_draw_scanline_func callback, int startscanline, int numscanlines, const poly_extent *extents)
UINT32 poly_render_triangle_custom(legacy_poly_manager *poly, void *dest, const rectangle &cliprect, poly_draw_scanline_func callback, int startscanline, int numscanlines, const poly_extent *extents)
{
INT32 curscan, scaninc;
polygon_info *polygon;
@ -756,7 +756,7 @@ UINT32 poly_render_triangle_custom(poly_manager *poly, void *dest, const rectang
given 4 vertexes
-------------------------------------------------*/
UINT32 poly_render_quad(poly_manager *poly, void *dest, const rectangle &cliprect, poly_draw_scanline_func callback, int paramcount, const poly_vertex *v1, const poly_vertex *v2, const poly_vertex *v3, const poly_vertex *v4)
UINT32 poly_render_quad(legacy_poly_manager *poly, void *dest, const rectangle &cliprect, poly_draw_scanline_func callback, int paramcount, const poly_vertex *v1, const poly_vertex *v2, const poly_vertex *v3, const poly_vertex *v4)
{
poly_edge fedgelist[3], bedgelist[3];
const poly_edge *ledge, *redge;
@ -976,7 +976,7 @@ UINT32 poly_render_quad(poly_manager *poly, void *dest, const rectangle &cliprec
quads in a fan
-------------------------------------------------*/
UINT32 poly_render_quad_fan(poly_manager *poly, void *dest, const rectangle &cliprect, poly_draw_scanline_func callback, int paramcount, int numverts, const poly_vertex *v)
UINT32 poly_render_quad_fan(legacy_poly_manager *poly, void *dest, const rectangle &cliprect, poly_draw_scanline_func callback, int paramcount, int numverts, const poly_vertex *v)
{
UINT32 pixels = 0;
int vertnum;
@ -998,7 +998,7 @@ UINT32 poly_render_quad_fan(poly_manager *poly, void *dest, const rectangle &cli
to 32 vertices
-------------------------------------------------*/
UINT32 poly_render_polygon(poly_manager *poly, void *dest, const rectangle &cliprect, poly_draw_scanline_func callback, int paramcount, int numverts, const poly_vertex *v)
UINT32 poly_render_polygon(legacy_poly_manager *poly, void *dest, const rectangle &cliprect, poly_draw_scanline_func callback, int paramcount, int numverts, const poly_vertex *v)
{
poly_edge fedgelist[MAX_POLYGON_VERTS - 1], bedgelist[MAX_POLYGON_VERTS - 1];
const poly_edge *ledge, *redge;
@ -1351,7 +1351,7 @@ static void *poly_item_callback(void *param, int threadid)
ensure everything is synced before saving
-------------------------------------------------*/
static void poly_state_presave(poly_manager *poly)
static void poly_state_presave(legacy_poly_manager *poly)
{
poly_wait(poly, "pre-save");
}

View File

@ -55,7 +55,7 @@
***************************************************************************/
/* opaque reference to the poly manager */
struct poly_manager;
struct legacy_poly_manager;
/* input vertex data */
@ -97,50 +97,50 @@ typedef void (*poly_draw_scanline_func)(void *dest, INT32 scanline, const poly_e
/* ----- initialization/teardown ----- */
/* allocate a new poly manager that can render triangles */
poly_manager *poly_alloc(running_machine &machine, int max_polys, size_t extra_data_size, UINT8 flags);
legacy_poly_manager *poly_alloc(running_machine &machine, int max_polys, size_t extra_data_size, UINT8 flags);
/* free a poly manager */
void poly_free(poly_manager *poly);
void poly_free(legacy_poly_manager *poly);
/* ----- common functions ----- */
/* wait until all polygons in the queue have been rendered */
void poly_wait(poly_manager *poly, const char *debug_reason);
void poly_wait(legacy_poly_manager *poly, const char *debug_reason);
/* get a pointer to the extra data for the next polygon */
void *poly_get_extra_data(poly_manager *poly);
void *poly_get_extra_data(legacy_poly_manager *poly);
/* ----- core triangle rendering ----- */
/* render a single triangle given 3 vertexes */
UINT32 poly_render_triangle(poly_manager *poly, void *dest, const rectangle &cliprect, poly_draw_scanline_func callback, int paramcount, const poly_vertex *v1, const poly_vertex *v2, const poly_vertex *v3);
UINT32 poly_render_triangle(legacy_poly_manager *poly, void *dest, const rectangle &cliprect, poly_draw_scanline_func callback, int paramcount, const poly_vertex *v1, const poly_vertex *v2, const poly_vertex *v3);
/* render a set of triangles in a fan */
UINT32 poly_render_triangle_fan(poly_manager *poly, void *dest, const rectangle &cliprect, poly_draw_scanline_func callback, int paramcount, int numverts, const poly_vertex *v);
UINT32 poly_render_triangle_fan(legacy_poly_manager *poly, void *dest, const rectangle &cliprect, poly_draw_scanline_func callback, int paramcount, int numverts, const poly_vertex *v);
/* perform a custom render of an object, given specific extents */
UINT32 poly_render_triangle_custom(poly_manager *poly, void *dest, const rectangle &cliprect, poly_draw_scanline_func callback, int startscanline, int numscanlines, const poly_extent *extents);
UINT32 poly_render_triangle_custom(legacy_poly_manager *poly, void *dest, const rectangle &cliprect, poly_draw_scanline_func callback, int startscanline, int numscanlines, const poly_extent *extents);
/* ----- core quad rendering ----- */
/* render a single quad given 4 vertexes */
UINT32 poly_render_quad(poly_manager *poly, void *dest, const rectangle &cliprect, poly_draw_scanline_func callback, int paramcount, const poly_vertex *v1, const poly_vertex *v2, const poly_vertex *v3, const poly_vertex *v4);
UINT32 poly_render_quad(legacy_poly_manager *poly, void *dest, const rectangle &cliprect, poly_draw_scanline_func callback, int paramcount, const poly_vertex *v1, const poly_vertex *v2, const poly_vertex *v3, const poly_vertex *v4);
/* render a set of quads in a fan */
UINT32 poly_render_quad_fan(poly_manager *poly, void *dest, const rectangle &cliprect, poly_draw_scanline_func callback, int paramcount, int numverts, const poly_vertex *v);
UINT32 poly_render_quad_fan(legacy_poly_manager *poly, void *dest, const rectangle &cliprect, poly_draw_scanline_func callback, int paramcount, int numverts, const poly_vertex *v);
/* ----- core polygon rendering ----- */
/* render a single polygon up to 32 vertices */
UINT32 poly_render_polygon(poly_manager *poly, void *dest, const rectangle &cliprect, poly_draw_scanline_func callback, int paramcount, int numverts, const poly_vertex *v);
UINT32 poly_render_polygon(legacy_poly_manager *poly, void *dest, const rectangle &cliprect, poly_draw_scanline_func callback, int paramcount, int numverts, const poly_vertex *v);

View File

@ -1715,7 +1715,7 @@ struct voodoo_state
tmu_shared_state tmushare; /* TMU shared state */
banshee_info banshee; /* Banshee state */
poly_manager * poly; /* polygon manager */
legacy_poly_manager * poly; /* polygon manager */
stats_block * thread_stats; /* per-thread statistics */
voodoo_stats stats; /* internal statistics */

View File

@ -40,7 +40,7 @@ public:
required_shared_ptr<UINT16> m_m68k_ram;
UINT16 *m_shared_ram[2];
required_shared_ptr<UINT16> m_screen_ram;
poly_manager *m_poly;
legacy_poly_manager *m_poly;
DECLARE_WRITE16_MEMBER(gpu_w);
DECLARE_READ16_MEMBER(gpu_r);
DECLARE_READ16_MEMBER(m68k_shared_0_r);

View File

@ -1331,7 +1331,7 @@ struct c404_t
struct render_t
{
poly_manager *polymgr;
legacy_poly_manager *polymgr;
int cur;
int poly_count;
int count[2];

View File

@ -55,7 +55,7 @@ public:
struct tempsprite *m_sprite_ptr_pre;
bitmap_ind16 m_tmpbitmaps;
bitmap_ind16 m_polybitmap;
poly_manager *m_poly;
legacy_poly_manager *m_poly;
int m_rsxb;
int m_rsyb;
int m_rsxoffs;

View File

@ -95,7 +95,7 @@ public:
int m_jnet_time_out;
UINT32 m_geo_read_start_address;
UINT32 m_geo_write_start_address;
poly_manager *m_poly;
legacy_poly_manager *m_poly;
raster_state *m_raster;
geo_state *m_geo;
bitmap_rgb32 m_sys24_bitmap;

View File

@ -101,7 +101,7 @@ public:
VECTOR3 m_parallel_light;
float m_parallel_light_intensity;
float m_ambient_light_intensity;
poly_manager *m_poly;
legacy_poly_manager *m_poly;
int m_list_depth;
int m_tick;
int m_debug_layer_disable;

View File

@ -12,7 +12,6 @@
#include "includes/gaelco3d.h"
#include "cpu/tms32031/tms32031.h"
#include "video/rgbutil.h"
#include "video/poly.h"
#define MAX_POLYGONS 4096

View File

@ -213,7 +213,7 @@ static int *tex_mirror_table[2][8];
static int K001005_bitmap_page = 0;
static poly_manager *poly;
static legacy_poly_manager *poly;
static poly_vertex prev_v[4];
static UINT32 fog_r, fog_g, fog_b;

View File

@ -77,7 +77,7 @@ private:
int m_bitmap_page;
poly_manager *m_poly;
legacy_poly_manager *m_poly;
poly_vertex m_prev_v[4];
int m_prev_poly_type;

View File

@ -57,7 +57,7 @@ struct poly_extra_data
*
*************************************/
static poly_manager *poly;
static legacy_poly_manager *poly;
static UINT8 log_fifo;
static UINT32 zeus_fifo[20];

View File

@ -57,7 +57,7 @@ struct poly_extra_data
*
*************************************/
static poly_manager *poly;
static legacy_poly_manager *poly;
static UINT8 log_fifo;
static UINT32 zeus_fifo[20];

View File

@ -924,7 +924,7 @@ static const poly_draw_scanline_func render_funcs[8] =
static void model2_3d_render( model2_state *state, bitmap_rgb32 &bitmap, triangle *tri, const rectangle &cliprect )
{
poly_manager *poly = state->m_poly;
legacy_poly_manager *poly = state->m_poly;
poly_extra_data *extra = (poly_extra_data *)poly_get_extra_data(poly);
UINT8 renderer;