Re: [AD] Importing Amiga Allegro

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


Hi Peter.

Been busy working 12 hour days at work so I haven't had time to get onto
workin on this unfortunately!  See my responses to your comments below...

On 04/01/2010, you wrote:
> 
>> > Please post a diff first.
>> 
>> +/* Variable exported from graphics.c */
>> +
>> +extern int gCustomMouse;
>> +
>> +void mouse_handle_buttons(int aCode);
>> +
>> +void mouse_handle_move(int aX, int aY);
>> +
>> +void mouse_handle_wheel(int aZ);
>> +
>> +void mouse_set_hardware_imagery(int aX, int aY);
>> +
>> +#endif /* ! AMOUSE_H */
>
> Internal symbols should begin with _, and preferably _al.
> For Amiga-specific symbols use _al_amiga_* or similar.

Done.  All functions and variables exported from Amiga modules (which the
various other Amiga modules) are now prefixed with _al_amiga_.

> Some minor things:
>
> - It would be nice to stick to the standard formatting style, if you
>   wouldn't mind running an auto-formatter over your code.  If not,
>   fine.  We're traditionally lenient in the platform-specific
>   directories, but it *has* left a mess in some directories.

Yes, I thought long and hard about this.  I always follow coding conventions
(and have done with any files I've edited in Allegro's src directory) but
the Amiga's (only) IDE has some serious issues with the Allegro coding
convention.  So at the risk of making life very difficult for myself I'll
have to leave the Amiga specific code as it is if you don't mind.  I doubt
anyone will look at it besides me anyway.  Any contributions to the main
Allegro source base will follow the conventions of course!

>> + *      Helper routines to make file.c work on Unix (POSIX)
>> platforms. + *
>> + *      By Michael Bukin.
>
> Update this.

Done.

>> +/* Driver info arrays used for by the system driver */
>> +
>> +extern _DRIVER_INFO _gfx_driver_list[];
>> +extern _DRIVER_INFO _digi_driver_list[];
>> +extern _DRIVER_INFO _midi_driver_list[];
>> +extern _DRIVER_INFO _keyboard_driver_list[];
>> +extern _DRIVER_INFO _mouse_driver_list[];
>> +extern _DRIVER_INFO _joystick_driver_list[];
>
> You would be better not to do this.

Is there any reason for this?  Is it just to keep the number of exported
symbols down?  I guess I could put each of these into its own .c file with
a matching function to get the pointer to it.

>> +
>> +static void system_exit();
>
> Functions without arguments should be declared (void).

Done.

>> +
>> +unsigned int al_get_sobj_version()
>> +{
>> +    return((1 << 16) | 2);
>> +}
>
> Try not to introduce al_* symbols as we are using that for the Allegro
> 5 branch.

Bummer.  Changing this now would break compatibility with the 50 already
released games that use the .so object.  But I'll rename it if ever I
update the Amiga port to become an A5 port.  Which may happen one day!

-- 
/-------------------------------------------------------------------\
[Hitman/Code HQ - 6502/z80/68000/604e/80x86/ARM coder - Amiga rulez!]
[VZ-200/VIC-20/MZ-700/c16/c64*10/c128*8/Plus-4/CPC464/CD32/500*2    ]
[600/1000/1200*2/A4000/SNES/N64/Dreamcast/Athlon 1100/AmigaOne      ]
[Assembly Language: The most fun you can have with your clothes on! ]
\-------------------------------------------------------------------/





Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/