aboutsummaryrefslogtreecommitdiffstats
path: root/src/world.cpp
diff options
context:
space:
mode:
authordrumsetmonkey <abelleisle@roadrunner.com>2015-12-04 09:20:36 -0500
committerdrumsetmonkey <abelleisle@roadrunner.com>2015-12-04 09:20:36 -0500
commit58ed33ed617396b4b4780d5b419392ae65d20e08 (patch)
tree96cbe176144ee5f863fac6f9c4db544d722a296c /src/world.cpp
parent4c6895ba1445a040f65affea6f29ab66011960db (diff)
parent5f0a1b99133a4f333f8be1466f1f5bf1245d6781 (diff)
Fixed white outline around textures :)
Diffstat (limited to 'src/world.cpp')
-rw-r--r--src/world.cpp19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/world.cpp b/src/world.cpp
index 5f8d44c..1b90a4b 100644
--- a/src/world.cpp
+++ b/src/world.cpp
@@ -321,8 +321,8 @@ void World::draw(Player *p){
static float yoff=DRAW_Y_OFFSET; // Initialize stuff
static int shade,bgshade;
static World *current;
- unsigned int i,ie;
- int is,v_offset,cx_start,width;
+ unsigned int i;
+ int is,ie,v_offset,cx_start,width;
struct line_t *cline;
bgshade = worldShade << 1; // *2
@@ -467,7 +467,8 @@ LOOP2:
// ie -> i end
ie=v_offset + (SCREEN_WIDTH / 2 / HLINE) + GEN_INC + HLINE;
- if(ie>current->lineCount)ie=current->lineCount; // Maximum bound
+ if(ie>(int)current->lineCount)ie=current->lineCount; // Maximum bound
+ else if(ie < GEN_INC)ie = GEN_INC;
/*
* Make more direct variables for quicker referencing.
@@ -499,7 +500,7 @@ LOOP2:
bool hey=false;
glBegin(GL_QUADS);
- for(i=is;i<ie-GEN_INC;i++){
+ for(i=is;i<(unsigned)ie-GEN_INC;i++){
cline[i].y+=(yoff-DRAW_Y_OFFSET); // Add the y offset
if(!cline[i].y){
cline[i].y+=50;
@@ -526,7 +527,7 @@ LOOP2:
float cgh[2];
glBegin(GL_QUADS);
- for(i=is;i<ie-GEN_INC;i++){
+ for(i=is;i<(unsigned)ie-GEN_INC;i++){
/*
* Load the current line's grass values
@@ -1043,15 +1044,15 @@ extern bool inBattle;
Arena::Arena(World *leave,Player *p){
generate(300);
- door.y = line[299].y;
- door.x = 100;
+ //door.y = line[299].y;
+ //door.x = 100;
exit = leave;
- npc.push_back(new NPC());
+ /*npc.push_back(new NPC());
entity.push_back(npc.back());
entity.back()->spawn(door.x,door.y);
entity.back()->width = HLINE * 12;
- entity.back()->height = HLINE * 16;
+ entity.back()->height = HLINE * 16;*/
inBattle = true;
pxy = p->loc;