/[enigma]/enigma/models-2d.lua
ViewVC logotype

Diff of /enigma/models-2d.lua

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.55 by dheck, Wed Dec 18 22:47:59 2002 UTC revision 1.56 by dheck, Thu Dec 19 23:38:04 2002 UTC
# Line 259  function print_table(t) Line 259  function print_table(t)
259  end  end
260    
261    
262  ------------------  --------------------------------------------------------------------
263  -- Actor models --  --                           ACTOR MODELS                         --
264  ------------------  --------------------------------------------------------------------
265  progress(0)  progress(0)
266    
267  LastSubimages = {}  ----------------------
268  IMAGE,SHMODEL,ANIM,ALIAS,SUBIMAGES,RANDMODEL=1,2,3,4,5,6  -- Small white ball --
269  function DefineModels(models)  ----------------------
270      for idx,model in models do  do
271          local name = model[1]      local fg,img
         local type = model[2]  
         local descr = model[3]  
         if type==IMAGE then  
             def_image(name, descr)  
         elseif type==SHMODEL then  
             def_shmodel(name, descr.fg, descr.bg)  
         elseif type==ANIM then  
             def_anim(name, descr.frames, descr.loop or 0)  
         elseif type==ALIAS then  
             def_alias(name, descr)  
         elseif type==SUBIMAGES then  
             LastSubimages = def_subimages(name, descr)  
         elseif type==RANDMODEL then  
         end  
 --        print("name:"..name.." - type:" ..type.."\n")  
     end  
 end  
272    
273  DefineModels{      -- Normal
274      {"sh-blackball", IMAGE, {xoff=-6, yoff=-6}},      def_image("sh-whiteball-small", {xoff=-3, yoff=-3})
275      {"sh-whiteball", IMAGE, {xoff=-6, yoff=-6}},      fg=def_image(nil, {filename="ac-whiteball-small", xoff=-6, yoff=-6})
276      {"sh-whiteball-small", IMAGE, {xoff=-3, yoff=-3}},      def_shmodel("ac-whiteball-small", fg, "sh-whiteball-small")
277    
278      {"fg-whiteball-small", IMAGE, {filename="ac-whiteball-small", xoff=-6, yoff=-6}},      -- Appearing
279      {"fg-blackball", IMAGE, {filename="ac-blackball", xoff=-9, yoff=-9}},      def_anim("ac-whiteball-small-appear",
280      {"fg-whiteball", IMAGE, {filename="ac-whiteball", xoff=-9, yoff=-9}},               {{"invisible", 30},{"ac-whiteball-small", 50}})
281    
282      {"ac-whiteball-small-fall", SUBIMAGES, {h=5,imgw=12,imgh=12,xoff=-6,yoff=-6}},      -- Falling
283      {"ac-whiteball-small-fall", ANIM,      img=def_subimages("ac-whiteball-small-fall",
284          {frames=composeframes(LastSubimages,{70,65,60,55,50})}},                        {modelname="ac-wbs-f",h=5,imgw=12,imgh=12,
285      {"ac-whiteball-small", SHMODEL, {fg="fg-whiteball-small", bg="sh-whiteball-small"}},                            xoff=-6,yoff=-6})
286      {"ac-whiteball-small-fallen", ALIAS, "invisible"},      def_anim("ac-whiteball-small-fall", composeframes(img,{70,65,60,55,50}))
287      {"ac-whiteball-small-shattered", IMAGE, {xoff=-8, yoff=-9}},      def_alias("ac-whiteball-small-fallen", "invisible")
288    
289      {"ac-blackball", SHMODEL, {fg="fg-blackball", bg="sh-whiteball"}},      -- Shattering
290      {"ac-blackball-fallen",  ALIAS, "invisible"},      img=def_subimages("ac-whiteball-small-shatter",
291      {"ac-blackball-shattered", IMAGE, {xoff=-20, yoff=-20}},                        {h=5, imgw=20, imgh=20, xoff=-10, yoff=-10})
292        def_anim("ac-whiteball-small-shatter", buildframes(img, 60))
293        def_image("ac-whiteball-small-shattered", {xoff=-8, yoff=-9})
294    end
295    
296    ----------------
297    -- Black ball --
298    ----------------
299    do
300        -- Normal
301        def_image("sh-blackball", {xoff=-6, yoff=-6})
302        def_image("fg-bb", {filename="ac-blackball", xoff=-9, yoff=-9})
303        def_shmodel("ac-blackball", "fg-bb", "sh-blackball")
304    
305      {"ac-whiteball", SHMODEL, {fg="fg-whiteball", bg="sh-whiteball"}},      -- Falling
306  }      def_alias("ac-blackball-fallen", "invisible")
307    
308  -- namelist=LastSubimages      -- Shattering
309  -- def_anim("ac-whiteball-small-fall",      def_image("ac-blackball-shattered", {xoff=-20, yoff=-20})
310  --          composeframes(namelist,))  end
311    
312  namelist=def_subimages("ac-whiteball-small-shatter",  ----------------
313                         {h=5, imgw=20, imgh=20, xoff=-10, yoff=-10})  -- White ball --
314  def_anim("ac-whiteball-small-shatter", buildframes(namelist, 60))  ----------------
315    do
316        -- Normal
317        def_image("sh-whiteball", {xoff=-6, yoff=-6})
318        def_image("fg-wb", {filename="ac-whiteball", xoff=-9, yoff=-9})
319        def_shmodel("ac-whiteball", "fg-wb", "sh-whiteball")
320    end
321    
322    
323    
# Line 334  def_anim("ac-blackball-fall", frames) Line 335  def_anim("ac-blackball-fall", frames)
335    
336  -- Appearing black ball --  -- Appearing black ball --
337  def_anim("ac-blackball-appear", reverseframes(buildframes(namelist, 30)))  def_anim("ac-blackball-appear", reverseframes(buildframes(namelist, 30)))
 def_anim("ac-whiteball-small-appear",  
          {{"invisible", 30},{"ac-whiteball-small", 50}})  
