[Scummvm-cvs-logs] CVS: scummvm/scumm/smush codec37.cpp,1.10,1.11

Max Horn max at quendi.de
Sun Mar 2 15:23:40 CET 2003


At 23:35 Uhr +0100 02.03.2003, Marcus Comstedt wrote:
>Max Horn <max at quendi.de> writes:
>
>>  Uh, that's pretty ugly and hard to maintain...
>
>Considering how the _rest_ of the code looked, that didn't seem to be
>a major concern in this file...  :-)
>
>
>>  I already see the typos
>>  sneaking in whenever we have to fix something here. Why not use clean
>>  simple nested look for the SCUMM_NEED_ALIGNMENT variants? Any
>>  reasonable compiler should automatically unroll them, shouldn't it?
>>  I.e something lie
>>
>>
>>     t = *src++;
>>  #if defined(SCUMM_NEED_ALIGNMENT)
>>     for (int i = 0; i < 4; i++)
>>       for (int j = 0; j < 4; j++)
>>         (dst + pitch * i)[j] = t;
>>  #else
>>    ...
>>  #endif
>
>I think the whole file could use a cleanup.  There's the same code
>cut'n'pasted four times all over the place.  Maybe a macro that's
>instansiated four times to get the different variants instead?

All be fine by me :-)


Max




More information about the Scummvm-git-logs mailing list