Path: blob/master/libmupen64plus/mupen64plus-video-glide64/src/Debugger.h
2 views
/*1* Glide64 - Glide video plugin for Nintendo 64 emulators.2* Copyright (c) 2002 Dave20013*4* This program is free software; you can redistribute it and/or modify5* it under the terms of the GNU General Public License as published by6* the Free Software Foundation; either version 2 of the License, or7* any later version.8*9* This program is distributed in the hope that it will be useful,10* but WITHOUT ANY WARRANTY; without even the implied warranty of11* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the12* GNU General Public License for more details.13*14* You should have received a copy of the GNU General Public15* Licence along with this program; if not, write to the Free16* Software Foundation, Inc., 51 Franklin Street, Fifth Floor,17* Boston, MA 02110-1301, USA18*/1920//****************************************************************21//22// Glide64 - Glide Plugin for Nintendo 64 emulators (tested mostly with Project64)23// Project started on December 29th, 200124//25// To modify Glide64: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.28//29// Official Glide64 development channel: #Glide64 on EFnet30//31// Original author: Dave2001 ([email protected])32// Other authors: Gonetz, Gugaman33//34//****************************************************************3536#define SELECTED_NONE 0x0000000037#define SELECTED_TRI 0x0000000138#define SELECTED_TEX 0x000000023940typedef struct TEX_INFO_t41{42DWORD cur_cache[2]; // Current cache #43BYTE format;44BYTE size;45DWORD width, height;46WORD line, wid;47BYTE palette;48BYTE clamp_s, clamp_t;49BYTE mirror_s, mirror_t;50BYTE mask_s, mask_t;51BYTE shift_s, shift_t;52WORD ul_s, ul_t, lr_s, lr_t;53WORD t_ul_s, t_ul_t, t_lr_s, t_lr_t;54float scale_s, scale_t;55int tmu;56} TEX_INFO;5758typedef struct TRI_INFO_t59{60DWORD nv; // Number of vertices61VERTEX *v; // Vertices (2d screen coords) of the triangle, used to outline62DWORD cycle1, cycle2, cycle_mode; // Combine mode at the time of rendering63BYTE uncombined; // which is uncombined: 0x01=color 0x02=alpha 0x03=both64DWORD geom_mode; // geometry mode flags65DWORD othermode_h; // setothermode_h flags66DWORD othermode_l; // setothermode_l flags67DWORD tri_n; // Triangle number68DWORD flags;6970int type; // 0-normal, 1-texrect, 2-fillrect7172// texture info73TEX_INFO t[2];7475// colors76DWORD fog_color;77DWORD fill_color;78DWORD prim_color;79DWORD blend_color;80DWORD env_color;81DWORD prim_lodmin, prim_lodfrac;8283TRI_INFO_t *pNext;84} TRI_INFO;8586typedef struct87{88BOOL capture; // Capture moment for debugging?8990DWORD selected; // Selected object (see flags above)91TRI_INFO *tri_sel;9293DWORD tex_scroll; // texture scrolling94DWORD tex_sel;9596// CAPTURE INFORMATION97BYTE *screen; // Screen capture98TRI_INFO *tri_list; // Triangle information list99TRI_INFO *tri_last; // Last in the list (first in)100101DWORD tmu; // tmu #102103DWORD draw_mode;104105// Page number106int page;107108} DEBUGGER;109110#define PAGE_GENERAL 0111#define PAGE_TEX1 1112#define PAGE_TEX2 2113#define PAGE_COLORS 3114#define PAGE_FBL 4115#define PAGE_OTHERMODE_L 5116#define PAGE_OTHERMODE_H 6117#define PAGE_TEXELS 7118#define PAGE_COORDS 8119#define PAGE_TEX_INFO 9120121#define TRI_TRIANGLE 0122#define TRI_TEXRECT 1123#define TRI_FILLRECT 2124#define TRI_BACKGROUND 3125#ifdef _WIN32126static char *tri_type[4] = { "TRIANGLE", "TEXRECT", "FILLRECT", "BACKGROUND" };127#endif // _WIN32128extern DEBUGGER debug;129130void debug_init ();131void debug_capture ();132void debug_cacheviewer ();133void debug_mouse ();134void debug_keys ();135void output (float x, float y, BOOL scale, const char *fmt, ...);136137138139