diff --git a/asset/style.scss b/asset/style.scss
index 4afef4a7..6bb3adf7 100644
--- a/asset/style.scss
+++ b/asset/style.scss
@@ -477,6 +477,10 @@ footer {
.codehilite .nl { color: $primary; } // keyword label (private: etc.)
.codehilite .nt { color: $primary; } // json key
+// Hack: Pygments isn't recognizing preprocessor directives, so just color the
+// error like a keyword.
+.codehilite .err { color: $primary; }
+
// On phone-size screens, shrink all of the text a bit.
@media only screen and (max-width: 479px) {
.content {
diff --git a/book/command.markdown b/book/command.markdown
index e5850828..f17e4efb 100644
--- a/book/command.markdown
+++ b/book/command.markdown
@@ -119,12 +119,12 @@ Now the input handling just delegates to those:
-Notice how we don't check for `null` here? This assumes each button will have
+Notice how we don't check for `NULL` here? This assumes each button will have
*some* command wired up to it.
If we want to support buttons that do nothing without having to explicitly check
-for `null`, we can define a command class whose `execute()` method does nothing.
-Then, instead of setting a button handler to `null`, we point it to that object.
+for `NULL`, we can define a command class whose `execute()` method does nothing.
+Then, instead of setting a button handler to `NULL`, we point it to that object.
This is a pattern called [Null
Object](http://en.wikipedia.org/wiki/Null_Object_pattern).
diff --git a/book/event-queue.markdown b/book/event-queue.markdown
index 91b053e9..bff627e3 100644
--- a/book/event-queue.markdown
+++ b/book/event-queue.markdown
@@ -339,7 +339,7 @@ starts making the speaker wiggle.
We want to defer that work until later so that `playSound()` can return quickly.
To do that, we need to *reify* the request to play a sound. We need a little
structure that stores the details of a pending request so we can keep it around
-until later.
+until later:
^code play-message
diff --git a/book/observer.markdown b/book/observer.markdown
index bd935c11..43240553 100644
--- a/book/observer.markdown
+++ b/book/observer.markdown
@@ -630,7 +630,7 @@ require much knowledge of the other.
## Observers Today
-*Design Patterns* came out in the 90s . Back then,
+*Design Patterns* came out in 1994 . Back then,
object-oriented programming was *the* hot paradigm. Every programmer on Earth
wanted to "Learn OOP in 30 Days," and middle managers paid them based on the
number of classes they created. Engineers judged their mettle by the depth of
diff --git a/code/cpp/service-locator.h b/code/cpp/service-locator.h
index a24b2f7a..130f71f4 100644
--- a/code/cpp/service-locator.h
+++ b/code/cpp/service-locator.h
@@ -78,7 +78,6 @@ class LoggedAudio : public Audio
wrapped_.stopAllSounds();
}
-
private:
void log(const char* message)
{
diff --git a/code/cpp/update-method.h b/code/cpp/update-method.h
index 50a099ec..7904b4d0 100644
--- a/code/cpp/update-method.h
+++ b/code/cpp/update-method.h
@@ -102,7 +102,7 @@ namespace UpdateMethod
//^statues
}
}
-
+
namespace KeepInMind
{
struct Entity
@@ -113,7 +113,7 @@ namespace UpdateMethod
};
static const int MAX_ENTITIES = 10;
-
+
void refreshGame() {}
void skipAdded()
@@ -146,7 +146,7 @@ namespace UpdateMethod
namespace SampleCode
{
static const int MAX_ENTITIES = 10;
-
+
//^entity-class
class Entity
{
@@ -179,7 +179,7 @@ namespace UpdateMethod
{}
void gameLoop();
-
+
private:
Entity* entities_[MAX_ENTITIES];
int numEntities_;
@@ -192,7 +192,7 @@ namespace UpdateMethod
while (true)
{
// Handle user input...
-
+
// Update each entity.
//^update-component-entities
for (int i = 0; i < numEntities_; i++)
@@ -213,7 +213,7 @@ namespace UpdateMethod
Skeleton()
: patrollingLeft_(false)
{}
-
+
virtual void update()
{
if (patrollingLeft_)
@@ -247,7 +247,7 @@ namespace UpdateMethod
if (++frames_ == delay_)
{
shootLightning();
-
+
// Reset the timer.
frames_ = 0;
}
@@ -256,7 +256,7 @@ namespace UpdateMethod
private:
int frames_;
int delay_;
-
+
void shootLightning()
{
// Shoot the lightning...
@@ -310,7 +310,8 @@ namespace UpdateMethod
else
{
x += elapsed;
- if (x >= 100) {
+ if (x >= 100)
+ {
patrollingLeft_ = true;
x = 100 - (x - 100);
}
diff --git a/html/command.html b/html/command.html
index 072a37ed..1d8d0c48 100644
--- a/html/command.html
+++ b/html/command.html
@@ -177,11 +177,11 @@ Configuring Input <
-Notice how we don’t check for null
here? This assumes each button will have
+
Notice how we don’t check for NULL
here? This assumes each button will have
some command wired up to it.
If we want to support buttons that do nothing without having to explicitly check
-for null
, we can define a command class whose execute()
method does nothing.
-Then, instead of setting a button handler to null
, we point it to that object.
+for NULL
, we can define a command class whose execute()
method does nothing.
+Then, instead of setting a button handler to NULL
, we point it to that object.
This is a pattern called Null
Object .
diff --git a/html/event-queue.html b/html/event-queue.html
index b6351cca..1416bbb9 100644
--- a/html/event-queue.html
+++ b/html/event-queue.html
@@ -338,7 +338,7 @@
We want to defer that work until later so that playSound()
can return quickly.
To do that, we need to reify the request to play a sound. We need a little
structure that stores the details of a pending request so we can keep it around
-until later.
+until later:
struct PlayMessage
{
SoundId id ;
diff --git a/html/observer.html b/html/observer.html
index d6118772..37a1ebba 100644
--- a/html/observer.html
+++ b/html/observer.html
@@ -687,7 +687,7 @@ What’s going on?
minimum of communication between them so that working on either one doesn’t
require much knowledge of the other.
-Design Patterns came out in the 90s . Back then,
+
Design Patterns came out in 1994 . Back then,
object-oriented programming was the hot paradigm. Every programmer on Earth
wanted to “Learn OOP in 30 Days,” and middle managers paid them based on the
number of classes they created. Engineers judged their mettle by the depth of
diff --git a/html/service-locator.html b/html/service-locator.html
index dac1cb94..6fd234d0 100644
--- a/html/service-locator.html
+++ b/html/service-locator.html
@@ -368,7 +368,6 @@
Logging decorator <
wrapped_ . stopAllSounds ();
}
-
private:
void log ( const char * message )
{
diff --git a/html/update-method.html b/html/update-method.html
index 63ea0441..aa4abf5d 100644
--- a/html/update-method.html
+++ b/html/update-method.html
@@ -597,7 +597,8 @@
else
{
x += elapsed ;
- if ( x >= 100 ) {
+ if ( x >= 100 )
+ {
patrollingLeft_ = true ;
x = 100 - ( x - 100 );
}
diff --git a/note/log.txt b/note/log.txt
index 94f1c5b7..7433494d 100644
--- a/note/log.txt
+++ b/note/log.txt
@@ -1,3 +1,13 @@
+2014-10-08 - finish layout, proofread, re-upload to createspace for review
+2014-10-07 - layout through data locality
+2014-10-06 - layout through event queue
+2014-10-05 - layout through subclass sandbox
+2014-10-04 - layout through behavioral patterns
+2014-10-03 - layout through singleton (!)
+2014-10-02 - decimal inches page layout
+2014-10-01 - work on new page layout
+2014-09-30 - work on new page layout
+2014-09-29 - cover and other epub front matter
2014-09-28 - email
2014-09-27 - go through bugs and pull requests
2014-09-26 - finish applying proofreading, tweak other web stuff