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