This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*************************************************************************************************\ | |
* | |
* @file Record.hpp | |
* @brief Declares the libESD::Record class. | |
* @note libESD source code and software (c) Copyright 2011 by Sean Sube, All Rights Reserved. | |
* Neither the source nor binaries may be modified or distributed without permission. | |
* | |
\*************************************************************************************************/ | |
#pragma once |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Material> | |
<Texture file="vivec.dds" /> | |
<Shader file="normal_map.cgfx"> | |
<Texture sampler="normal_map" file="vivec_n.dds" /> | |
</Shader> | |
</Material> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
uint64_t input = 9; | |
uint64_t factorial(uint64_t input) | |
{ | |
uint64_t iter = input; | |
uint64_t output = input; | |
while (--iter > 1) | |
{ | |
output *= iter; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// v1 | |
#define loop(x,op,y) (auto t=x; for(auto c=y;c>1;--c){t=t op;},t) | |
//v2 | |
#define rdo(x,op,y) ([&](){auto t=x;auto r=y;while(r){t=t op;};return t;})() | |
//v3 | |
#define rdo(x,op,y) (auto l=[=](){auto t=x;auto r=y;while(r){t=t op;};return t;},l()) | |
//v4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct FSVert | |
{ | |
float x, y, z, rhw; // The transformed(screen space) position for the vertex. | |
float tu, tv; // Texture coordinates | |
}; | |
#define FSVERT_VFV (D3DFVF_XYZRHW | D3DFVF_TEX0) | |
//IDirect3DVertexDeclaration9 * g_VDecl; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
D3DVERTEXELEMENT9 vertDeclElems[] = | |
{ | |
{ 0, 0, D3DDECLTYPE_FLOAT4, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_POSITION, 0 }, | |
{ 0, 16, D3DDECLTYPE_FLOAT4, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_COLOR, 0 }, | |
{ 0, 32, D3DDECLTYPE_FLOAT4, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_TEXCOORD, 0 }, | |
{ 0, 48, D3DDECLTYPE_FLOAT4, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_TEXCOORD, 1 }, | |
D3DDECL_END() | |
}; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//----------------------------------------------- | |
// Hook startup code | |
//----------------------------------------------- | |
HMODULE WINAPI LoadSystemLibrary(const LPTSTR libname) | |
{ | |
TCHAR path[MAX_PATH]; | |
GetSystemDirectory(path, MAX_PATH); | |
StringCchCat(path, MAX_PATH, TEXT("\\")); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Install the hooks | |
IHookManagerRef hooker = m_Core->GetHookManager(); | |
hooker->Add(VOODOO_OGL_HOOK_PARAMS(wglCreateContext)); | |
hooker->Add(VOODOO_OGL_HOOK_PARAMS(wglDeleteContext)); | |
hooker->Add(VOODOO_OGL_HOOK_PARAMS(wglMakeCurrent)); | |
hooker->Add(VOODOO_OGL_HOOK_PARAMS(wglSwapLayerBuffers)); | |
// Now provide the funcs... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
uint64_t FlatFactorial(uint64_t input) | |
{ | |
if (input <= 2) return input; | |
uint64_t mult = input - 1; | |
while (mult > 1) | |
{ | |
input *= mult--; | |
} | |
return input; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PackageManifest m_Package; | |
List<String> m_File_Create, m_File_Remove; | |
public void CollateChanges(Version v_from, Version v_to) | |
{ | |
List<Version> versions = new List<Version>(m_Package.Versions); | |
// Find the first common parent | |
List<Version> searched = new List<Version>(); | |
Version c_from = v_from, c_to = v_to, c_check = c_from; |
OlderNewer