|
|
|
@ -1,6 +1,11 @@
|
|
|
|
|
#include "math.h"
|
|
|
|
|
/* $Revision$ */
|
|
|
|
|
|
|
|
|
|
#include <stdlib.h>
|
|
|
|
|
#include <unistd.h>
|
|
|
|
|
#include <math.h>
|
|
|
|
|
#include "SDL.h"
|
|
|
|
|
#include "sdl.h"
|
|
|
|
|
#include "map.h"
|
|
|
|
|
|
|
|
|
|
#define MEERESSPIEGEL 48
|
|
|
|
|
#define BLICKWEITE 55
|
|
|
|
@ -15,7 +20,7 @@ void init_tabs() {
|
|
|
|
|
int x;
|
|
|
|
|
|
|
|
|
|
for (x=0;x<360; x++)
|
|
|
|
|
sintab[x] = trunc(127 * sin(x*M_PI/180));
|
|
|
|
|
sintab[x] = (int) (127.0 * sin(x*M_PI/180));
|
|
|
|
|
for (x=0; x < 90; x++)
|
|
|
|
|
costab[x] = sintab[x+90];
|
|
|
|
|
for (x=90; x < 360; x++)
|
|
|
|
@ -51,27 +56,26 @@ int main(void) {
|
|
|
|
|
try {Thread.sleep(100);} catch (InterruptedException e) {}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* Richtung wechseln? */
|
|
|
|
|
/* if (java.lang.Math.random()<0.5)
|
|
|
|
|
Richtung wechseln?
|
|
|
|
|
if (java.lang.Math.random()<0.5)
|
|
|
|
|
if (java.lang.Math.random()<1.0)
|
|
|
|
|
if (richtung <= 0) richtung = 357;
|
|
|
|
|
else richtung -= 3;
|
|
|
|
|
else
|
|
|
|
|
if (richtung >= 357) richtung = 0;
|
|
|
|
|
else richtung += 3;
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* Vorwärts? */
|
|
|
|
|
/* posy = posy + costab[richtung] / 32;
|
|
|
|
|
Vorwärts?
|
|
|
|
|
posy = posy + costab[richtung] / 32;
|
|
|
|
|
posx = posx + sintab[richtung] / 32;
|
|
|
|
|
|
|
|
|
|
if (posy<=0) posy += 256;
|
|
|
|
|
if (posx<=0) posx += 256;
|
|
|
|
|
*/
|
|
|
|
|
/* Absolute Höhe berechnen */
|
|
|
|
|
/* flughoehe = 100;
|
|
|
|
|
*/
|
|
|
|
|
/*
|
|
|
|
|
|
|
|
|
|
Absolute Höhe berechnen
|
|
|
|
|
flughoehe = 100;
|
|
|
|
|
|
|
|
|
|
for (i=0;i<320;i++) rng[i] = 200;
|
|
|
|
|
System.arraycopy(emptyscreen,0,screen,0,320*200);
|
|
|
|
|
|
|
|
|
|