2010-06-09 01:37:08 +00:00
|
|
|
// Copyright (C) 2003-2009 Dolphin Project.
|
|
|
|
|
|
|
|
// This program is free software: you can redistribute it and/or modify
|
|
|
|
// it under the terms of the GNU General Public License as published by
|
|
|
|
// the Free Software Foundation, version 2.0.
|
|
|
|
|
|
|
|
// This program is distributed in the hope that it will be useful,
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
// GNU General Public License 2.0 for more details.
|
|
|
|
|
|
|
|
// A copy of the GPL 2.0 should have been included with the program.
|
|
|
|
// If not, see http://www.gnu.org/licenses/
|
|
|
|
|
|
|
|
// Official SVN repository and contact information can be found at
|
|
|
|
// http://code.google.com/p/dolphin-emu/
|
|
|
|
|
|
|
|
#ifndef _EFB_INTERFACE_H_
|
|
|
|
#define _EFB_INTERFACE_H_
|
|
|
|
|
|
|
|
#include "VideoCommon.h"
|
|
|
|
|
|
|
|
namespace EfbInterface
|
|
|
|
{
|
|
|
|
const int DEPTH_BUFFER_START = EFB_WIDTH * EFB_HEIGHT * 3;
|
|
|
|
|
2010-12-31 06:45:18 +00:00
|
|
|
enum { ALP_C, BLU_C, GRN_C, RED_C };
|
|
|
|
|
|
|
|
// color order is ABGR in order to emulate RGBA on little-endian hardware
|
2010-06-09 01:37:08 +00:00
|
|
|
|
|
|
|
// does full blending of an incoming pixel
|
|
|
|
void BlendTev(u16 x, u16 y, u8 *color);
|
|
|
|
|
|
|
|
// compare z at location x,y
|
|
|
|
// writes it if it passes
|
|
|
|
// returns result of compare.
|
|
|
|
bool ZCompare(u16 x, u16 y, u32 z);
|
|
|
|
|
|
|
|
// sets the color and alpha
|
|
|
|
void SetColor(u16 x, u16 y, u8 *color);
|
|
|
|
void SetDepth(u16 x, u16 y, u32 depth);
|
|
|
|
|
|
|
|
void GetColor(u16 x, u16 y, u8 *color);
|
|
|
|
u32 GetDepth(u16 x, u16 y);
|
|
|
|
|
|
|
|
u8* GetPixelPointer(u16 x, u16 y, bool depth);
|
|
|
|
|
|
|
|
void UpdateColorTexture();
|
2010-12-31 06:45:18 +00:00
|
|
|
extern u8 efbColorTexture[EFB_WIDTH*EFB_HEIGHT*4]; // RGBA format
|
2013-02-26 01:05:02 +00:00
|
|
|
void DoState(PointerWrap &p);
|
2010-06-09 01:37:08 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|