mirror of
https://github.com/krystalgamer/spidey-decomp.git
synced 2024-11-26 23:00:30 +00:00
PCTex_InitSystemTextures
This commit is contained in:
parent
0ccefeb9eb
commit
3ec3c61725
@ -52,7 +52,7 @@ RECT gRect;
|
||||
EXPORT LPDIRECT3D7 g_D3D7;
|
||||
|
||||
LPDIRECT3DDEVICE7 g_D3DDevice7;
|
||||
EXPORT D3DDEVICEDESC7 gD3DDevCaps;
|
||||
D3DDEVICEDESC7 gD3DDevCaps;
|
||||
|
||||
// @Ok
|
||||
void gsub_5027A0(void)
|
||||
|
1
DXinit.h
1
DXinit.h
@ -124,6 +124,7 @@ EXPORT extern i32 gDxOptionRelated;
|
||||
EXPORT extern LPDIRECTDRAWSURFACE7 g_pDDS_SaveScreen;
|
||||
EXPORT extern RECT gRect;
|
||||
EXPORT extern LPDIRECTDRAWSURFACE7 g_pDDS_Scene;
|
||||
EXPORT extern D3DDEVICEDESC7 gD3DDevCaps;
|
||||
|
||||
void validate_DXContext(void);
|
||||
void validate_DXContextEntry(void);
|
||||
|
26
PCTex.cpp
26
PCTex.cpp
@ -2,10 +2,16 @@
|
||||
#include "validate.h"
|
||||
#include "mem.h"
|
||||
#include "dcfileio.h"
|
||||
#include "DXinit.h"
|
||||
|
||||
#include <cstring>
|
||||
#include <cstdlib>
|
||||
|
||||
EXPORT u32 gMaxTextureAspectRatio;
|
||||
EXPORT u32 gMaxTextureWidth;
|
||||
EXPORT u32 gTextureHeight;
|
||||
EXPORT bool gSquareOnly;
|
||||
|
||||
const i32 GLOBAL_TEXTURE_COUNT = 1024;
|
||||
EXPORT SPCTexture gGlobalTextures[GLOBAL_TEXTURE_COUNT];
|
||||
|
||||
@ -251,10 +257,26 @@ i32 PCTex_GetTextureSplitCount(i32 index)
|
||||
return gGlobalTextures[index].mSplitCount;
|
||||
}
|
||||
|
||||
// @SMALLTODO
|
||||
// @Ok
|
||||
// @Matching
|
||||
void PCTex_InitSystemTextures(void)
|
||||
{
|
||||
printf("PCTex_InitSystemTextures(void)");
|
||||
if ( gLowGraphics )
|
||||
{
|
||||
gMaxTextureAspectRatio = 0;
|
||||
gMaxTextureWidth = 256;
|
||||
gTextureHeight = 256;
|
||||
gSquareOnly = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
gMaxTextureWidth = gD3DDevCaps.dwMaxTextureWidth;
|
||||
gTextureHeight = gD3DDevCaps.dwMaxTextureHeight;
|
||||
gMaxTextureAspectRatio = gD3DDevCaps.dwMaxTextureAspectRatio;
|
||||
gSquareOnly = (gD3DDevCaps.dpcTriCaps.dwTextureCaps & D3DPTEXTURECAPS_SQUAREONLY) != 0;
|
||||
}
|
||||
|
||||
PCTEX_Init();
|
||||
}
|
||||
|
||||
// @MEDIUMTODO
|
||||
|
Loading…
Reference in New Issue
Block a user