1
///////////////////////////////////////////////
3
// Snipe2d ludum dare 48h compo entry
8
///////////////////////////////////////////////
10
///////////////////////////////////////////////
12
// This software is provided 'as-is', without any express or implied
13
// warranty. In no event will the authors be held liable for any damages
14
// arising from the use of this software.
16
// Permission is granted to anyone to use this software for any purpose,
17
// including commercial applications, and to alter it and redistribute it
18
// freely, subject to the following restrictions:
20
// 1. The origin of this software must not be misrepresented; you must not
21
// claim that you wrote the original software. If you use this software
22
// in a product, an acknowledgment in the product documentation would be
23
// appreciated but is not required.
24
// 2. Altered source versions must be plainly marked as such, and must not be
25
// misrepresented as being the original software.
26
// 3. This notice may not be removed or altered from any source distribution.
28
// (eg. same as ZLIB license)
30
///////////////////////////////////////////////
32
// Houses are taken from a satellite picture of glasgow.
34
// The sources are a mess, as I didn't even try to do anything
35
// really organized here.. and hey, it's a 48h compo =)
40
void print(int aXofs, int aYofs, int aColor, const char *aString, ...)
45
va_start(arglist,aString);
46
vsprintf(cbuf,aString,arglist);
49
SDL_Rect srcRect, tgtRect;
52
tgtRect.w = srcRect.w = 4;
53
tgtRect.h = srcRect.h = 6;
57
srcRect.y = (*cp - 32) * 6;
58
SDL_BlitSurface(Game.Font[aColor], &srcRect, Game.Screen, &tgtRect);
64
void printShadow(int aXofs, int aYofs, const char *aString, ...)
69
va_start(arglist,aString);
70
vsprintf(cbuf,aString,arglist);
73
SDL_Rect srcRect, tgtRect;
74
tgtRect.x = aXofs + 1;
75
tgtRect.y = aYofs + 1;
76
tgtRect.w = srcRect.w = 4;
77
tgtRect.h = srcRect.h = 6;
81
srcRect.y = (*cp - 32) * 6;
82
SDL_BlitSurface(Game.Font[0], &srcRect, Game.Screen, &tgtRect);
91
srcRect.y = (*cp - 32) * 6;
92
SDL_BlitSurface(Game.Font[1], &srcRect, Game.Screen, &tgtRect);