Compare commits

..

No commits in common. "340f813bfa3900393e66acf59a4c8a334a9ce362" and "19e437d517f006cce9f393d40ef35a5dbc4c7e35" have entirely different histories.

5 changed files with 29 additions and 71 deletions

View File

@ -5,7 +5,6 @@
#include "xm.h" #include "xm.h"
#include "xm/milkypack01.xm.h" #include "xm/milkypack01.xm.h"
#include "xm/CottageFantasy2.xm.h" #include "xm/CottageFantasy2.xm.h"
#include "xm/CloudsAhead6.xm.h"
namespace playlist { namespace playlist {
@ -14,18 +13,14 @@ namespace playlist {
}; };
const static playlist_item playlist[] = { const static playlist_item playlist[] = {
{
"Shiroiii",
(int)&_binary_xm_CottageFantasy2_xm_start,
},
{
"Shiroiii",
(int)&_binary_xm_CloudsAhead6_xm_start,
},
{ {
"leon du star", "leon du star",
(int)&_binary_xm_milkypack01_xm_start, (int)&_binary_xm_milkypack01_xm_start,
}, },
{
"Shiroiii",
(int)&_binary_xm_CottageFantasy2_xm_start,
},
}; };
const int playlist_length = (sizeof (playlist)) / (sizeof (playlist[0])); const int playlist_length = (sizeof (playlist)) / (sizeof (playlist[0]));
@ -36,7 +31,7 @@ namespace playlist {
if (state.playlist_ix >= playlist_length) if (state.playlist_ix >= playlist_length)
state.playlist_ix = 0; state.playlist_ix = 0;
printf("next deferred_load playlist_ix %d\n", state.playlist_ix); printf("deferred_load\n");
interpreter::deferred_load(playlist[state.playlist_ix].start); interpreter::deferred_load(playlist[state.playlist_ix].start);
} }
@ -46,7 +41,6 @@ namespace playlist {
if (state.playlist_ix < 0) if (state.playlist_ix < 0)
state.playlist_ix = playlist_length - 1; state.playlist_ix = playlist_length - 1;
printf("prev deferred_load playlist_ix %d\n", state.playlist_ix);
interpreter::deferred_load(playlist[state.playlist_ix].start); interpreter::deferred_load(playlist[state.playlist_ix].start);
} }
} }

View File

@ -24,63 +24,43 @@ void prev_click()
void next_click() void next_click()
{ {
printf("next\n"); printf("next\n");
playlist::next(); playlist::prev();
} }
#define __length(c) ((sizeof (c)) / (sizeof (c[0]))) widget::button prev_button(50, 50, "prev", prev_click);
widget::button play_button(50, 50, "play");
widget::button pause_button(50, 50, "pause");
widget::button stop_button(50, 50, "stop");
widget::button next_button(50, 50, "next", next_click);
widget::button play_button(75, 60, "play"); widget::widget * left1_children[] = {
widget::button pause_button(75, 33, "pause"); &prev_button,
widget::button prev_button(79, 30, "prev", prev_click);
widget::button next_button(79, 30, "next", next_click);
widget::button rrr_button(39, 15, "rrr");
widget::button rr_button(39, 15, "rr");
widget::button ff_button(39, 15, "ff");
widget::button fff_button(39, 15, "fff");
widget::widget * play_pause_children[] = {
&play_button, &play_button,
&pause_button, &pause_button,
}; &stop_button,
int play_pause_length = __length(play_pause_children);
widget::widget * prev_next_children[] = {
&prev_button,
&next_button, &next_button,
}; };
int prev_next_length = __length(prev_next_children); int left1_length = (sizeof (left1_children)) / (sizeof (left1_children[0]));
widget::widget * ff_rr_children[] = { widget::button up_button(50, 50, "up");
&rrr_button, widget::button down_button(50, 50, "down");
&rr_button,
&ff_button, widget::widget * left2_children[] = {
&fff_button, &up_button,
&down_button,
}; };
int ff_rr_length = __length(ff_rr_children); int left2_length = (sizeof (left2_children)) / (sizeof (left2_children[0]));
widget::top_aligned play_pause(0, 0, 1, play_pause_children, play_pause_length); widget::left_aligned left_container1(0, 0, 5, left1_children, left1_length);
widget::left_aligned left_container2(0, 0, 5, left2_children, left2_length);
widget::left_aligned prev_next(0, 15, 1, prev_next_children, prev_next_length);
widget::left_aligned ff_rr(0, 70, 1, ff_rr_children, ff_rr_length);
widget::widget * prev_next_ff_rr_children[] = {
&prev_next,
&ff_rr,
};
int prev_next_ff_rr_length = __length(prev_next_ff_rr_children);
widget::container prev_next_ff_rr(0, 0, 159, 85, prev_next_ff_rr_children, prev_next_ff_rr_length);
widget::widget * top_children[] = { widget::widget * top_children[] = {
&play_pause, &left_container1,
&prev_next_ff_rr, &left_container2,
}; };
int top_length = __length(top_children); int top_length = (sizeof (top_children)) / (sizeof (top_children[0]));
widget::left_aligned top(100, 100, 20, top_children, top_length); widget::top_aligned top = widget::top_aligned(100, 100, 5, top_children, top_length);
namespace scene::tracker { namespace scene::tracker {

Binary file not shown.

View File

@ -1,15 +0,0 @@
#pragma once
#include <stdint.h>
#ifdef __cplusplus
extern "C" {
#endif
extern uint32_t _binary_xm_CloudsAhead6_xm_start __asm("_binary_xm_CloudsAhead6_xm_start");
extern uint32_t _binary_xm_CloudsAhead6_xm_end __asm("_binary_xm_CloudsAhead6_xm_end");
extern uint32_t _binary_xm_CloudsAhead6_xm_size __asm("_binary_xm_CloudsAhead6_xm_size");
#ifdef __cplusplus
}
#endif

View File

@ -1,7 +1,6 @@
XM_OBJ = \ XM_OBJ = \
xm/milkypack01.xm.o \ xm/milkypack01.xm.o \
xm/CottageFantasy2.xm.o \ xm/CottageFantasy2.xm.o
xm/CloudsAhead6.xm.o
TEXTURE_OBJ = \ TEXTURE_OBJ = \
font/tandy1k.data.o \ font/tandy1k.data.o \