add tree cover

This commit is contained in:
Zack Buhman 2025-07-04 18:29:40 -05:00
parent 606616d1f5
commit f679129e30
10 changed files with 37 additions and 3 deletions

BIN
cover/tree.data Normal file

Binary file not shown.

15
cover/tree.data.h Normal file
View File

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

BIN
cover/tree.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

View File

@ -33,7 +33,7 @@ namespace playlist {
.artist = "Cai",
.title = "SummerDreamsDemov4",
.start = (int)&_binary_xm_SummerDreamsDemoTrackv4_xm_start,
.cover_ix = scene::tracker::cover::mountain,
.cover_ix = scene::tracker::cover::tree,
},
};

View File

@ -82,6 +82,16 @@ namespace scene::tracker::cover {
.height = 72,
.scale = 6,
},
[tree] = {
.texture_offset = texture::offset::tree,
.texture_size = tsp_instruction_word::texture_u_size::from_int(128)
| tsp_instruction_word::texture_v_size::from_int(128),
.texture_width = 1.0f / 128.0f,
.texture_height = 1.0f / 128.0f,
.width = 72,
.height = 72,
.scale = 6,
},
};
constexpr inline vec3 transform_position_fs(const cover& cover,

View File

@ -12,6 +12,7 @@ namespace scene::tracker::cover {
mountain,
mossycottage,
clocks,
tree,
};
void draw(ta_multiwriter& multi, float x, float y, bool zoom);

View File

@ -271,7 +271,7 @@ void draw_middle_line(ta_parameter_writer& writer, float x, float y)
{
using namespace interpreter;
int middle_width = line_column_width * (state.xm.number_of_channels) + (2 * glyph::hori_advance) + 2 + 3;
int middle_width = line_column_width * (state.xm.number_of_channels) + (3 * glyph::hori_advance) + 2 + 3;
int middle_height = glyph::vert_advance - 1;
y += 3;

View File

@ -21,6 +21,7 @@
#include "cover/redtree.data.h"
#include "cover/silvertrees.data.h"
#include "cover/thebeach.data.h"
#include "cover/tree.data.h"
#include "printf/printf.h"
@ -82,6 +83,11 @@ namespace texture {
.size = reinterpret_cast<int>(&_binary_cover_thebeach_data_size),
.offset = offset::thebeach,
},
{
.start = reinterpret_cast<void *>(&_binary_cover_tree_data_start),
.size = reinterpret_cast<int>(&_binary_cover_tree_data_size),
.offset = offset::tree,
},
};
const int textures_length = (sizeof (textures)) / (sizeof (textures[0]));

View File

@ -19,6 +19,7 @@ namespace texture {
constexpr int redtree = mountain + 32768;
constexpr int silvertrees = redtree + 32768;
constexpr int thebeach = silvertrees + 32768;
constexpr int tree = thebeach + 32768;
};
extern struct texture textures[];

View File

@ -16,7 +16,8 @@ TEXTURE_OBJ = \
cover/mountain.data.o \
cover/redtree.data.o \
cover/silvertrees.data.o \
cover/thebeach.data.o
cover/thebeach.data.o \
cover/tree.data.o
PCM_OBJ = \
pcm/start3.adpcm.o \