338    
339  def_anim("ac-whiteball-appear", {{"invisible", 30},{"ac-whiteball", 50}})  def_anim("ac-whiteball-appear", {{"invisible", 30},{"ac-whiteball", 50}})
340    
# Line 567  def_stone("st-white4", "sh-white4") Line 566  def_stone("st-white4", "sh-white4")
566  def_stone("st-yinyang1")  def_stone("st-yinyang1")
567  def_stone("st-yinyang2")  def_stone("st-yinyang2")
568  def_stone("st-bluegray")  def_stone("st-bluegray")
569    def_stone("st-plain")
570    def_stone("st-yellow")
571    
572  def_stone("st-death")  
573  framelist=def_subimages("st-death-munch", {h=3})  ------------------
574  def_anim("st-death-munch-anim", buildframes(framelist, 140))  -- Death's head --
575  def_solidstone("st-death-munch", "st-death-munch-anim")  ------------------
576    do
577        def_stone("st-death")
578        local img=def_subimages("st-death-munch", {h=3})
579        def_anim("st-death-munch-anim", buildframes(img, 140))
580        def_solidstone("st-death-munch", "st-death-munch-anim")
581    end
582    
583  -----------------  -----------------
584  -- Oxyd Stones --  -- Oxyd Stones --
# Line 589  def_solidstone("st-death-munch", "st-dea Line 596  def_solidstone("st-death-munch", "st-dea
596  -- we use a couple of specialized functions and overlays to create  -- we use a couple of specialized functions and overlays to create
597  -- them automatically.  -- them automatically.
598    
599  oxcolorspots = framenames("st-oxydbtempl", 2,9)  do
600  oxbulges = framenames("st-oxydbtempl", 10,14)      local colorspots = framenames("st-oxydbtempl", 2,9)
601        local openovls = framenames("st-oxydbtempl", 10,14)
602    
603  -- Define "fading in" and "fading out" animations for oxyd stones.  -- Define "fading in" and "fading out" animations for oxyd stones.
604  -- These two animations are combined with the stone images to  -- These two animations are combined with the stone images to
605  -- produce the opening and closing animations for oxyd stones.  -- produce the opening and closing animations for oxyd stones.
606    
607  oxbaseimg = {      local baseimg = {
608      a="st-oxyda-open",          a="st-oxyda-open",
609      b="st-oxydb-open",          b="st-oxydb-open",
610      c="st-oxydc-open",          c="st-oxydc-open",
611      d="st-oxydd-open"          d="st-oxydd-open"
612  }      }
613  oxopening_fms = {      local fopening = {
614      a = buildframes(def_subimages("st-oxyda-opening", {h=9}), 60),          a = buildframes(def_subimages("st-oxyda-opening", {h=9}), 60),
615      b = buildframes(def_subimages("st-oxydb-opening", {h=14}), 40),          b = buildframes(def_subimages("st-oxydb-opening", {h=14}), 40),
616      c = buildframes(def_subimages("st-oxydc-opening", {h=5}), 70),          c = buildframes(def_subimages("st-oxydc-opening", {h=5}), 70),
617      d = buildframes(def_subimages("st-oxydd-opening", {h=5}), 70),          d = buildframes(def_subimages("st-oxydd-opening", {h=5}), 70),
618  }      }
619  oxclosing_fms = {      local fclosing = {
620      a = reverseframes(oxopening_fms["a"]),          a = reverseframes(fopening["a"]),
621      b = reverseframes(oxopening_fms["b"]),          b = reverseframes(fopening["b"]),
622      c = reverseframes(oxopening_fms["c"]),          c = reverseframes(fopening["c"]),
623      d = reverseframes(oxopening_fms["d"]),          d = reverseframes(fopening["d"]),
624  }      }
625    
626  function make_oxydopenclose(flavor, color)      function mkopenclose(flavor, color)
627      local basename = "st-oxyd" .. flavor .. color          local n = "st-oxyd" .. flavor .. color
628      local fadein = "oxyd"..flavor.."-fadein"          local fadein = "oxyd"..flavor.."-fadein"
629      local fadeout= "oxyd"..flavor.."-fadeout"          local fadeout= "oxyd"..flavor.."-fadeout"
630            
631      def_overlay(basename.."-base", {oxbaseimg[flavor], oxcolorspots[color+1]})          def_overlay(n.."-base", {%baseimg[flavor], %colorspots[color+1]})
632      def_solidstone(basename, basename.."-base")          def_solidstone(n, n.."-base")
633      display.DefineComposite(basename .. "-opening", basename, fadein)          display.DefineComposite(n.."-opening", n, fadein)
634      display.DefineComposite(basename .. "-closing", basename, fadeout)          display.DefineComposite(n.."-closing", n, fadeout)
635  end      end
   
   
 function make_oxydblink(flavor, color)  
     local basename = "st-oxyd" .. flavor .. color .. "-blink"  
   
     local images={oxbaseimg[flavor], oxcolorspots[color+1], "st-oxyd-questmark"}  
     def_overlay(basename .. 1, images)  
     def_overlay(basename .. 2, {oxbaseimg[flavor], oxcolorspots[color+1]})  
     def_anim(basename.."-anim",  
              buildframes({basename .. 1,basename .. 2}, 500), 1)  
     def_shmodel(basename, basename .. "-anim", "sh-solid")  
 end  
