This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef MATH_HPP | |
#define MATH_HPP | |
#include <math.h> | |
#ifdef ASSERT | |
#define MATH_ASSERT(...) ASSERT(__VA_ARGS__) | |
#else | |
#define MATH_ASSERT(...) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
{ | |
"folders": | |
[ | |
{ | |
"path": "Assets", | |
"file_exclude_patterns": [ | |
"*.dll", | |
"*.meta", | |
"*.mat", | |
"*.asset", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//NOTE: MSVC 2013 command line build | |
//cl -nologo -EHa- -Gm- -GR- -fp:fast -Oi -WX -W4 -wd4996 -wd4100 -wd4189 -wd4127 -wd4201 -wd4101 -wd4505 -MTd -Od -Z7 tear.cpp user32.lib gdi32.lib winmm.lib opengl32.lib -link -incremental:no -opt:ref | |
#define WIN32_LEAN_AND_MEAN | |
#define NOMINMAX | |
#include <windows.h> | |
#undef near | |
#undef far |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
stbtt_fontinfo ttf_info; | |
MemoryPtr ttf_file = read_file_to_memory(file_name); | |
ASSERT(ttf_file.ptr); | |
stbtt_InitFont(&ttf_info, ttf_file.ptr, stbtt_GetFontOffsetForIndex(ttf_file.ptr, 0)); | |
f32 scale_factor = stbtt_ScaleForPixelHeight(&ttf_info, pixel_height); | |
i32 ascent, descent, line_gap; | |
stbtt_GetFontVMetrics(&ttf_info, &ascent, &descent, &line_gap); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ "keys": ["alt+1"], "command": "focus_group", "args": { "group": 0 } }, | |
{ "keys": ["alt+2"], "command": "focus_group", "args": { "group": 1 } }, | |
{ "keys": ["alt+left"], "command": "move_to", "args": {"to": "bol", "extend": false} }, | |
{ "keys": ["alt+right"], "command": "move_to", "args": {"to": "eol", "extend": false} }, | |
{ "keys": ["alt+shift+left"], "command": "move_to", "args": {"to": "bol", "extend": true} }, | |
{ "keys": ["alt+shift+right"], "command": "move_to", "args": {"to": "eol", "extend": true} }, | |
{ "keys": ["ctrl+up"], "command": "move", "args": {"by": "stops", "empty_line": true, "forward": false}}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Programming Interview Practice - Max Consecutive Sum | |
Albert Elwin | |
Website: http://albertelw.in | |
Email: [email protected] | |
*/ | |
#include <cstdio> |