[hatari-devel] Falcon emu and STE compatibility (D-Bug games)
Laurent Sallafranque
laurent.sallafranque at free.fr
Sun Feb 20 23:33:55 CET 2011
Is it OK like this ?
Laurent
Le 20/02/2011 23:18, Eero Tamminen a écrit :
> Hi,
>
>
> On sunnuntai 20 helmikuu 2011, Laurent Sallafranque wrote:
>>> Pretty much well done now ... it's just a little bit confusing that
>>> the
>> STE mode is activated when "isFalconInSteMode" is false... when I read
>> the code I would rather expect isFalconInSteMode == true would mean
>> that the STE mode is activated...
>>
>>
>> Yes, I thought about it. As the Ste compatibility mode is activated when
>> the bit = 0, I've kept the same behaviour for the variable. But like
>> you, I think it can be confusing.
>> If you ask for, I change it.
> -------
> static Uint8 falconBusMode; /* Falcon bus mode
> (0=STe compatible bus; 1= Falcon bus) */
> ...
> if (falconBusMode == 0) {
> --------
>
> No magic variables, please. If it's bool, use true& false and variable
> name where it's clear what true means, with non-bools like above, please use
> enums for the names of the possible states.
>
> For example:
> ---------
> static enum {
> FALCON_BUS_STE,
> FALCON_BUS_16MHZ
> } falconBusMode;
> ----------
>
> (C++ and maybe GCC too check that one doesn't try to put wrong values to
> enums.)
>
>
> - Eero
> _______________________________________________
> hatari-devel mailing list
> hatari-devel at lists.berlios.de
> https://lists.berlios.de/mailman/listinfo/hatari-devel
>
>
More information about the hatari-devel
mailing list