1 /*
2 
3 	MSX specific routines
4 
5 	GFX - a small graphics library
6 	Copyright (C) 2004  Rafael de Oliveira Jannone
7 
8 	Set screen to mangled mode (screen 1 + 2)
9 
10 	$Id: msx_put_sprite_8.c,v 1.4 2016-06-16 20:54:24 dom Exp $
11 */
12 
13 #include <msx.h>
14 
msx_put_sprite_8(unsigned int id,int x,int y,unsigned int handle,unsigned int color)15 void msx_put_sprite_8(unsigned int id, int x, int y, unsigned int handle, unsigned int color) {
16 	sprite_t sp;
17 	if (x < 0) {
18 		x += 32;
19 		color |= 128;
20 	}
21 	sp.y = y - 1;
22 	sp.x = x;
23 	sp.handle = handle;
24 	sp.color = color;
25 	msx_vwrite_direct(&sp, 0x1b00 + (id << 2), 4);
26 }
27