File:  [RetroPC.NET] / np2 / lio / gpset.c
Revision 1.4: download - view: text, annotated - select for diffs
Fri Feb 20 17:32:23 2004 JST (21 years, 8 months ago) by yui
Branches: MAIN
CVS tags: HEAD
fix i286a memory (T.Yui)

#include	"compiler.h"
#include	"cpucore.h"
#include	"lio.h"


typedef struct {
	BYTE	x[2];
	BYTE	y[2];
	BYTE	pal;
} LIOGPSET;


REG8 lio_gpset(void) {

	LIOGPSET	gpset;
	SINT16		x;
	SINT16		y;

	i286_memstr_read(CPU_DS, CPU_BX, &gpset, sizeof(gpset));
	if (gpset.pal >= lio.gcolor1.palmax) {
		if (CPU_AH == 2) {
			gpset.pal = lio.gcolor1.bgcolor;
		}
		else {
			gpset.pal = lio.gcolor1.fgcolor;
		}
	}
	x = (SINT16)LOADINTELWORD(gpset.x);
	y = (SINT16)LOADINTELWORD(gpset.y);
	lio_pset(x, y, gpset.pal);
	return(LIO_SUCCESS);
}


RetroPC.NET-CVS <cvs@retropc.net>