Skip to content

Instantly share code, notes, and snippets.

View FransBouma's full-sized avatar

Frans Bouma FransBouma

View GitHub Profile
@FransBouma
FransBouma / homefront2_release.CT
Last active April 29, 2018 20:18
Homefront:The Revolution Cheat table. Currently: FOV (PgUp/PgDn). CT also contains notes / addresses on player struct for XYZ position. For the person who wants to create a noclip cheat :)
<?xml version="1.0" encoding="utf-8"?>
<CheatTable CheatEngineTableVersion="21">
<CheatEntries>
<CheatEntry>
<ID>609</ID>
<Description>"camera coord 1"</Description>
<LastState Value="627.9749756" RealAddress="1625AC43C"/>
<VariableType>Float</VariableType>
<Address>1625AC43C</Address>
<Hotkeys>
#include EFFECT(CeeJay, DisplayDepth)
// scene additions
#include EFFECT(MartyMcFly, SSAO)
#include EFFECT(MartyMcFly, Emboss)
#include EFFECT(MartyMcFly, RBM)
// misc 2D effects
#include EFFECT(CeeJay, HDR)
#include EFFECT(MartyMcFly, HSV)
@FransBouma
FransBouma / Query.sql
Last active July 11, 2016 14:30
Temporal table predicate specification test for LLBLGen Pro v5.1 on SQL Server 2016
SELECT [LPA_L1].[Address], [LPA_L1].[AnnualSalary], [LPA_L1].[Department],
[LPA_L1].[EmployeeID] AS [EmployeeId], [LPA_L1].[Name], [LPA_L1].[Position],
[LPA_L1].[ValidFrom], [LPA_L1].[ValidTo]
FROM [TestDB].[dbo].[Employee]
FOR SYSTEM_TIME BETWEEN @p2 AND @p4 [LPA_L1]
WHERE ( ( [LPA_L1].[EmployeeID] = @p5))
@FransBouma
FransBouma / Tests.cs
Last active July 7, 2016 11:26
Table/view hint specification in LLBLGen Pro v5.1 Linq queries
[Test]
public void TwoHintOnJoinedElementTest()
{
using(var adapter = new SqlReadDataAccessAdapter())
{
var metaData = new LinqMetaData(adapter);
var q = from c in metaData.Customer
.WithHint("NOLOCK")
.WithHint("FORCESEEK")
join o in metaData.Order on c.CustomerId equals o.CustomerId
@FransBouma
FransBouma / Reshade\Presets\Default\Shaders_by_JPulowski.cfg
Last active January 15, 2017 08:32
More flexible Outline.fx. Except for the .fx file which is copied in its entirety, copy the lines below as new lines into the files specified.
//>Outline Settings<\\
#define OutlineUseDepthThreshold 1 //[0:1] //- if set to 1 it will cut off lines above the OutlineDepthThreshold.
#define OutlineUseFading 1 //[0:1] //- if set to 1, it will fade lines further away.
#define OutlineDepthThreshold 0.3 //[0.0:1.0] //-Depth threshold, all lines further away than this value will not be drawn
#define OutlineFadeStart 0.1 //[0.0:1.0] //-The start of the fog. 0.0 is at the camera position, 1.0 is horizon.
#define OutlineFadeCurve 10 //[0.1:175] //-//-The curve how quickly distant objects get faded. A low value will make the fade appear just slightly. A high value will make the fade kick in rather quickly.
<?xml version="1.0" encoding="utf-8"?>
<CheatTable CheatEngineTableVersion="19">
<CheatEntries>
<CheatEntry>
<ID>2</ID>
<Description>"Enable this first, then use NUMPAD 0 to toggle timestop"</Description>
<LastState/>
<VariableType>Auto Assembler Script</VariableType>
<AssemblerScript>[ENABLE]
//---------
@FransBouma
FransBouma / ceoutput.md
Last active March 28, 2016 16:48
AC Syndicate Timestop addresses

Timestop is done by writing a '1' at an address location. This is shown in this picture: .

After writing a 1, press ESC to stop the engine. Cameras still work, the game clock however has stopped.

Below are the addresses which write and read from this address.

Writing

ACS.scimitar::GraphicLibFacade::~GraphicLibFacade+D0C6D - C6 87 FB020000 01     - mov byte ptr [rdi+000002FB],01 { 1 }
...
[Test]
public void SingleOnWhereOnGetQueryable()
{
using(var adapter = new DataAccessAdapter())
{
var metaData = new LinqMetaData(adapter);
var r = metaData.GetQueryableForEntity<CustomerEntity>().Where(c=>c.CustomerId == "ALFKI").Single();
Assert.AreEqual("ALFKI", r.CustomerId);
}
@FransBouma
FransBouma / DepthHaze.h
Created March 1, 2016 18:20
DepthHaze with fog
NAMESPACE_ENTER(OFX)
#include OFX_SETTINGS_DEF
#if USE_DEPTHHAZE
///////////////////////////////////////////////////////////////////
// This effect works like a one-side DoF for distance haze, which slightly
// blurs far away elements. A normal DoF has a focus point and blurs using
// two planes.
//
@FransBouma
FransBouma / howtogetvsnetthemeid.cs
Created January 21, 2016 16:33
How to get the theme ID inside a vs.net extension without using references to vsnet2012 dlls (so code can be added to 2010 vsix too)
var themeService = this.ActiveServiceProvider.GetService(new Guid("0D915B59-2ED7-472A-9DE8-9161737EA1C5"));
if(themeService == null)
{
// no theming, no problem!
return;
}
var currentThemeProperty = themeService.GetType().GetProperty("CurrentTheme");
if(currentThemeProperty == null)
{
// something's wrong. No theming for you