mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-31 18:24:41 +03:00
Replace hardcoded temp buffer sizes with a named constant
Constants.h will house constants like the screen size and others. But basically only the screen size for now. Now we don't have to type that "4 bytes per 40 chars (whole screen)" comment everywhere...
This commit is contained in:
18
desktop_version/src/Constants.h
Normal file
18
desktop_version/src/Constants.h
Normal file
@@ -0,0 +1,18 @@
|
||||
#ifndef CONSTANTS_H
|
||||
#define CONSTANTS_H
|
||||
|
||||
/*
|
||||
* FIXME: These should be used everywhere...
|
||||
* FIXME: This should include more constants!
|
||||
*/
|
||||
|
||||
#define SCREEN_WIDTH_TILES 40
|
||||
#define SCREEN_HEIGHT_TILES 30
|
||||
|
||||
#define SCREEN_WIDTH_PIXELS (SCREEN_WIDTH_TILES * 8)
|
||||
#define SCREEN_HEIGHT_PIXELS (SCREEN_WIDTH_TILES * 8)
|
||||
|
||||
/* 4 bytes per char, for UTF-8 encoding. */
|
||||
#define SCREEN_WIDTH_CHARS (SCREEN_WIDTH_TILES * 4)
|
||||
|
||||
#endif /* CONSTANTS_H */
|
||||
Reference in New Issue
Block a user