summaryrefslogtreecommitdiff
path: root/plugins/gxvideo/soft.h
blob: 113ab22ee3f5f6394c22e4034ebe504c0331d0f9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
/***************************************************************************
 soft.h  -  description
 -------------------
 begin                : Sun Oct 28 2001
 copyright            : (C) 2001 by Pete Bernert
 email                : BlackDove@addcom.de
 ***************************************************************************/
/***************************************************************************
 *                                                                         *
 *   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; either version 2 of the License, or     *
 *   (at your option) any later version. See also the license.txt file for *
 *   additional informations.                                              *
 *                                                                         *
 ***************************************************************************/

#ifndef _GPU_SOFT_H_
#define _GPU_SOFT_H_

#include <stdint.h>

typedef struct {
	short g_m1;
	short g_m2;
	short g_m3;
	short DrawSemiTrans;
	short Ymin;
	short Ymax;

	short ly0, lx0, ly1, lx1, ly2, lx2, ly3, lx3; // global psx vertex coords
	int32_t GlobalTextAddrX, GlobalTextAddrY, GlobalTextTP;
	int32_t GlobalTextREST, GlobalTextABR, GlobalTextPAGE;
} gxv_soft_t;

void offsetPSXLine(void);
void offsetPSX2(void);
void offsetPSX3(void);
void offsetPSX4(void);

void FillSoftwareAreaTrans(short x0, short y0, short x1, short y1,
		unsigned short col);
void FillSoftwareArea(short x0, short y0, short x1, short y1,
		unsigned short col);
void drawPoly3G(int32_t rgb1, int32_t rgb2, int32_t rgb3);
void drawPoly4G(int32_t rgb1, int32_t rgb2, int32_t rgb3, int32_t rgb4);
void drawPoly3F(int32_t rgb);
void drawPoly4F(int32_t rgb);
void drawPoly4FT(unsigned char * baseAddr);
void drawPoly4GT(unsigned char * baseAddr);
void drawPoly3FT(unsigned char * baseAddr);
void drawPoly3GT(unsigned char * baseAddr);
void DrawSoftwareSprite(unsigned char * baseAddr, short w, short h, int32_t tx,
		int32_t ty);
void DrawSoftwareSpriteTWin(unsigned char * baseAddr, int32_t w, int32_t h);
void DrawSoftwareSpriteMirror(unsigned char * baseAddr, int32_t w, int32_t h);
void DrawSoftwareLineShade(int32_t rgb0, int32_t rgb1);
void DrawSoftwareLineFlat(int32_t rgb);

#endif // _GPU_SOFT_H_