C i p h e r s o f t w a r e

Snippets

Welcome to the new code snippets and tutorials section. Here you will find odd bits and ends that you may find useful at times. the sections are nicely catergorized. Feel free do use these snippets in your own code. A special note: I had to consult many message boards for some of these snippets. Special thanks to the members of allegro.cc, gamedev.net and flipcode.com.

W i n d o w s P r o g r a m m i n g

S i m p l e D i a l o g B a s e d A p p l i c a t i o n

Download

Language: C
Libraries used: Win API
Description: This shows you how to create a very basic dialog-based application using the winapi only. The download comes with a MSVC++ 6.0 resource script file and a project file.

Source: DlgApp.c

G r a p h i c s

F u l l S c r e e n O p e n G L W i n d o w

Language: C
Libraries used: OpenGL, WinAPI
Description: This is fully commented source which sets up an OpenGL window in full screen mode. If you find a bug, just email me.

Source: fscreen.c

O t h e r

B i n a r y T o D e c i m a l

Download

Language: C++
Libraries used: N/A
Description: I wrote this small application in 5 minutes. It basically requests a binary number in the form of a string such as "01000001". It then converts it to ascii (a), as well as hex, dec, and oct.

Source: bintodec.cpp

I n p u t

U s i n g G e t A s y n c K e y S t a t e ( )

View Document

Description: GetAsyncKeyState() is a fast and easy way to handle input in games under the Windows Platform.