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
inline float3& operator *= (float3& lhs, float rhs) { | |
lhs.x += rhs; | |
lhs.y += rhs; | |
lhs.z += rhs; | |
return lhs; | |
} |
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
namespace rendering | |
{ | |
namespace detail | |
{ | |
template <typename T> | |
struct format_of; | |
template <> | |
struct format_of<D3DXVECTOR2> | |
{ |
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
void animated_mesh::draw(animated_mesh& model, std::vector<instance_data> const& instances, D3DXMATRIX view, D3DXMATRIX projection) | |
{ | |
auto hr = noisy_hresult(); | |
unsigned stride[] = { sizeof(vertex_type_a), sizeof(vertex_type_b), sizeof(instance_data) }; | |
unsigned offset[] = { 0, 0, 0 }; | |
CComPtr<ID3D11DeviceContext> ctx = model.ctx; | |
CComPtr<ID3D11Device> device; | |
ctx->GetDevice(&device); |
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 noisy_hresult | |
{ | |
HRESULT hr; | |
noisy_hresult& operator = (HRESULT hr) | |
{ | |
this->hr = hr; | |
if (FAILED(hr)) | |
__debugbreak(); | |
return *this; | |
} |
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
#include "A.hpp" | |
#include "B.hpp" | |
void A::f(B* b) | |
{ | |
b->g(this); | |
} |
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 delayed_call | |
{ | |
boost::optional<std::function<void ()>> f; | |
~delayed_call() | |
{ | |
if (f) | |
(*f)(); | |
} | |
}; |
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
texture tex : WAVEFORMDATA; | |
sampler sTex = sampler_state | |
{ | |
Texture = (tex); | |
MipFilter = LINEAR; | |
MinFilter = LINEAR; | |
MagFilter = LINEAR; | |
AddressU = Clamp; |
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
solution "brigade" | |
configurations { "Debug", "Release" } | |
location "build" | |
defines { | |
"WIN32", | |
"_WIN32_WINNT=0x0600", | |
"_CRT_SECURE_NO_WARNINGS=1", | |
"_SCL_SECURE_NO_WARNINGS=1", | |
"_WINDOWS", |
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
gcc -Ltundra-output/linux-gcc-release-standalone -lm -lpthread -o tundra-output/linux-gcc-release-standalone/tundra_luac tundra-output/linux-gcc-release-standalone/__luac/lua/src/luac.o tundra-output/linux-gcc-release-standalone/__luac/lua/src/print.o tundra-output/linux-gcc-release-standalone/libbase_lua_host.a | |
tundra-output/linux-gcc-release-standalone/libbase_lua_host.a(lvm.o): In function `luaV_execute': | |
lua/src/lvm.c:(.text+0x21ae): undefined reference to `pow' | |
lua/src/lvm.c:(.text+0x2265): undefined reference to `pow' | |
tundra-output/linux-gcc-release-standalone/libbase_lua_host.a(lcode.o): In function `codearith': | |
lua/src/lcode.c:(.text+0x1c72): undefined reference to `pow' | |
collect2: ld returned 1 exit status |
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
package Kitteh; | |
use strict; | |
use warnings; | |
use DBI; | |
use File::Basename; | |
use File::HomeDir; | |
use MIME::Base64; | |
use UUID::Tiny ':std'; |