From 60d6511035c428fce07b1bc386ff21016c93182a Mon Sep 17 00:00:00 2001 From: rsninja722 Date: Mon, 26 Apr 2021 20:18:29 -0400 Subject: [PATCH] tutorial --- assets/img/map/tutorial1.png | Bin 306 -> 0 bytes assets/img/map/tutorial2.png | Bin 286 -> 0 bytes src/logic/ingame/mod.rs | 42 +++++++++++++++++++++++++++++++++++ src/logic/shop/mod.rs | 8 +++++++ src/resources.rs | 12 ++++++++++ 5 files changed, 62 insertions(+) delete mode 100644 assets/img/map/tutorial1.png delete mode 100644 assets/img/map/tutorial2.png diff --git a/assets/img/map/tutorial1.png b/assets/img/map/tutorial1.png deleted file mode 100644 index 29f3a8be810c2a27349baf5433d2c09ce833af09..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 306 zcmV-20nPr2P)Px#>`6pHR9J=WmoW~*APhxm)r(~Ap1b6Py-W7Yy-Ft}1m6Uw*w_khM4&u=ut`F= z3;Xx|8ST)_l$FAQ>~pk0S5TrBQm*1onv!!Nol1@pCX3E=f)r`8`3B5x2+79r5k3zj zvM$GlCf6jXHN7c>L%`BVHl0)3Xis3#t;?}-J3_ujib6O(G^WLo(2y>KwUW9@(~+Px#*hxe|R9J=WnLQ4GAPh#U@gmOd-o+Do7j|c_;$%XM{1p3X8~YZOK=Wd15g-B( z_Gv}LB_isi1IDuRxGmE0MLA`!SCzzase82`C3{q06fTU$oUl2>CXQTXP&a{GWlPVW zawk*U_BtsEZaW8aRlTJD~yQA8iWuo^&3*1(Nk?n zo|PV&-|(YBYI3-Cu(UAze*={gIm}HQF039-sglTHku_b7h`M#1X?$-j!iCZNR~We$ k0ppD`j(?vbogmZT03$e}tB{1%S^xk507*qoM6N<$g5RNbF8}}l diff --git a/src/logic/ingame/mod.rs b/src/logic/ingame/mod.rs index 786348c..998afeb 100644 --- a/src/logic/ingame/mod.rs +++ b/src/logic/ingame/mod.rs @@ -98,6 +98,48 @@ impl InGameScreen { } fish.render(context_2d, &mut game_core.resources); } + context_2d.draw_texture_pro( + &game_core.resources.tut1, + Rectangle { + x: 0.0, + y: 0.0, + width: 44.0, + height: 41.0, + }, + Rectangle { + x: 110.0, + y: 100.0, + width: 44.0, + height: 41.0, + }, + Vector2 { + x: 0.0, + y: 0.0, + }, + 0.0, + Color::WHITE, + ); + context_2d.draw_texture_pro( + &game_core.resources.tut2, + Rectangle { + x: 0.0, + y: 0.0, + width: 44.0, + height: 41.0, + }, + Rectangle { + x: 160.0, + y: 110.0, + width: 44.0, + height: 41.0, + }, + Vector2 { + x: 0.0, + y: 0.0, + }, + 0.0, + Color::WHITE, + ); // Render the world texture context_2d.draw_texture_rec( diff --git a/src/logic/shop/mod.rs b/src/logic/shop/mod.rs index cfd54b5..29d9030 100644 --- a/src/logic/shop/mod.rs +++ b/src/logic/shop/mod.rs @@ -37,6 +37,14 @@ impl Screen for ShopScreen { audio_system.play_sound(&game_core.resources.song_shop); } + draw_handle.draw_text( + &format!("you really need to get to the bottom huh?\n Well then buy my wares,\n they will help you get to your doo-hicky"), + 10, + 50, + 20, + Color::WHITE, + ); + // Window dimensions let win_height = draw_handle.get_screen_height(); let win_width = draw_handle.get_screen_width(); diff --git a/src/resources.rs b/src/resources.rs index ce8340f..822ce33 100644 --- a/src/resources.rs +++ b/src/resources.rs @@ -58,6 +58,10 @@ pub struct GlobalResources { pub flippers_one: Texture2D, pub flippers_two: Texture2D, pub flippers_three: Texture2D, + + // tut + pub tut1: Texture2D, + pub tut2: Texture2D, // Treasure pub transponder: FrameAnimationWrapper, @@ -253,6 +257,14 @@ impl GlobalResources { &thread, &Image::load_image("./assets/img/items/flippers3.png")?, )?), + tut1: (raylib.load_texture_from_image( + &thread, + &Image::load_image("./assets/img/map/tut1.png")?, + )?), + tut2: (raylib.load_texture_from_image( + &thread, + &Image::load_image("./assets/img/map/tut2.png")?, + )?), transponder: FrameAnimationWrapper::new( raylib.load_texture_from_image( &thread,