FireBirdLib - Topfield TMS PVR TAP Programming Library
OSDMenuWaitSpinnerIdle.c
Go to the documentation of this file.
1
#include "
FBLib_TMSOSDMenu.h
"
2
3
void
OSDMenuWaitSpinnerIdle
(
void
)
4
{
5
TRACEENTER
();
6
7
if
(TAP_GetTick() >
WaitSpinnerTimeout
)
8
{
9
int
i, trail = 0;
10
11
for
(i =
WaitSpinnerIndex
; i >= 0; i--)
12
{
13
dword x, r, g, b;
14
15
if
(i <
WaitSpinnerItems
) x = i *
WaitSpinnerItemWidth
* 2;
16
else
x = (i -
WaitSpinnerItems
) *
WaitSpinnerItemWidth
* 2;
17
18
r =
R8888
(
WaitSpinnerItemColorTrail
) + trail * (
R8888
(
WaitSpinnerItemColorBlank
) -
R8888
(
WaitSpinnerItemColorTrail
)) /
WaitSpinnerItemsTrail
;
19
g =
G8888
(
WaitSpinnerItemColorTrail
) + trail * (
G8888
(
WaitSpinnerItemColorBlank
) -
G8888
(
WaitSpinnerItemColorTrail
)) /
WaitSpinnerItemsTrail
;
20
b =
B8888
(
WaitSpinnerItemColorTrail
) + trail * (
B8888
(
WaitSpinnerItemColorBlank
) -
B8888
(
WaitSpinnerItemColorTrail
)) /
WaitSpinnerItemsTrail
;
21
22
OSDMenuWaitSpinnerDrawItem
(
WaitSpinnerRgn
, x, RGB(r, g, b));
23
24
if
(++trail ==
WaitSpinnerItemsTrail
&& i > 0)
25
{
26
OSDMenuWaitSpinnerDrawItem
(
WaitSpinnerRgn
, (i - 1) *
WaitSpinnerItemWidth
* 2,
WaitSpinnerItemColorBlank
);
27
break
;
28
}
29
}
30
31
if
(
WaitSpinnerIndex
==
WaitSpinnerItems
+
WaitSpinnerItemsTrail
- 1)
WaitSpinnerIndex
=
WaitSpinnerItemsTrail
;
32
else
WaitSpinnerIndex
++;
33
34
TAP_Osd_Copy(
WaitSpinnerRgn
,
InfoBoxOSDRgn
, 0, 0,
WaitSpinnerWidth
,
WaitSpinnerItemHeight
, (
_InfoBox_Gd
.width -
WaitSpinnerWidth
) >> 1,
WaitSpinnerPosY
, FALSE);
35
TAP_Osd_Sync();
36
37
WaitSpinnerTimeout
= TAP_GetTick() +
WaitSpinnerSpeed
;
38
}
39
40
TRACEEXIT
();
41
}
FBLib_TMSOSDMenu.h
WaitSpinnerItemColorBlank
#define WaitSpinnerItemColorBlank
Definition:
FBLib_TMSOSDMenu.h:25
WaitSpinnerSpeed
#define WaitSpinnerSpeed
Definition:
FBLib_TMSOSDMenu.h:24
WaitSpinnerTimeout
dword WaitSpinnerTimeout
Definition:
OSDMenuInit.c:35
WaitSpinnerWidth
#define WaitSpinnerWidth
Definition:
FBLib_TMSOSDMenu.h:22
OSDMenuWaitSpinnerDrawItem
void OSDMenuWaitSpinnerDrawItem(word rgn, dword x, dword rgb)
Definition:
OSDMenuWaitSpinnerDrawItem.c:3
WaitSpinnerItems
#define WaitSpinnerItems
Definition:
FBLib_TMSOSDMenu.h:19
InfoBoxOSDRgn
word InfoBoxOSDRgn
Definition:
OSDMenuInit.c:12
WaitSpinnerItemsTrail
#define WaitSpinnerItemsTrail
Definition:
FBLib_TMSOSDMenu.h:23
WaitSpinnerItemColorTrail
#define WaitSpinnerItemColorTrail
Definition:
FBLib_TMSOSDMenu.h:27
WaitSpinnerItemWidth
#define WaitSpinnerItemWidth
Definition:
FBLib_TMSOSDMenu.h:20
WaitSpinnerPosY
dword WaitSpinnerPosY
Definition:
OSDMenuInfoBoxShow.c:4
WaitSpinnerIndex
int WaitSpinnerIndex
Definition:
OSDMenuInit.c:34
_InfoBox_Gd
TYPE_GrData _InfoBox_Gd
WaitSpinnerItemHeight
#define WaitSpinnerItemHeight
Definition:
FBLib_TMSOSDMenu.h:21
WaitSpinnerRgn
word WaitSpinnerRgn
Definition:
OSDMenuInit.c:33
OSDMenuWaitSpinnerIdle
void OSDMenuWaitSpinnerIdle(void)
Definition:
OSDMenuWaitSpinnerIdle.c:3
B8888
#define B8888(x)
Definition:
libFireBird.h:243
TRACEEXIT
#define TRACEEXIT()
Definition:
libFireBird.h:1244
TRACEENTER
#define TRACEENTER()
Definition:
libFireBird.h:1243
R8888
#define R8888(x)
Definition:
libFireBird.h:241
G8888
#define G8888(x)
Definition:
libFireBird.h:242
TMSOSDMenu
OSDMenuWaitSpinnerIdle.c
Generated on Fri Apr 29 2022 13:34:01 for FireBirdLib - Topfield TMS PVR TAP Programming Library by
1.9.3