libmsx
C library for MSX
Loading...
Searching...
No Matches
metasprite.h
Go to the documentation of this file.
1
// -*- coding: utf-8-unix -*-
2
/*
3
* Copyright (c) 2021-2024 Daishi Mori (mori0091)
4
*
5
* This software is released under the MIT License.\n
6
* See https://github.com/mori0091/libmsx/blob/main/LICENSE
7
*
8
* GitHub libmsx project\n
9
* https://github.com/mori0091/libmsx
10
*/
17
#pragma once
18
19
#ifndef METASPRITE_H
20
#define METASPRITE_H
21
22
#include <stdint.h>
23
24
#include "
vdp.h
"
25
#include "
vmem.h
"
26
#include "
sprite.h
"
27
35
typedef
struct
vec2i
{
36
int
x
;
37
int
y
;
38
}
vec2i_t
;
39
60
typedef
struct
metasprite
{
65
uint8_t
n
;
70
vec2i_t
anchor
;
75
vec2i_t
*
layouts
;
79
uint8_t*
pats
;
80
}
metasprite_t
;
81
95
void
vmem_set_metasprite_s
(
vmemptr_t
base, uint8_t plane,
int
x,
int
y,
96
const
metasprite_t
* ms,
97
const
tagged_color_t
tagged_color);
98
112
void
vmem_set_metasprite_m
(
vmemptr_t
base, uint8_t plane,
int
x,
int
y,
113
const
metasprite_t
* ms,
114
const
tagged_color_t
* tagged_colors);
115
148
void
vmem_set_metasprite_a
(
vmemptr_t
base, uint8_t plane,
int
x,
int
y,
149
const
metasprite_t
* ms);
150
153
#endif
tagged_color_t
uint8_t tagged_color_t
Color code with tags of sprite attribute table.
Definition
sprite.h:50
vec2i::y
int y
Definition
metasprite.h:37
metasprite::layouts
vec2i_t * layouts
n element array of sprite positions, in the metasprite local coordinate system.
Definition
metasprite.h:75
metasprite::anchor
vec2i_t anchor
the anchor point of the metasprite, in the metasprite local coordinate system.
Definition
metasprite.h:70
vec2i::x
int x
Definition
metasprite.h:36
metasprite::n
uint8_t n
Number of sprites, of that the metasprite consists.
Definition
metasprite.h:65
metasprite::pats
uint8_t * pats
n element array of the sprite pattern numbers.
Definition
metasprite.h:79
vec2i_t
struct vec2i vec2i_t
vmem_set_metasprite_s
void vmem_set_metasprite_s(vmemptr_t base, uint8_t plane, int x, int y, const metasprite_t *ms, const tagged_color_t tagged_color)
MSX Display / Move single colored metasprite.
vmem_set_metasprite_m
void vmem_set_metasprite_m(vmemptr_t base, uint8_t plane, int x, int y, const metasprite_t *ms, const tagged_color_t *tagged_colors)
MSX Display / Move multi colored metasprite.
metasprite_t
struct metasprite metasprite_t
Meta-sprite ; an aggregate of sprites.
vmem_set_metasprite_a
void vmem_set_metasprite_a(vmemptr_t base, uint8_t plane, int x, int y, const metasprite_t *ms)
MSX Display / Move metasprite.
metasprite
Meta-sprite ; an aggregate of sprites.
Definition
metasprite.h:60
vec2i
Definition
metasprite.h:35
vmemptr_t
uint32_t vmemptr_t
Type for VRAM address.
Definition
vmem.h:42
sprite.h
Sprites.
vdp.h
Data types and functions for VDP (Video Display Proccessor) access.
vmem.h
Data types and functions for VRAM access.
include
metasprite.h
Generated by
1.9.8