From e4186bd02b6d2fd0ed2550a050c140448bd3a152 Mon Sep 17 00:00:00 2001 From: alu Date: Sun, 11 Apr 2010 06:29:08 +0000 Subject: [PATCH] Added Langton\'s Ant to animations + some whitespace fun. --- animations/Makefile | 4 ++++ config.in | 39 ++++++++++++++++++++------------------- display_loop.c | 7 +++++++ 3 files changed, 31 insertions(+), 19 deletions(-) diff --git a/animations/Makefile b/animations/Makefile index 0f8392d..1d8640c 100644 --- a/animations/Makefile +++ b/animations/Makefile @@ -29,4 +29,8 @@ ifeq ($(ANIMATION_BREAKOUT),y) SRC += breakout_demo.c endif +ifeq ($(ANIMATION_LTN_ANT),y) + SRC += ltn_ant.c +endif + include $(TOPDIR)/rules.mk diff --git a/config.in b/config.in index 93489f7..740a341 100644 --- a/config.in +++ b/config.in @@ -9,9 +9,9 @@ comment "General Setup" choice 'Target MCU' \ "ATmega8 atmega8 \ - ATmega32 atmega32 \ - ATmega644 atmega644 \ - ATmega644p atmega644p" \ + ATmega32 atmega32 \ + ATmega644 atmega644 \ + ATmega644p atmega644p" \ 'ATmega32' MCU int "MCU frequency" FREQ 16000000 @@ -61,24 +61,25 @@ source games/config.in ######################### Animations Menu ##################################### mainmenu_option next_comment comment "Animations" - comment "selects which animations are displayed in main loop" + comment "selects which animations are displayed in main loop" - dep_bool "Scrolltext" ANIMATION_SCROLLTEXT $SCROLLTEXT_SUPPORT - bool "Spirale" ANIMATION_SPIRALE - bool "Joern1" ANIMATION_JOERN1 - dep_bool "Snake" ANIMATION_SNAKE $RANDOM_SUPPORT - bool "Schachbrett" ANIMATION_SCHACHBRETT - dep_bool "Feuer" ANIMATION_FEUER $RANDOM_SUPPORT - dep_bool "Matrix" ANIMATION_MATRIX $RANDOM_SUPPORT - dep_bool "Random Bright" ANIMATION_RANDOM_BRIGHT $RANDOM_SUPPORT - dep_bool "Stonefly" ANIMATION_STONEFLY $RANDOM_SUPPORT $GAME_TETRIS_CORE - dep_bool "Flying Dots" ANIMATION_FLYINGDOTS $RANDOM_SUPPORT - dep_bool "Game of Life" ANIMATION_GAMEOFLIFE $RANDOM_SUPPORT - dep_bool "Breakout Demo" ANIMATION_BREAKOUT $GAME_BREAKOUT - bool "M Herweg" ANIMATION_MHERWEG + dep_bool "Scrolltext" ANIMATION_SCROLLTEXT $SCROLLTEXT_SUPPORT + bool "Spirale" ANIMATION_SPIRALE + bool "Joern1" ANIMATION_JOERN1 + dep_bool "Snake" ANIMATION_SNAKE $RANDOM_SUPPORT + bool "Schachbrett" ANIMATION_SCHACHBRETT + dep_bool "Feuer" ANIMATION_FEUER $RANDOM_SUPPORT + dep_bool "Matrix" ANIMATION_MATRIX $RANDOM_SUPPORT + dep_bool "Random Bright" ANIMATION_RANDOM_BRIGHT $RANDOM_SUPPORT + dep_bool "Stonefly" ANIMATION_STONEFLY $RANDOM_SUPPORT $GAME_TETRIS_CORE + dep_bool "Flying Dots" ANIMATION_FLYINGDOTS $RANDOM_SUPPORT + dep_bool "Game of Life" ANIMATION_GAMEOFLIFE $RANDOM_SUPPORT + dep_bool "Breakout Demo" ANIMATION_BREAKOUT $GAME_BREAKOUT + bool "M Herweg" ANIMATION_MHERWEG + bool "Langton Ant" ANIMATION_LTN_ANT $RANDOM_SUPPORT - comment "Special Animations" - bool "Test Animations" ANIMATION_TESTS + comment "Special Animations" + bool "Test Animations" ANIMATION_TESTS bool "Display off mode" ANIMATION_OFF endmenu diff --git a/display_loop.c b/display_loop.c index 14fbb8c..b6bd9e9 100644 --- a/display_loop.c +++ b/display_loop.c @@ -10,6 +10,7 @@ #include "animations/stonefly.h" #include "animations/flyingdots.h" #include "animations/breakout_demo.h" +#include "animations/ltn_ant.h" #include "borg_hw/borg_hw.h" #include "can/borg_can.h" #include "random/prng.h" @@ -135,6 +136,12 @@ void display_loop(){ break; #endif +#ifdef ANIMATION_LTN_ANT + case 14: + ltn_ant(); + break; +#endif + #ifdef ANIMATION_TESTS case 31: test_level1();