mirror of
https://github.com/gwenhael-le-moine/c-urs_-toil-s.git
synced 2024-12-26 09:58:48 +01:00
beautify level strings
This commit is contained in:
parent
e2005d8b12
commit
0aea5112e4
1 changed files with 255 additions and 30 deletions
285
star.c
285
star.c
|
@ -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",
|
||||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VWWVGVWWGVVVGVVVVWWVVVWGVVGVVWWVVWWVGVVVVWWVVWGVVWWVWGVVVGWVVVVGVWWVWWGVWBVCVVVVVWWWWWWWWWWWWWWWWWVVVVVVVVVVVVVVVV" };
|
||||
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 ];
|
||||
|
|
Loading…
Reference in a new issue