Skip to content

Instantly share code, notes, and snippets.

View andresfelipemendez's full-sized avatar

Andrés Felipe Méndez andresfelipemendez

View GitHub Profile

Core Coding Standard

Coding practices are a source of a lot of arguments among programmers. Coding standards, to some degree, help us to put certain questions to bed and resolve stylistic debates. No coding standard makes everyone happy. (And even their existence is sure to make some unhappy.) What follows are the standards we put together on the Core team, which have become the general coding standard for all programming teams on new code development. We’ve tried to balance the need for creating a common, recognizable and readable code base with not unduly burdening the programmer with minor code formatting concerns.

Table Of Contents

@andresfelipemendez
andresfelipemendez / bootstrap.bat
Created April 14, 2019 16:09
clone my cpp bootstrap
@echo off
git init
git remote add bootstrap git@github.com:andresfelipemendez/cppbootstrap.git
git fetch
git pull bootstrap master
curl -sL https://github.com/catchorg/Catch2/releases/download/v2.7.1/catch.hpp > catch.hpp
#include "Game.h"
#include <SDL.h>
const float paddleH = 100.0f;
Game::Game()
:mWindow(nullptr)
,mRenderer(nullptr)
,mIsRunning(true)
@andresfelipemendez
andresfelipemendez / HelloTriangle.c
Created December 25, 2018 18:35
The Fundamental of C/C++ Game programming Brian Beuken Chapter Three Hello Triangle Using the Target
#include <stdio.h>
#include <assert.h>
#include <math.h>
#include <sys/time.h>
#include "bcm_host.h"
#include <EGL/egl.h>
#include <EGL/eglext.h>
#include <GLES2/gl2.h>
#define TRUE 1
@andresfelipemendez
andresfelipemendez / Microsoft.PowerShell_profile.ps1
Created November 27, 2018 15:20
add aliases to powershell
# allow powershell to execute commands Set-ExecutionPolicy -Scope CurrentUser
# set permission RemoteSigned
# reload profile to acces new changes . $profile
function openCurrentFolder{
ii .
}
New-Alias open openCurrentFolder
@andresfelipemendez
andresfelipemendez / barebonesengine.cpp
Created July 19, 2018 01:15
engine without architecture, frame rate independence
#include <SDL.h>
#undef main
#include <iostream>
class LTimer
{
public:
//Initializes variables
LTimer();
@andresfelipemendez
andresfelipemendez / ahk
Created May 8, 2018 19:40
shortcut for missing media keys
;^ ctrl
;! alt
;+ shift
^!r::Reload
^F1::Send, {Media_Play_Pause}
^F2::Send, {Media_Prev}
^F3::Send, {Media_Next}
^F5::Send, {Volume_Up}
^F4::Send, {Volume_Down}
return
@andresfelipemendez
andresfelipemendez / cmake boost beast
Created April 9, 2018 20:07
include boost beast :)
cmake_minimum_required(VERSION 3.11)
find_package(Boost 1.66 REQUIRED COMPONENTS system)
if(Boost_FOUND)
include_directories(${Boost_INCLUDE_DIRS})
link_directories(${Boost_LIBRARY_DIR})
add_executable(progname main.cpp)
target_link_libraries(progname ${Boost_LIBRARIES})
endif()
@andresfelipemendez
andresfelipemendez / SIMD.cpp
Last active February 8, 2018 22:15
cl /arch:SSE3 main.cpp && main.exe
#include <string>
#include <array>
#include <memory>
#include <iostream>
using namespace std;
#include <intrin.h>
string get_cpu_name()
@echo off
mkdir ..\..\build
pushd ..\..\build
cl -Zi ..\handmade\code\win32_handmade.cpp user32.lib
popd