636    
637  function make_oxydopened(flavor, color)      function mkblink(flavor, color)
638      local basename = "st-oxyd" .. flavor .. color .. "-open"          local n = "st-oxyd"..flavor..color.."-blink"
639      local names = {}          local img={%baseimg[flavor],%colorspots[color+1], "st-oxyd-questmark"}
640            def_overlay(n..1, img)
641            def_overlay(n..2, {%baseimg[flavor], %colorspots[color+1]})
642            def_anim(n.."-anim", buildframes({n..1,n..2}, 500), 1)
643            def_shmodel(n, n.."-anim", "sh-solid")
644        end
645    
646      for i=1,getn(oxbulges) do      function mkopened(flavor, color)
647          local images={oxbaseimg[flavor],oxcolorspots[color+1],oxbulges[i]}          local n = "st-oxyd" .. flavor .. color .. "-open"
648          names[i] = basename .. format("_%04d", i)          local names = {}
649          def_overlay(names[i], images)          
650            for i=1,getn(%openovls) do
651                local images={%baseimg[flavor],%colorspots[color+1],%openovls[i]}
652                names[i] = n .. format("_%04d", i)
653                def_overlay(names[i], images)
654            end
655            
656            -- compose these images into an animation
657            frames = pingpong(buildframes(names, 100))
658            def_anim(n.."-anim", frames, 1)
659            
660            -- and finally add a shadow to make the model complete
661            def_solidstone(n, n.."-anim")
662      end      end
663            
664      -- compose these images into an animation      function mkoxyd(flavor)
665      frames = pingpong(buildframes(names, 100))          --    print ("making oxyd model for "..flavor)
666      def_anim(basename .. "-anim", frames, 1)          def_stone("st-oxyd"..flavor)
667            
668      -- and finally add a shadow to make the model complete          local fadein = "oxyd"..flavor.."-fadein"
669      def_solidstone(basename, basename.."-anim")          local fadeout= "oxyd"..flavor.."-fadeout"
670  end          def_anim(fadein, %fopening[flavor])
671            def_anim(fadeout, %fclosing[flavor])
672  function make_oxydmodel(flavor)          
673  --    print ("making oxyd model for "..flavor)          for color=0,7 do
674      def_stone("st-oxyd"..flavor)              mkopenclose(flavor, color)
675                mkblink(flavor, color)
676      local fadein = "oxyd"..flavor.."-fadein"              mkopened(flavor, color)
677      local fadeout= "oxyd"..flavor.."-fadeout"          end
     def_anim(fadein, oxopening_fms[flavor])  
     def_anim(fadeout, oxclosing_fms[flavor])  
   
     for color=0,7 do  
         make_oxydopenclose(flavor, color)  
         make_oxydblink(flavor, color)  
         make_oxydopened(flavor, color)  
