Merge branch 'Texture_Cleanup'
# Conflicts: # src/textures/formats/multipatchtexture.cpp
This commit is contained in:
commit
1422a95aa8
188 changed files with 5931 additions and 5416 deletions
|
|
@ -53,7 +53,7 @@ static void CastCo2S(FString *a, int b) { PalEntry c(b); a->Format("%02x %02x %0
|
|||
static int CastS2So(FString *b) { return FSoundID(*b); }
|
||||
static void CastSo2S(FString *a, int b) { *a = S_sfx[b].name; }
|
||||
static void CastSID2S(FString *a, unsigned int b) { *a = (b >= sprites.Size()) ? "TNT1" : sprites[b].name; }
|
||||
static void CastTID2S(FString *a, int b) { auto tex = TexMan[*(FTextureID*)&b]; *a = (tex == nullptr) ? "(null)" : tex->Name.GetChars(); }
|
||||
static void CastTID2S(FString *a, int b) { auto tex = TexMan.GetTexture(*(FTextureID*)&b); *a = (tex == nullptr) ? "(null)" : tex->GetName().GetChars(); }
|
||||
|
||||
void JitCompiler::EmitCAST()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1874,8 +1874,8 @@ static void DoCast(const VMRegisters ®, const VMFrame *f, int a, int b, int c
|
|||
case CAST_TID2S:
|
||||
{
|
||||
ASSERTS(a); ASSERTD(b);
|
||||
auto tex = TexMan[*(FTextureID*)&(reg.d[b])];
|
||||
reg.s[a] = tex == nullptr ? "(null)" : tex->Name.GetChars();
|
||||
auto tex = TexMan.GetTexture(*(FTextureID*)&(reg.d[b]));
|
||||
reg.s[a] = tex == nullptr ? "(null)" : tex->GetName().GetChars();
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1584,6 +1584,19 @@ DEFINE_ACTION_FUNCTION_NATIVE(_TexMan, ReplaceTextures, ReplaceTextures)
|
|||
return 0;
|
||||
}
|
||||
|
||||
void SetCameraToTexture(AActor *viewpoint, const FString &texturename, double fov);
|
||||
|
||||
DEFINE_ACTION_FUNCTION_NATIVE(_TexMan, SetCameraToTexture, SetCameraToTexture)
|
||||
{
|
||||
PARAM_PROLOGUE;
|
||||
PARAM_OBJECT(viewpoint, AActor);
|
||||
PARAM_STRING(texturename); // [ZZ] there is no point in having this as FTextureID because it's easier to refer to a cameratexture by name and it isn't executed too often to cache it.
|
||||
PARAM_FLOAT(fov);
|
||||
SetCameraToTexture(viewpoint, texturename, fov);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
//=====================================================================================
|
||||
//
|
||||
// secplane_t exports
|
||||
|
|
@ -2372,7 +2385,7 @@ DEFINE_ACTION_FUNCTION_NATIVE(DBaseStatusBar, ReceivedWeapon, ReceivedWeapon)
|
|||
static int GetMugshot(DBaseStatusBar *self, int accuracy, int stateflags, const FString &def_face)
|
||||
{
|
||||
auto tex = self->mugshot.GetFace(self->CPlayer, def_face, accuracy, (FMugShot::StateFlags)stateflags);
|
||||
return (tex ? tex->id.GetIndex() : -1);
|
||||
return (tex ? tex->GetID().GetIndex() : -1);
|
||||
}
|
||||
|
||||
DEFINE_ACTION_FUNCTION_NATIVE(DBaseStatusBar, GetMugshot, GetMugshot)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue