#include <pspkernel.h>
#include <pspdebug.h>
#include <psppower.h>
#include <pspsdk.h>
#include <stdio.h>
#include "graphics.h"
#include <zlib.h>
#include <stdlib.h>
#include <pspctrl.h>
#include <dirent.h>
#include <math.h>
#include <psprtc.h>
#include <pspnet_apctl.h>
#include <pspnet_inet.h>
#include <netinet/in.h>
#include <sys/socket.h>
#include <sys/unistd.h>
#include <psputility.h>
#include <errno.h>
#include <pspnet_resolver.h>
#include <sys/stat.h>
#include <pspwlan.h>


#ifdef SDL_SOUND
#include "SDL.h"
#include "SDL_mixer.h"
#endif


#define PSP_WIDTH       480
#define PSP_HEIGHT      272
#define RADIUS          18
#define TILE_SIZE       256
#define STDOUT_FILE     "stdout.txt"
#define STDERR_FILE     "stderr.txt"
#define PI              3.14159265358979326433

typedef struct
{
        double lon;
        double lat;
        double lonWidth;
        double latHeight;
} Coord;



void initLatLon(); 
void toUpperCase(char * str);
Coord getLatLong(int x, int y, int zoom);
Coord getXY(double lat, double lon, int zoomLevel );
int powerOf(int p);
