Shortcut | Description |
---|---|
ranger |
Start Ranger |
Q |
Quit Ranger |
R |
Reload current directory |
? |
Ranger Manpages / Shortcuts |
/* -fno-objc-arc | |
CFTypeRef _unsafeCreatePartiallyInitialized(Class c) { | |
Method method = class_getInstanceMethod([NSObject class], @selector(init)); | |
IMP imp = method_getImplementation(method); | |
return ((id (*)(id, SEL))imp)([c alloc], @selector(init)); | |
} | |
void _unsafeDestructPartiallyInitialized(CFTypeRef x) { | |
Method method = class_getInstanceMethod([NSObject class], @selector(dealloc)); | |
IMP imp = method_getImplementation(method); |
# Blender v2.76 (sub 0) OBJ File: '' | |
# www.blender.org | |
mtllib cube.mtl | |
o Cube | |
v 1.000000 -1.000000 -1.000000 | |
v 1.000000 -1.000000 1.000000 | |
v -1.000000 -1.000000 1.000000 | |
v -1.000000 -1.000000 -1.000000 | |
v 1.000000 1.000000 -0.999999 | |
v 0.999999 1.000000 1.000001 |
/* Shadow 0dp */ | |
box-shadow: none; | |
/* Shadow 1dp */ | |
box-shadow: 0 1px 1px 0 rgba(0,0,0,0.14), 0 2px 1px -1px rgba(0,0,0,0.12), 0 1px 3px 0 rgba(0,0,0,0.20); | |
/* Shadow 2dp */ | |
box-shadow: 0 2px 2px 0 rgba(0,0,0,0.14), 0 3px 1px -2px rgba(0,0,0,0.12), 0 1px 5px 0 rgba(0,0,0,0.20); | |
/* Shadow 3dp */ |
Minimal D3D11 reference implementation: An uncluttered Direct3D 11 setup + basic rendering primer and API familiarizer. Complete, runnable Windows application contained in a single function and laid out in a linear, step-by-step fashion that should be easy to follow from the code alone. ~200 LOC. No modern C++, OOP or (other) obscuring cruft. View on YouTube
Also check out Minimal D3D11 pt2, reconfigured for instanced rendering and with a smaller, tighter, simplified overall code structure, or Minimal D3D11 pt3, with shadowmapping + showcasing a range of alternative setup and rendering techniques.
Readme: In the following pseudo code, [] indicates a subroutine. | |
Sometimes I choose to write the subroutine inline under the [] in order to maintain context. | |
One important fact about the way rollbacks are handled here is that we are storing state for every frame. | |
In any real implementation you only need to store one game state at a time. Storing a game | |
state for every frame allows us to only rollback to the first frame where the predicted inputs don't match the true ones. | |
==Constants== | |
MAX_ROLLBACK_FRAMES := Any Positive Integer # Specifies the maximum number of frames that can be resimulated | |
FRAME_ADVANTAGE_LIMIT := Any Positive Integer # Specifies the number of frames the local client can progress ahead of the remote client before time synchronizing. |
Minimal D3D11 sprite renderer: basic back-to-front sprite rendering reference code with example sprite sheet animation logic. As usual: Complete, runnable single-function app. No modern C++ / OOP / obscuring cruft.
Swap out the sprite sheet with a font atlas for a lightweight GUI / text renderer. Clip individual sprites and glyphs by offsetting screenPos
and atlasPos
to top left corner of visible area and adjusting size
accordingly (all values in pixels):
sprite.screenPos.x += 17;
sprite.screenPos.y += 10;