1
0
Fork 0

(svn r12769) -Codechange: some coding style cleanups.

release/0.7
rubidium 2008-04-18 15:18:16 +00:00
parent 8c2c7c27ea
commit 0cecc4af20
2 changed files with 128 additions and 151 deletions

View File

@ -218,13 +218,11 @@ extern void UpdateAllStationVirtCoord();
static void MainWindowWndProc(Window *w, WindowEvent *e)
{
int off_x;
switch (e->event) {
case WE_PAINT:
DrawWindowViewport(w);
if (_game_mode == GM_MENU) {
off_x = _screen.width / 2;
int off_x = _screen.width / 2;
DrawSprite(SPR_OTTD_O, PAL_NONE, off_x - 120, 50);
DrawSprite(SPR_OTTD_P, PAL_NONE, off_x - 86, 50);
@ -234,24 +232,6 @@ static void MainWindowWndProc(Window *w, WindowEvent *e)
DrawSprite(SPR_OTTD_T, PAL_NONE, off_x + 34, 50);
DrawSprite(SPR_OTTD_T, PAL_NONE, off_x + 65, 50);
DrawSprite(SPR_OTTD_D, PAL_NONE, off_x + 96, 50);
/*
DrawSprite(SPR_OTTD_R, off_x + 119, 50);
DrawSprite(SPR_OTTD_A, off_x + 148, 50);
DrawSprite(SPR_OTTD_N, off_x + 181, 50);
DrawSprite(SPR_OTTD_S, off_x + 215, 50);
DrawSprite(SPR_OTTD_P, off_x + 246, 50);
DrawSprite(SPR_OTTD_O, off_x + 275, 50);
DrawSprite(SPR_OTTD_R, off_x + 307, 50);
DrawSprite(SPR_OTTD_T, off_x + 337, 50);
DrawSprite(SPR_OTTD_T, off_x + 390, 50);
DrawSprite(SPR_OTTD_Y, off_x + 417, 50);
DrawSprite(SPR_OTTD_C, off_x + 447, 50);
DrawSprite(SPR_OTTD_O, off_x + 478, 50);
DrawSprite(SPR_OTTD_O, off_x + 509, 50);
DrawSprite(SPR_OTTD_N, off_x + 541, 50);
*/
}
break;
@ -423,21 +403,17 @@ void ShowSelectGameWindow();
void SetupColorsAndInitialWindow()
{
uint i;
Window *w;
int width, height;
for (i = 0; i != 16; i++) {
for (uint i = 0; i != 16; i++) {
const byte *b = GetNonSprite(PALETTE_RECOLOR_START + i);
assert(b);
memcpy(_colour_gradient[i], b + 0xC6, sizeof(_colour_gradient[i]));
}
width = _screen.width;
height = _screen.height;
int width = _screen.width;
int height = _screen.height;
w = AllocateWindow(0, 0, width, height, MainWindowWndProc, WC_MAIN_WINDOW, NULL);
Window *w = AllocateWindow(0, 0, width, height, MainWindowWndProc, WC_MAIN_WINDOW, NULL);
AssignWindowViewport(w, 0, 0, width, height, TileXY(32, 32), ZOOM_LVL_VIEWPORT);
/* XXX: these are not done */

View File

@ -36,6 +36,7 @@
#include "fios.h"
#include "functions.h"
#include "console.h"
#include "news_gui.h"
#include "network/network.h"
#include "network/network_gui.h"