1
0
mirror of https://github.com/cc65/cc65.git synced 2024-06-19 14:29:40 +00:00

make plasma sample work again despite issue #1348

This commit is contained in:
mrdudz 2020-11-19 23:21:06 +01:00
parent 0d46af2e9c
commit 48710af55a

View File

@ -1,7 +1,7 @@
/*****************************************************************************\ /*****************************************************************************\
** plasma test program for cc65. ** ** plasma test program for cc65. **
** ** ** **
** (w)2001 by groepaz/hitmen ** ** (w)2001 by groepaz **
** ** ** **
** Cleanup and porting by Ullrich von Bassewitz. ** ** Cleanup and porting by Ullrich von Bassewitz. **
** ** ** **
@ -54,7 +54,6 @@
#pragma static-locals (1); #pragma static-locals (1);
static const unsigned char sinustable[0x100] = { static const unsigned char sinustable[0x100] = {
0x80, 0x7d, 0x7a, 0x77, 0x74, 0x70, 0x6d, 0x6a, 0x80, 0x7d, 0x7a, 0x77, 0x74, 0x70, 0x6d, 0x6a,
0x67, 0x64, 0x61, 0x5e, 0x5b, 0x58, 0x55, 0x52, 0x67, 0x64, 0x61, 0x5e, 0x5b, 0x58, 0x55, 0x52,
@ -131,8 +130,6 @@ static void doplasma (register unsigned char* scrn)
} }
} }
static void makechar (void) static void makechar (void)
{ {
static const unsigned char bittab[8] = { static const unsigned char bittab[8] = {
@ -147,7 +144,7 @@ static void makechar (void)
for (i = 0; i < 8; ++i){ for (i = 0; i < 8; ++i){
b = 0; b = 0;
for (ii = 0; ii < 8; ++ii) { for (ii = 0; ii < 8; ++ii) {
if ((rand() & 0xFF) > s) { if ((rand() & 0xFFu) > s) {
b |= bittab[ii]; b |= bittab[ii];
} }
} }