mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-14 13:58:01 +00:00
DREAMWEB: Place the ID after the callback pointer in UseListEntry
This keeps MSVC happy, without using struct packing
This commit is contained in:
parent
302e49f97d
commit
ea8a8278e5
@ -27,99 +27,98 @@ namespace DreamGen {
|
||||
|
||||
typedef void (DreamGenContext::*UseCallback)(void);
|
||||
|
||||
#include "common/pack-start.h" // START STRUCT PACKING
|
||||
|
||||
// Note: The callback pointer has been placed before the
|
||||
// ID to keep MSVC happy (otherwise, it throws warnings
|
||||
// that alignment of a member was sensitive to packing)
|
||||
struct UseListEntry {
|
||||
uint8 id[5]; // 0-terminal because it is easier syntatically to initialize the array
|
||||
UseCallback callback;
|
||||
const char *id;
|
||||
};
|
||||
|
||||
#include "common/pack-end.h" // END STRUCT PACKING
|
||||
|
||||
void DreamGenContext::useroutine() {
|
||||
|
||||
static const UseListEntry kUseList[] = {
|
||||
{ "NETW", &DreamGenContext::usemon },
|
||||
{ "ELVA", &DreamGenContext::useelevator1 },
|
||||
{ "ELVB", &DreamGenContext::useelevator2 },
|
||||
{ "ELVC", &DreamGenContext::useelevator3 },
|
||||
{ "ELVE", &DreamGenContext::useelevator4 },
|
||||
{ "ELVF", &DreamGenContext::useelevator5 },
|
||||
{ "CGAT", &DreamGenContext::usechurchgate },
|
||||
{ "REMO", &DreamGenContext::usestereo },
|
||||
{ "BUTA", &DreamGenContext::usebuttona },
|
||||
{ "CBOX", &DreamGenContext::usewinch },
|
||||
{ "LITE", &DreamGenContext::uselighter },
|
||||
{ "PLAT", &DreamGenContext::useplate },
|
||||
{ "LIFT", &DreamGenContext::usecontrol },
|
||||
{ "WIRE", &DreamGenContext::usewire },
|
||||
{ "HNDL", &DreamGenContext::usehandle },
|
||||
{ "HACH", &DreamGenContext::usehatch },
|
||||
{ "DOOR", &DreamGenContext::useelvdoor },
|
||||
{ "CSHR", &DreamGenContext::usecashcard },
|
||||
{ "GUNA", &DreamGenContext::usegun },
|
||||
{ "CRAA", &DreamGenContext::usecardreader1 },
|
||||
{ "CRBB", &DreamGenContext::usecardreader2 },
|
||||
{ "CRCC", &DreamGenContext::usecardreader3 },
|
||||
{ "SEAT", &DreamGenContext::sitdowninbar },
|
||||
{ "MENU", &DreamGenContext::usemenu },
|
||||
{ "COOK", &DreamGenContext::usecooker },
|
||||
{ "ELCA", &DreamGenContext::callhotellift },
|
||||
{ "EDCA", &DreamGenContext::calledenslift },
|
||||
{ "DDCA", &DreamGenContext::calledensdlift },
|
||||
{ "ALTR", &DreamGenContext::usealtar },
|
||||
{ "LOKA", &DreamGenContext::openhoteldoor },
|
||||
{ "LOKB", &DreamGenContext::openhoteldoor2 },
|
||||
{ "ENTA", &DreamGenContext::openlouis },
|
||||
{ "ENTB", &DreamGenContext::openryan },
|
||||
{ "ENTE", &DreamGenContext::openpoolboss },
|
||||
{ "ENTC", &DreamGenContext::openyourneighbour },
|
||||
{ "ENTD", &DreamGenContext::openeden },
|
||||
{ "ENTH", &DreamGenContext::opensarters },
|
||||
{ "WWAT", &DreamGenContext::wearwatch },
|
||||
{ "POOL", &DreamGenContext::usepoolreader },
|
||||
{ "WSHD", &DreamGenContext::wearshades },
|
||||
{ "GRAF", &DreamGenContext::grafittidoor },
|
||||
{ "TRAP", &DreamGenContext::trapdoor },
|
||||
{ "CDPE", &DreamGenContext::edenscdplayer },
|
||||
{ "DLOK", &DreamGenContext::opentvdoor },
|
||||
{ "HOLE", &DreamGenContext::usehole },
|
||||
{ "DRYR", &DreamGenContext::usedryer },
|
||||
{ "HOLY", &DreamGenContext::usechurchhole },
|
||||
{ "WALL", &DreamGenContext::usewall },
|
||||
{ "BOOK", &DreamGenContext::usediary },
|
||||
{ "AXED", &DreamGenContext::useaxe },
|
||||
{ "SHLD", &DreamGenContext::useshield },
|
||||
{ "BCNY", &DreamGenContext::userailing },
|
||||
{ "LIDC", &DreamGenContext::usecoveredbox },
|
||||
{ "LIDU", &DreamGenContext::useclearbox },
|
||||
{ "LIDO", &DreamGenContext::useopenbox },
|
||||
{ "PIPE", &DreamGenContext::usepipe },
|
||||
{ "BALC", &DreamGenContext::usebalcony },
|
||||
{ "WIND", &DreamGenContext::usewindow },
|
||||
{ "PAPR", &DreamGenContext::viewfolder },
|
||||
{ "UWTA", &DreamGenContext::usetrainer },
|
||||
{ "UWTB", &DreamGenContext::usetrainer },
|
||||
{ "STAT", &DreamGenContext::entersymbol },
|
||||
{ "TLID", &DreamGenContext::opentomb },
|
||||
{ "SLAB", &DreamGenContext::useslab },
|
||||
{ "CART", &DreamGenContext::usecart },
|
||||
{ "FCAR", &DreamGenContext::usefullcart },
|
||||
{ "SLBA", &DreamGenContext::slabdoora },
|
||||
{ "SLBB", &DreamGenContext::slabdoorb },
|
||||
{ "SLBC", &DreamGenContext::slabdoorc },
|
||||
{ "SLBD", &DreamGenContext::slabdoord },
|
||||
{ "SLBE", &DreamGenContext::slabdoore },
|
||||
{ "SLBF", &DreamGenContext::slabdoorf },
|
||||
{ "PLIN", &DreamGenContext::useplinth },
|
||||
{ "LADD", &DreamGenContext::useladder },
|
||||
{ "LADB", &DreamGenContext::useladderb },
|
||||
{ "GUMA", &DreamGenContext::chewy },
|
||||
{ "SQEE", &DreamGenContext::wheelsound },
|
||||
{ "TAPP", &DreamGenContext::runtap },
|
||||
{ "GUIT", &DreamGenContext::playguitar },
|
||||
{ "CONT", &DreamGenContext::hotelcontrol },
|
||||
{ "BELL", &DreamGenContext::hotelbell },
|
||||
{ &DreamGenContext::usemon, "NETW" },
|
||||
{ &DreamGenContext::useelevator1, "ELVA" },
|
||||
{ &DreamGenContext::useelevator2, "ELVB" },
|
||||
{ &DreamGenContext::useelevator3, "ELVC" },
|
||||
{ &DreamGenContext::useelevator4, "ELVE" },
|
||||
{ &DreamGenContext::useelevator5, "ELVF" },
|
||||
{ &DreamGenContext::usechurchgate, "CGAT" },
|
||||
{ &DreamGenContext::usestereo, "REMO" },
|
||||
{ &DreamGenContext::usebuttona, "BUTA" },
|
||||
{ &DreamGenContext::usewinch, "CBOX" },
|
||||
{ &DreamGenContext::uselighter, "LITE" },
|
||||
{ &DreamGenContext::useplate, "PLAT" },
|
||||
{ &DreamGenContext::usecontrol, "LIFT" },
|
||||
{ &DreamGenContext::usewire, "WIRE" },
|
||||
{ &DreamGenContext::usehandle, "HNDL" },
|
||||
{ &DreamGenContext::usehatch, "HACH" },
|
||||
{ &DreamGenContext::useelvdoor, "DOOR" },
|
||||
{ &DreamGenContext::usecashcard, "CSHR" },
|
||||
{ &DreamGenContext::usegun, "GUNA" },
|
||||
{ &DreamGenContext::usecardreader1, "CRAA" },
|
||||
{ &DreamGenContext::usecardreader2, "CRBB" },
|
||||
{ &DreamGenContext::usecardreader3, "CRCC" },
|
||||
{ &DreamGenContext::sitdowninbar, "SEAT" },
|
||||
{ &DreamGenContext::usemenu, "MENU" },
|
||||
{ &DreamGenContext::usecooker, "COOK" },
|
||||
{ &DreamGenContext::callhotellift, "ELCA" },
|
||||
{ &DreamGenContext::calledenslift, "EDCA" },
|
||||
{ &DreamGenContext::calledensdlift, "DDCA" },
|
||||
{ &DreamGenContext::usealtar, "ALTR" },
|
||||
{ &DreamGenContext::openhoteldoor, "LOKA" },
|
||||
{ &DreamGenContext::openhoteldoor2, "LOKB" },
|
||||
{ &DreamGenContext::openlouis, "ENTA" },
|
||||
{ &DreamGenContext::openryan, "ENTB" },
|
||||
{ &DreamGenContext::openpoolboss, "ENTE" },
|
||||
{ &DreamGenContext::openyourneighbour, "ENTC" },
|
||||
{ &DreamGenContext::openeden, "ENTD" },
|
||||
{ &DreamGenContext::opensarters, "ENTH" },
|
||||
{ &DreamGenContext::wearwatch, "WWAT" },
|
||||
{ &DreamGenContext::usepoolreader, "POOL" },
|
||||
{ &DreamGenContext::wearshades, "WSHD" },
|
||||
{ &DreamGenContext::grafittidoor, "GRAF" },
|
||||
{ &DreamGenContext::trapdoor, "TRAP" },
|
||||
{ &DreamGenContext::edenscdplayer, "CDPE" },
|
||||
{ &DreamGenContext::opentvdoor, "DLOK" },
|
||||
{ &DreamGenContext::usehole, "HOLE" },
|
||||
{ &DreamGenContext::usedryer, "DRYR" },
|
||||
{ &DreamGenContext::usechurchhole, "HOLY" },
|
||||
{ &DreamGenContext::usewall, "WALL" },
|
||||
{ &DreamGenContext::usediary, "BOOK" },
|
||||
{ &DreamGenContext::useaxe, "AXED" },
|
||||
{ &DreamGenContext::useshield, "SHLD" },
|
||||
{ &DreamGenContext::userailing, "BCNY" },
|
||||
{ &DreamGenContext::usecoveredbox, "LIDC" },
|
||||
{ &DreamGenContext::useclearbox, "LIDU" },
|
||||
{ &DreamGenContext::useopenbox, "LIDO" },
|
||||
{ &DreamGenContext::usepipe, "PIPE" },
|
||||
{ &DreamGenContext::usebalcony, "BALC" },
|
||||
{ &DreamGenContext::usewindow, "WIND" },
|
||||
{ &DreamGenContext::viewfolder, "PAPR" },
|
||||
{ &DreamGenContext::usetrainer, "UWTA" },
|
||||
{ &DreamGenContext::usetrainer, "UWTB" },
|
||||
{ &DreamGenContext::entersymbol, "STAT" },
|
||||
{ &DreamGenContext::opentomb, "TLID" },
|
||||
{ &DreamGenContext::useslab, "SLAB" },
|
||||
{ &DreamGenContext::usecart, "CART" },
|
||||
{ &DreamGenContext::usefullcart, "FCAR" },
|
||||
{ &DreamGenContext::slabdoora, "SLBA" },
|
||||
{ &DreamGenContext::slabdoorb, "SLBB" },
|
||||
{ &DreamGenContext::slabdoorc, "SLBC" },
|
||||
{ &DreamGenContext::slabdoord, "SLBD" },
|
||||
{ &DreamGenContext::slabdoore, "SLBE" },
|
||||
{ &DreamGenContext::slabdoorf, "SLBF" },
|
||||
{ &DreamGenContext::useplinth, "PLIN" },
|
||||
{ &DreamGenContext::useladder, "LADD" },
|
||||
{ &DreamGenContext::useladderb, "LADB" },
|
||||
{ &DreamGenContext::chewy, "GUMA" },
|
||||
{ &DreamGenContext::wheelsound, "SQEE" },
|
||||
{ &DreamGenContext::runtap, "TAPP" },
|
||||
{ &DreamGenContext::playguitar, "GUIT" },
|
||||
{ &DreamGenContext::hotelcontrol, "CONT" },
|
||||
{ &DreamGenContext::hotelbell, "BELL" },
|
||||
};
|
||||
|
||||
if (data.byte(kReallocation) >= 50) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user