From 1084917cb673ee30dc8dbd145784d41728c873fe Mon Sep 17 00:00:00 2001 From: attilavs2 Date: Fri, 25 Oct 2024 23:05:09 +0200 Subject: [PATCH] =?UTF-8?q?J'ai=20oubli=C3=A9=20de=20commit=20--'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CMakeLists.txt | 15 +++- assets-fx/2bpp_palette.png | Bin 0 -> 77 bytes assets-fx/fxconv-metadata.txt | 5 +- assets-fx/sprite.png | Bin 642 -> 0 bytes assets-fx/sprites/friendlyguy.png | Bin 0 -> 5144 bytes assets-fx/sprites/friendlyguy1.png | Bin 0 -> 5194 bytes assets-fx/sprites/fxconv-metadata.txt | 8 ++ assets-fx/textures/bwain.png | Bin 0 -> 5876 bytes assets-fx/textures/bwain1.png | Bin 0 -> 5870 bytes assets-fx/textures/fxconv-metadata.txt | 18 +++- assets-fx/textures/meat.png | Bin 0 -> 6062 bytes assets-fx/textures/meat1.png | Bin 0 -> 6036 bytes eng/map.c | 66 -------------- eng/moteur.c | 13 ++- eng/sprites.c | 38 +++++--- eng/utils.c | 78 ++++++++++++++++ include/C3D/map.h | 6 -- include/C3D/sprites.h | 2 + include/C3D/utils.h | 7 +- src/game.c | 39 ++++++++ src/game.h | 18 ++++ src/gfx.c | 44 +++++++++ src/gfx.h | 14 +++ src/main.c | 118 +++++++++++-------------- src/map.c | 44 +++++++++ src/map.h | 13 +++ 26 files changed, 376 insertions(+), 170 deletions(-) create mode 100644 assets-fx/2bpp_palette.png delete mode 100644 assets-fx/sprite.png create mode 100644 assets-fx/sprites/friendlyguy.png create mode 100644 assets-fx/sprites/friendlyguy1.png create mode 100644 assets-fx/sprites/fxconv-metadata.txt create mode 100644 assets-fx/textures/bwain.png create mode 100644 assets-fx/textures/bwain1.png create mode 100644 assets-fx/textures/meat.png create mode 100644 assets-fx/textures/meat1.png create mode 100644 src/game.c create mode 100644 src/game.h create mode 100644 src/gfx.c create mode 100644 src/gfx.h create mode 100644 src/map.c create mode 100644 src/map.h diff --git a/CMakeLists.txt b/CMakeLists.txt index 4593da5..b5ca519 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -16,8 +16,11 @@ set(NAMEOFGAME "Test3D") set(AUTHOR "Fcalva") set(SOURCES - #sources de votre jeu + #sources du jeu src/main.c + src/gfx.c + src/map.c + src/game.c #sources du moteur eng/moteur.c eng/map.c @@ -27,15 +30,21 @@ set(SOURCES ) set(ASSETS - assets-fx/sprite.png + assets-fx/sprites/friendlyguy.png + assets-fx/sprites/friendlyguy1.png + assets-fx/textures/briques0.png assets-fx/textures/buisson1.png + assets-fx/textures/bwain.png + assets-fx/textures/bwain1.png + assets-fx/textures/meat.png + assets-fx/textures/meat1.png ) fxconv_declare_assets(${ASSETS} WITH_METADATA) add_executable(Copy3DEngine ${SOURCES} ${ASSETS}) -target_compile_options(Copy3DEngine PRIVATE -Wall -Wextra -Ofast) +target_compile_options(Copy3DEngine PRIVATE -Wall -Wextra -O2) target_include_directories(Copy3DEngine PRIVATE "include/") target_compile_definitions(Copy3DEngine PRIVATE NAMEOFGAME="${NAMEOFGAME}" AUTHOR="${AUTHOR}") target_link_libraries(Copy3DEngine Gint::Gint) diff --git a/assets-fx/2bpp_palette.png b/assets-fx/2bpp_palette.png new file mode 100644 index 0000000000000000000000000000000000000000..05dc19da38d7d0adb4bde11eacaf2b43cd4a6cde GIT binary patch literal 77 zcmeAS@N?(olHy`uVBq!ia0vp^j6lr7!2%?oUYxrTNQrp5IEHY{OiuW5{>k|RB8Luq b_;1f3Xvw_P-D`3tP@cil)z4*}Q$iB}#ljW* literal 0 HcmV?d00001 diff --git a/assets-fx/fxconv-metadata.txt b/assets-fx/fxconv-metadata.txt index 2766769..8b13789 100644 --- a/assets-fx/fxconv-metadata.txt +++ b/assets-fx/fxconv-metadata.txt @@ -1,4 +1 @@ -sprite.png: - type: bopti-image - name: sprite_tst - profile: gray_alpha + diff --git a/assets-fx/sprite.png b/assets-fx/sprite.png deleted file mode 100644 index d934f8895ee6839da02ce6a0796414e40e03488d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 642 zcmV-|0)737P)EX>4Tx04R}tkv&MmKpe$i(~43m4i*t{h)~7BE-K;vxAeOiqYdvy3@OO2Tt|-NVP%yC~1{KKJM7RdW^td?Im-8D^DugLr1M zYH;2s4zr@H5}y-Km~=tnN3JU_zi}=&Ebz>*nNH0Uhl#~P2P+-Sil#<9O&n1*o$`f@ z%PQwB&RV&~TKD8H4CVBdWvu?YAB(MDx$RNq*zGNe%!-95AEQ9`F3_yo_V=-EH%|cnGjOH1{gnnV`$>Ae ztwoN2zHQ**x~(aDz~v4w_+-eY>_~o^LOu_?pV2pEf&N<{xaRiO+Q;bwkfyGZH^9Lm zFjk=Kb&q%VboTb|nO1*4t@Luf%54pG00006VoOIv00000008+zyMF)x010qNS#tmY zE+YT{E+YYWr9XB6000McNliru=n4o62{c9IqZ|ML02y>eSad^gZEa<4bO1wgWnpw> zWFU8GbZ8()Nlj2!fese{003G^L_t(o!|j$)3IHGoLsh!}mF)yUIAN6Af9{d9G?S$1 za^P$>)`HCQ0Cc4w-(m}ZJq_?h2n`8gmw6c?8qG@(ngRg`fDS-^h!*=VKwIG22Lvz< c;JfD}c;` z?bhI>O2-BlJ7%8Q0^6^`J9cbr`E%u!1BJ7Cp8h-h(%=-Cb zw6uZ{Gjmg`d3H*pstf(id&`va(<&QAq0G zPn9fZPx+q5Miof|eb}l=_*Vy8G%Gs0_kzij{=U&TMjNQI!CJC6n;^w@^zr@t#7x-#A9Q)P} zq;ZAW{?*nC>8_CnYnpaFyY$5Z#nUAr9Y>cyOUOPs9os3nRY&J!hM!w3*w`qN+{uoP zKn3%P6fa^zItyY#HT(i5THJ3D$`FP{_lxA!iH)tIFONsN?t46|Gxw81S~odAW$F4x zlkFuA#z*aUw*vx&_uJy30Zx^Fc`U%o{# zxaxu5SKWdK-Em2Ip|?8EIPr5M(hmj9&vz^QHhZOJBw?tOUCX-AGU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!TQbHluODT!dndj@pBkK0&N|h2+%GD2PkObz?KqMfVOiW_1*%Fc%qQfMP z*hLJ%5*kNBV~>OKRcJ6+AwhId0Gx~h99Y7k(IpIsB&9-h5(A<^Bo37Yk*H!wiXbeu z3&duOgIK0UK~}=C04WVY{$dOo+x|av1ctLP3aH12R#ENu!eKqu%Jk!UfI%VqsmL0sy@R@P*4)BQT~^ z2Pl=XJfhAdf==_zvJjM$6vkjL7()Ok6=HB{R4&8_pt*4AU`(4&g}Bsl@=7TxOZZ>X zy5b?Yj)vR^)qwpI^i!i1wE|f?`ZoF+i|R{>K+qQjh~cOU8h9Nd)!PZMMwcW}up$xx z-D50WU(cg|lL|61mCmHg7$g=4Vv-nAh(U6Za@ZuQL@E>0=`8SYc^6%ylwt9(8d(?# zcm!O5^we`jaMlNE?z__QQHU-IfG`q`N_tBeG)5R@%wdYIXT0{4!DZ>YBaO4cMQgHniMN;j%7yFa|Cj&fnmjzmqbYbR9moH9Tu&`tAC8 zFD(iUmDN4jlZNApf-A)brFj8+f30o!rDf~8)?o@-M71J^pMWB>pF literal 0 HcmV?d00001 diff --git a/assets-fx/sprites/friendlyguy1.png b/assets-fx/sprites/friendlyguy1.png new file mode 100644 index 0000000000000000000000000000000000000000..e088356e205d5d19386c12353a1261c534c993e8 GIT binary patch literal 5194 zcmeHKX;f3!7EVMEQ9!5&B0fSu5i#>bA~9f~B$i-AMybP1?oGHr29gU2h$09m;?S1b zr{aJDb*5E;LahS@MJ-TF5v(l;D%4g12a2em?dhE{nnTDQXA@ z>0ucLqrcS?8I$~A{?uXlbh)MAj$6*g>Jv#a^`>;D6VKowy4C*Ut>YG13lsxieAay8 z^{}GbmN>WW^7A8Z*=rK3?%B(Oo0YB9{a~AZd){v|T3E^21affZvI^)HE8-^Qa8(Fx za?h)^h3gj2q@^qG`S$#9a@}rhG|ys>WmZLfMWdq(*O_}o@qlWVUHrH^w!FSxxu<_f zYtJ6^yWaWx&C5>q-Pc+IA4M;0ityRyx8A*<{P02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+i$r7aO6@2MC?6y}pe9j>WRgNb8gHRR z0+UgY(SZKeLK}wuXOTi7ttv?)g#wcyCE`9F0+f!~tCKVdrgT6l2}*zzsHztAN_op= zkWeHZvoKO1hZSm*6-xG7ng}fWi>$X|GtQXO86OC0K8E|2_M6;I%BYq|#0gMIlZ@dB z1Gspje-5aU!XU@=%AiUp6wrrCVA7ck0-eHO5&$MBA%Ij0nF>cB8=itXb??CVN(g943H4$Y&MzT!y-cj7DWO|s1zy4W|7B1EY-khRRRg)qcTE) zC=?TtkR^1ogurAnAp)H$V-o-tKqW|6AWK4qd{|5d(*y-dIUlMt3IJVBSOLf(l3FP@ zO&AI1_=|;HJe4@&)g%!o0Ei4V;NpW}Ws?3c)i78AEk^(&n-mt6%|cz!STqKc&KPGM z0co^oB^og)WFn1jGB+*@2TcYg7BJQ+3Sg3>xp4Rz2tZVtFqJBSi#G;lrqVeSGKWeJqxf)WG!BF5O{Q|l7VtK@RwYApfCloHqdcNqq2+1f3OCQRP+o6q z>tZ3}DxicBjHqLTu|^3ajV4So_KY_f`;z{P6JL|UxF&CnrP zEny%Hy=YlTJ_-sjUAZvN`DfG7x5;Wjv=)OQx*H#?zJ!;I3MU~#QQ)NeR!-C0*mEUu z=BQ{U5*UT>RSM&&9Ai2xLLg2DBe6K+VKFkp#t~Jj76$l-Mb-3tA+p~{w#;5_2yr~; zBJWCW3;QT`qMc9Wmx?{ qLi>-kgCyXE&3DsJwMV)PVjlgmY~c%8k|&xBMi>|pP`Y?c=6?W!vcr}D literal 0 HcmV?d00001 diff --git a/assets-fx/sprites/fxconv-metadata.txt b/assets-fx/sprites/fxconv-metadata.txt new file mode 100644 index 0000000..8fe530d --- /dev/null +++ b/assets-fx/sprites/fxconv-metadata.txt @@ -0,0 +1,8 @@ +friendlyguy.png: + type: bopti-image + name: sprite_tst + profile: gray_alpha +friendlyguy1.png: + type: bopti-image + name: sprite_tst1 + profile: gray_alpha diff --git a/assets-fx/textures/bwain.png b/assets-fx/textures/bwain.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o}Hk`V4wN**Ws;b`Lvu=-ZwL;mI&Ry1}jqzd30oS?-#gM6g zv(x>uXY9P7oQV6>`T~>bS$h4O>IrQjT;8gM4^HRJ*xh;Sbh?C*5j~J|6=(Uxs%>ud hiHeRV%?W#ZwGKUYk77N4nu+m-bLV(DmpBG*{4aTT?1TUS literal 0 HcmV?d00001 diff --git a/assets-fx/textures/meat1.png b/assets-fx/textures/meat1.png new file mode 100644 index 0000000000000000000000000000000000000000..bc1c9279f55282c1136c6c0034dbc1e0dd8dc9f4 GIT binary patch literal 6036 zcmeHLc~leU77w6MHo>J;EY%RviZEm{S%yRw+1CKFh#)SL$pj)~Aqf!BDgt5wv8c5Q z21J%BsEAZ}DvLf8v=&hjMN|}dSVR$VLlD6?2`>0v&w0mp+WuwEnPk52yZ3j$`@8pk zH#4ce-mdyOGj#|Ag1)<(lOO&|R9;_9z`xt1=)C5Ird$xbl$l<`oDHa>#7Fv1%7bfwBq{*{acE)ULstH76E%f4zdselv zNA{f58rkTWtPz)C)@AsWvF)(M#H6EYHQ{3u-13a^zu6+`_c<+GO11}`H!|d?K}5t<*BNq@}i1lMJK9LAu9hStMHL) zOjMNTh*(nda`M%PH1}_tzp0uS)csoXRNKYv=9LKttP<+18jmc`S-3he@z&KIYsgSP z>49iR?oy`fT05Vh%Ie+)eSTfy^Ecx-HDTCKqbB7(!*03V6&6vBvf|p2hH!qPVyp8L zwW3LD{KBqA5^B;6zhX_!n>eU<-BG)_X)_fGI=t!-@X#-+R1tjY{Hlu?x(0pzrPb>B zJH4k+41?=0{Mwbz4bFMe{iw_2GS(WZzVo3=)%K~n7t7*;`7WN{-hARzt@)E3%ukhRXspV}k#x*WbK*^dHsq<_mnRe^sx8@}nc116+c7V7V~TrM z@qz`r<~0^%ZP2cN_T@j>F%!9Qhp*dR{*BWVbdK9#0v)?2ryr-16w&a;W9I)>-kr#oa43D{qKtuP;q@G3IwI_P!Pq zvR<*WtYKjUlm*qx%TwBB7)+0R^7ZA*n_mC*v*sC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w7=C)ZP1kqx{69(s9)^M-iUKqmoq@-X1_4$elL~M_h7|;H zcpM&n*nDJID&omv5ea4=hVzJXg{P;AE8=`rpv*p&jt$3@Q2-$-0KxzT4xqp+$chD0 z-x5at>s`bhVQ@HfE&y|>T--$}6+mbV2%sP|Iu}JCIs^REU8K`kAm#6KkwWM4Xebp1 z7#N+dj3NS9(eZe~G#ZD)U{Yud5c@bT|7R3w0La7x89<@1@DiXh{yrC(Oe+S+q$nK& z@kGUVG=Kv$DS#Cf=Av9W4P!vipX4G1KU?2d_J2gtnyhSY?@H5}{9na8CNQoW;t4)B zhj&@LX_Mb~?YEh)?2mup=WXr&g%)t=&qh9p-_LY?rt6a!_$1-a+4Y&OPh#Mcggc;KX%Z=-w3F4JYAg#dv!z0yzr5>*ezH}Am~n2UTTDF#SDB> zOXkjY*1E4VebUU?DVn*x_zRgS?oRdrZfA=Et0pCZdeuwyzIlbT?`r_8})($``^9S||9t3gP--oe+`B9yWTqR`XYnx*V+V?FI<&#tiM=SzYu z4LD8nI=9=0@B3on3sF)`81>SbaN|yOZ@*+lJLqZo7CHyRl?1uAhsCjznCyEs96_vG6-m4Slx75FmtDO~}WpkuB zYvQ`Lc7r_LXr`mA^Lq8^2MSV7%wc2w1)k;Rwed&WcQ+;P9?+OS#WmQg#CZfKjNtC< K?NsWpD)HYx$nB*7 literal 0 HcmV?d00001 diff --git a/eng/map.c b/eng/map.c index 6fee952..2fa19e6 100644 --- a/eng/map.c +++ b/eng/map.c @@ -5,69 +5,3 @@ #include "C3D/map.h" #include "C3D/moteur.h" -uint8_t __attribute__((section(".rodata"))) map_test[map_w][map_h] = { - {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1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1,1,1} -}; diff --git a/eng/moteur.c b/eng/moteur.c index 8df3ff7..8338e9d 100644 --- a/eng/moteur.c +++ b/eng/moteur.c @@ -27,8 +27,8 @@ fixed_t zbuf[viewport_w]; void move(RcGame *game) { extern int frame_time; - fixed_t moveSpeed = fmul(fix(frame_time)/1000, 0x148); //frame_time * fix(carrés/seconde/1000) là carrés/seconde = 5 - fixed_t rotSpeed = fmul(fix(frame_time)/1000, 0x83); //frame_time * fix(radians/seconde/1000) là radians/seconde = 2 + fixed_t moveSpeed = fmul(fix(frame_time/1000), 0x148); //frame_time * fix(carrés/seconde/1000) là carrés/seconde = 5 + fixed_t rotSpeed = fmul(fix(frame_time/1000), 0x83); //frame_time * fix(radians/seconde/1000) là radians/seconde = 2 fixed_t c_rotSpeed = fix(cos(f2float(rotSpeed))); fixed_t s_rotSpeed = fix(sin(f2float(rotSpeed))); @@ -36,6 +36,8 @@ void move(RcGame *game) { V2d *plane = &game->player.plane; V2d *dir = &game->player.dir; V2d *pos = &game->player.pos; + int map_w = game->current_map->w; + int map_h = game->current_map->h; fixed_t oldDirX; fixed_t oldPlaneX; @@ -116,7 +118,7 @@ inline int __attribute__((always_inline)) if(layers > 2){ alpha = !(layer_ptr[2] & mask); } - return (alpha << 2) + (dark << 1) + light; + return (alpha << 2) | (dark << 1) | light; } uint32_t *light, *dark; @@ -151,6 +153,7 @@ inline void __attribute__((always_inline)) light[offset] |= mask; dark [offset] |= mask; break; + case C_NONE: break; @@ -221,7 +224,9 @@ void draw_walls( fixed_t planeY = game->player.plane.y; extern bopti_image_t *tex_index[TINDEX_S]; uint8_t *map_test = game->current_map->dat; - + int map_w = game->current_map->w; + int map_h = game->current_map->h; + fixed_t cameraX; fixed_t rayDirX; fixed_t rayDirY; diff --git a/eng/sprites.c b/eng/sprites.c index 5da31d9..e464896 100644 --- a/eng/sprites.c +++ b/eng/sprites.c @@ -5,6 +5,7 @@ #include #include #include +#include #include "C3D/fixed.h" #include "C3D/game.h" @@ -16,7 +17,7 @@ extern fixed_t zbuf[viewport_w]; -int spritec; +int spritec = 0; Sprite *sprite_index[SINDEX_S]; @@ -30,8 +31,19 @@ void clear_sprites(){ spritec = 0; } -void remove_sprite(GUNUSED Sprite *sprite){ - //TODO +void remove_sprite(Sprite *sprite){ + if(!sprite) + return; + int pos = -1; + for(int i = 0; i < spritec; i++){ + if(sprite == sprite_index[i]){ + pos = i; + break; + } + } + if(pos < 0) + return; + memmove(&sprite_index[pos], &sprite_index[pos+1], sizeof(void*) * (spritec-pos)); } //Lodev's sprite projection, translated to use my functions and fixed point @@ -77,7 +89,7 @@ void project_sprite(bopti_image_t *tex_index[], Sprite *sprite, RcActor *player) fixed_t sprite_size = fdiv(fix(sprite_w), fix(TSIZE)); for(int x = sprite_pos_x; x < sprite_end_x; x++){ - if(ty < 0 || x < 0 || ty > zbuf[x]) + if(ty < fix(0.4) || x < 0 || ty > zbuf[x]) continue; if(x > viewport_w) break; @@ -100,10 +112,10 @@ int sprite_cmpfnc(const void *p1, const void *p2){ void draw_sprites(bopti_image_t *tex_index[], RcActor *player){ struct SpriteDist dists[SINDEX_S]; memset(dists, 0, sizeof(struct SpriteDist)*SINDEX_S); + for(int i = 0; i < spritec; i++){ Sprite *spr = sprite_index[i]; - fixed_t d = player->pos.x - spr->pos.x; - d = fmul(d,d); + fixed_t d = fmul(player->pos.x - spr->pos.x, player->pos.x - spr->pos.x); d += fmul(player->pos.y - spr->pos.y,player->pos.y - spr->pos.y); dists[i].dist = d; dists[i].id = i; @@ -111,11 +123,12 @@ void draw_sprites(bopti_image_t *tex_index[], RcActor *player){ qsort(dists, SINDEX_S, sizeof(struct SpriteDist), &sprite_cmpfnc); - int msprite = min(spritec,max_sprites); - for(int i = msprite; i > 0; i--){ + int msprite = spritec > max_sprites ? max_sprites:spritec; + for(int i = 0; i < msprite; i++){ struct SpriteDist *sd = &dists[i]; Sprite *spr = sprite_index[sd->id]; - if(sd->dist > max_dist) + + if(sd->dist > max_dist || !spr) continue; project_sprite(tex_index, spr, player); } @@ -131,6 +144,8 @@ fixed_t raycast(RcGame *game, RcActor *origin, Sprite **hit){ fixed_t planeX = origin->plane.x; fixed_t planeY = origin->plane.y; uint8_t *map_test = game->current_map->dat; + int map_w = game->current_map->w; + int map_h = game->current_map->h; fixed_t cameraX; fixed_t rayDirX; @@ -147,11 +162,8 @@ fixed_t raycast(RcGame *game, RcActor *origin, Sprite **hit){ int stepY; int side = 0; //was a NS or a EW wall hit? - //int v_offset = 0; - fixed_t h_offset = 0; - //calculate ray position and direction - cameraX = fdiv(fix(x*2), fix(viewport_w)) - 0xFFFF + h_offset; //x-coordinate in camera space + cameraX = fdiv(fix(x*2), fix(viewport_w)) - 0xFFFF; //x-coordinate in camera space rayDirX = dirX + fmul(planeX, cameraX); rayDirY = dirY + fmul(planeY, cameraX); diff --git a/eng/utils.c b/eng/utils.c index 0d2092b..a1fcfcb 100644 --- a/eng/utils.c +++ b/eng/utils.c @@ -1,4 +1,82 @@ #include +#include #include "C3D/fixed.h" #include "C3D/game.h" + +bool rect_rect_coll(Rect *a, Rect *b){ + bool r = a->x0 >= b->x0 && a->x1 <= b->x1; + r = r && a->y0 >= b->y0; +} + +int cmpfunc (const void * a, const void * b) { + return ( *(int*)a - *(int*)b ); +} + +/* + * Copyright (c) 1990 Regents of the University of California. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. [rescinded 22 July 1999] + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +/* + * Perform a binary search. + * + * The code below is a bit sneaky. After a comparison fails, we + * divide the work in half by moving either left or right. If lim + * is odd, moving left simply involves halving lim: e.g., when lim + * is 5 we look at item 2, so we change lim to 2 so that we will + * look at items 0 & 1. If lim is even, the same applies. If lim + * is odd, moving right again involes halving lim, this time moving + * the base up one item past p: e.g., when lim is 5 we change base + * to item 3 and make lim 2 so that we will look at items 3 and 4. + * If lim is even, however, we have to shrink it by one before + * halving: e.g., when lim is 4, we still looked at item 2, so we + * have to make lim 3, then halve, obtaining 1, so that we will only + * look at item 3. + */ +void * +bsearch (const void *key, const void *base0, + size_t nmemb, size_t size, + int (*compar)(const void *, const void *)) +{ + const char *base = (const char *) base0; + int lim, cmp; + const void *p; + + for (lim = nmemb; lim != 0; lim >>= 1) { + p = base + (lim >> 1) * size; + cmp = (*compar)(key, p); + if (cmp == 0) + return (void *)p; + if (cmp > 0) { /* key > p: move right */ + base = (const char *)p + size; + lim--; + } /* else move left */ + } + return (NULL); +} diff --git a/include/C3D/map.h b/include/C3D/map.h index e64dfa8..e97f268 100644 --- a/include/C3D/map.h +++ b/include/C3D/map.h @@ -6,9 +6,3 @@ #include "fixed.h" #include "sprites.h" -//TODO : deprecate -//! Attention à avoir *exactement* la même taille entre ces valeurs et la carte dans map.c ! - -#define map_w 64 -#define map_h 128 - diff --git a/include/C3D/sprites.h b/include/C3D/sprites.h index 627847f..75c4831 100644 --- a/include/C3D/sprites.h +++ b/include/C3D/sprites.h @@ -15,6 +15,8 @@ void add_sprite(Sprite *sprite); void clear_sprites(); +void remove_sprite(Sprite *sprite); + void draw_sprites(bopti_image_t *tex_index[], RcActor *player); //Returns distance (-1 if no hit), hit is set to the hit sprite diff --git a/include/C3D/utils.h b/include/C3D/utils.h index eda678f..a36b58c 100644 --- a/include/C3D/utils.h +++ b/include/C3D/utils.h @@ -15,7 +15,6 @@ typedef struct { int y0,y1; } Rect; -static bool rect_rect_coll(Rect *a, Rect *b){ - bool r = a->x0 >= b->x0 && a->x1 <= b->x1; - r = r && a->y0 >= b->y0; -} +bool rect_rect_coll(Rect *a, Rect *b); + +int cmpfunc (const void * a, const void * b); diff --git a/src/game.c b/src/game.c new file mode 100644 index 0000000..13681a3 --- /dev/null +++ b/src/game.c @@ -0,0 +1,39 @@ +#include +#include + +#include "C3D/sprites.h" +#include "C3D/fixed.h" + +int sreserve_c = 0; +Sprite sprite_reserve[SINDEX_S]; + +Rect sprite_colls[] = { + {}, + {}, + {}, + {}, + {.x0 = fix(.25), .y0 = fix(.25), .x1 = fix(.5), .y1 = fix(.5)} +}; + +Sprite *cc_mksprite(V2d pos, int type){ + if(sreserve_c >= SINDEX_S) + return NULL; + Sprite *spr = &sprite_reserve[sreserve_c++]; + spr->tex = type; + spr->coll = sprite_colls[type]; + spr->pos = pos; + add_sprite(spr); + return spr; +} + +void cc_rmsprite(int pos){ + if(pos < 0 || pos >= sreserve_c) + return; + + remove_sprite(&sprite_reserve[pos]); + + if(pos+1 != sreserve_c){ + memmove(&sprite_reserve[pos], &sprite_reserve[pos+1], sizeof(Sprite)*(sreserve_c-pos)); + } + sreserve_c--; +} diff --git a/src/game.h b/src/game.h new file mode 100644 index 0000000..a368d5f --- /dev/null +++ b/src/game.h @@ -0,0 +1,18 @@ +//Par Fcalva, et est sous GPLv3 + +#pragma once + +#include "C3D/game.h" + +enum { + stype_frenguy = 4 +}; + +typedef struct { + RcGame _bgame; + int curr_map; +} CCGame; //CpC game Game struct + +Sprite *cc_mksprite(V2d pos, int type); + +void cc_rmsprite(int pos); diff --git a/src/gfx.c b/src/gfx.c new file mode 100644 index 0000000..13794fe --- /dev/null +++ b/src/gfx.c @@ -0,0 +1,44 @@ +//Par Fcalva et est sous GPLv3 +#include + +#include "C3D/fixed.h" +#include "C3D/game.h" +#include "C3D/sprites.h" +#include "C3D/moteur.h" +#include "C3D/map.h" +#include "C3D/config.h" + +#include "gfx.h" + +extern bopti_image_t briques0; +extern bopti_image_t buisson0; +extern bopti_image_t sprite_tst; +extern bopti_image_t sprite_tst1; +extern bopti_image_t bwain0; +extern bopti_image_t bwain1; +extern bopti_image_t meat0; +extern bopti_image_t meat1; + +bopti_image_t *tex_index[TINDEX_S] = { + &briques0, //0 + &buisson0, //1 + &briques0, //2 + &briques0, //3 + &sprite_tst, //4 + &bwain0, //5 + &meat0 //6 +}; + +int state = 0; +int anim_tex(GUNUSED RcGame *game){ + tex_index[5] = state > 7 ? &bwain0:&bwain1; + tex_index[6] = state > 7 ? &meat0:&meat1; + tex_index[4] = state > 7 ? &sprite_tst:&sprite_tst1; + state = (state+1) % 16; + + return 0; +} + +void init_gfx(){ + add_logic_hook((RcLogicFunc*)&anim_tex); +} diff --git a/src/gfx.h b/src/gfx.h new file mode 100644 index 0000000..6682fa7 --- /dev/null +++ b/src/gfx.h @@ -0,0 +1,14 @@ +//Par Fcalva et est sous GPLv3 + +#pragma once + +#include + +#include "C3D/fixed.h" +#include "C3D/game.h" +#include "C3D/sprites.h" +#include "C3D/moteur.h" +#include "C3D/map.h" +#include "C3D/config.h" + +void init_gfx(); diff --git a/src/main.c b/src/main.c index 865bd28..6676d90 100644 --- a/src/main.c +++ b/src/main.c @@ -12,13 +12,16 @@ #include #include "C3D/fixed.h" - #include "C3D/game.h" #include "C3D/sprites.h" #include "C3D/moteur.h" #include "C3D/map.h" #include "C3D/config.h" +#include "gfx.h" +#include "map.h" +#include "game.h" + //====== Copy3DEngine ===== // Git du moteur : https://git.planet-casio.com/Fcalva/Copy3DEngine // Git du jeu : [Rajoutez le vôtre ici] @@ -29,42 +32,29 @@ // // -bopti_image_t *tex_index[TINDEX_S]; - -extern uint8_t map_test[map_w][map_h]; - -//Vos images ici - -extern bopti_image_t briques0; -extern bopti_image_t buisson0; -extern bopti_image_t sprite_tst; +extern bopti_image_t *tex_index[TINDEX_S]; char disp_frame_time = 0; char first_frame = 0; int frame_time_timer = 1; -RcMap map0 = { - .w = 128, - .h = 64, - .dat = (void*)&map_test -}; - -RcGame game = { - .player = { - .pos = {fix(3.1), fix(3.1)}, - .dir = {fix(0), fix(1)}, - .plane = {fix(0.66), fix(0)} - }, - .current_map = &map0, - .flags = {0} +CCGame game = { + ._bgame = { + .player = { + .pos = {fix(3.1), fix(3.1)}, + .dir = {fix(0), fix(1)}, + .plane = {fix(0.66), fix(0)} + }, + .flags = {0} + } }; int frame_time = 1; -void keys_get(){ +void keys_get(RcGame *game){ pollevent(); - - move(&game); + + move(game); if (keydown(KEY_F1) && frame_time_timer <= 0) { if (disp_frame_time == 0) { @@ -77,10 +67,22 @@ void keys_get(){ } } frame_time_timer--; - if (keydown(KEY_EXIT)) game.flags.exit = 1; + if (keydown(KEY_EXIT)) game->flags.exit = 1; if(keydown(KEY_F2)){ - dprint(0,0,3,"%d",raycast(&game, &game.player, NULL)); + dprint(0,0,3,"%d",raycast(game, &game->player, NULL)); + } + + if(keydown(KEY_F3)){ + cc_mksprite(game->player.pos, stype_frenguy); + while(keydown(KEY_F3)){ + clearevents(); + pollevent(); + } + } + if(keydown(KEY_F4)){ + cc_rmsprite(0); + while(keydown(KEY_F4)) { clearevents(); pollevent();} } #ifdef debug @@ -88,15 +90,6 @@ void keys_get(){ #endif } -void main_menu(){ - dtext_opt(198, 100, 0xde85, C_NONE, DTEXT_CENTER, DTEXT_TOP, NAMEOFGAME, -1); - dtext_opt(198, 120, 0xde85, C_NONE, DTEXT_CENTER, DTEXT_TOP, "De "AUTHOR, -1); - dtext_opt(198, 150, 0xde85, C_NONE, DTEXT_CENTER, DTEXT_TOP, "Appuyez sur une touche", -1); - - dupdate(); - getkey(); -} - Sprite tsprite = { .pos = {200000, 300000}, .tex = 4 @@ -104,7 +97,7 @@ Sprite tsprite = { int movdir = 1; -int test_logic(RcGame *game){ +int test_logic(GUNUSED RcGame *game){ tsprite.pos.x += movdir*500; if(tsprite.pos.x > fix(4) || tsprite.pos.x < fix(2)) movdir = -movdir; @@ -112,27 +105,21 @@ int test_logic(RcGame *game){ return 0; } +extern bopti_image_t sprite_tst; + int main(){ + RcGame *rcgame = (RcGame*)&game; + dclear(C_WHITE); //trucs de chargement load_map(); - tex_index[1] = &buisson0; - tex_index[2] = &briques0; - - //Vos textures générées procéduralement (TODO) - - tex_index[0] = &briques0; - tex_index[3] = &briques0; - - tex_index[4] = &sprite_tst; - prof_init(); if(dgray(DGRAY_ON)) - goto c3d_abort; + rcgame->flags.exit = 1; dupdate(); dclear(0); @@ -145,35 +132,35 @@ int main(){ add_sprite(&tsprite); add_logic_hook((RcLogicFunc*)&test_logic); - - while (!game.flags.exit) { + + init_gfx(); + + init_map(&game); + + while (!rcgame->flags.exit) { prof_t frame = prof_make(); prof_enter(frame); dclear(C_WHITE); - if(first_frame){ - main_menu(); - } - - keys_get(); + keys_get(rcgame); - do_logic(&game, frame_time); + do_logic(rcgame, frame_time); draw_walls( #if debug &timers, #endif - &game + rcgame ); - draw_sprites(tex_index, &game.player); + draw_sprites(tex_index, &rcgame->player); if (disp_frame_time == 1) dprint( 0, 0, C_BLACK, "%d ms", frame_time/1000); #if debug - dprint( 1, 27, C_BLACK, "pX %d", game.player.pos.x); - dprint( 1, 36, C_BLACK, "pY %d", game.player.pos.y); + dprint( 1, 27, C_BLACK, "pX %d", ffloor(rcgame->player.pos.x)); + dprint( 1, 36, C_BLACK, "pY %d", ffloor(rcgame->player.pos.y)); dprint( 1, 9, C_BLACK, "Rct %d", prof_time(timers.raycast_time)); dprint( 1, 18, C_BLACK, "Dt %d", prof_time(timers.draw_time)); timers.raycast_time = prof_make(); @@ -182,20 +169,15 @@ int main(){ dupdate(); prof_leave(frame); - frame_time = (int)prof_time(frame); + frame_time = prof_time(frame); first_frame = 0; } -c3d_abort: - dgray(DGRAY_OFF); prof_quit(); //Libérez vos textures générées procéduralement - //bopti_free(tex_index[0]); - //bopti_free(tex_index[3]); - return 1; } diff --git a/src/map.c b/src/map.c new file mode 100644 index 0000000..dc6e07e --- /dev/null +++ b/src/map.c @@ -0,0 +1,44 @@ +// Voir README.md pour license précise, par Fcalva 2023-2024 et est sous GPLv3 + +#include + +#include "C3D/map.h" +#include "C3D/moteur.h" +#include "C3D/game.h" + +#include "map.h" +#include "game.h" + +uint8_t __attribute__((section(".rodata"))) map_dat0[] = { + 1,1,1,1,1,1,1,1,1,1, + 1,0,0,0,0,0,0,0,0,1, + 1,0,4,0,0,0,0,2,0,1, + 1,0,0,0,0,0,0,0,0,1, + 1,0,0,0,0,0,0,0,0,1, + 1,0,0,0,0,0,0,0,0,1, + 1,0,0,0,0,0,0,0,0,1, + 1,0,5,5,6,6,0,1,0,1, + 1,0,0,0,0,0,0,0,0,1, + 1,1,1,1,1,1,1,1,1,1, +}; + +RcMap map0 = { + .w = 10, + .h = 10, + .dat = (void*)&map_dat0 +}; + +#define MAPC 1 + +RcMap *maps[MAPC] = { + &map0 +}; + +void init_map(CCGame *game){ + switch_map(game, 0); +}; + +void switch_map(CCGame *game, int map){ + game->_bgame.current_map = maps[map]; + game->curr_map = map; +} diff --git a/src/map.h b/src/map.h new file mode 100644 index 0000000..5e30974 --- /dev/null +++ b/src/map.h @@ -0,0 +1,13 @@ +//Par Fcalva et est sous GPLv3 + +#pragma once + +#include + +#include "C3D/game.h" + +#include "game.h" + +void init_map(CCGame *game); + +void switch_map(CCGame *game, int map);