From 2a5120775535019c021f9053078368fe9acb5876 Mon Sep 17 00:00:00 2001 From: LMH Date: Sat, 8 Mar 2014 16:46:09 -1000 Subject: [PATCH] Separated shading on egg from the rotating graphic to make the rolling egg look more natural. --- data/images/powerups/egg/egg-shade.png | Bin 0 -> 2216 bytes data/images/powerups/egg/egg.png | Bin 2388 -> 2245 bytes data/images/powerups/egg/egg.sprite | 12 ++++++++---- src/object/growup.cpp | 5 +++++ src/object/growup.hpp | 1 + 5 files changed, 14 insertions(+), 4 deletions(-) create mode 100644 data/images/powerups/egg/egg-shade.png diff --git a/data/images/powerups/egg/egg-shade.png b/data/images/powerups/egg/egg-shade.png new file mode 100644 index 0000000000000000000000000000000000000000..fcbb696534c911acb7072ef2d52fe01ce64d983e GIT binary patch literal 2216 zcmV;Z2v_%sP)sj&QH=lq2sKGW zK~z}7#h1yirbQLTf9IU4df#ulU*FpUttic;K_)dwP#n4!hLu91F(&jzjqwj~;i@}E z8#k`pxFylp=w8Fdl{YHb3C4J(RiJ@p=!R~3xWhNRL)CF{MIeHTF05T8RrNf1&Z%>r z1OMkG|Iw+V#|5Z>8-aU)+kiE|00#=N3A_w!08auhbMi$0zY*94J^*|M_gf$jaJh(- z9o#C!D~h&AnE+FSj_e~;3ThW{e;hc)BM&X!J%OXg18_gNe1x`n3bvl0OPk2DVZ5)S zyIfdZh29HSW)We4X@i%WX}F1yuBRRxLhT~%Kjo2!{`__@_O{>;9vegXI?MSAxvXQl z!TKLxAYIdP{Yp>pLRC8#=y~OW;fu(!%lNpa>z(4;Q zdN1f0=~r0xD>tHg4)`G_Ph9$E1s*&msD72j)m66JUs0}}Vdw0O)8||Ejo{XM zo!bs8w|@#w|7Q2j{a;gVJP6M`v%7!l4~3gQ+TrSib_$lDBt(teWMX|CVBC55&upwa zfWC?U4dng^UHKECdycixu)Qr@(+a;nAGz>i#>*yf1o!v8Re__&74*x@Hl3#Z9cM4U!tD8uookJ2Lg3b^;UVyW z1ICL_70#b806hBy+ejC5_pXH)g#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nf)_BDKpG$Js|$a zw@&L%?JXwD{pGyanO4^JRaSmsrY@Q_J;dZ-p2u!71MhQj0y(-KqDz>^G8A@UIpf;A zvH=Kht+wIYtJ?dN{^W3fc^ja3?$e*eC4$+T+n6rR3xB&&6=5g2Y*-*s1d(Ls29hBY zDR~An+OkiO9K|FPQZUobq=*N*%i`LQa5gRN_PQ(n=Xgz>;x8ZU%>Mw`e#du#nYA(b z@83LLza;lpc4m`_33G`8^7t*HQItmPJomYacreate("images/powerups/egg/egg.sprite")), lightsprite(sprite_manager->create("images/objects/lightmap_light/lightmap_light-small.sprite")) { physic.enable_gravity(true); physic.set_velocity_x((direction == LEFT)?-100:100); sound_manager->preload("sounds/grow.ogg"); + //shadow to remain in place as egg rolls + shadesprite->set_action("shadow"); //set light for glow effect lightsprite->set_blend(Blend(GL_SRC_ALPHA, GL_ONE)); lightsprite->set_color(Color(0.2f, 0.2f, 0.0f)); @@ -48,6 +51,8 @@ GrowUp::draw(DrawingContext& context){ sprite->set_angle(get_pos().x * 360.0f / (32.0f * M_PI)); //Draw the Sprite. MovingSprite::draw(context); + //Draw shade + shadesprite->draw(context, get_pos(), layer+1); //Draw the light when dark context.get_light( get_bbox().get_middle(), &light ); if (light.red + light.green < 2.0){ diff --git a/src/object/growup.hpp b/src/object/growup.hpp index f1427c028..4b0482360 100644 --- a/src/object/growup.hpp +++ b/src/object/growup.hpp @@ -35,6 +35,7 @@ public: private: Physic physic; Color light; + SpritePtr shadesprite; SpritePtr lightsprite; }; -- 2.11.0