Skip to content

Instantly share code, notes, and snippets.

View haxpor's full-sized avatar
🤓
Some of my financial tools https://www.mql5.com/en/users/haxpor/seller

Wasin Thonkaew haxpor

🤓
Some of my financial tools https://www.mql5.com/en/users/haxpor/seller
View GitHub Profile
@haxpor
haxpor / BELL-412-Model-Output.txt
Created April 30, 2012 16:40
BELL-412 Model Structure
-- Model Bone Information --
-Name: RootNode
Index: 0
-Name: BELL412
Index: 1
-Name: group
Index: 2
-Name: BELL412_Pop1
Index: 3
-Name: BELL412_Pop1_ncl1_1
@haxpor
haxpor / SMAA.fx
Created July 8, 2012 03:51
Modified version of SMAA effect files to make it able to be compiled and run on XNA 3.1. Original sources taken from https://github.com/iryoku/smaa. NOTE: The code seen here don't work yet, it can be compiled and run but I'm trying to figure out the alway
// ------------------------------------------------------
// -- SMAA ----------------------------------------------
// ------------------------------------------------------
#define SMAA_PIXEL_SIZE float2(1.0/ viewport_width, 1.0/ viewport_height)
#define SMAA_HLSL_3 1
#define SMAA_PRESET_HIGH 1
#include "SMAA.h"
/**
@haxpor
haxpor / AppDelegate.js
Created August 29, 2012 15:31
Example to scale content to fit the current screen resolution with the option to recieve "width" and "height" from external or from browser's available client screen.
/****************************************************************************
Copyright (c) 2010-2012 cocos2d-x.org
Copyright (c) 2008-2010 Ricardo Quesada
Copyright (c) 2011 Zynga Inc.
http://www.cocos2d-x.org
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
template <>
struct ObjectSpawner::EnemyTraits<Zombie01> { const int enemy_type = (int)ZOMBIE_01; };
@haxpor
haxpor / README.md
Last active December 16, 2015 00:08
TestFlight Wrapper for C++ coder See README.md

TestFlightWrapper

Created as a C++ wrapper for TestFlight SDK v.1.2.4 with the aim to clear cut using Objective-C from C++ code.
I tested with cocos2d-x v.2.0.3 (which is adhered to cocos2d v.2.0) on iOS platform.
The test includes uploading build to TestFlight and play-through testing functionality of TestFlight.

Testing

Tested

  • setDeviceIdentifier()
@haxpor
haxpor / CCMenu.cpp
Last active December 21, 2015 08:59
Added holding touch functionality to CCMenuItem, thus related to CCMenu. It can return time passed since the previous holding touch. Holding touch functionality can be turned on/off on the fly during run-time. The benefit is that we can use CCMenu with holding touch functionality without a need to implement on our own in external checking inside…
/****************************************************************************
Copyright (c) 2010-2012 cocos2d-x.org
Copyright (c) 2008-2010 Ricardo Quesada
http://www.cocos2d-x.org
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
@haxpor
haxpor / convertToCaf-sfx.sh
Last active August 29, 2015 13:57
Converter to .caf from .wav in the current folder, nice export for ios game
#!/bin/bash
# This script is for converting sound files into .caf (for sfx)
for i in *.wav; do
afconvert -f caff -d LEI16@22050 -c 1 "$i"
done
# create a new folder then move newly exported into it
mkdir caf
@haxpor
haxpor / convertToAifc-music.sh
Last active November 14, 2018 08:22
Convert from .wav & .mp3 to .aifc (music file) for all files in current folder, nice export for ios game
#!/bin/bash
# This script is for converting sound files into .aifc (for music)
for i in *.wav; do
afconvert -f AIFC -d ima4 "$i"
done
for i in *.mp3; do
afconvert -f AIFC -d ima4 "$i"
@haxpor
haxpor / batchLayerTranslate.jsx
Created May 11, 2015 08:55
Batch translate layer in images residing in a folder for fixed x, and y amount. It will open each image file, then translate, then save the change replacing the file. If translating the layer outside of the image area, photoshop will interrupt and ask you whether or not to save. You can still continue to save manually. But make sure to select to…
var inputFolder = Folder.selectDialog ("Select a folder to process");
var fileList = inputFolder.getFiles("*.png");
for(var i=0; i<fileList.length; i++) {
app.load(fileList[i]);
backFile = app.activeDocument;
backFile.layers[0].translate(10,-3);
backFile.close(SaveOptions.SAVECHANGES);
}
@haxpor
haxpor / exportAndSignIPA.sh
Last active August 29, 2015 14:21
Export Xcode's archive file to .ipa, and sign it with the proper code signing identity.
# Export .xcarchive file into .ipa and properly sign it with implied codesign identity
# Full credits to http://www.thecave.com/2014/09/16/using-xcodebuild-to-export-a-ipa-from-an-archive/
# Set the parameters here
archiveFileName="ZombieHero"
exportIPAFileName="ZombieHero"
provisioningProfileName="Journalists inhouse"
# Export into .ipa file
echo "-- Exporting into .ipa --"