Files
@ r11977:bc3933e2c9d0
Branch filter:
Location: cpp/openttd-patchpack/source/src/cheat.cpp - annotation
r11977:bc3933e2c9d0
506 B
text/x-c
(svn r16388) -Codechange: move u.air to Aircraft
r8965:16f6e5e9ed36 r8965:16f6e5e9ed36 r9111:983de9c5a848 r8965:16f6e5e9ed36 r8965:16f6e5e9ed36 r8965:16f6e5e9ed36 r8965:16f6e5e9ed36 r8965:16f6e5e9ed36 r8965:16f6e5e9ed36 r8965:16f6e5e9ed36 r8965:16f6e5e9ed36 r8965:16f6e5e9ed36 r8965:16f6e5e9ed36 r8965:16f6e5e9ed36 r8965:16f6e5e9ed36 r8965:16f6e5e9ed36 r8965:16f6e5e9ed36 r10647:62911ec68e89 r10647:62911ec68e89 r8965:16f6e5e9ed36 r8965:16f6e5e9ed36 r8965:16f6e5e9ed36 r8965:16f6e5e9ed36 r8965:16f6e5e9ed36 r8965:16f6e5e9ed36 r8965:16f6e5e9ed36 | /* $Id$ */
/** @file cheat.cpp Handling (loading/saving/initializing) of cheats. */
#include "stdafx.h"
#include "cheat_type.h"
Cheats _cheats;
void InitializeCheats()
{
memset(&_cheats, 0, sizeof(Cheats));
}
bool CheatHasBeenUsed()
{
/* Cannot use lengthof because _cheats is of type Cheats, not Cheat */
const Cheat *cht = (Cheat*)&_cheats;
const Cheat *cht_last = &cht[sizeof(_cheats) / sizeof(Cheat)];
for (; cht != cht_last; cht++) {
if (cht->been_used) return true;
}
return false;
}
|