rpi4-osdev/part12-wgt/wmiscb.c

21 lines
382 B
C
Raw Normal View History

#include "wgt.h"
#include "include/mem.h"
extern short bx,by,tx,ty;
void wfreeblock (block ptr)
{
free (ptr);
}
short wgetblockwidth (block ptr)
{
return *ptr; /* Width is first 2 bytes of data */
}
short wgetblockheight (block ptr)
{
ptr ++; /* Skip width */
return *ptr; /* Height is second 2 bytes of data */
}