-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathSky.cpp
More file actions
53 lines (44 loc) · 790 Bytes
/
Sky.cpp
File metadata and controls
53 lines (44 loc) · 790 Bytes
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
45
46
47
48
49
50
51
52
53
//
// Sky.cpp
// Project
//
// Created by Inês on 10/8/11.
// Copyright 2011 __MyCompanyName__. All rights reserved.
//
#include "Sky.h"
namespace CastleBlast {
Sky::Sky() : cg::Entity("SKY") {}
Sky::~Sky() {}
void Sky::init()
{
_worldSize = cg::Properties::instance()->getInt("WORLD_SIZE");
_red=0;
_green=0;
_blue=0;
}
void Sky::draw()
{
glDisable(GL_LIGHTING);
glColor3d(_red, _green, _blue);
glutSolidSphere(_worldSize, 16, 16);
glEnable(GL_LIGHTING);
}
void Sky::setLevel(int level)
{
switch (level) {
case 1:
_red=0.53;
_green=0.81;
_blue=0.98;
break;
case 2:
_red=0.0;
_green=0.0;
_blue=0.0;
break;
}
}
void Sky::setLevel1(){}
void Sky::setLevel2(){}
void Sky::update(unsigned long elapsed_millis) {}
}