Skip to content

Instantly share code, notes, and snippets.

View haleyjd's full-sized avatar

James Haley (Nightdive Studios) haleyjd

View GitHub Profile
===============================================================================
General stuff
===============================================================================
* Support for patch textures between T_START and T_END namespace markers
===============================================================================
Thing Flags
===============================================================================
* Doom 64: Don't spawn until triggered (how to trigger?)
* Doom 64: No infighting
/*
JS Bindings for libxml2 functionality
*/
#ifndef VIBC_NO_LIBXML2
#include "libxml/xmlmemory.h"
#include "libxml/parser.h"
#include "libxml/HTMLparser.h"
//
// Find the currently selected video driver by ID
//
static haldriveritem_t *I_FindHALVDRByID(int id)
{
for(unsigned int i = 0; i < VDR_MAXDRIVERS; i++)
{
if(halVideoDriverTable[i].id == id && halVideoDriverTable[i].driver)
return &halVideoDriverTable[i];
}
@haleyjd
haleyjd / WiaAutomationProxy.cpp
Created May 1, 2017 19:20
C++/CLI wrapper for WIA Automation library
// This is the main DLL file.
#include "stdafx.h"
#include "WiaAutomationProxy.h"
void WiaAutomationProxy::CommonDialog::ShowPhotoPrintingWizard(const char ** filenames, unsigned int numfilenames)
{
WIA::CommonDialogClass cdc;
WIA::VectorClass vector;
Generalized Lighting Types
================================================================================================
Base = 0x2000 (8192 dec)
Max = 0x2F7F (12159 dec)
# Types = 3968 max
Bits
===================================================
D C B A 9 8 7 6 5 4 3 2 1 0
//---------------------------------------------------------------------------------------------------------------------
// FileCache::CreateDirectory
// Create a directory under the cache base path, non-recursive, provided it doesn't exist already.
bool FileCache::CreateDirectory(const string &dir_name)
{
string concat_path = PathConcatenate(GetBasePath(), dir_name);
if(DirectoryExists(concat_path, false))
return true; // already exists
//======================================================================================================================
// Base64 Routines
// jhaley 20110805: The stack data in crash dumps needs to be Base64-encoded. This seemed like the best place to put
// it, for general visibility.
//
// Copyright 2010 Jonathan Wallace. All rights reserved.
// Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
// following conditions are met:
//
// 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following
//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include "codeSearchDocument.h"
#include "codeRecordDocument.h"
#include "codeSpecialScanDocument.h"
#include "codeSearchPerson.h"
//---------------------------------------------------------------------------
bool FunctionWhatMayThrow(byte *bytes, size_t len)
{
if(!notInGoodState)
throw BadStateException();
return bytes[len-1] == 0;
}
class ByteOwner
{
protected:
//
// Extensions to Object
//
//
// Bind natively defined extensions
//
//
// Object.defineProperty - ECMAScript 5 extension