Path: blob/master/libmupen64plus/mupen64plus-video-glide64mk2/src/Glide64/Debugger.h
2 views
/*1* Glide64 - Glide video plugin for Nintendo 64 emulators.2* Copyright (c) 2002 Dave20013* Copyright (c) 2003-2009 Sergey 'Gonetz' Lipski4*5* This program is free software; you can redistribute it and/or modify6* it under the terms of the GNU General Public License as published by7* the Free Software Foundation; either version 2 of the License, or8* any later version.9*10* This program is distributed in the hope that it will be useful,11* but WITHOUT ANY WARRANTY; without even the implied warranty of12* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the13* GNU General Public License for more details.14*15* You should have received a copy of the GNU General Public License16* along with this program; if not, write to the Free Software17* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA18*/1920//****************************************************************21//22// Glide64 - Glide Plugin for Nintendo 64 emulators23// Project started on December 29th, 200124//25// Authors:26// Dave2001, original author, founded the project in 2001, left it in 200227// Gugaman, joined the project in 2002, left it in 200228// Sergey 'Gonetz' Lipski, joined the project in 2002, main author since fall of 200229// Hiroshi 'KoolSmoky' Morii, joined the project in 200730//31//****************************************************************32//33// To modify Glide64:34// * 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.35// * 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.36//37//****************************************************************3839#define SELECTED_NONE 0x0000000040#define SELECTED_TRI 0x0000000141#define SELECTED_TEX 0x000000024243typedef struct TEX_INFO_t44{45wxUint32 cur_cache[2]; // Current cache #46wxUint8 format;47wxUint8 size;48wxUint32 width, height;49wxUint16 line, wid;50wxUint8 palette;51wxUint8 clamp_s, clamp_t;52wxUint8 mirror_s, mirror_t;53wxUint8 mask_s, mask_t;54wxUint8 shift_s, shift_t;55wxUint16 ul_s, ul_t, lr_s, lr_t;56wxUint16 t_ul_s, t_ul_t, t_lr_s, t_lr_t;57float scale_s, scale_t;58int tmu;59} TEX_INFO;6061typedef struct TRI_INFO_t62{63wxUint32 nv; // Number of vertices64VERTEX *v; // Vertices (2d screen coords) of the triangle, used to outline65wxUint32 cycle1, cycle2, cycle_mode; // Combine mode at the time of rendering66wxUint8 uncombined; // which is uncombined: 0x01=color 0x02=alpha 0x03=both67wxUint32 geom_mode; // geometry mode flags68wxUint32 othermode_h; // setothermode_h flags69wxUint32 othermode_l; // setothermode_l flags70wxUint32 tri_n; // Triangle number71wxUint32 flags;7273int type; // 0-normal, 1-texrect, 2-fillrect7475// texture info76TEX_INFO t[2];7778// colors79wxUint32 fog_color;80wxUint32 fill_color;81wxUint32 prim_color;82wxUint32 blend_color;83wxUint32 env_color;84wxUint32 prim_lodmin, prim_lodfrac;8586TRI_INFO_t *pNext;87} TRI_INFO;8889typedef struct DEBUGGER_t90{91int capture; // Capture moment for debugging?9293wxUint32 selected; // Selected object (see flags above)94TRI_INFO *tri_sel;9596wxUint32 tex_scroll; // texture scrolling97wxUint32 tex_sel;9899// CAPTURE INFORMATION100wxUint8 *screen; // Screen capture101TRI_INFO *tri_list; // Triangle information list102TRI_INFO *tri_last; // Last in the list (first in)103104wxUint32 tmu; // tmu #105106wxUint32 draw_mode;107108// Page number109int page;110111} GLIDE64_DEBUGGER;112113#define PAGE_GENERAL 0114#define PAGE_TEX1 1115#define PAGE_TEX2 2116#define PAGE_COLORS 3117#define PAGE_FBL 4118#define PAGE_OTHERMODE_L 5119#define PAGE_OTHERMODE_H 6120#define PAGE_TEXELS 7121#define PAGE_COORDS 8122#define PAGE_TEX_INFO 9123124#define TRI_TRIANGLE 0125#define TRI_TEXRECT 1126#define TRI_FILLRECT 2127#define TRI_BACKGROUND 3128129extern GLIDE64_DEBUGGER _debugger;130131void debug_init ();132void debug_capture ();133void debug_cacheviewer ();134void debug_mouse ();135void debug_keys ();136void output (float x, float y, int scale, const char *fmt, ...);137138139