summaryrefslogtreecommitdiffstats
path: root/src/fig/FIGCarousel.cpp
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2015-08-07 14:04:28 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2015-08-07 14:04:37 +0200
commit5db817edef50d9a3bf92c594d419dd9a17255a5e (patch)
tree3582111e99c7cda581a0f34900493d337e02dd1a /src/fig/FIGCarousel.cpp
parent8ea5c5bf03335f0c95a292f400699ba98e6cf821 (diff)
downloaddabmux-5db817edef50d9a3bf92c594d419dd9a17255a5e.tar.gz
dabmux-5db817edef50d9a3bf92c594d419dd9a17255a5e.tar.bz2
dabmux-5db817edef50d9a3bf92c594d419dd9a17255a5e.zip
Set flag in FIG0_9, add new FIC allocation helper
Diffstat (limited to 'src/fig/FIGCarousel.cpp')
-rw-r--r--src/fig/FIGCarousel.cpp39
1 files changed, 26 insertions, 13 deletions
diff --git a/src/fig/FIGCarousel.cpp b/src/fig/FIGCarousel.cpp
index 99fb73a..3ae5738 100644
--- a/src/fig/FIGCarousel.cpp
+++ b/src/fig/FIGCarousel.cpp
@@ -64,20 +64,33 @@ FIGCarousel::FIGCarousel(boost::shared_ptr<dabEnsemble> ensemble) :
m_fig0_1(&m_rti),
m_fig0_2(&m_rti),
m_fig0_3(&m_rti),
- m_fig0_17(&m_rti)
+ m_fig0_17(&m_rti),
+ m_fig0_8(&m_rti),
+ m_fig1_0(&m_rti),
+ m_fig0_13(&m_rti),
+ m_fig0_10(&m_rti),
+ m_fig0_9(&m_rti)
{
- m_figs_available[std::make_pair(0, 0)] = &m_fig0_0;
- m_figs_available[std::make_pair(0, 1)] = &m_fig0_1;
- m_figs_available[std::make_pair(0, 2)] = &m_fig0_2;
- m_figs_available[std::make_pair(0, 3)] = &m_fig0_3;
- m_figs_available[std::make_pair(0, 17)] = &m_fig0_17;
-
- const int fib0 = 0;
- allocate_fig_to_fib(0, 0, fib0);
- allocate_fig_to_fib(0, 1, fib0);
- allocate_fig_to_fib(0, 2, fib0);
- allocate_fig_to_fib(0, 3, fib0);
- allocate_fig_to_fib(0, 17, fib0);
+ load_and_allocate(m_fig0_0, 0);
+ load_and_allocate(m_fig0_1, 0);
+ load_and_allocate(m_fig0_2, 0);
+ load_and_allocate(m_fig0_3, 0);
+ load_and_allocate(m_fig0_17, 0);
+
+ load_and_allocate(m_fig0_8, 1);
+ load_and_allocate(m_fig1_0, 1);
+ load_and_allocate(m_fig0_13, 1);
+ load_and_allocate(m_fig0_10, 1);
+ load_and_allocate(m_fig0_9, 1);
+}
+
+void FIGCarousel::load_and_allocate(IFIG& fig, int fib)
+{
+ int type = fig.figtype();
+ int extension = fig.figextension();
+
+ m_figs_available[std::make_pair(type, extension)] = &fig;
+ allocate_fig_to_fib(type, extension, fib);
}
void FIGCarousel::update(unsigned long currentFrame, time_t dabTime)