src/fsmblockmap.cpp
author rubidium
Sat, 06 Oct 2007 21:16:00 +0000
branchNewGRF_ports
changeset 6870 ca3fd1fbe311
parent 6758 1545d187ab64
permissions -rw-r--r--
(svn r11219) [NewGRF_ports] -Sync: with trunk r11035:11218.
/* $Id$ */

/** @file fsmblockmap.cpp */

#include "fsmblockmap.h"
#include "debug.h"

FSMblockmap* SetFSMSingleBlock(const byte *blocklist)
{
	FSMblockmap *singleblock = new FSMblockmap;
	singleblock->ResetAll();
	singleblock->Initialise(blocklist, 1);
	return singleblock;
}

void FSMblockmap::PrintBlock(bool newline) const
{
	printf("%016" OTTD_PRINTF64 "x%016" OTTD_PRINTF64 "x", this->GetUpper(), this->GetLower());
	if (newline) printf("\n");
}

/* static */ void FSMblockmap::AssertOnWrongBlockOffset()
{
	FSMblockmap fsmb;
	if ((void*)&fsmb != (void*)fsmb.blocks) NOT_REACHED();
}