mirror of
https://github.com/holub/mame
synced 2025-06-06 04:43:45 +03:00
renamed poly.{c|h} to polylgcy.{c|h} and polynew.h to poly.h
This commit is contained in:
parent
b018751a9a
commit
cae402dd2e
4
.gitattributes
vendored
4
.gitattributes
vendored
@ -3107,9 +3107,9 @@ src/emu/video/pc_cga.c svneol=native#text/plain
|
||||
src/emu/video/pc_cga.h svneol=native#text/plain
|
||||
src/emu/video/pc_vga.c svneol=native#text/plain
|
||||
src/emu/video/pc_vga.h svneol=native#text/plain
|
||||
src/emu/video/poly.c svneol=native#text/plain
|
||||
src/emu/video/poly.h svneol=native#text/plain
|
||||
src/emu/video/polynew.h svneol=native#text/plain
|
||||
src/emu/video/polylgcy.c svneol=native#text/plain
|
||||
src/emu/video/polylgcy.h svneol=native#text/plain
|
||||
src/emu/video/psx.c svneol=native#text/plain
|
||||
src/emu/video/psx.h svneol=native#text/plain
|
||||
src/emu/video/ramdac.c svneol=native#text/plain
|
||||
|
1144
src/emu/video/poly.h
1144
src/emu/video/poly.h
File diff suppressed because it is too large
Load Diff
@ -1,13 +1,13 @@
|
||||
/***************************************************************************
|
||||
|
||||
poly.c
|
||||
polylgcy.c
|
||||
|
||||
Helper routines for polygon rendering.
|
||||
Legacy helper routines for polygon rendering.
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
#include "emu.h"
|
||||
#include "poly.h"
|
||||
#include "polylgcy.h"
|
||||
|
||||
|
||||
/***************************************************************************
|
153
src/emu/video/polylgcy.h
Normal file
153
src/emu/video/polylgcy.h
Normal file
@ -0,0 +1,153 @@
|
||||
/***************************************************************************
|
||||
|
||||
polylgcy.h
|
||||
|
||||
Legacy polygon helper routines.
|
||||
|
||||
****************************************************************************
|
||||
|
||||
Pixel model:
|
||||
|
||||
(0.0,0.0) (1.0,0.0) (2.0,0.0) (3.0,0.0)
|
||||
+---------------+---------------+---------------+
|
||||
| | | |
|
||||
| | | |
|
||||
| (0.5,0.5) | (1.5,0.5) | (2.5,0.5) |
|
||||
| * | * | * |
|
||||
| | | |
|
||||
| | | |
|
||||
(0.0,1.0) (1.0,1.0) (2.0,1.0) (3.0,1.0)
|
||||
+---------------+---------------+---------------+
|
||||
| | | |
|
||||
| | | |
|
||||
| (0.5,1.5) | (1.5,1.5) | (2.5,1.5) |
|
||||
| * | * | * |
|
||||
| | | |
|
||||
| | | |
|
||||
| | | |
|
||||
+---------------+---------------+---------------+
|
||||
(0.0,2.0) (1.0,2.0) (2.0,2.0) (3.0,2.0)
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef __POLYNEW_H__
|
||||
#define __POLYNEW_H__
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
CONSTANTS
|
||||
***************************************************************************/
|
||||
|
||||
#define MAX_VERTEX_PARAMS 6
|
||||
#define MAX_POLYGON_VERTS 32
|
||||
|
||||
#define POLYFLAG_INCLUDE_BOTTOM_EDGE 0x01
|
||||
#define POLYFLAG_INCLUDE_RIGHT_EDGE 0x02
|
||||
#define POLYFLAG_NO_WORK_QUEUE 0x04
|
||||
#define POLYFLAG_ALLOW_QUADS 0x08
|
||||
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
TYPE DEFINITIONS
|
||||
***************************************************************************/
|
||||
|
||||
/* opaque reference to the poly manager */
|
||||
struct legacy_poly_manager;
|
||||
|
||||
|
||||
/* input vertex data */
|
||||
struct poly_vertex
|
||||
{
|
||||
float x; /* X coordinate */
|
||||
float y; /* Y coordinate */
|
||||
float p[MAX_VERTEX_PARAMS]; /* interpolated parameter values */
|
||||
};
|
||||
|
||||
|
||||
/* poly_param_extent describes information for a single parameter in an extent */
|
||||
struct poly_param_extent
|
||||
{
|
||||
float start; /* parameter value at starting X,Y */
|
||||
float dpdx; /* dp/dx relative to starting X */
|
||||
};
|
||||
|
||||
|
||||
/* poly_extent describes start/end points for a scanline, along with per-scanline parameters */
|
||||
struct poly_extent
|
||||
{
|
||||
INT16 startx; /* starting X coordinate (inclusive) */
|
||||
INT16 stopx; /* ending X coordinate (exclusive) */
|
||||
poly_param_extent param[MAX_VERTEX_PARAMS]; /* starting and dx values for each parameter */
|
||||
};
|
||||
|
||||
|
||||
/* callback routine to process a batch of scanlines in a triangle */
|
||||
typedef void (*poly_draw_scanline_func)(void *dest, INT32 scanline, const poly_extent *extent, const void *extradata, int threadid);
|
||||
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
TYPE DEFINITIONS
|
||||
***************************************************************************/
|
||||
|
||||
|
||||
/* ----- initialization/teardown ----- */
|
||||
|
||||
/* allocate a new poly manager that can render triangles */
|
||||
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(legacy_poly_manager *poly);
|
||||
|
||||
|
||||
|
||||
/* ----- common functions ----- */
|
||||
|
||||
/* wait until all polygons in the queue have been rendered */
|
||||
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(legacy_poly_manager *poly);
|
||||
|
||||
|
||||
|
||||
/* ----- core triangle rendering ----- */
|
||||
|
||||
/* render a single triangle given 3 vertexes */
|
||||
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(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(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(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(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(legacy_poly_manager *poly, void *dest, const rectangle &cliprect, poly_draw_scanline_func callback, int paramcount, int numverts, const poly_vertex *v);
|
||||
|
||||
|
||||
|
||||
/* ----- clipping ----- */
|
||||
|
||||
/* zclip (assumes p[0] == z) a polygon */
|
||||
int poly_zclip_if_less(int numverts, const poly_vertex *v, poly_vertex *outv, int paramcount, float clipval);
|
||||
|
||||
|
||||
#endif /* __POLY_H__ */
|
File diff suppressed because it is too large
Load Diff
@ -384,11 +384,11 @@ endif
|
||||
|
||||
#-------------------------------------------------
|
||||
#
|
||||
#@src/emu/video/poly.h,VIDEOS += POLY
|
||||
#@src/emu/video/polylgcy.h,VIDEOS += POLY
|
||||
#-------------------------------------------------
|
||||
|
||||
ifneq ($(filter POLY,$(VIDEOS)),)
|
||||
VIDEOOBJS+= $(VIDEOOBJ)/poly.o
|
||||
VIDEOOBJS+= $(VIDEOOBJ)/polylgcy.o
|
||||
endif
|
||||
|
||||
#-------------------------------------------------
|
||||
|
@ -145,7 +145,7 @@ bits(7:4) and bit(24)), X, and Y:
|
||||
#define EXPAND_RASTERIZERS
|
||||
|
||||
#include "emu.h"
|
||||
#include "video/poly.h"
|
||||
#include "video/polylgcy.h"
|
||||
#include "video/rgbutil.h"
|
||||
#include "voodoo.h"
|
||||
#include "vooddefs.h"
|
||||
|
@ -17,7 +17,7 @@
|
||||
#include "emu.h"
|
||||
#include "cpu/m68000/m68000.h"
|
||||
#include "cpu/tms32010/tms32010.h"
|
||||
#include "video/poly.h"
|
||||
#include "video/polylgcy.h"
|
||||
|
||||
|
||||
class atarisy4_state : public driver_device
|
||||
|
@ -365,7 +365,7 @@ Thanks to Alex, Mr Mudkips, and Philip Burke for this info.
|
||||
#include "machine/idectrl.h"
|
||||
#include "machine/idehd.h"
|
||||
#include "machine/naomigd.h"
|
||||
#include "video/polynew.h"
|
||||
#include "video/poly.h"
|
||||
#include "bitmap.h"
|
||||
#include "debug/debugcon.h"
|
||||
#include "debug/debugcmd.h"
|
||||
|
@ -320,7 +320,7 @@
|
||||
#include "machine/jvsdev.h"
|
||||
#include "machine/timekpr.h"
|
||||
#include "video/k001604.h"
|
||||
#include "video/polynew.h"
|
||||
#include "video/poly.h"
|
||||
#include "video/rgbgen.h"
|
||||
#include "sound/rf5c400.h"
|
||||
#include "sound/dmadac.h"
|
||||
|
@ -1225,7 +1225,7 @@ Notes:
|
||||
|
||||
#include "emu.h"
|
||||
#include <float.h>
|
||||
#include "video/poly.h"
|
||||
#include "video/polylgcy.h"
|
||||
#include "cpu/mips/mips3.h"
|
||||
#include "cpu/h83002/h8.h"
|
||||
#include "cpu/sh2/sh2.h"
|
||||
|
@ -177,7 +177,7 @@ Notes:
|
||||
#include "machine/ataintf.h"
|
||||
#include "machine/idehd.h"
|
||||
#include "machine/nvram.h"
|
||||
#include "video/polynew.h"
|
||||
#include "video/poly.h"
|
||||
|
||||
/*
|
||||
Interesting mem areas
|
||||
|
@ -9,7 +9,7 @@
|
||||
**************************************************************************/
|
||||
|
||||
#include "sound/dmadac.h"
|
||||
#include "video/polynew.h"
|
||||
#include "video/poly.h"
|
||||
#include "machine/eepromser.h"
|
||||
#include "machine/gaelco3d.h"
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
#include "machine/eepromser.h"
|
||||
#include "video/poly.h"
|
||||
#include "video/polylgcy.h"
|
||||
#include "video/tc0100scn.h"
|
||||
#include "video/tc0480scp.h"
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
**************************************************************************/
|
||||
|
||||
#include "video/polynew.h"
|
||||
#include "video/poly.h"
|
||||
|
||||
#define MIDVUNIT_VIDEO_CLOCK 33000000
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
#include "video/poly.h"
|
||||
#include "video/polylgcy.h"
|
||||
#include "audio/dsbz80.h"
|
||||
#include "audio/segam1audio.h"
|
||||
#include "machine/eepromser.h"
|
||||
|
@ -1,4 +1,4 @@
|
||||
#include "video/poly.h"
|
||||
#include "video/polylgcy.h"
|
||||
#include "machine/scsibus.h"
|
||||
#include "machine/53c810.h"
|
||||
#include "audio/dsbz80.h"
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
#include "machine/eeprompar.h"
|
||||
#include "video/rgbutil.h"
|
||||
#include "video/polynew.h"
|
||||
#include "video/poly.h"
|
||||
|
||||
enum
|
||||
{
|
||||
|
@ -1,4 +1,4 @@
|
||||
#include "video/polynew.h"
|
||||
#include "video/poly.h"
|
||||
#include "machine/taitoio.h"
|
||||
|
||||
#define TAITOJC_POLYGON_FIFO_SIZE 0x20000
|
||||
|
@ -1,5 +1,5 @@
|
||||
#include "emu.h"
|
||||
#include "video/poly.h"
|
||||
#include "video/polylgcy.h"
|
||||
#include "includes/galastrm.h"
|
||||
|
||||
#define X_OFFSET 96
|
||||
|
@ -3,7 +3,7 @@
|
||||
#include "cpu/sharc/sharc.h"
|
||||
#include "machine/konppc.h"
|
||||
#include "video/voodoo.h"
|
||||
#include "video/poly.h"
|
||||
#include "video/polylgcy.h"
|
||||
#include "video/k001604.h"
|
||||
#include "video/gticlub.h"
|
||||
|
||||
|
@ -409,7 +409,7 @@ WRITE32_MEMBER( k001005_device::write )
|
||||
|
||||
}
|
||||
|
||||
/* emu/video/poly.c cannot handle atm callbacks passing a device parameter */
|
||||
/* legacy_poly_manager cannot handle atm callbacks passing a device parameter */
|
||||
|
||||
#if POLY_DEVICE
|
||||
void k001005_device::draw_scanline( void *dest, INT32 scanline, const poly_extent *extent, const void *extradata, int threadid )
|
||||
|
@ -2,7 +2,7 @@
|
||||
#ifndef __K001005_H__
|
||||
#define __K001005_H__
|
||||
|
||||
#include "video/poly.h"
|
||||
#include "video/polylgcy.h"
|
||||
#include "cpu/sharc/sharc.h"
|
||||
|
||||
#define POLY_DEVICE 0
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
#include "emu.h"
|
||||
#include "includes/midzeus.h"
|
||||
#include "video/poly.h"
|
||||
#include "video/polylgcy.h"
|
||||
#include "video/rgbutil.h"
|
||||
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
#include "emu.h"
|
||||
#include "cpu/tms32031/tms32031.h"
|
||||
#include "includes/midzeus.h"
|
||||
#include "video/poly.h"
|
||||
#include "video/polylgcy.h"
|
||||
#include "video/rgbutil.h"
|
||||
|
||||
|
||||
|
@ -87,7 +87,7 @@
|
||||
*********************************************************************************************************************************/
|
||||
#include "emu.h"
|
||||
#include "video/segaic24.h"
|
||||
#include "video/poly.h"
|
||||
#include "video/polylgcy.h"
|
||||
#include "includes/model2.h"
|
||||
|
||||
#define MODEL2_VIDEO_DEBUG 0
|
||||
|
@ -1,5 +1,5 @@
|
||||
#include "emu.h"
|
||||
#include "video/poly.h"
|
||||
#include "video/polylgcy.h"
|
||||
#include "video/rgbutil.h"
|
||||
#include "includes/model3.h"
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
#include "emu.h"
|
||||
#include "includes/n64.h"
|
||||
#include "video/polynew.h"
|
||||
#include "video/poly.h"
|
||||
#include "video/rdpblend.h"
|
||||
#include "video/rdptpipe.h"
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
*
|
||||
* - emulate slave dsp!
|
||||
* - texture u/v mapping is often 1 pixel off, resulting in many glitch lines/gaps between textures. The glitch may be in MAME core:
|
||||
* it used to be much worse with the old poly.h
|
||||
* it used to be much worse with the legacy_poly_manager
|
||||
* - tokyowar tanks are not shootable, same for timecris helicopter, there's still a very small hitbox but almost impossible to hit.
|
||||
* airco22b may have a similar problem. (is this related to dsp? or cpu?)
|
||||
* - find out how/where vics num_sprites is determined exactly, currently a workaround is needed for airco22b and dirtdash
|
||||
|
@ -7,7 +7,7 @@
|
||||
*************************************************************************/
|
||||
|
||||
#include "emu.h"
|
||||
#include "video/polynew.h"
|
||||
#include "video/poly.h"
|
||||
#include "includes/taitojc.h"
|
||||
|
||||
static const gfx_layout taitojc_char_layout =
|
||||
|
Loading…
Reference in New Issue
Block a user