harbaum / galagino

A Galaga, Pac-Man and Donkey Kong arcade emulator for the ESP32
315 stars 21 forks source link

"machine" is undeclared when compiling #19

Closed witnessmenow closed 1 year ago

witnessmenow commented 1 year ago

I have my conf file configured just for Galaga

// disable e.g. if roms are missing
// #define ENABLE_PACMAN
#define ENABLE_GALAGA
// #define ENABLE_DKONG
// #define ENABLE_FROGGER
// #define ENABLE_DIGDUG

Which defines SINGLE_MACHINE in the conf

And when I compile I get the following error

C:\Users\Brian\Documents\Code\galagino\galagino\emulation.h: In function 'OpZ80_INL':
emulation.h:238:20: error: 'machine' undeclared (first use in this function)
   return rom_table[machine][current_cpu][Addr];

It seems machine is only created if its not a single machine

From the main .ino

#ifndef SINGLE_MACHINE
signed char machine = MCH_MENU;   // start with menu
#endif
witnessmenow commented 1 year ago

Actually I think this is an issue for all modes, presumably as its declared after including emulation.h

harbaum commented 1 year ago

Thanks. I'll have a look at that. I must admit I haven't checked single machine setup with the latest update.

witnessmenow commented 1 year ago

Thanks, will give it a try later