summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/includes/hng64.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/includes/hng64.h')
-rw-r--r--src/mame/includes/hng64.h81
1 files changed, 78 insertions, 3 deletions
diff --git a/src/mame/includes/hng64.h b/src/mame/includes/hng64.h
index d4d143ad64d..2460644db4e 100644
--- a/src/mame/includes/hng64.h
+++ b/src/mame/includes/hng64.h
@@ -10,8 +10,43 @@ enum
BURIKI_MCU
};
+enum hng64trans_t
+{
+ HNG64_TILEMAP_NORMAL = 1,
+ HNG64_TILEMAP_ADDITIVE,
+ HNG64_TILEMAP_ALPHA
+};
+
+
+struct blit_parameters
+{
+ bitmap_rgb32 * bitmap;
+ rectangle cliprect;
+ UINT32 tilemap_priority_code;
+ UINT8 mask;
+ UINT8 value;
+ UINT8 alpha;
+ hng64trans_t drawformat;
+};
+
+///////////////////////
+// polygon rendering //
+///////////////////////
+
+struct polygonRasterOptions
+{
+ UINT8 texType;
+ UINT8 texIndex;
+ UINT8 texPageSmall;
+ UINT8 texPageHorizOffset;
+ UINT8 texPageVertOffset;
+ int palOffset;
+ int palPageSize;
+ int debugColor;
+};
+
class hng64_state : public driver_device
{
public:
@@ -40,8 +75,9 @@ public:
m_screen(*this, "screen"),
m_palette(*this, "palette"),
m_generic_paletteram_32(*this, "paletteram")
- { }
+ { }
+
required_device<mips3_device> m_maincpu;
required_device<cpu_device> m_audiocpu;
required_device<cpu_device> m_comm;
@@ -70,6 +106,7 @@ public:
required_device<palette_device> m_palette;
required_shared_ptr<UINT32> m_generic_paletteram_32;
+
int m_mcu_type;
UINT16 *m_soundram;
@@ -217,7 +254,45 @@ public:
DECLARE_CUSTOM_INPUT_MEMBER(brake_down_r);
void clear3d();
TIMER_CALLBACK_MEMBER(hng64_3dfifo_processed);
+
+ void FillSmoothTexPCHorizontalLine(
+ const polygonRasterOptions& prOptions,
+ int x_start, int x_end, int y, float z_start, float z_delta,
+ float w_start, float w_delta, float r_start, float r_delta,
+ float g_start, float g_delta, float b_start, float b_delta,
+ float s_start, float s_delta, float t_start, float t_delta);
+
+ void hng64_command3d(const UINT16* packet);
+ void draw_sprites(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
+ void transition_control( bitmap_rgb32 &bitmap, const rectangle &cliprect);
+ void hng64_tilemap_draw_roz_core(screen_device &screen, tilemap_t *tmap, const blit_parameters *blit,
+ UINT32 startx, UINT32 starty, int incxx, int incxy, int incyx, int incyy, int wraparound);
+ void hng64_drawtilemap(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect, int tm);
+ void setCameraTransformation(const UINT16* packet);
+ void setLighting(const UINT16* packet);
+ void set3dFlags(const UINT16* packet);
+ void setCameraProjectionMatrix(const UINT16* packet);
+ void recoverPolygonBlock(const UINT16* packet, struct polygon* polys, int* numPolys);
+ void hng64_mark_all_tiles_dirty(int tilemap);
+ void hng64_mark_tile_dirty(int tilemap, int tile_index);
+
+ void hng64_tilemap_draw_roz(screen_device &screen, bitmap_rgb32 &dest, const rectangle &cliprect, tilemap_t *tmap,
+ UINT32 startx, UINT32 starty, int incxx, int incxy, int incyx, int incyy,
+ int wraparound, UINT32 flags, UINT8 priority, hng64trans_t drawformat);
+
+ void hng64_tilemap_draw_roz_primask(screen_device &screen, bitmap_rgb32 &dest, const rectangle &cliprect, tilemap_t *tmap,
+ UINT32 startx, UINT32 starty, int incxx, int incxy, int incyx, int incyy,
+ int wraparound, UINT32 flags, UINT8 priority, UINT8 priority_mask, hng64trans_t drawformat);
+
+ void RasterizeTriangle_SMOOTH_TEX_PC(
+ float A[4], float B[4], float C[4],
+ float Ca[3], float Cb[3], float Cc[3], // PER-VERTEX RGB COLORS
+ float Ta[2], float Tb[2], float Tc[2], // PER-VERTEX (S,T) TEX-COORDS
+ const polygonRasterOptions& prOptions);
+
+ void drawShaded( struct polygon *p);
+
+ void hng64_patch_bios_region(int region);
+
};
-/*----------- defined in video/hng64.c -----------*/
-void hng64_command3d(running_machine& machine, const UINT16* packet);