Nebula: whitespace style fixes only, no functional changes
This commit is contained in:
@@ -55,7 +55,8 @@ float gMaxFramesPerSecond;
|
||||
BBitmap* gBitmap;
|
||||
BScreenSaver* gScreenSaver;
|
||||
uint32 gPalette[256];
|
||||
int8 gPaletteScheme,gBlankBorders;
|
||||
int8 gPaletteScheme;
|
||||
int8 gBlankBorders;
|
||||
char* gBuffer8; /* working 8bit buffer */
|
||||
|
||||
|
||||
@@ -189,6 +190,7 @@ drawshdisk(int x0, int y0, int r)
|
||||
*/
|
||||
if ((uint32)(y0 - y - 1) < gHeight - 3)
|
||||
memshset(&gBuffer8[x0 + gWidth * (y0 - y + 1)], c, d, x);
|
||||
|
||||
if ((uint32)(y0 + y - 1) < gHeight - 3)
|
||||
memshset(&gBuffer8[x0 + gWidth*(y0 + y)], c, d, x);
|
||||
}
|
||||
@@ -230,7 +232,8 @@ drawGalaxy()
|
||||
(independant of processor speed)
|
||||
*/
|
||||
static bigtime_t firstTime = system_time();
|
||||
t = ((double)gSpeed * system_time()-firstTime)/1000000.0; //opti_scale_time(0.418, &demo_elapsed_time);
|
||||
t = ((double)gSpeed * system_time() - firstTime) / 1000000.0;
|
||||
//opti_scale_time(0.418, &demo_elapsed_time);
|
||||
|
||||
a = 0.9 * t;
|
||||
b = t;
|
||||
@@ -270,8 +273,10 @@ drawGalaxy()
|
||||
rz += 300;
|
||||
|
||||
if (rz > 5) {
|
||||
x = (int)(15*rx/(rz/5+1)) + gWidth/2; /* tain jcomprend plus rien */
|
||||
y = (int)(15*ry/(rz/5+1)) + gHeight/2; /* a ces formules de daube !! */
|
||||
x = (int)(15 * rx / (rz / 5 + 1)) + gWidth / 2;
|
||||
/* tain jcomprend plus rien */
|
||||
y = (int)(15 * ry/ (rz / 5 + 1)) + gHeight / 2;
|
||||
/* a ces formules de daube !! */
|
||||
r = (int)(3 * gal[i].r / (rz / 4 + 3)) + 2;
|
||||
|
||||
if (x > 5 && x < gWidth - 6 && y > 5 && y < gHeight - 6)
|
||||
@@ -291,7 +296,8 @@ setPalette()
|
||||
case 0: // yellow
|
||||
default:
|
||||
for (i = 0; i < 30; i++)
|
||||
gPalette[i] = (uint8)(i*8/10) << 16 | (uint8)(i*6/10) << 8; // | (uint8)(i*3/10);
|
||||
gPalette[i] = (uint8)(i * 8 / 10) << 16 | (uint8)(i * 6 / 10) << 8;
|
||||
// | (uint8)(i*3/10);
|
||||
|
||||
for (i = 30; i < 256; i++) {
|
||||
uint8 r = (i);
|
||||
@@ -301,9 +307,12 @@ setPalette()
|
||||
gPalette[i] = ((r << 16) | (g << 8) | (b));
|
||||
}
|
||||
break;
|
||||
|
||||
case 1: // blue
|
||||
for (i = 0; i < 30; i++)
|
||||
gPalette[i] = (uint8)(i*8/10); // << 16 | (uint8)(i*6/10) << 8; // | (uint8)(i*3/10);
|
||||
gPalette[i] = (uint8)(i * 8 / 10);
|
||||
// << 16 | (uint8)(i * 6 / 10) << 8;
|
||||
// | (uint8)(i * 3 / 10);
|
||||
|
||||
for (i = 30; i < 256; i++) {
|
||||
uint8 b = (i);
|
||||
@@ -313,9 +322,12 @@ setPalette()
|
||||
gPalette[i] = ((r << 16) | (g << 8) | (b));
|
||||
}
|
||||
break;
|
||||
|
||||
case 2: // red
|
||||
for (i = 0; i < 128; i++)
|
||||
gPalette[i] = (uint8)i << 16; // << 16 | (uint8)(i*6/10) << 8; // | (uint8)(i*3/10);
|
||||
gPalette[i] = (uint8)i << 16;
|
||||
// << 16 | (uint8)(i * 6/10) << 8;
|
||||
// | (uint8)(i * 3 / 10);
|
||||
|
||||
for (i = 128;i < 256;i++)
|
||||
{
|
||||
@@ -336,9 +348,12 @@ setPalette()
|
||||
gPalette[i] = gPalette[i] & 0xff0000 | c << 8 | c;
|
||||
}
|
||||
*/ break;
|
||||
|
||||
case 3: // green
|
||||
for (i = 0; i < 30; i++)
|
||||
gPalette[i] = (uint8)(i*8/10) << 8; // << 16 | (uint8)(i*6/10) << 8; // | (uint8)(i*3/10);
|
||||
gPalette[i] = (uint8)(i * 8 / 10) << 8;
|
||||
// << 16 | (uint8)(i * 6 / 10) << 8;
|
||||
// | (uint8)(i * 3 / 10);
|
||||
|
||||
for (i = 30; i < 256; i++) {
|
||||
uint8 g = (i);
|
||||
@@ -348,6 +363,7 @@ setPalette()
|
||||
gPalette[i] = ((r << 16) | (g << 8) | (b));
|
||||
}
|
||||
break;
|
||||
|
||||
case 4: // grey
|
||||
for (i = 0; i < 256; i++) {
|
||||
uint8 c = i * 15 / 16 + 10;
|
||||
@@ -356,7 +372,9 @@ setPalette()
|
||||
break;
|
||||
case 5: // cold
|
||||
for (i = 0; i < 30; i++)
|
||||
gPalette[i] = (uint8)(i*8/10) << 16; // << 16 | (uint8)(i*6/10) << 8; // | (uint8)(i*3/10);
|
||||
gPalette[i] = (uint8)(i * 8 / 10) << 16;
|
||||
// << 16 | (uint8)(i * 6 / 10) << 8;
|
||||
// | (uint8)(i * 3 / 10);
|
||||
|
||||
for (i = 30; i < 256; i++) {
|
||||
uint8 r = i;
|
||||
@@ -365,6 +383,7 @@ setPalette()
|
||||
gPalette[i] = ((r << 16) | (c << 8) | c);
|
||||
}
|
||||
break;
|
||||
|
||||
case 6: // original
|
||||
for (i = 0; i < 256; i++) {
|
||||
uint32 c = *(char *)&i;
|
||||
@@ -394,7 +413,8 @@ setPalette()
|
||||
class SimpleSlider : public BSlider {
|
||||
public:
|
||||
SimpleSlider(const char* label, BMessage* message)
|
||||
: BSlider(B_EMPTY_STRING, B_EMPTY_STRING, message, 1, 100, B_HORIZONTAL)
|
||||
:
|
||||
BSlider(B_EMPTY_STRING, B_EMPTY_STRING, message, 1, 100, B_HORIZONTAL)
|
||||
{
|
||||
SetLimitLabels("1", "100");
|
||||
SetHashMarks(B_HASH_MARKS_BOTTOM);
|
||||
@@ -607,7 +627,6 @@ SettingsView::MessageReceived(BMessage* message)
|
||||
|
||||
case kMsgSpeed:
|
||||
gSpeed = 0.002 + 0.05 * fSpeedSlider->Value();
|
||||
//printf("value = %d, gSpeed = %f\n",fSpeedSlider->Value(),gSpeed);
|
||||
break;
|
||||
|
||||
case kMsgFrames:
|
||||
|
||||
Reference in New Issue
Block a user