-
Notifications
You must be signed in to change notification settings - Fork 4
/
AnimPlayer.hws
84 lines (71 loc) · 2.23 KB
/
AnimPlayer.hws
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
/****************************************************************
** **
** Name: AnimPlayer **
** Author: Dimitris Panokostas **
** Version: 2.4 **
** Date: 2022-10-17 **
** Interpreter: Hollywood 9.0+ **
** **
****************************************************************/
Const #DEBUG = False
/*
** Make sure we have at least Hollywood 9
*/
@VERSION 9,0
/*
** This script requires the RapaGUI plugin
*/
@REQUIRE "RapaGUI", {Link = True}
@REQUIRE "yafa", {Link = True}
@REQUIRE "flicanim", {Link = True}
/*
** Information about this app
*/
@APPTITLE "AnimPlayer"
@APPVERSION "$VER: AnimPlayer 2.4 (2022-10-17)"
@APPCOPYRIGHT "(C) Copyright 2016-2022 by Dimitris Panokostas"
@APPAUTHOR "Dimitris Panokostas"
@APPDESCRIPTION "A simple Amiga ANIM player"
/*
** Button and list view images
*/
@BRUSH 1, "data/tapestart.png", {LoadAlpha = True}
@BRUSH 2, "data/tapeplay.png", {LoadAlpha = True}
@BRUSH 3, "data/tapestop.png", {LoadAlpha = True}
@BRUSH 4, "data/tapeend.png", {LoadAlpha = True}
@BRUSH 5, "data/add.png", {LoadAlpha = True}
@BRUSH 6, "data/remove.png", {LoadAlpha = True}
@BRUSH 7, "data/moveup.png", {LoadAlpha = True}
@BRUSH 8, "data/movedown.png", {LoadAlpha = True}
@BRUSH 9, "data/video.png", {LoadAlpha = True}
/*
** Our BGPic
*/
@BRUSH 10, "data/cover.png"
/*
** The GUI xml definition
*/
@FILE 1, "AnimPlayer.xml"
/*
** Use a black background for our Hollywood display
*/
@DISPLAY {Color = #BLACK, Title = "AnimPlayer", Sizeable = True, Layers = True}
@INCLUDE "AnimPlayerLib.hws"
DisplayBrush(10, #CENTER, #CENTER)
; dynamically create GUI from an external *.xml file definition
Local gui = ""
While Not Eof(1) Do gui = gui .. ReadLine(1)
moai.CreateApp(gui)
; get plugin file types
p_GetPluginFiletypes()
; listen to these events!
InstallEventHandler({RapaGUI = p_EventFunc, SizeWindow = p_EventFunc})
musstate$ = "init"
animDrawInterval = Nil
animSize = "original"
loopAnim = false
; main loop!
Repeat
WaitEvent
Forever