瀏覽代碼

Fixed a few minor bug introduced by the merge.

Adrien Boucaud 12 年之前
父節點
當前提交
09608e9926
共有 2 個文件被更改,包括 24 次插入31 次删除
  1. 23 19
      hexagon.g1w
  2. 1 12
      wall.c

+ 23 - 19
hexagon.g1w

@@ -1,19 +1,23 @@
-[DLSimProject]
-Name=hexagon
-Version=1.00.0000
-Model=:fx-9860G.dlm
-SourcePath=SRC
-MemoryPath=INIT
-MemCardPath=SDCard
-
-[Program1]
-Program=HEXAGON.G1A
-Debug=Debug\FXADDINror.dbg
-LoadAddress=80000000:90100000
-
-[Files]
-SourceFile=:hexagon.c
-SourceFile=:ECode.c
-SourceFile=:MonochromeLib.c
-SourceFile=:syscall.src
-SourceFile=:wall.c
+[DLSimProject]
+Name=hexagon
+Version=1.00.0000
+Model=:fx-9860G.dlm
+SourcePath=SRC
+MemoryPath=INIT
+MemCardPath=SDCard
+
+[Program1]
+Program=hexagon.G1A
+Debug=Debug\FXADDINror.dbg
+LoadAddress=80000000:90100000
+
+[Files]
+SourceFile=:draw_states.c
+SourceFile=:ECode.c
+SourceFile=:hexagon.c
+SourceFile=:init_states.c
+SourceFile=:MonochromeLib.c
+SourceFile=:states.c
+SourceFile=:syscall.src
+SourceFile=:update_states.c
+SourceFile=:wall.c

+ 1 - 12
wall.c

@@ -76,17 +76,6 @@ void updateWalls(Wall *list, unsigned int delta_time)
 	}while(tmp != NULL);
 }
 
-//these are the actual drawing functions
-//they should the rewritten from scratch
-int getSlopeIndex(int dot1, int dot2)
-{
-	if(dot2 - dot1 == 1)
-	{
-		return dot1;
-	}else if(dot2 - dot1 == -1){
-		return dot2;
-	}else return 3;
-}
 void drawWalls(Wall *list, Camera *cam)
 {
 	Wall *tmp;
@@ -103,7 +92,7 @@ void drawWalls(Wall *list, Camera *cam)
 				const float sin1 = sin(angle);
 				const float sin2 = sin(angle + PI/3);
 				int i,j, x, y;
-				float dist = tmp->d - tmp->h + cam.zoom;
+				float dist = tmp->d - tmp->h + cam->zoom;
 				for(i = 0; i < tmp->h; ++i) {
 					if(dist <= 8) break;
 					ML_line(64 + dist*cos1, 32 + dist*sin1, 64 + dist*cos2, 32 + dist*sin2, BLACK);