• Advertisement
Sign in to follow this  
  • entries
    686
  • comments
    1952
  • views
    386917

Arrgh! April Fools, my old nemesis!

Sign in to follow this  

87 views

Why can't I see my avatar when I post in the forum! And how come this day comes every year and I still get tricked like a moron?!

However, the best april fools joke evar was of course, from IGN (I think?). See, one year, IGN claimed that you could get Luigi in Pokemon if you fed a Snorlax a water stone and flipped your gameboy upside down, it would turn into a luigi. What?! I didn't try it! Shut up!

Anyway, here's what I have of Pong Advance so far:




#define RGB(r, g, b) (r + (g << 5) + (b << 10))

#define WIDTH 160
#define HEIGHT 128

struct
{

int x, y;
int score;

} Paddle[2];

struct
{

int x, y;
int vx, vy;

} Ball;


unsigned short *VideoBuffer;
unsigned short *FrontBuffer = (unsigned short*)0x6000000;
unsigned short *BackBuffer = (unsigned short*)0x600A000;
*(unsigned long*)0x4000000 = (0x5 | 0x400);
volatile unsigned int *Buttons = (unsigned int*)0x4000130;
volatile unsigned short *Scanline = (volatile unsigned short*)0x4000006;


void Init(void)
{

Paddle[0].x = 5;
Paddle[0].y = (HEIGHT / 2) - 5;
Paddle[0].score = 0;

Paddle[1].x = WIDTH - 10;
Paddle[1].y = (HEIGHT / 2) - 5;
Paddle[1].score = 0;

}


void WaitForVsync(void)
{

while(*Scanline < HEIGHT) {}

}


void FlipPage(void)
{

if(*(unsigned long*)0x4000000 & 0x10)
{

*(unsigned long*)0x4000000 &= ~0x10;
VideoBuffer = BackBuffer;

}
else
{

*(unsigned long*)0x4000000 |= 0x10;
VideoBuffer = FrontBuffer;

}

}





Yay!
Sign in to follow this  


1 Comment


Recommended Comments

Quote:
Why can't I see my avatar when I post in the forum! And how come this day comes every year and I still get tricked like a moron?!
Put it into the suggestion box.

Share this comment


Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Advertisement