niedziela, 30 czerwca 2013

Edytor punktów ulubionych dla programu AutoMapa


Pod adresem amfavedit.appspot.com znajduje się mój edytor punktów ulubionych dla programu AutoMapa:


Zrobiony w dwa dni przy użyciu Google App Engine, napisany w Pythonie i JavaScripcie.

niedziela, 3 lutego 2013

Poprawka dla znikających cząsteczek w kodzie Doom'a 3

Here's a patch that fixes the disappearing particles problem in Doom 3 engine. Use this code in idRenderModelStatic::FinishSurfaces() in file renderer/Model.cpp

// if the surface has a deformation, increase the bounds
switch ( surf->shader->Deform() ) {
case DFRM_NONE:
 break;
case DFRM_PARTICLE2: {
  // expand surface bounds to include any emitted particles
  srfTriangles_t *tri = surf->geometry;
  const idDeclParticle *particleSystem = (idDeclParticle *)surf->shader->GetDeformDecl();
  tri->bounds.AddBounds(particleSystem->bounds);
 }
 break;
default: {
  // the amount here is somewhat arbitrary, designed to handle
  // autosprites and flares, but could be done better with exact
  // deformation information.
  // Note that this doesn't handle deformations that are skinned in
  // at run time...
  srfTriangles_t *tri = surf->geometry;
  idVec3 mid = ( tri->bounds[1] + tri->bounds[0] ) * 0.5f;
  float radius = ( tri->bounds[0] - mid ).Length();
  radius += 20.0f;
 
  tri->bounds[0][0] = mid[0] - radius;
  tri->bounds[0][1] = mid[1] - radius;
  tri->bounds[0][2] = mid[2] - radius;
 
  tri->bounds[1][0] = mid[0] + radius;
  tri->bounds[1][1] = mid[1] + radius;
  tri->bounds[1][2] = mid[2] + radius;
 }
 break;
}

Link to entry in the The Dark Mod  issue tracker: http://bugs.thedarkmod.com/view.php?id=3278

poniedziałek, 1 sierpnia 2011

NTFS Streams tab in file properties

Here's an interesting article about NTFS streams:
http://www.forensicfocus.com/dissecting-ntfs-hidden-streams

The most interesting part is a DLL that adds a "Streams" tab to file properties:

Just download a Visual Studio project from here (self-extracting archive):
http://download.microsoft.com/download/F/C/6/FC6943EB-790A-44AA-B32D-14ED7E22FD5D/NTFSExt.exe
Compile it, and copy resulting StrmExt.dll to Windows\System32 folder along with two scripts: HardLinks.vbs and RWStream.vbs (found in ReleaseMinDependency folder) and then run:

regsvr32 StrmExt.dll

Done!

If you have trouble compiling the project comment out following lines in StdAfx.h:
//#ifndef _WIN32_WINNT
//#define _WIN32_WINNT 0x0400
//#endif

In case you are using 64 bit Windows: create x64 platform configuration and copy settings from Win32 configuration. Compile x64 version (StrmExt.dll still goes to Windows\System32 folder).

wtorek, 1 grudnia 2009

Test Wiritera i VSPaste

public class ParamRule
{
public string Name;
public SemanticDesc SemanticDesc;
public ParamRule(string name, SemanticDesc semanticDesc)
{
Name = name;
SemanticDesc = semanticDesc;
}
}
I co? Działa.

Online RegEx and JSON tools

Here's an online regular expressions editor: RegExr
And here's an online JSON formatter: JSON Formatter

niedziela, 22 listopada 2009

Perl, Ruby, Python Cookbook

There are cookbooks for almost any language here: PLEAC - Cookbooks

For example:
Ruby Cookbook
Python Cookbook
Perl Cookbook
C++ Cookbook

The Python Tutorial - often more helpful than library reference et. al. (i.e. Chapter 7: Input and Output).

sobota, 21 listopada 2009

Mozilla plugins refresh and stuff

To verify that Mozilla is aware of new .xpt files, you can look in the generated file, xpti.dat, where type libraries are listed. If you need to, you can call navigator.plugins.refresh() to find new XPT files and plug-in software.

Plug-in developers might find it useful for debugging purposes to turn off the exception catching mechanism currently implemented in Mozilla on Windows. To turn off Windows exception handling, add the following line into your prefs.js file: user_pref("plugin.dont_try_safe_calls", true);