Permalink
Browse files

Do away with Constants; only use the shorthand C.

  • Loading branch information...
1 parent f4996af commit c36f1a0a236667d8c39b9c149437ddae0eb148d5 @stephank committed Jun 14, 2010
Showing with 8 additions and 10 deletions.
  1. +7 −9 src/globals.js
  2. +1 −1 util/lint.head.js
View
@@ -1,10 +1,8 @@
// This file is special. Because these global variables are referenced immediatly on execution of
// some other scripts, this should be one of the first source files included.
-// Constants is just a container for predefined and precalculated stuff.
-var Constants = {};
-// A shorthand.
-var C = Constants;
+// A container for constants; predefined and precalculated stuff.
+var C = {};
// The canvas drawing context. (See engine.js.)
var c = null;
@@ -15,11 +13,11 @@ var frame = null;
var grid = null;
// Radians per degree, used in conversion.
-Constants.radPerDeg = Math.PI / 180;
+C.radPerDeg = Math.PI / 180;
// Constants for Z-coordinates.
// When in normal play, the grid starts at 20 and goes down another 120.
-Constants.startDepth = 20;
-Constants.depth = 120;
-Constants.endDepth = Constants.startDepth + Constants.depth;
-Constants.fogDepth = Constants.startDepth * 2;
+C.startDepth = 20;
+C.depth = 120;
+C.endDepth = C.startDepth + C.depth;
+C.fogDepth = C.startDepth * 2;
View

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

0 comments on commit c36f1a0

Please sign in to comment.