678      end      end
679        mkoxyd("a")
680        mkoxyd("b")
681        progress(40)
682        mkoxyd("d")
683        mkoxyd("c")
684  end  end
 make_oxydmodel("a")  
 make_oxydmodel("b")  
 progress(40)  
 make_oxydmodel("d")  
 make_oxydmodel("c")  
685    
686  progress(50)  progress(50)
687    
# Line 745  def_solidstone("st-stoneimpulse-hollow-a Line 751  def_solidstone("st-stoneimpulse-hollow-a
751  def_anim("stoneimpulse-hollow-anim2", reverseframes(buildframes(namelist, 50)))  def_anim("stoneimpulse-hollow-anim2", reverseframes(buildframes(namelist, 50)))
752  def_solidstone("st-stoneimpulse-hollow-anim2", "stoneimpulse-hollow-anim2")  def_solidstone("st-stoneimpulse-hollow-anim2", "stoneimpulse-hollow-anim2")
753    
754  -- Thief stone  -----------------
755  namelist = def_subimages("st-thief", {h=7})  -- Thief stone --
756  DefineModels{  -----------------
757  --     {"st-thief%d", SUBIMAGES, {file="st-thief", h=7}},  do
758  --     {"thief-anim", ANIM, {frames=pingpong(buildframes,namelist,80)}},      local img = def_subimages("st-thief", {h=7})
759  --     {"st-thief", STONE, {fg=namelist[1]}},      def_anim("thief-anim", pingpong(buildframes(img, 80)))
760  --     {"st-thief-anim", STONE, {fg="thief-anim"}},      def_solidstone("st-thief", img[1])
761  }      def_solidstone("st-thief-anim", "thief-anim")
762  def_anim("thief-anim", pingpong(buildframes(namelist, 80)))  end
763  def_solidstone("st-thief", namelist[1])  
764  def_solidstone("st-thief-anim", "thief-anim")  -----------------
765    -- Timer stone --
766  -- Timer stone  -----------------
767  namelist = def_subimages("st-timer", {h=4})  do
768  def_anim("timer-anim", buildframes(namelist, 120), 1)      local img = def_subimages("st-timer", {h=4})
769  def_solidstone("st-timer", "timer-anim")      def_anim("timer-anim", buildframes(img, 120), 1)
770  def_stone("st-timeroff")      def_solidstone("st-timer", "timer-anim")
771        def_stone("st-timeroff")
772    end
773    
774  progress(60)  progress(60)
775    
# Line 810  make_mirror("st-pmirror-st", "st-mirror- Line 818  make_mirror("st-pmirror-st", "st-mirror-
818  -- OneWay --  -- OneWay --
819  def_stones{"st-oneway-n", "st-oneway-e", "st-oneway-w", "st-oneway-s"}  def_stones{"st-oneway-n", "st-oneway-e", "st-oneway-w", "st-oneway-s"}
820    
821    ---------------
822  -- Coin dropping into slot --  -- Coin slot --
823  namelist=def_subimages("st-coin2slot", {h=20})  ---------------
824  def_anim("st-coin2slot-anim", buildframes(namelist, 20))  do
825  def_solidstone("st-coin2slot", "st-coin2slot-anim")      def_stone("st-coinslot")
826        local img=def_subimages("st-coin2slot", {h=20})
827  def_stone("st-coinslot")      def_anim("st-coin2slot-anim", buildframes(img, 20))
828  def_stone("st-yellow")      def_solidstone("st-coin2slot", "st-coin2slot-anim")
829    end
830    
831    
832  progress(70)  progress(70)
833    
834    -------------------
835  -- Puzzle stones --  -- Puzzle stones --
836  def_subimages("st-puzzle", {modelname="st-puzzlex",w=4,h=4})  -------------------
837  for i=2,16 do def_solidstone("st-puzzle"..i, "st-puzzlex"..i) end  do
838  def_shmodel("st-puzzle1", "st-puzzlex1", "sh-puzzle1")      def_subimages("st-puzzle", {modelname="st-puzzlex",w=4,h=4})
839        for i=2,16 do def_solidstone("st-puzzle"..i, "st-puzzlex"..i) end
840        def_shmodel("st-puzzle1", "st-puzzlex1", "sh-puzzle1")
841    end
842    
843    ----------
844  -- Door --  -- Door --
845  def_image("st-doorh-open")  ----------
846  def_image("st-doorh-closed")  do
847  doorhframes = buildframes(def_subimages("st-doorh", {h=7}),60)      local f,img
848  def_anim("st-doorh-opening", reverseframes(doorhframes))  
849  def_anim("st-doorh-closing", doorhframes)      img=def_subimages("st-doorh", {h=7})
850        def_alias("st-doorh-open", img[1])
851  def_image("st-doorv-open")      def_alias("st-doorh-closed", img[7])
852  def_image("st-doorv-closed")      f=buildframes(img, 60)
853  doorvframes = buildframes(def_subimages("st-doorv", {w=7}),60)      def_anim("st-doorh-opening", reverseframes(f))
854  def_anim("st-doorv-opening", reverseframes(doorvframes))      def_anim("st-doorh-closing", f)
855  def_anim("st-doorv-closing", doorvframes)  
856        img=def_subimages("st-doorv", {w=7})
857        def_alias("st-doorv-open", img[1])
858        def_alias("st-doorv-closed", img[7])
859        f = buildframes(img,60)
860        def_anim("st-doorv-opening", reverseframes(f))
861        def_anim("st-doorv-closing", f)
862    end
863    
864  -- Door_a --  -- Door_a --
865  def_image("st-door_a-open", {filename="st-doora_0002"})  do
866  def_image("st-door_a-closed", {filename="st-doora_0001"})      def_alias("st-door_a-open", "st-grate1")
867  door_ahframes = buildframes(framenames("st-doora",1,2),60)      def_alias("st-door_a-closed", "st-oxyda")
868  def_anim_images("st-door_a-opening", door_ahframes)      local f = buildframes({"st-door_a-closed", "st-door_a-open"},60)
869  def_anim_images("st-door_a-closing", reverseframes(door_ahframes))      def_anim("st-door_a-opening", f)
870        def_anim("st-door_a-closing", reverseframes(f))
871    end
872    
873  -- Door_b --  -- Door_b --
874  def_image("st-door_b-open", {filename="st-doorb_0008"})  do
875  def_image("st-door_b-closed", {filename="st-doorb_0001"})      def_alias("st-door_b-open", "invisible")
876  door_bhframes = buildframes(framenames("st-doorb",1,8),60)      def_alias("st-door_b-closed", "st-plain")
877  def_anim_images("st-door_b-opening", door_bhframes)      local img=def_subimages("st-doorb", {modelname="doorb", h=8})
878  def_anim_images("st-door_b-closing", reverseframes(door_bhframes))      local f = buildframes(img,60)
879        def_anim("st-door_b-opening", f)
880        def_anim("st-door_b-closing", reverseframes(f))
881    end
882    
883  -- Door_c --  -- Door_c --
884  def_image("st-door_c-open", {filename="st-doorc_0002"})  do
885  def_image("st-door_c-closed", {filename="st-doorc_0001"})      def_alias("st-door_c-open", "st-grate2")
886  door_chframes = buildframes(framenames("st-doorc",1,2),60)      def_alias("st-door_c-closed", "st-plain")
887  def_anim_images("st-door_c-opening", door_chframes)      frames=buildframes({"st-door_c-closed","st-door_c-open"},60)
888  def_anim_images("st-door_c-closing", reverseframes(door_chframes))      def_anim("st-door_c-opening", frames)
889        def_anim("st-door_c-closing", reverseframes(frames))
890    end
891    
892    -------------------
893  -- Shogun stones --  -- Shogun stones --
894  def_images{"sh-shogun1","sh-shogun2", "sh-shogun4"}  -------------------
895  def_subimages("st-shogun", {modelname="st-shogun-fg",h=7})  do
896        def_images{"sh-shogun1","sh-shogun2", "sh-shogun4"}
897        def_subimages("st-shogun", {modelname="st-shogun-fg",h=7})
898    
899  def_shmodel("st-shogun1", "st-shogun-fg1", "sh-shogun1")      def_shmodel("st-shogun1", "st-shogun-fg1", "sh-shogun1")
900  def_shmodel("st-shogun2", "st-shogun-fg2", "sh-shogun2")      def_shmodel("st-shogun2", "st-shogun-fg2", "sh-shogun2")
901  def_shmodel("st-shogun3", "st-shogun-fg3", "sh-shogun1")      def_shmodel("st-shogun3", "st-shogun-fg3", "sh-shogun1")
902  def_shmodel("st-shogun4", "st-shogun-fg4", "sh-shogun4")      def_shmodel("st-shogun4", "st-shogun-fg4", "sh-shogun4")
903  def_shmodel("st-shogun5", "st-shogun-fg5", "sh-shogun1")      def_shmodel("st-shogun5", "st-shogun-fg5", "sh-shogun1")
904  def_shmodel("st-shogun6", "st-shogun-fg6", "sh-shogun2")      def_shmodel("st-shogun6", "st-shogun-fg6", "sh-shogun2")
905  def_shmodel("st-shogun7", "st-shogun-fg7", "sh-shogun1")      def_shmodel("st-shogun7", "st-shogun-fg7", "sh-shogun1")
906    end
907    
908  progress(80)  progress(80)
909    
910  -------------------  -------------------
911  -- Bolder stones --  -- Bolder stones --
912  -------------------  -------------------
 bolder_base="st-bolder_0001"  
 bolder_arrows={  
     n=framenames("st-bolder", 2,4),  
     e=framenames("st-bolder", 5,7),  
     s=framenames("st-bolder", 8,10),  
     w=framenames("st-bolder", 11,13)  
 }  
 function def_bolder2(orient)  
     local ovlname = "st-bolder"..orient.."o"  
     local animname = "st-bolder"..orient.."a"  
     local names = {}  
     for i=1,3 do  
         def_overlay(ovlname..i, {bolder_base, bolder_arrows[orient][i]})  
         names[i] = ovlname..i  
     end  
     def_anim(animname, buildframes(names, 120), 1)  
     def_shmodel("st-bolder-"..orient, animname, "sh-solid")  
 end  
 --def_bolder("n")  
 --def_bolder("e")  
 --def_bolder("s")  
 --def_bolder("w")  
   
