Permalink
Browse files

bug fixes in app5 regarding recent API changes

  • Loading branch information...
1 parent 7be09da commit cf51685da018566f216dd080e955f0cf965aff9a James Long committed Nov 14, 2009
Showing with 40 additions and 51 deletions.
  1. +11 −9 lib/apps/app5.scm
  2. +7 −9 lib/init.scm
  3. BIN resources/sphere.obj.gso
  4. +12 −13 tosser.xcodeproj/james.mode1v3
  5. +10 −20 tosser.xcodeproj/james.pbxuser
View
@@ -2,14 +2,14 @@
;;; Balls thrown up and pulled down by gravity (determined from
;;; accelerometer)
-(include "events#.scm")
-(include "obj-loader2.scm")
-(include "scene.scm")
-(include "physics.scm")
+(include "../events#.scm")
+(include "../obj-loader2.scm")
+(include "../scene.scm")
+(include "../physics.scm")
;;; resources
-(define sphere-mesh (obj-load (resource "resources/sphere") #t))
+(define sphere-mesh #f)
;;; throwing
@@ -70,6 +70,8 @@
(define (init)
(random-source-randomize! default-random-source)
+ (set! sphere-mesh (obj-load (local-resource "resources/sphere") #t))
+
;; opengl
(let* ((fov 40.)
(aspect (/ (UIView-width (current-view))
@@ -91,12 +93,12 @@
(glEnable GL_LIGHTING)
(glEnable GL_LIGHT0)
(glLightf GL_LIGHT0 GL_CONSTANT_ATTENUATION .6)
- (glLightfv GL_LIGHT0 GL_AMBIENT (vector->GLfloat* (vector .15 .15 .15 1.)))
- (glLightfv GL_LIGHT0 GL_POSITION (vector->GLfloat* (vector 25. 25. 0. 1.)))
- (glLightfv GL_LIGHT0 GL_DIFFUSE (vector->GLfloat* (vector 1. 1. 1. 1.)))
+ (glLightfv GL_LIGHT0 GL_AMBIENT (vector->float-array (vector .15 .15 .15 1.)))
+ (glLightfv GL_LIGHT0 GL_POSITION (vector->float-array (vector 25. 25. 0. 1.)))
+ (glLightfv GL_LIGHT0 GL_DIFFUSE (vector->float-array (vector 1. 1. 1. 1.)))
(glFogx GL_FOG_MODE GL_EXP2)
- (glFogfv GL_FOG_COLOR (vector->GLfloat* (vector 0. 0. 0. 1.)))
+ (glFogfv GL_FOG_COLOR (vector->float-array (vector 0. 0. 0. 1.)))
(glFogf GL_FOG_DENSITY .01)
(glFogf GL_FOG_START 1.)
(glFogf GL_FOG_END 1000.)
View
@@ -4,12 +4,12 @@
;;;; debugger
-;; (include "util/remote-debugger/debuggee.scm")
-;; (rdi-set-host! "localhost:20000")
+(include "util/remote-debugger/debuggee.scm")
+(rdi-set-host! "localhost:20000")
-;; (thread-start!
-;; (make-thread
-;; (lambda () (##repl-debug-main))))
+(thread-start!
+ (make-thread
+ (lambda () (##repl-debug-main))))
;; (define (thread-make-repl-channel-remote thread)
;; (let ((i (open-input-string ""))
@@ -23,9 +23,7 @@
(include "resource.scm")
(include "util/srfi-1.scm")
-
(include "ffi/ffi.scm")
-(include "ffi/lodepng/lodepng.scm")
(include "ffi/gl.scm")
(include "ffi/gl-util.scm")
(include "ffi/osx.scm")
@@ -34,8 +32,8 @@
(include "vectors.scm")
(include "events.scm")
-;;(load (local-resource "lib/apps/animattack"))
-(include "apps/animattack.scm")
+(load (local-resource "lib/apps/app5"))
+;;(include "apps/app5.scm")
;; ;;;; c interface
View
Binary file not shown.
@@ -358,9 +358,6 @@
<string>1A5300D6103E52D200859416</string>
<string>1A8888681079AB6D00E1E774</string>
<string>1A8888691079AB6D00E1E774</string>
- <string>1A1D5ADB109A369C00ED980E</string>
- <string>1A1D5ADC109A369C00ED980E</string>
- <string>1A1D5B46109BFEF400ED980E</string>
</array>
</dict>
<key>SplitCount</key>
@@ -372,14 +369,14 @@
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
- <string>{{0, 0}, {803, 229}}</string>
+ <string>{{0, 0}, {803, 218}}</string>
<key>RubberWindowFrame</key>
<string>132 312 1011 523 0 0 1440 878 </string>
</dict>
<key>Module</key>
<string>PBXNavigatorGroup</string>
<key>Proportion</key>
- <string>229pt</string>
+ <string>218pt</string>
</dict>
<dict>
<key>ContentConfiguration</key>
@@ -392,14 +389,14 @@
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
- <string>{{0, 234}, {803, 248}}</string>
+ <string>{{0, 223}, {803, 259}}</string>
<key>RubberWindowFrame</key>
<string>132 312 1011 523 0 0 1440 878 </string>
</dict>
<key>Module</key>
<string>XCDetailModule</string>
<key>Proportion</key>
- <string>248pt</string>
+ <string>259pt</string>
</dict>
</array>
<key>Proportion</key>
@@ -418,9 +415,9 @@
</array>
<key>TableOfContents</key>
<array>
- <string>1A4E478B10AEFC650034AC4B</string>
+ <string>1A1DE02610AEFCB60053C3EA</string>
<string>1CE0B1FE06471DED0097A5F4</string>
- <string>1A4E478C10AEFC650034AC4B</string>
+ <string>1A1DE02710AEFCB60053C3EA</string>
<string>1CE0B20306471E060097A5F4</string>
<string>1CE0B20506471E060097A5F4</string>
</array>
@@ -541,7 +538,7 @@
<key>StatusbarIsVisible</key>
<true/>
<key>TimeStamp</key>
- <real>279903333.62121803</real>
+ <real>279903414.62875098</real>
<key>ToolbarDisplayMode</key>
<integer>1</integer>
<key>ToolbarIsVisible</key>
@@ -556,8 +553,8 @@
<integer>5</integer>
<key>WindowOrderList</key>
<array>
- <string>1ACA2F3C0FD4E803005851FB</string>
<string>/Users/james/projects/scheme/gambit-iphone-example/tosser.xcodeproj</string>
+ <string>1ACA2F3C0FD4E803005851FB</string>
</array>
<key>WindowString</key>
<string>132 312 1011 523 0 0 1440 878 </string>
@@ -598,6 +595,8 @@
<string>228pt</string>
</dict>
<dict>
+ <key>BecomeActive</key>
+ <true/>
<key>ContentConfiguration</key>
<dict>
<key>PBXProjectModuleGUID</key>
@@ -637,7 +636,7 @@
<key>TableOfContents</key>
<array>
<string>1ACA2F3C0FD4E803005851FB</string>
- <string>1A4E478D10AEFC650034AC4B</string>
+ <string>1A1DE02810AEFCB60053C3EA</string>
<string>1CD0528F0623707200166675</string>
<string>XCMainBuildResultsModuleGUID</string>
</array>
@@ -648,7 +647,7 @@
<key>WindowToolGUID</key>
<string>1ACA2F3C0FD4E803005851FB</string>
<key>WindowToolIsVisible</key>
- <false/>
+ <true/>
</dict>
<dict>
<key>FirstTimeWindowDisplayed</key>
@@ -79,11 +79,6 @@
name = sheep.mtl;
path = "/Users/james/projects/scheme/gambit-iphone-example/resources/sheep.mtl";
sourceTree = "<absolute>";
- uiCtxt = {
- sepNavIntBoundsRect = "{{0, 0}, {742, 519}}";
- sepNavSelRange = "{0, 0}";
- sepNavVisRange = "{0, 514}";
- };
};
1A8888021079A52100E1E774 /* sheep.obj */ = {
isa = PBXFileReference;
@@ -92,11 +87,6 @@
name = sheep.obj;
path = "/Users/james/projects/scheme/gambit-iphone-example/resources/sheep.obj";
sourceTree = "<absolute>";
- uiCtxt = {
- sepNavIntBoundsRect = "{{0, 0}, {742, 45396}}";
- sepNavSelRange = "{0, 0}";
- sepNavVisRange = "{0, 1223}";
- };
};
1A8888681079AB6D00E1E774 /* PlistBookmark */ = {
isa = PlistBookmark;
@@ -319,18 +309,18 @@
PBXFileDataSource_Warnings_ColumnID,
);
};
- PBXPerProjectTemplateStateSaveDate = 279903258;
- PBXWorkspaceStateSaveDate = 279903258;
+ PBXPerProjectTemplateStateSaveDate = 279903404;
+ PBXWorkspaceStateSaveDate = 279903404;
};
perUserProjectItems = {
- 1A1D5ADB109A369C00ED980E /* PBXBookmark */ = 1A1D5ADB109A369C00ED980E /* PBXBookmark */;
- 1A1D5ADC109A369C00ED980E /* PBXTextBookmark */ = 1A1D5ADC109A369C00ED980E /* PBXTextBookmark */;
- 1A1D5B46109BFEF400ED980E /* PBXTextBookmark */ = 1A1D5B46109BFEF400ED980E /* PBXTextBookmark */;
- 1A3B7340101900D300887149 /* PBXTextBookmark */ = 1A3B7340101900D300887149 /* PBXTextBookmark */;
- 1A5300D6103E52D200859416 /* PBXTextBookmark */ = 1A5300D6103E52D200859416 /* PBXTextBookmark */;
- 1A8888681079AB6D00E1E774 /* PlistBookmark */ = 1A8888681079AB6D00E1E774 /* PlistBookmark */;
- 1A8888691079AB6D00E1E774 /* PBXTextBookmark */ = 1A8888691079AB6D00E1E774 /* PBXTextBookmark */;
- 1A9614811012282700A54EBA /* PBXTextBookmark */ = 1A9614811012282700A54EBA /* PBXTextBookmark */;
+ 1A1D5ADB109A369C00ED980E = 1A1D5ADB109A369C00ED980E /* PBXBookmark */;
+ 1A1D5ADC109A369C00ED980E = 1A1D5ADC109A369C00ED980E /* PBXTextBookmark */;
+ 1A1D5B46109BFEF400ED980E = 1A1D5B46109BFEF400ED980E /* PBXTextBookmark */;
+ 1A3B7340101900D300887149 = 1A3B7340101900D300887149 /* PBXTextBookmark */;
+ 1A5300D6103E52D200859416 = 1A5300D6103E52D200859416 /* PBXTextBookmark */;
+ 1A8888681079AB6D00E1E774 = 1A8888681079AB6D00E1E774 /* PlistBookmark */;
+ 1A8888691079AB6D00E1E774 = 1A8888691079AB6D00E1E774 /* PBXTextBookmark */;
+ 1A9614811012282700A54EBA = 1A9614811012282700A54EBA /* PBXTextBookmark */;
};
sourceControlManager = 1ACA2F450FD4E803005851FB /* Source Control */;
userBuildSettings = {

0 comments on commit cf51685

Please sign in to comment.