project64/Source/Project64-video/TexLoad.h

47 lines
1.0 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
2013-04-04 21:22:19 +00:00
#include "TexLoad4b.h"
#include "TexLoad8b.h"
#include "TexLoad16b.h"
#include "TexLoad32b.h"
2016-01-28 20:00:13 +00:00
#include <string.h>
2016-01-25 11:26:42 +00:00
uint32_t LoadNone(uintptr_t /*dst*/, uintptr_t /*src*/, int /*wid_64*/, int /*height*/, int /*line*/, int /*real_width*/, int /*tile*/)
2013-04-04 21:22:19 +00:00
{
2016-01-25 11:26:42 +00:00
memset(texture, 0, 4096 * 4);
return (1 << 16) | GFX_TEXFMT_ARGB_1555;
2013-04-04 21:22:19 +00:00
}
2016-01-25 11:26:42 +00:00
typedef uint32_t(*texfunc)(uintptr_t, uintptr_t, int, int, int, int, int);
texfunc load_table[4][5] = { // [size][format]
{ Load4bSelect,
LoadNone,
Load4bCI,
Load4bIA,
Load4bI },
2013-04-04 21:22:19 +00:00
2016-01-25 11:26:42 +00:00
{ Load8bCI,
LoadNone,
Load8bCI,
Load8bIA,
Load8bI },
2013-04-04 21:22:19 +00:00
2016-01-25 11:26:42 +00:00
{ Load16bRGBA,
Load16bYUV,
Load16bRGBA,
Load16bIA,
LoadNone },
2013-04-04 21:22:19 +00:00
2016-01-25 11:26:42 +00:00
{ Load32bRGBA,
LoadNone,
LoadNone,
LoadNone,
LoadNone }
2013-04-04 21:22:19 +00:00
};