913  do  do
914      local bolderlist=def_subimages("st-bolder", {w=4,h=3})      local img=def_subimages("st-bolder", {w=4,h=3})
915      function def_bolder(orient, start)      function def_bolder(orient, start)
916          local animname="st-bolder"..orient.."a"          local animname="st-bolder"..orient.."a"
917          local frames={%bolderlist[start],          local frames={%img[start], %img[start+1], %img[start+2]}
                       %bolderlist[start+1],  
                       %bolderlist[start+2]}  
918          def_anim(animname, buildframes(frames, 120),1)          def_anim(animname, buildframes(frames, 120),1)
919          def_shmodel("st-bolder-"..orient, animname, "sh-solid")          def_shmodel("st-bolder-"..orient, animname, "sh-solid")
920      end      end
# Line 917  do Line 924  do
924      def_bolder("s",7)      def_bolder("s",7)
925      def_bolder("w",10)      def_bolder("w",10)
926  end  end
 --namelist={"st-bolder-n1","st-bolder-n2","st-bolder-n3"}  
 --frames = buildframes(namelist, 120)  
 --def_anim_images("st-bolder-n-anim", frames, {loop=1})  
 --def_shmodel("st-bolder-n", "st-bolder-n-anim", "sh-solid")  
   
927    
928  -- Invisible stone --  -- Invisible stone --
929  def_image("st-invisible", {filename="invisible"})  def_alias("st-invisible", "invisible")
930  def_image("st-invisible_magic", {filename="invisible"})  def_alias("st-invisible_magic", "invisible")
931  def_image("st-stonebrush", {filename="invisible"})  def_alias("st-stonebrush", "invisible")
932    
933    ----------------------
934  -- Magic stones :-) --  -- Magic stones :-) --
935  namelist= def_subimages("st-magic", {h=4, modelname="st-magic-fg"})  ----------------------
936  nlist = {}  do
937  for i=1,getn(namelist) do      local img = def_subimages("st-magic", {h=4, modelname="st-magic-fg"})
938      nlist[i] = "st-magic"..i      local nlist = {}
939      def_solidstone(nlist[i],namelist[i])      for i=1,getn(img) do
940            nlist[i] = "st-magic"..i
941            def_solidstone(nlist[i], img[i])
942        end
943        display.DefineRandModel("st-magic", getn(nlist), nlist)
944  end  end
 display.DefineRandModel("st-magic", getn(nlist), nlist)  
   
945    
946    
947  -------------  -------------
# Line 944  display.DefineRandModel("st-magic", getn Line 949  display.DefineRandModel("st-magic", getn
949  -------------  -------------
950  progress(100)  progress(100)
951    
952  ring_anim_frames = buildframes(framenames("ring-anim", 1,8), 50)  do
953  --ring_anim_frames = buildframes(framenames("ring-animb", 2,11), 50)      local f = buildframes(framenames("ring-anim", 1,8), 50)
954  def_anim_images("ring-anim", ring_anim_frames, {xoff=-16,yoff=-16})      def_anim_images("ring-anim", f, {xoff=-16,yoff=-16})
955    end

Legend:
Removed from v.1.55  
changed lines
  Added in v.1.56

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26