Skip to content

Commit

Permalink
Merge pull request #2 from stixpjr/main
Browse files Browse the repository at this point in the history
Fix builds on non-linux platforms; and add a couple of extra models while here
  • Loading branch information
jaqx0r authored Mar 30, 2024
2 parents b0d6c71 + 36b760f commit f7f99c4
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
13 changes: 11 additions & 2 deletions SConstruct
Original file line number Diff line number Diff line change
@@ -1,13 +1,22 @@
from __future__ import print_function

import os

EnsureSConsVersion(0, 95)
SConsignFile('.sconsign')

env = Environment(ENV={'PATH': os.environ['PATH']})

env = Environment()

# Require gl
env.ParseConfig('pkg-config --cflags --libs gl')

# Merge in glu + glut pkg configs if they exist
for pkg in ['glu', 'glut']:
try:
env.ParseConfig('pkg-config --cflags --libs ' + pkg)
except Exception:
pass

# configure
if not env.GetOption("clean"):
conf = Configure(env)
Expand Down
10 changes: 10 additions & 0 deletions glsnake.c
Original file line number Diff line number Diff line change
Expand Up @@ -594,6 +594,16 @@ static struct model_s model[] = {
ZERO, RIGHT, LEFT, RIGHT, PIN, ZERO, RIGHT, ZERO, RIGHT, ZERO, RIGHT,
ZERO, ZERO}}},

/* Models by [email protected] */
{"begging dog",
{{ZERO, RIGHT, RIGHT, RIGHT, PIN, LEFT, RIGHT, ZERO, RIGHT,
LEFT, PIN, RIGHT, RIGHT, ZERO, LEFT, PIN, LEFT, RIGHT, PIN,
RIGHT, LEFT, PIN, LEFT}}},
{"swan",
{{ZERO, PIN, ZERO, ZERO, ZERO, LEFT, ZERO, LEFT, ZERO, ZERO,
RIGHT, PIN, LEFT, ZERO, ZERO, LEFT, PIN, RIGHT, ZERO, ZERO,
LEFT, ZERO, LEFT}}},

/* These models come from the website at
* http://www.geocities.com/stigeide/snake */
#if 0
Expand Down

0 comments on commit f7f99c4

Please sign in to comment.