Skip to content

Instantly share code, notes, and snippets.

@tonkatsu7
Last active October 26, 2021 03:22
Show Gist options
  • Save tonkatsu7/10960e61296e95f9f1c7cec6d9714b2a to your computer and use it in GitHub Desktop.
Save tonkatsu7/10960e61296e95f9f1c7cec6d9714b2a to your computer and use it in GitHub Desktop.
My notes through my journey with Handmade Hero https://handmadehero.org/watch

Day 001 Setting up dev environment

sartup.bat

Users\spham\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup\startup.bat

@echo off
subst i: C:\Users\spham\Documents\dev\handmadeHreo\master

# Map the unzipped episode's source code to h: drive
subst h: C:\Users\spham\Documents\dev\handmadeHreo\handmade_hero_099_source\handmade_hero_day_NNN_source

# Delete drive mapping after each episode
subst /D h:
  • You could also press Windows+R to open the Run dialog, execute shell:Common Startup
    • Personal User Path: shell:startup
    • All Users Path: shell:common startup

shell.bat

@echo off
call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" x64
set path=I:\misc;%path%

CMD shortcut

Target= %windir%\system32\cmd.exe /k w:\handmade\misc\shell.bat

build.bat

@echo off
mkdir ..\build
pushd ..\build
cl -Zi ..\code\win32_handmade.cpp User32.lib
popd

Open exe for debugging in Visual Studio 2017

devenv ..\build\win32_handmade.exe

Win32 functions used

Day 001 Q&A

cmd shortcut options

ndir%\system32\cmd.exe /k I:\misc\shell.bat

Day 002

Win32 functions used

Day 003 Allocating a back buffer

Win32 functions used

Day 004 Animating the back buffer

Win32 functions used

Day 005 Windows graphics review

Win32 functions used

Day 006 Gamepad and keyboard shortcut

Win32 functions used

Day 007 Initialising DirectSound

Win32 functions used

Day 008 Writing a square wave to DirectSound

Win32 functions used

Day 009 Variable pitch sine wave output

Win32 functions used

Day 010 QueryPerformanceCounter and RDTSC

Intel Architecture

Win32 functions used

Day 011 The basics of API design

Day 012 Platform independent sound output

Win32 functions used

Day 013 Platform independent user input

Win32 functions used

Day 014 Platform independent game memory

Win32 functions used

Day 015 Platform indenpendent debug file IO

Win32 functions used

Day 016 VisualStudio compiler switches

Day 017 Unified Keyboard and gamepad input

Day 018 Enforcing video frame rate

Day 019 Improving audio synchronisation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment