From 38157398876006d0ca1c222a6dc89e89411ac046 Mon Sep 17 00:00:00 2001 From: "Debian @ Home" Date: Sat, 5 Sep 2026 22:42:26 +0200 Subject: [PATCH] animated horse :) --- bootscreen/plymouth/falbella/falbella.script | 101 ++++++------------- bootscreen/plymouth/falbella/frame_0.png | Bin 0 -> 1580 bytes bootscreen/plymouth/falbella/frame_1.png | Bin 0 -> 1593 bytes bootscreen/plymouth/falbella/frame_2.png | Bin 0 -> 1598 bytes bootscreen/plymouth/falbella/frame_3.png | Bin 0 -> 1625 bytes test.sh | 3 +- 6 files changed, 33 insertions(+), 71 deletions(-) create mode 100644 bootscreen/plymouth/falbella/frame_0.png create mode 100644 bootscreen/plymouth/falbella/frame_1.png create mode 100644 bootscreen/plymouth/falbella/frame_2.png create mode 100644 bootscreen/plymouth/falbella/frame_3.png diff --git a/bootscreen/plymouth/falbella/falbella.script b/bootscreen/plymouth/falbella/falbella.script index d2538d5..ac4d8af 100644 --- a/bootscreen/plymouth/falbella/falbella.script +++ b/bootscreen/plymouth/falbella/falbella.script @@ -27,8 +27,8 @@ #------------------------------- Constants ----------------------------------------- -NB_ANIM_STEPS = 360; -NB_REFRESHS_BETWEEN_ANIMS = 1; +NB_ANIM_STEPS = 4; +NB_REFRESHS_BETWEEN_ANIMS = 10; @@ -41,8 +41,6 @@ progress_time = 0; progress_pct = 0; # Variables for glow rotation animation -anim_start_time = NULL; -anim_status = "stopped"; refresh_iter = 0; anim_iter = 0; @@ -70,6 +68,16 @@ debugsprite_bottom.SetPosition(0, (Window.GetHeight (0) - 20), 1); debugsprite_medium = Sprite(); debugsprite_medium.SetPosition(0, (Window.GetHeight (0) - 100), 1); +animation_first_frame = 0; +animation_last_frame = 3; +animation_current_frame = 0; + +for (frame = animation_first_frame; frame <= animation_last_frame; frame++) { + animation_images[frame] = Image("frame_" + frame + ".png"); +} + + + # General purpose function to create text fun WriteText (text, colour) { image = Image.Text (text, colour.red, colour.green, colour.blue); @@ -231,28 +239,13 @@ fun StringToInteger (str) { return int; } -#----------------------------------------------------------------------------- -# Top background colour -> RGB/256 -# #263a47 --> 0.1484, 0.2266, 0.2773 -# Bottom background colour -# #263a47 --> 0.1484, 0.2266, 0.2773 +#horse = Image("falbella.png"); -fun calchorse(horse_base) { - x0 = Window.GetWidth(); - y0 = Window.GetHeight(); - xhorse = horse_base.GetWidth(); - yhorse = horse_base.GetHeight(); - - dim.horse.xsize = x0; - dim.horse.ysize = y0; - - return dim; -} +Window.SetBackgroundTopColor (0.05, 0.05, 0.05); # Nice colour on top of the screen fading to +Window.SetBackgroundBottomColor (0.05, 0.05, 0.05); # an equally nice colour on the bottom -horse = Image("falbella.png"); - -Window.SetBackgroundTopColor (0.0, 1.0, 1.0); # Nice colour on top of the screen fading to -Window.SetBackgroundBottomColor (1.0, 1.0, 0.0); # an equally nice colour on the bottom +first_line_height = ImageFromTintedText ("AfpqtM").GetHeight(); +top_of_the_text = TextYOffset(); bits_per_pixel = Window.GetBitsPerPixel (); password_dot_filename = "password_dot.png"; @@ -263,21 +256,23 @@ message_notification[1].image = ImageFromTintedText (""); status = "normal"; -# use a fixed string with ascending and descending stems to calibrate the -# bounding box for the first message, so the messages below don't move up -# and down according to *their* height. -first_line_height = ImageFromTintedText ("AfpqtM").GetHeight(); +animation_sprite = Sprite(); -# if the user has a 640x480 or 800x600 display, we can't quite fit everything -# (including passphrase prompts) with the target spacing, so scoot the text up -# a bit if needed. -top_of_the_text = TextYOffset(); +# align the animation in the centre of the screen (optional) +animation_width = animation_images[animation_first_frame].GetWidth(); +animation_height = animation_images[animation_first_frame].GetHeight(); +animation_sprite.SetX((Window.GetWidth() / 2) - (animation_width / 2)); +animation_sprite.SetY((Window.GetHeight() / 2) - (animation_height / 2)); +animation_sprite.SetZ(0); -horse_dim = calchorse(horse); -horse = horse.Scale(Window.GetWidth(), Window.GetHeight()); -horse_sprite = Sprite(horse); - -SetPosition(horse_sprite, 0, 0, 0); +# now to animate we can change the image used in the sprite each frame, +fun update_horse () { + animation_current_frame += 1; + if (animation_current_frame > animation_last_frame) { + animation_current_frame = animation_first_frame; + } + animation_sprite.SetImage(animation_images[animation_current_frame]); +} #-------------------------------Progress Indicator----------------------------- # Implement in boot progress callback @@ -521,36 +516,6 @@ Plymouth.SetUpdateStatusFunction (update_status_callback); # #Plymouth.SetDisplayQuestionFunction (display_question_callback); -#fun rotate_img(source_img, current_step, nb_steps) { -# angle = Math.Sin(current_step / nb_steps * Math.Pi / 2) * 2 * Math.Pi; -# #debug_sin = Math.Sin(current_step / nb_steps * Math.Pi / 2); -# #DebugMedium("Sin = " + debug_sin); -# rotated_img = source_img.Rotate(angle); -# return rotated_img; -#} - -fun update_horse () { -# if (global.anim_iter > NB_ANIM_STEPS) { -# global.anim_iter = 0; -# } -# #DebugMedium("iter = " + global.anim_iter); -# #glow_opacity = 0.6 + 0.3 * Math.Cos(global.anim_iter / NB_ANIM_STEPS * 2 * Math.Pi); -# #Debug("glow_opacity = " + glow_opacity); -# if (global.anim_start_time != global.progress_time && global.anim_status != "running") { -# global.anim_start_time = global.progress_time; -# global.anim_iter = 0; -# global.anim_status = "running"; -# } -# -# if (global.anim_status == "running") { -# global.glow_sprite.SetOpacity(glow_opacity); -# global.anim_iter++; -# -# if (global.anim_iter >= NB_ANIM_STEPS) { -# global.anim_status = "stopped"; -# } -# } -} #-----------------------------------------Refresh stuff -------------------------------- @@ -589,9 +554,7 @@ fun display_normal_callback () if (message_notification[1].sprite) { show_message (1); } - } - Plymouth.SetDisplayNormalFunction (display_normal_callback); diff --git a/bootscreen/plymouth/falbella/frame_0.png b/bootscreen/plymouth/falbella/frame_0.png new file mode 100644 index 0000000000000000000000000000000000000000..a4cf64b4054f9254136645abc776b6b504010bd3 GIT binary patch literal 1580 zcmeAS@N?(olHy`uVBq!ia0y~yV3Yx}e{iq?NxQJf0}KqT4?SHRLn`LHxpTHVE?xH6 z$Ja}kFZs00atd%a$Vzq$+7KWjddc(Up&cSeF4ZsKXz~uvdUa{5lh~tWA)bnQmwgM3 zM6{w-ipHw4?)Et9@{+spg6r(d#wBz8PFU_VI{)Nz<9*xi=N~@oIZ(c1rsem>1FNKu zr!SX$e(qZ*>%5d%Itf+tCVTIhCSGR{cfu$?d!nU4gU~_7EEe_^f-(!-3L2z{;H2qp zc(m{9bD7!)ch7wLzFz%0f7-M{kGjuGKc>%o`R0G|izBChMyKuCGtqf@+?kyEpJ|`I zJv^gkv1ZTm`uWG}|GYl4ty1x3oy}&Rq1J`ut|`p2u7ABN85O*f}#NH}(9DO55AF zXP%zMMMAhhgKy3cc5kV+Cy$PvDf^J{ZOZfc{_En;$22i}TbJqlK6lJ*T7ow#u|6Ww zJ4EBFo z#&fg(SYdXQIrHkQ?AMPc-03n-pOilDWDdXmoR~d3ewX&!&D!%VDz6=HhFJKW2QK`11JrP3|?% zr>@!m=`F+QpD#`RpYiejD}S!}a*cWQk%_A-Z4XTPH!E?+gqb-jiAt(Orf9s%W^FZm zyz8(lr|x4n?mM3Ma2LN3&;NZlo1J&;ER?zYb@9v7R+FtWW&WG2RlofC z(3g32GeQmeZeOlavaO$CH+y-pdhg?xnSWiY{#ox`e*W$o$7n5Lix|8SLQEM2G+@@& zg5vb^%d(OmSL~=hH~)Xpx>)bC4-dzmwskA8J2^XlSyt^|PaLEG--e}CR@zW?1FSk(XjZ{2Xv4ai^v752;w+gC51R==ifI#7hc M)78&qol`;+0Nv}X_W%F@ literal 0 HcmV?d00001 diff --git a/bootscreen/plymouth/falbella/frame_1.png b/bootscreen/plymouth/falbella/frame_1.png new file mode 100644 index 0000000000000000000000000000000000000000..11364ac2643c51bf0f3a9f22c177dd99c403b077 GIT binary patch literal 1593 zcmeAS@N?(olHy`uVBq!ia0y~yV3Yx}e{iq?NxQJf0}KqT?>t=`Ln`LHxpTfdHeL4k z$Mc=ZS5Ar?(pfXBNz+g|^Qdd!mKlEC+>e7MIQ?&I;?Rp-xzhW3S8PYOlV~f)-6hhA zX*wZWnnYtwmzGTI5MJWr>A5@8&p%`P&x>;=`=_a`7q6K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file mode 100644 index 0000000000000000000000000000000000000000..f2672f713bd33019f786e54643f10c5690a60010 GIT binary patch literal 1598 zcmeAS@N?(olHy`uVBq!ia0y~yV3Yx}e{iq?NxQJf0}KqTpFLe1Ln`LHxnsCu?o-+0 zAMfw{?%*xtn0wSLCLr^YV#o`HZDPr{qT83<-Q}@hvGepxE2F)a=EZuqC++6Q&Eh_| z^yL(Zs@5$x4vNKIaX7F-h09G@7oc~vEa_#$>Pp*_3pZrz!>7vd4lP>D!llQJq-*o)= z7uo-bYSk~|PhLCdvo+0|l~@-c94>d@=qc-+GoQ!boW9%W;_2VUH;->tw6A{=v8?KA z_U>a}3zq#l-apCw{fU(Hc|VgsegB_6Y3tTAOsn%Ge8Yw8K3_B zo|$4MEEBQgFLy=Q%S|_LoKU(E#7IKmBfLs{gdy~Ne&cfZ!{frc9Om8msmm?P^(@QY zyy~m{@$kukMxSp_CZ9ao9d7sTob_aPxszLGq^e7`1wXFR*s#iP&JP`x@W-9%licOc zru_bxYFh}YS$ebaTq zzka=Hm-#IJ`Mz7`Ufp1LPW*Cl=A6$v_u2hjbKUsvbYq_1>mTjlH=aFr@15D33n~vA zEP1{Bar@Wy82`fsSuy-epRa#xDSJ{&qHS$qt$}U5-1@WrMYg<$A3y$e`pX`(d6$np zy|;y&{Dd42q($+}_S4m`R))O2`@6T`v5bA4zh11@*|*!}Px!hO*qy(*dF8Fm&$ksk zj@eP*eQv)0S%W*XX7}id5>*-^GS|HJ%|2q&>^sRn`-0wNT3LVr>mdKI;Vst0EnopwEzGB literal 0 HcmV?d00001 diff --git a/bootscreen/plymouth/falbella/frame_3.png b/bootscreen/plymouth/falbella/frame_3.png new file mode 100644 index 0000000000000000000000000000000000000000..fc30f998f52765325cada9e1f33618d8a0b00c18 GIT binary patch literal 1625 zcmeAS@N?(olHy`uVBq!ia0y~yV3Yx}e{iq?NxQJf0}Kpoe4Z|jAr*7p+&SMJn=X6& z<9XiXC6hH<1e>G|dhoht9CZrZGQqEl`*Dzf_y0yE4!ziwE4{CCMRv>%I_ea&Ou8^l zBV9%2EDm3}X=B>XE~#E@V0Z3irOou^^;S74cKX?R#TpE%P0Uv~_yUwI9C{xxm=eJ` z8DxbdT@@skf z+WqCt{K@yDbxvnX!Gcdhr7p`+1ccmN1d# zGlb#9hXz#7v?2lC!~Vw}Uq3YW(QeC(bupgj=HI`&wclpao$`3K>Q5)1%q=h5_wL5V zCl}p|t&%<3Ad|k8Cvml+;l9%Rg;%uTP36D{0A=$kdHZ znGUbyxs+YMnKv{qE!1OKa9|P_3CWUz$b%&RG_w?onJ@QQoSSZZcWdFjvo7WF=jY#x zKDmNXnXu+CWic=w*Xr(x>4q-LeaQwK{b z=Y$*G6~9zkJZJB{)9KamlXqYGe9t0$v&6P~`Lvfe_gy#Nygkf*X6?eC&-CUcN?iK- z`ApjLP1D;R&VT%|q-vgA{N?kTINB16ZOqEM{=EKi&t}?Q6Q1