From 2e8cabf47e621bb09d76475d27454f9c999f52d7 Mon Sep 17 00:00:00 2001 From: sigonasr2 Date: Mon, 25 Jul 2022 16:49:29 -0500 Subject: [PATCH] Fix the referencing of map IDs to tile IDs Co-authored-by: sigonasr2 --- main | Bin 17928 -> 22024 bytes main.c | 20 ++++++++++++-------- maps/start.world | 2 +- 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/main b/main index ffe45b68c0c99822714faa8619aa944dd227fd4e..58b20bb4995ef4caf58e96a850a2f0c5527a32b0 100755 GIT binary patch literal 22024 zcmeHP4|G%4dB2h|aR?xjKto6ZN&-D06xAk>K?#iwJo4Py;DFthWLra)9R0yS zOJ*kAqNAvBw~^6yUFotk>DG2+Sp#hY*o0t`lcpx4ozsv_X_H2ZY3jJN^->b;_uW5F zPp^78JKN6A*^Vzr-~E2ypL_3j@4N55E5G|ETH^+%!@*RlU>|0jn=Oz!DbP164aVx& zN;U)E3)p-%74Q^%>ZI68N1Q^SXqD8f042M*lqo~66EIU$)sQIJ*`>OfLZT?E7ChNi zQdaU-y6Y;Tr>K$}<<$r|v(N$AK1I!T6r01h3%kROrLo z)ys_!b>E#ETN%1#fH3KfIeP`K{E>_fCRZ17_?ejc>J<2Lxy zHuxnQ{6!o5lQ#H0Hud-0;Mc>C8y{=(11J~&4L11eHu&Q<_$-_HtgyjvvBCG-`2V&I z-eiM+0Js|;Yq}3Wxj4KDd={I>>YAm6yeOTh=Z#h;;IsH}{mnwC=3C}%Xle5L1JOW7 zFcuF)TbkB|BH=)bZ(At9yxxwkNZ1>T`=W8LSE!a%^anyc!7%Ib`TcF3EF1~6bw zQ5FvLaQ|JA9RU^$2jkvuUogsZv9>4^733~ZI4a}Y#kL1_b^H7f`AMT~TQuO?&U|e# zZGQS+!@f{(cYt;ILJ$JQgxe;Y-sMB%+9Tb8FzZglV+_8y z5}3A5RL@I#ZQH$Vo!h&)=AltStvwKFXK)v8OGIOV7){!@5g!kR+am_oCUP6s zwQk;`ZMn_6!c*g^UA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30L~tHc}h0_A-|tcst5 zRq%(a-~+&^Ud$^hB*<%3^nVFlDOcs(N5E&E@^iwe#=?lUWGPL@_^i|pOE~Ug z17f`Ky-n!TI#)@*S?IqY`j_wdLjQSuT$oR`HXvh4FCiWp|6bwjCLz1MivPQSlOM0w zx{;C1)^Fg6;C9!Kza`g#=E+s z;Z!)}UgKH4ys{DetDUJqBAaqzq95ym}t#JBBKbZ8@I{d6rxo>$0%4AsH zTGk^-<>nZksF8j`iJxb(ipx)CX`y6XLvw}b)K=3L*o7i7Eu9R9F#73i*8dO&4G0>m z;=ELOVa@SCXgmKQPn@$V7i-$CWKu-R&r}CmwX4mt445Ej;jeqgDeq_ z2FO6H4YpmKeeaFfMeK7UH8NJT-d_H?QbKhefz{QaVQNj<_& zZ0i{NBhqaE8QRN{_Hw^RQm+tD9jTpV{pG$-1Q-=5?dATFq&vyTlq@W}8#3C9k@oWW zSW;{JQcqGkhfI4rl9$iXl6H%-DSnDm#xG!&M~2!|+RNu{N#%Z%wf$uMe<6%@WU*I-oun>HgInCQzp>cM{Qya&zKF^i z9(&wk?-lz7lJd$)V^HZ&(r2vp;-*X9f1Z~ckHUwvlP>8cVRQS*eF#bAzNyr=w%?1w zUiLpzgr=bMvYt7~{*%~i$WZyx{-~l$B;BX8#<#WnUqE8Em-`=*j*!rltmS_I8SN#A z%iegdmw&gwsxNs-KZdQ-WH0xNmn;K_B=vM|f|vLg5YX6_<;&-F`FAMf-L z{rI=QsEX2F?$3C|gU0}5<|OSUrE~mdd*&6|9-T^7piGe&LFsv)d>Q3?b%9sd%lL)* zMfS5`kN-@lOEo6#Z!i!&L%NjARE`~8qJMV_hlfN(Y1@ICMAlo*AG8lHW7jS9@9{M{ az1cG0WVuq8F4s!-H>}q+uCN$bSoYt_eo=7% diff --git a/main.c b/main.c index ef34146..316e3ee 100644 --- a/main.c +++ b/main.c @@ -13,7 +13,11 @@ const char*TILES[TILECOUNT] = { /*3*/ "START", }; -int lookupReferenceTile(char*tileName) { +enum Tile{ + VOID,WALL,GRASS,START +}; + +char lookupReferenceTile(char*tileName) { for (int j=0;j