-
Notifications
You must be signed in to change notification settings - Fork 2
/
level.cc
44 lines (35 loc) · 966 Bytes
/
level.cc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
// Copyright (C) 1998 Ingo Ruhnke <[email protected]>, see README.TXT for details
#include <stdio.h>
#include <vector>
#include "level.hh"
#include "pingu.hh"
#include "playfield.hh"
int
play_level(int)
{
bool quit = false;
puts("Starting Level");
Playfield playfield;
puts("Playfield created");
while(!quit) {
if (keypressed()) {
readkey();
quit = true;
}
if (mouse_b & 1) {
circlefill(playfield.world.gfx_map, mouse_x, mouse_y, 10, 0);
circlefill(playfield.world.col_map, mouse_x, mouse_y, 10, 0);
} else if (mouse_b & 2) {
//puts("New Pingu");
playfield.world.pingu.push_back(*(new Pingu(mouse_x, mouse_y)));
//puts("Happy Pinguing");
} else if (mouse_b & 4) {
circlefill(playfield.world.gfx_map, mouse_x, mouse_y, 10, 0xffffff);
circlefill(playfield.world.col_map, mouse_x, mouse_y, 10, 255);
}
playfield.draw();
rest(10);
}
return 0;
}
/* EOF */