project64/Source/Project64-video/TexLoad.h

54 lines
1.8 KiB
C
Raw Normal View History

2017-04-26 10:23:36 +00:00
/***************************************************************************
* *
* Project64-video - A Nintendo 64 gfx plugin. *
* http://www.pj64-emu.com/ *
* Copyright (C) 2017 Project64. All rights reserved. *
* Copyright (C) 2003-2009 Sergey 'Gonetz' Lipski *
* Copyright (C) 2002 Dave2001 *
* *
* License: *
* GNU/GPLv2 http://www.gnu.org/licenses/gpl-2.0.html *
* version 2 of the License, or (at your option) any later version. *
* *
****************************************************************************/
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
};