Skip to content

Instantly share code, notes, and snippets.

@t-mat
t-mat / eawebkit-1.10-xbox360-pseudo-patch
Created July 14, 2011 16:44
EAWebKit 1.10 : Xbox360 Pseudo Patch
//
// Open Source ? Skate 3 : EA WebKit 1.10
// http://gpl.ea.com/skate3.html
//
// Webkit browser for PS3 by EA available to developers
// http://community.us.playstation.com/thread/3332685
//
// Origyn Web Browser
// http://en.wikipedia.org/wiki/Origyn_Web_Browser
//
@t-mat
t-mat / neon_vectorModAngles
Created July 21, 2011 04:07
XMVectorModAngles() compatible function for ARM NEON
/**
XMVectorModAngles() compatible function for ARM NEON
@sa XMVectorModAngles()
*/
float32x4_t vectorModAngles(float32x4_t vAngle) {
#define M_PI 3.1415926535f
float32x4_t v0 = vmulq_f32(vAngle, vdupq_n_f32(1.0f/M_PI)); // v0.xyzw = vAngle.xyzw * vReciprocalPi.xyzw
uint32x4_t iq = vcgeq_f32(vAngle, vmovq_n_f32(0.0f)); // iq.xyzw = foreach(vAngle.xyzw) : a { (a > 0) ? -1 : 0; }
@t-mat
t-mat / gist:1281332
Created October 12, 2011 14:16
xmosaic-1.2/README
NCSA Mosaic for the X Window System
===================================
Welcome to NCSA Mosaic.
This README details installation steps. More complete information and
documentation on NCSA Mosaic is available online, via NCSA Mosaic.
Binaries
@t-mat
t-mat / gist:1281333
Created October 12, 2011 14:16
xmosaic-1.2/COPYRIGHT
Everything not already copyrighted by CERN is copyrighted by NCSA
(including the contents of the libhtmlw, libdmf, and src directories,
but not including the contents of libdtm, which is entirely public
domain).
The official NCSA Mosaic copyright statement follows; NOTE THAT THIS
HAS CHANGED FOR 1.1:
/****************************************************************************
* NCSA Mosaic for the X Window System *
@t-mat
t-mat / gist:1317043
Created October 26, 2011 17:14
C++ scoped object trick
#include <stdio.h>
class A {
public:
A() { printf("A : begin\n"); }
~A() { printf("A : end\n"); }
operator bool() const { return true; }
};
#define SCOPED_OBJ() if(A a = A())
@t-mat
t-mat / dinput8_joystick.cpp
Created November 24, 2011 12:52
DirectInput Joystick class
#include <windows.h>
#include <stdio.h>
#define DIRECTINPUT_VERSION 0x0800
#include <dinput.h>
#pragma comment(lib, "dinput8.lib")
#pragma comment(lib, "dxguid.lib")
class DiJoyStick {
public:
@t-mat
t-mat / CheckGpsEnable
Created December 7, 2011 08:40
android : check gps enable
// This application needs
//
// <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
//
// in AndroidManifest.xml : <manifest> section.
package com.example.my.checkgps;
import android.app.Activity;
import android.os.Bundle;
@t-mat
t-mat / dot.emacs
Created December 14, 2011 22:26
my dot emacs
;; https://gist.github.com/1478850
;; GNU Emacs 23.3.1 (x86_64-apple-darwin11.2.0, NS apple-appkit-1138.23)
;;
;; Kotoeri Shortcut plist
;; /System/Library/Input Methods/Kotoeri.app/Contents/Resources/Menu.plist
; 言語を日本語にする
(set-language-environment 'Japanese)
; UTF-8をできるだけ使う
(prefer-coding-system 'utf-8)
@t-mat
t-mat / space_harrier_prologue_and_epilogue_sega_mk3.md
Created December 19, 2011 00:05
疑問:スペースハリアーのタイトル画面において、なぜハリアーは敵キャラであるドムの肩に乗り、にこやかに手を振っているのか?

疑問:スペースハリアーのタイトル画面において、なぜハリアーは敵キャラであるドムの肩に乗り、にこやかに手を振っているのか?

  • ドラゴンランドがまだ平和だったころに撮ったもの?
    • ドム、マンモス、木が全てドラゴンランドの土着の生きモノであれば、そうかもしれない
      • 3種ともウイウイジャンボや、浮遊城砦に居た何かに呼び出されたり、取り込まれたものでなければ
    • スペースハリアー3D以後、スペースハリアー本編以前に撮られたもの、ということになる
  • ドラゴンランドに平和が戻ったあとに撮ったもの?
    • 文章の印象としては、ハリアーは事件解決後すぐにどこかへ向かって旅立ったように見えるが…
  • スナップ撮影のようなものなので、10秒もあれば撮れるはず
@t-mat
t-mat / d3d9_proxy_dll_memo.md
Created December 30, 2011 15:08
D3D9プロキシDLLの作り方

D3D9プロキシDLLの作り方

知りたいこと

既存の D3D アプリケーションのレンダリング結果に、 自前のポスト処理/オーバーレイを付加したり、スクリーンショット撮ったりする (FXAA とかああいう) のはどーやってるの?

逆順に説明すると、以下のようになる: