[Glide64] Cleanup rdp.h

This commit is contained in:
zilmar 2016-01-25 21:25:32 +11:00
parent 5a68a1f721
commit 38205b5ee8
1 changed files with 529 additions and 530 deletions

View File

@ -215,30 +215,31 @@ typedef struct {
int use_hotkeys;
//Frame buffer emulation options
#define fb_emulation (1<<0) //frame buffer emulation
#define fb_hwfbe (1<<1) //hardware frame buffer emualtion
#define fb_motionblur (1<<2) //emulate motion blur
#define fb_ref (1<<3) //read every frame
#define fb_read_alpha (1<<4) //read alpha
#define fb_hwfbe_buf_clear (1<<5) //clear auxiliary texture frame buffers
#define fb_depth_render (1<<6) //enable software depth render
#define fb_optimize_texrect (1<<7) //fast texrect rendering with hwfbe
#define fb_ignore_aux_copy (1<<8) //do not copy auxiliary frame buffers
#define fb_useless_is_useless (1<<10) //
#define fb_get_info (1<<11) //get frame buffer info
#define fb_read_back_to_screen (1<<12) //render N64 frame buffer to screen
#define fb_read_back_to_screen2 (1<<13) //render N64 frame buffer to screen
#define fb_cpu_write_hack (1<<14) //show images writed directly by CPU
#define fb_emulation (1<<0) //frame buffer emulation
#define fb_hwfbe (1<<1) //hardware frame buffer emualtion
#define fb_motionblur (1<<2) //emulate motion blur
#define fb_ref (1<<3) //read every frame
#define fb_read_alpha (1<<4) //read alpha
#define fb_hwfbe_buf_clear (1<<5) //clear auxiliary texture frame buffers
#define fb_depth_render (1<<6) //enable software depth render
#define fb_optimize_texrect (1<<7) //fast texrect rendering with hwfbe
#define fb_ignore_aux_copy (1<<8) //do not copy auxiliary frame buffers
#define fb_useless_is_useless (1<<10) //
#define fb_get_info (1<<11) //get frame buffer info
#define fb_read_back_to_screen (1<<12) //render N64 frame buffer to screen
#define fb_read_back_to_screen2 (1<<13) //render N64 frame buffer to screen
#define fb_cpu_write_hack (1<<14) //show images writed directly by CPU
#define fb_emulation_enabled ((settings.frame_buffer&fb_emulation)>0)
#define fb_hwfbe_enabled ((settings.frame_buffer&(fb_emulation|fb_hwfbe))==(fb_emulation|fb_hwfbe))
#define fb_depth_render_enabled ((settings.frame_buffer&fb_depth_render)>0)
#define fb_emulation_enabled ((settings.frame_buffer&fb_emulation)>0)
#define fb_hwfbe_enabled ((settings.frame_buffer&(fb_emulation|fb_hwfbe))==(fb_emulation|fb_hwfbe))
#define fb_depth_render_enabled ((settings.frame_buffer&fb_depth_render)>0)
uint32_t frame_buffer;
enum FBCRCMODE {
fbcrcNone = 0,
fbcrcFast = 1,
fbcrcSafe = 2} fb_crc_mode;
fbcrcSafe = 2
} fb_crc_mode;
#ifdef TEXTURE_FILTER
//Texture filtering options
@ -303,36 +304,36 @@ typedef struct {
int n64_z_scale; //scale vertex z value before writing to depth buffer, as N64 does.
//Special game hacks
#define hack_ASB (1<<0) //All-Star Baseball games
#define hack_Banjo2 (1<<1) //Banjo Tooie
#define hack_BAR (1<<2) //Beetle Adventure Racing
#define hack_Chopper (1<<3) //Chopper Attack
#define hack_Diddy (1<<4) //diddy kong racing
#define hack_Fifa98 (1<<5) //FIFA - Road to World Cup 98
#define hack_Fzero (1<<6) //F-Zero
#define hack_GoldenEye (1<<7) //Golden Eye
#define hack_Hyperbike (1<<8) //Top Gear Hyper Bike
#define hack_ISS64 (1<<9) //International Superstar Soccer 64
#define hack_KI (1<<10) //Killer Instinct
#define hack_Knockout (1<<11) //Knockout Kings 2000
#define hack_Lego (1<<12) //LEGO Racers
#define hack_MK64 (1<<13) //Mario Kart
#define hack_Megaman (1<<14) //Megaman64
#define hack_Makers (1<<15) //Mischief-makers
#define hack_WCWnitro (1<<16) //WCW Nitro
#define hack_Ogre64 (1<<17) //Ogre Battle 64
#define hack_Pilotwings (1<<18) //Pilotwings
#define hack_PMario (1<<19) //Paper Mario
#define hack_PPL (1<<20) //pokemon puzzle league requires many special fixes
#define hack_RE2 (1<<21) //Resident Evil 2
#define hack_Starcraft (1<<22) //StarCraft64
#define hack_Supercross (1<<23) //Supercross 2000
#define hack_TGR (1<<24) //Top Gear Rally
#define hack_TGR2 (1<<25) //Top Gear Rally 2
#define hack_Tonic (1<<26) //tonic trouble
#define hack_Yoshi (1<<27) //Yoshi Story
#define hack_Zelda (1<<28) //zeldas hacks
#define hack_OoT (1<<29) //zelda OoT hacks
#define hack_ASB (1<<0) //All-Star Baseball games
#define hack_Banjo2 (1<<1) //Banjo Tooie
#define hack_BAR (1<<2) //Beetle Adventure Racing
#define hack_Chopper (1<<3) //Chopper Attack
#define hack_Diddy (1<<4) //diddy kong racing
#define hack_Fifa98 (1<<5) //FIFA - Road to World Cup 98
#define hack_Fzero (1<<6) //F-Zero
#define hack_GoldenEye (1<<7) //Golden Eye
#define hack_Hyperbike (1<<8) //Top Gear Hyper Bike
#define hack_ISS64 (1<<9) //International Superstar Soccer 64
#define hack_KI (1<<10) //Killer Instinct
#define hack_Knockout (1<<11) //Knockout Kings 2000
#define hack_Lego (1<<12) //LEGO Racers
#define hack_MK64 (1<<13) //Mario Kart
#define hack_Megaman (1<<14) //Megaman64
#define hack_Makers (1<<15) //Mischief-makers
#define hack_WCWnitro (1<<16) //WCW Nitro
#define hack_Ogre64 (1<<17) //Ogre Battle 64
#define hack_Pilotwings (1<<18) //Pilotwings
#define hack_PMario (1<<19) //Paper Mario
#define hack_PPL (1<<20) //pokemon puzzle league requires many special fixes
#define hack_RE2 (1<<21) //Resident Evil 2
#define hack_Starcraft (1<<22) //StarCraft64
#define hack_Supercross (1<<23) //Supercross 2000
#define hack_TGR (1<<24) //Top Gear Rally
#define hack_TGR2 (1<<25) //Top Gear Rally 2
#define hack_Tonic (1<<26) //tonic trouble
#define hack_Yoshi (1<<27) //Yoshi Story
#define hack_Zelda (1<<28) //zeldas hacks
#define hack_OoT (1<<29) //zelda OoT hacks
uint32_t hacks;
//wrapper settings
@ -340,7 +341,6 @@ typedef struct {
int wrpVRAM;
int wrpFBO;
int wrpAnisotropic;
} SETTINGS;
typedef struct
@ -690,7 +690,7 @@ struct RDP_Base{
uint8_t uncombined; // which is uncombined: 0x01=color 0x02=alpha 0x03=both
// float YUV_C0, YUV_C1, YUV_C2, YUV_C3, YUV_C4; //YUV textures conversion coefficients
// float YUV_C0, YUV_C1, YUV_C2, YUV_C3, YUV_C4; //YUV textures conversion coefficients
// What needs updating
uint32_t update;
@ -777,9 +777,8 @@ struct RDP : public RDP_Base
void Reset();
};
void SetWireframeCol ();
void ChangeSize ();
void SetWireframeCol();
void ChangeSize();
void GoToFullScreen();
extern RDP rdp;
@ -800,7 +799,7 @@ extern wxString pluginPath;
extern wxString iniPath;
// RDP functions
void rdp_reset ();
void rdp_reset();
extern const char *ACmp[];
extern const char *Mode0[];
@ -860,9 +859,9 @@ extern const char *CIStatus[];
#endif
// Convert from u0/v0/u1/v1 to the real coordinates without regard to tmu
__inline void ConvertCoordsKeep (VERTEX *v, int n)
__inline void ConvertCoordsKeep(VERTEX *v, int n)
{
for (int i=0; i<n; i++)
for (int i = 0; i < n; i++)
{
v[i].uc(0) = v[i].u0;
v[i].vc(0) = v[i].v0;
@ -872,9 +871,9 @@ __inline void ConvertCoordsKeep (VERTEX *v, int n)
}
// Convert from u0/v0/u1/v1 to the real coordinates based on the tmu they are on
__inline void ConvertCoordsConvert (VERTEX *v, int n)
__inline void ConvertCoordsConvert(VERTEX *v, int n)
{
for (int i=0; i<n; i++)
for (int i = 0; i < n; i++)
{
v[i].uc(rdp.t0) = v[i].u0;
v[i].vc(rdp.t0) = v[i].v0;
@ -883,24 +882,24 @@ __inline void ConvertCoordsConvert (VERTEX *v, int n)
}
}
__inline void AllowShadeMods (VERTEX *v, int n)
__inline void AllowShadeMods(VERTEX *v, int n)
{
for (int i=0; i<n; i++)
for (int i = 0; i < n; i++)
{
v[i].shade_mod = 0;
}
}
__inline void AddOffset (VERTEX *v, int n)
__inline void AddOffset(VERTEX *v, int n)
{
for (int i=0; i<n; i++)
for (int i = 0; i < n; i++)
{
v[i].x += rdp.offset_x;
v[i].y += rdp.offset_y;
}
}
__inline void CalculateFog (VERTEX *v)
__inline void CalculateFog(VERTEX *v)
{
if (rdp.flags & FOG_ENABLED)
{
@ -920,7 +919,7 @@ void newSwapBuffers();
extern int SwapOK;
// ** utility functions
void load_palette (uint32_t addr, uint16_t start, uint16_t count);
void load_palette(uint32_t addr, uint16_t start, uint16_t count);
void setTBufTex(uint16_t t_mem, uint32_t cnt);
#endif // ifndef RDP_H