Skip to content

Commit

Permalink
Added Stranger in Sword City plugin and config
Browse files Browse the repository at this point in the history
  • Loading branch information
PeterTh committed Jun 7, 2016
1 parent b276be5 commit ca6294f
Show file tree
Hide file tree
Showing 8 changed files with 44 additions and 3 deletions.
2 changes: 2 additions & 0 deletions GeDoSaTo.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,7 @@
<ClCompile Include="source\plugins\dw8.cpp" />
<ClCompile Include="source\plugins\ff13.cpp" />
<ClCompile Include="source\plugins\lrff13.cpp" />
<ClCompile Include="source\plugins\stranger.cpp" />
<ClCompile Include="source\plugins\symphonia.cpp" />
<ClCompile Include="source\plugins\zestiria.cpp" />
<ClCompile Include="source\renderstate_manager_dx11.cpp" />
Expand Down Expand Up @@ -418,6 +419,7 @@
<ClInclude Include="include\plugins\dw8.h" />
<ClInclude Include="include\plugins\ff13.h" />
<ClInclude Include="include\plugins\lrff13.h" />
<ClInclude Include="include\plugins\stranger.h" />
<ClInclude Include="include\plugins\symphonia.h" />
<ClInclude Include="include\plugins\zestiria.h" />
<ClInclude Include="include\steam\steamfriends.h" />
Expand Down
1 change: 1 addition & 0 deletions defs/plugins.def
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ PLUGIN("Mitsurugi Kamui Hikae", "mitsurugi", MitsurugiPlugin)
PLUGIN("Tales of Zestiria", "Tales of Zestiria", ZestiriaPlugin)
PLUGIN("Lightning Returns FInal Fantasy XIII", "LRFF13", LightningReturnsPlugin)
PLUGIN("Tales of Symphonia", "Symphonia", SymphoniaPlugin)
PLUGIN("Stranger of Sword City", "StrangerOfSwordCity", StrangerOfSwordCityPlugin)

// this should always be last
PLUGIN("Generic", "*", GenericPlugin)
Expand Down
2 changes: 1 addition & 1 deletion include/main.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ using std::string;
#define SAFEDELETEARR(_p) { if(_p) { delete [] (_p); SDLOG(10, "Safedeletearr: %p, loc: %s : %d\n", (_p), __FILE__, __LINE__); (_p) = nullptr; } }

#define EPSILON (std::numeric_limits<float>::epsilon()*10)
#define FLT_EQ(__a, __b) (std::abs((__a) - (__b)) <= EPSILON * (std::max)(1.0f, (std::max)(std::abs(__a), std::abs(__b))))
#define FLT_EQ(__a, __b) (std::abs((__a) - (__b)) <= EPSILON)
#define FLT_EPS(__a, __b, __eps) (std::abs((__a) - (__b)) <= __eps)

#define CHECKHR(__hresult, __message, ...) if(FAILED(__hresult)) { SDLOG(-1, "ERROR: " __message, __VA_ARGS__) }
Expand Down
31 changes: 31 additions & 0 deletions include/plugins/stranger.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#pragma once

#include "game_plugin.h"

#include "ssao.h"
#include "post.h"
#include "bloom.h"
#include "scaling.h"
#include "generic_depth.h"


class StrangerOfSwordCityPlugin : public GenericPlugin {

public:
StrangerOfSwordCityPlugin(IDirect3DDevice9* device, RSManagerDX9 &manager);

virtual ~StrangerOfSwordCityPlugin() {};

virtual void initialize(unsigned rw, unsigned rh, D3DFORMAT bbformat, D3DFORMAT dssformat) override;
virtual void reportStatus() override;

virtual void prePresent() override;

virtual HRESULT redirectCreateTexture(UINT Width, UINT Height, UINT Levels, DWORD Usage, D3DFORMAT Format, D3DPOOL Pool, IDirect3DTexture9** ppTexture, HANDLE* pSharedHandle) override;
virtual HRESULT redirectCreateDepthStencilSurface(UINT Width, UINT Height, D3DFORMAT Format, D3DMULTISAMPLE_TYPE MultiSample, DWORD MultisampleQuality, BOOL Discard, IDirect3DSurface9** ppSurface, HANDLE* pSharedHandle) override;

virtual HRESULT redirectSetViewport(CONST D3DVIEWPORT9 * pViewport) override;
virtual HRESULT redirectSetPixelShader(IDirect3DPixelShader9* pShader) override;
virtual HRESULT redirectDrawPrimitiveUP(D3DPRIMITIVETYPE PrimitiveType, UINT PrimitiveCount, CONST void* pVertexStreamZeroData, UINT VertexStreamZeroStride) override;

};
Binary file modified pack/GeDoSaTo.dll
Binary file not shown.
6 changes: 6 additions & 0 deletions pack/config/StrangerOfSwordCity/GeDoSaTo.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Lines starting with "#" are ignored by GeDoSaTo and used to provide documentation

# This is a profile file for StrangerOfSwordCity

logLevel 0
forceAnisoLevel 16
1 change: 1 addition & 0 deletions source/game_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include "plugins/zestiria.h"
#include "plugins/lrff13.h"
#include "plugins/symphonia.h"
#include "plugins/stranger.h"

#include "utils/string_utils.h"

Expand Down
4 changes: 2 additions & 2 deletions source/version.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ const char* VER_NAME = "How Could Hell Be Any Worse";

const unsigned VER_MAJOR = 0;
const unsigned VER_MINOR = 21;
const unsigned VER_BUILD = 2255;
const unsigned VER_BUILD = 2297;

const char* VER_STRING = "version 0.21.2255 built on 2016/02/28 20:21:17";
const char* VER_STRING = "version 0.21.2297 built on 2016/06/07 17:11:48";

#ifdef _DEBUG
const char* MODE_STRING = "DEBUG";
Expand Down

0 comments on commit ca6294f

Please sign in to comment.