beautify level strings

This commit is contained in:
Gwenhael Le Moine 2011-07-01 12:19:23 +02:00
parent e2005d8b12
commit 0aea5112e4

285
star.c
View file

@ -2,40 +2,265 @@
#include <string.h>
#include <stdlib.h>
/* levels have fixed, hardcoded dimensions */
#define LEVEL_HEIGHT 9
#define LEVEL_WIDTH 16
#define WALL 'W'
#define BALL 'B'
#define CUBE 'C'
#define VOID 'V'
#define GIFT 'G'
#define WALL '#'
#define BALL '@'
#define CUBE 'H'
#define VOID ' '
#define GIFT '*'
char* levels[] = { "WWWWWWWWWWWWWWWWWBWWVVVVVVVVGWCWWVVVVVVVVVVGVWWWWVVVVVVVWWGVVVVWWVVVWWVGVVVVVVWWWWVGVVGVVVVVGVVWWVGVVVVVVGWWVGVWWVVVVVWWGVVVVVGWWWWWWWWWWWWWWWWW",
"VWVVWVWVWVVVWVWWWVVVGVVVVVVVVVBWVVVWGVVWGVVVGVVVWVWVGVVVVVGVVWVWVVVVVVWVVVGVVVWVWVVVVWCWVVGVVVVWVVVWVVWVWVVVWGGWWVVVVVVVVVVVVVWVVWVVWVVVVVVVVWVV",
"WWWWWWWWWWWWWWWWWVVVVVVVVVVVGWBWWVVVWWVVVVVVWWCWWVVVWGVVVVVGVVVWWVGVVVVVGWWVVVGWWVWGVVGVVGWVVGWWWVWWGVWGVVGVGWWWWGVVVVWWGVVVVVVWWWWWWWWWWWWWWWWW",
"WWWWWWWWWWWWWWWWWVVVVVVVVVVVVWCWWVVVVVWVVVVVVVVWWWGWGVGWGWGWGWGWWVWVWGVGWVWVWVWWWWGWGWGVGWGWGWGWWVVVVVWVVVVVVVVWWVVVWVVVVVVVWBVWWWWWWWWWWWWWWWWW",
"VWWWWWWWWWWWWWWVWBVVWVVVWVVWVVVWWVVWGVWVGVVGVWVWWWVVVVVVWVVWVVVWWGVWGWVVVVVVVVWWWWVVVVVWVGVWVVVWWGWVVWVWVWVVVWCWWVVVWVVVVGWVVWGWVWWWWWWWWWWWWWWV",
"VVVVWWWWWWWWWWWWV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WWWWWWWWWWVVVGWGVVVVVVVVWWWGVVGWVWWGVVVWWWVWVWVGVVVWVVWVWWVCVWVVWWVVWVBGWWVWVVWVVVGVWVWVWWWVVVGWWVWGVVGWWWVVVVVVVVGWGVVVWWWWWWWWWWWWWWWWW",
"WWWWWWWWWWWWWWWWWVWWWVVVVVGVVVWWWVVVWVVVVVVVWVWWWVVVWWGVVVVVVGVWWVVGVVVVGVVVGVWWWVVVVWVVVVWWWGVWWVVGVGVBVCVGVGGWWWWWWWWWWWWWWWWWVVVVVVVVVVVVVVVV",
"WWWWWWWWWWWWWWWWWGWVVWGWVWGVVWVWWVVVVWVVVVVVVVVWWGVVVWVVWGVVGVVWWWVWGVVVVVVGVWWWWVGVWVVVWWWGVVVWWVVVVVWBWCVVGVVWWWWWWWWWWWWWWWWWVVVVVVVVVVVVVVVV",
"VWWWWWWWWWWWWWWVWVWVVWGWVWGVVWVWWVVVVGVVWVVVVVVWWWVVVWVVVGVWGVVWWVVWGVVWVVGGVGVWWWGVWVVVWWVGVVVWWVVVVVWBWCVVGVVWVWWWWWWWWWWWWWWVVVVVVVVVVVVVVVVV",
"WWWWWWWWWWWWWWWWWVVVVVWVVVVVVVWWWVWWGVGVVVVWWGWWWVWGVVVVVGWVVWWWWVGGVVGWVWWVVVVWWVWGVGVWVVVVWWVWWVWWVVVBWCWWWGGWWWWWWWWWWWWWWWWWVVVVVVVVVVVVVVVV",
"WWWWWWWWWWWWWWWWWVVVVVVVVVVVVWVWWVGVWWGVVVGVVVVWWVVVWGVVGVVWWVVWWVGVVVVWWVVWGVVWWVWGVVVGWVVVVGVWWVWWGVWBVCVVVVVWWWWWWWWWWWWWWWWWVVVVVVVVVVVVVVVV" };
char* levels[] = { "################"
"#@## *#H#"
"# * ###"
"# ##* #"
"# ## * ##"
"## * * * #"
"# * *## * #"
"# ##* *#"
"################",
" # # # # # ##"
"# * @#"
" #* #* * "
"# # * * # #"
" # * # "
"# #H# * #"
" # # # #**#"
"# # "
" # # # ",
"################"
"# *#@#"
"# ## ##H#"
"# #* * #"
"# * *## *#"
"# #* * *# *##"
"# ##* #* * *###"
"#* ##* #"
"################",
"################"
"# #H#"
"# # #"
"##*#* *#*#*#*#*#"
"# # #* *# # # ##"
"##*#*#* *#*#*#*#"
"# # #"
"# # #@ #"
"################",
" ############## "
"#@ # # # #"
"# #* # * * # #"
"## # # #"
"#* #*# ##"
"## # * # #"
"#*# # # # #H#"
"# # *# #*#"
" ############## ",
" ############"
" # * #* *#"
" # * # ##"
" # * #"
"#@ * #"
"## * # ##"
"# * # #"
"#H # * ##* #"
"################",
"################"
"# #"
" ## ### #* ##*#"
" #* #* # # # # "
" # # ### ## "
" ## # #*# #*# "
"# #"
"# @#* H #*#"
"################",
"############### "
"# *## ##"
"# #* ## * #"
"# *## # #* #"
"## ## #*# #"
"## # *#* #"
"#*H*# * #@# #"
"## #"
" ###############",
" # ########### "
" #*#* # @#"
"#* *# * # "
" # # *## *# #"
"# #* #*H* *#"
"# *## # "
"#*#* # "
"# # "
"############ ",
" ########### "
"#### * #"
"# H ###* *# *#"
"# * #* #* # "
"# # * # *#"
"#*#* # *# #@# "
" #* ### ### "
"# # # # "
" ######### # #",
"################"
"# # @#"
"# #** ** ##"
"## * ## *#"
"#* #*#** ###"
"## ## ## #"
"#* *# * H *#"
"##*### # ##"
" ## ########### ",
"## ## #### "
"#@#####* ### *##"
"# ** * #"
"# ## ##* #*# #"
"# # * ###* ## #"
"# ## ## #H# #"
"# * #"
"# * #"
"################",
" ############## "
"# @# * ##"
"# # #* *## #"
"# * # #"
"# * #*#"
"# # * #"
"## * * #*#"
"#H # * # # #"
" ############## ",
"################"
"#*#* *#*#"
"# *#@ ## #"
"# H * #"
"# *# #"
"# * #"
"# *# # #"
"#*#* *#*#"
"################",
" ###### ####### "
"# *# * #"
"# # * # # * #"
"# @# #** #* #"
" # # # * H# #"
"#* # #* #"
" # * # "
"#* *#"
" ############## ",
"################"
"## H#* * *#"
"#* @*#* ##"
"## ### * ##"
"## *#*# #"
"#** *#* #"
"## * ####* #"
"##*# # #"
"################",
"################"
"# *# #@ #"
"# # *#**#* # #"
"# #*##*# * #"
"# *# *# #"
"# *#* *# #"
"# # # ##*# # #"
"# * #* H #"
"################",
"################"
"# * * H# #"
"# #*#* #* #"
"# #*# #* #"
"# * # *#* #"
"# #*# # *# #"
"# *#* # * # #"
"#*#@ # # #"
"################",
"################"
"#* ## ##*#"
"# # # #* #"
"# *# *## * #"
"# # #* #"
"# # *# #"
"# ## *# ##* #H#"
"# *# #* ##@#"
"################",
"################"
"# *#* #"
"##* *# ##* ##"
"# # # * # # #"
"# H # ## # @*#"
"# # # * # # #"
"## *## #* *##"
"# *#* #"
"################",
"################"
"# ### * ##"
"# # # ##"
"# ##* * #"
"# * * * ##"
"# # ###* #"
"# * * @ H * **#"
"################"
" ",
"################"
"#*# #*# #* # #"
"# # #"
"#* # #* * #"
"## #* * ###"
"# * # ###* #"
"# #@#H * #"
"################"
" ",
" ############## "
"# # #*# #* # #"
"# * # #"
"## # * #* #"
"# #* # ** * #"
"##* # ## * #"
"# #@#H * #"
" ############## "
" ",
"################"
"# # ##"
"# ##* * ##*##"
"# #* *# ###"
"# ** *# ## #"
"# #* * # ## #"
"# ## @#H###**#"
"################"
" ",
"################"
"# # #"
"# * ##* * #"
"# #* * ## #"
"# * ## #* #"
"# #* *# * #"
"# ##* #@ H #"
"################"
" " };
struct state {
char level[ LEVEL_HEIGHT * LEVEL_WIDTH ];