4
4
#include " core.h"
5
5
#include " string_compare.hpp"
6
6
7
- #define SS_TEXTURE_WIDTH 128
8
- #define SS_TEXTURE_HEIGHT 128
7
+ #define SS_TEXTURE_WIDTH 256
8
+ #define SS_TEXTURE_HEIGHT 256
9
9
#define SS_TEXTURE_FONECOLOR 0xFF000000
10
10
11
11
uint32_t GetA8R8G8B8_FromFMT (void *p, uint32_t fmt)
@@ -122,8 +122,7 @@ bool SCRSHOTER::MakeScreenShot()
122
122
// create a new screen shot
123
123
if (hr == D3D_OK)
124
124
{
125
- textureIndex_ =
126
- rs->TextureCreate (SS_TEXTURE_WIDTH, SS_TEXTURE_HEIGHT, 1 , 0 , D3DFMT_A8R8G8B8, D3DPOOL_MANAGED);
125
+ textureIndex_ = rs->TextureCreate (SS_TEXTURE_WIDTH, SS_TEXTURE_HEIGHT, 1 , 0 , D3DFMT_A8R8G8B8, D3DPOOL_MANAGED);
127
126
texture_ = static_cast <IDirect3DTexture9 *>(rs->GetTextureFromID (textureIndex_));
128
127
}
129
128
@@ -168,9 +167,9 @@ bool SCRSHOTER::MakeScreenShot()
168
167
pRenderTarg->Release ();
169
168
170
169
// Add a texture with a frame to the shot
171
- const int nTextureID = rs->TextureCreate (" interfaces\\ EmptyBorder.tga" );
172
- if ( nTextureID >= 0 )
173
- {
170
+ // const int nTextureID = core.GetTargetEngineVersion() >= storm::ENGINE_VERSION::TO_EACH_HIS_OWN ? -1 : rs->TextureCreate("interfaces\\EmptyBorder.tga");
171
+ const int nTextureID = - 1 ;
172
+
174
173
IDirect3DTexture9 *pScrShotTex = nullptr ;
175
174
if (D3D_OK == rs->CreateTexture (SS_TEXTURE_WIDTH, SS_TEXTURE_HEIGHT, 1 , D3DUSAGE_RENDERTARGET, D3DFMT_A8R8G8B8,
176
175
D3DPOOL_DEFAULT, &pScrShotTex))
@@ -208,9 +207,12 @@ bool SCRSHOTER::MakeScreenShot()
208
207
rs->TextureSet (0 , textureIndex_);
209
208
rs->DrawPrimitiveUP (D3DPT_TRIANGLESTRIP, BI_SCRSHOTER_VERTEX_FORMAT, 2 , vert,
210
209
sizeof (BI_SCRSHOTER_VERTEX), " battle_icons" );
210
+ if (nTextureID >= 0 )
211
+ {
211
212
rs->TextureSet (0 , nTextureID);
212
213
rs->DrawPrimitiveUP (D3DPT_TRIANGLESTRIP, BI_SCRSHOTER_VERTEX_FORMAT, 2 , vert,
213
214
sizeof (BI_SCRSHOTER_VERTEX), " battle_icons" );
215
+ }
214
216
rs->SetRenderTarget (pOldRenderTarg, pStencil);
215
217
}
216
218
if (pRenderTarg)
@@ -232,8 +234,7 @@ bool SCRSHOTER::MakeScreenShot()
232
234
rs->Release (pScrShotTex);
233
235
}
234
236
235
- rs->TextureRelease (nTextureID);
236
- }
237
+ if (nTextureID >= 0 ) rs->TextureRelease (nTextureID);
237
238
238
239
return hr == D3D_OK;
239
240
}
0 commit comments