|
|
|
|
|
by userbinator
3411 days ago
|
|
Now, I wonder if I can get an old calculator to play the accompanying 4 track MOD? Add some music and the demosceners at pouet.net might get interested in seeing it; they have a "wild" category for hardware/exotic demos like this. I agree with the second comment there about replacing the verbose chain of if-statements with a single expression; my first thought upon seeing that was "this really needs to be simplified"; likewise, the second part with 7 nearly identical lines shifting left and then right by the same amount, then multiplying by 255(?!) can be simplified to a loop; the way it looked with lines for B and C having a slightly-different mask constant is misleading, since it looks like a copy-paste error. Here's an (untested) attempt at simplifying the code: int yoffs[] = { 0, 1, 3, 4, 3, 1, 2 };
shift = 6 - ((digit&3) << 1);
for(segs=0,i=0;i<7;i++)
segs |= !!(screen_buffer[bx+yoffs[i]][bx] & 1 << shift+(i<1||i>2) ) << 6-i;
|
|
Revision 2017 has a Wild competition coming up in mid-April as well:
https://2017.revision-party.net/compos/other