project64/Source/Project64-video/Gfx_1.3.h

69 lines
1.7 KiB
C
Raw Normal View History

2021-03-02 02:13:17 +00:00
// Project64 - A Nintendo 64 emulator
// http://www.pj64-emu.com/
// Copyright(C) 2001-2021 Project64
// Copyright(C) 2003-2009 Sergey 'Gonetz' Lipski
// Copyright(C) 2002 Dave2001
// GNU/GPLv2 licensed: https://gnu.org/licenses/gpl-2.0.html
2017-04-26 10:23:36 +00:00
#pragma once
2013-04-09 12:02:27 +00:00
2013-04-04 21:22:19 +00:00
#include <stdio.h>
#include <fstream>
2016-01-25 10:07:57 +00:00
#include <stdlib.h>
2013-04-04 21:22:19 +00:00
#include <stddef.h> // offsetof
#include <Common/MemTest.h>
#include "Config.h"
#include "Settings.h"
2021-01-19 05:58:59 +00:00
#include "rdp.h"
2013-04-04 21:22:19 +00:00
#if defined __VISUALC__
#define GLIDE64_TRY __try
#define GLIDE64_CATCH __except (EXCEPTION_EXECUTE_HANDLER)
#else
#define GLIDE64_TRY try
#define GLIDE64_CATCH catch (...)
#endif
#include <Project64-plugin-spec/Video.h>
2013-04-04 21:22:19 +00:00
//********
// Logging
2013-04-04 21:22:19 +00:00
// ********************************
// ** TAKE OUT BEFORE RELEASE!!! **
//#define LOG_UCODE
2013-04-04 21:22:19 +00:00
// note that some of these things are inserted/removed
// from within the code & may not be changed by this define.
2013-04-04 21:22:19 +00:00
// ********************************
2013-04-04 21:22:19 +00:00
//#define CATCH_EXCEPTIONS // catch exceptions so it doesn't freeze and will report
// "The gfx plugin has caused an exception" instead.
2013-04-04 21:22:19 +00:00
// Usually enabled
2013-04-04 21:22:19 +00:00
#define LARGE_TEXTURE_HANDLING // allow large-textured objects to be split?
extern unsigned int BMASK;
2016-01-20 08:37:38 +00:00
extern uint32_t update_screen_count;
2016-01-20 08:37:38 +00:00
extern int GfxInitDone;
extern bool g_romopen;
extern int to_fullscreen;
2016-01-20 08:37:38 +00:00
extern int ev_fullscreen;
2016-01-20 08:37:38 +00:00
extern int exception;
2016-01-20 08:37:38 +00:00
int InitGfx();
void ReleaseGfx();
2016-01-20 08:37:38 +00:00
// The highest 8 bits are the segment # (1-16), and the lower 24 bits are the offset to
// add to it.
__inline uint32_t segoffset(uint32_t so)
{
return (rdp.segment[(so >> 24) & 0x0f] + (so&BMASK))&BMASK;
}
extern GFX_INFO gfx;
extern bool no_dlist;