2 * Glide64 - Glide video plugin for Nintendo 64 emulators.
3 * Copyright (c) 2002 Dave2001
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 //****************************************************************
22 // Glide64 - Glide Plugin for Nintendo 64 emulators (tested mostly with Project64)
23 // Project started on December 29th, 2001
26 // * Write your name and (optional)email, commented by your work, so I know who did it, and so that you can find which parts you modified when it comes time to send it to me.
27 // * Do NOT send me the whole project or file that you modified. Take out your modified code sections, and tell me where to put them. If people sent the whole thing, I would have many different versions, but no idea how to combine them all.
29 // Official Glide64 development channel: #Glide64 on EFnet
31 // Original author: Dave2001 (Dave2999@hotmail.com)
32 // Other authors: Gonetz, Gugaman
34 //****************************************************************
36 #define SELECTED_NONE 0x00000000
37 #define SELECTED_TRI 0x00000001
38 #define SELECTED_TEX 0x00000002
40 typedef struct TEX_INFO_t
42 DWORD cur_cache
[2]; // Current cache #
48 BYTE clamp_s
, clamp_t
;
49 BYTE mirror_s
, mirror_t
;
51 BYTE shift_s
, shift_t
;
52 WORD ul_s
, ul_t
, lr_s
, lr_t
;
53 WORD t_ul_s
, t_ul_t
, t_lr_s
, t_lr_t
;
54 float scale_s
, scale_t
;
58 typedef struct TRI_INFO_t
60 DWORD nv
; // Number of vertices
61 VERTEX
*v
; // Vertices (2d screen coords) of the triangle, used to outline
62 DWORD cycle1
, cycle2
, cycle_mode
; // Combine mode at the time of rendering
63 BYTE uncombined
; // which is uncombined: 0x01=color 0x02=alpha 0x03=both
64 DWORD geom_mode
; // geometry mode flags
65 DWORD othermode_h
; // setothermode_h flags
66 DWORD othermode_l
; // setothermode_l flags
67 DWORD tri_n
; // Triangle number
70 int type
; // 0-normal, 1-texrect, 2-fillrect
81 DWORD prim_lodmin
, prim_lodfrac
;
88 BOOL capture
; // Capture moment for debugging?
90 DWORD selected
; // Selected object (see flags above)
93 DWORD tex_scroll
; // texture scrolling
96 // CAPTURE INFORMATION
97 BYTE
*screen
; // Screen capture
98 TRI_INFO
*tri_list
; // Triangle information list
99 TRI_INFO
*tri_last
; // Last in the list (first in)
110 #define PAGE_GENERAL 0
113 #define PAGE_COLORS 3
115 #define PAGE_OTHERMODE_L 5
116 #define PAGE_OTHERMODE_H 6
117 #define PAGE_TEXELS 7
118 #define PAGE_COORDS 8
119 #define PAGE_TEX_INFO 9
121 #define TRI_TRIANGLE 0
122 #define TRI_TEXRECT 1
123 #define TRI_FILLRECT 2
124 #define TRI_BACKGROUND 3
126 static char *tri_type
[4] = { "TRIANGLE", "TEXRECT", "FILLRECT", "BACKGROUND" };
128 extern DEBUGGER debug
;
131 void debug_capture ();
132 void debug_cacheviewer ();
135 void output (float x
, float y
, BOOL scale
, const char *fmt
, ...);