summaryrefslogtreecommitdiff
path: root/apps/plugins/jackpot.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/jackpot.c')
-rw-r--r--apps/plugins/jackpot.c26
1 files changed, 7 insertions, 19 deletions
diff --git a/apps/plugins/jackpot.c b/apps/plugins/jackpot.c
index e5518b7bbc..aa573db46a 100644
--- a/apps/plugins/jackpot.c
+++ b/apps/plugins/jackpot.c
@@ -19,6 +19,7 @@
19 19
20#include "plugin.h" 20#include "plugin.h"
21#include "pluginlib_actions.h" 21#include "pluginlib_actions.h"
22#include "picture.h"
22 23
23PLUGIN_HEADER 24PLUGIN_HEADER
24 25
@@ -52,32 +53,19 @@ static unsigned long char_patterns[NB_SLOTS];
52#define PICTURE_ROTATION_STEPS REMOTE_PICTURE_HEIGHT 53#define PICTURE_ROTATION_STEPS REMOTE_PICTURE_HEIGHT
53#endif 54#endif
54 55
55struct jackpot_picture{
56 const void* data;
57 int width;
58 int height;
59};
60
61/* FIXME: would be nice to have better graphics ... */ 56/* FIXME: would be nice to have better graphics ... */
62#include "jackpot_slots.h" 57#include "jackpot_slots.h"
63#if NB_SCREENS==2 58#if NB_SCREENS==2
64#include "jackpot_slots_remote.h" 59#include "jackpot_slots_remote.h"
65#endif 60#endif
66 61
67const struct jackpot_picture jackpot_pictures[]={ 62const struct picture jackpot_pictures[]={
68 { 63 {jackpot_slots, BMPWIDTH_jackpot_slots,PICTURE_HEIGHT},
69 jackpot_slots,
70 BMPWIDTH_jackpot_slots,
71 PICTURE_HEIGHT
72 },
73#if NB_SCREENS==2 64#if NB_SCREENS==2
74 { 65 {jackpot_slots_remote,BMPWIDTH_jackpot_slots_remote,REMOTE_PICTURE_HEIGHT}
75 jackpot_slots_remote,
76 BMPWIDTH_jackpot_slots_remote,
77 REMOTE_PICTURE_HEIGHT
78 }
79#endif 66#endif
80}; 67};
68
81#define SLEEP_TIME (HZ/100) 69#define SLEEP_TIME (HZ/100)
82#endif /* HAVE_LCD_CHARCELLS */ 70#endif /* HAVE_LCD_CHARCELLS */
83 71
@@ -182,8 +170,7 @@ void jackpot_display_slot_machine(struct jackpot* game, struct screen* display)
182#ifdef HAVE_LCD_CHARCELLS 170#ifdef HAVE_LCD_CHARCELLS
183 display->putc(0, 0, '['); 171 display->putc(0, 0, '[');
184#else 172#else
185 const struct jackpot_picture* picture= 173 const struct picture* picture= &(jackpot_pictures[display->screen_type]);
186 &(jackpot_pictures[display->screen_type]);
187 int pos_x=(display->width-NB_SLOTS*(picture->width+1))/2; 174 int pos_x=(display->width-NB_SLOTS*(picture->width+1))/2;
188 int pos_y=(display->height-(picture->height))/2; 175 int pos_y=(display->height-(picture->height))/2;
189#endif /* HAVE_LCD_CHARCELLS */ 176#endif /* HAVE_LCD_CHARCELLS */
@@ -216,6 +203,7 @@ void jackpot_display_slot_machine(struct jackpot* game, struct screen* display)
216 /* Position on the screen */ 203 /* Position on the screen */
217 pos_x, pos_y, picture->width, picture->height 204 pos_x, pos_y, picture->width, picture->height
218 ); 205 );
206 vertical_picture_draw_part(display, picture, state_y, pos_x, pos_y);
219 pos_x+=(picture->width+1); 207 pos_x+=(picture->width+1);
220#endif 208#endif
221 } 209 }