


## diver-images.pkg
#
# This file contains the stick-figure diver images
# used in diver_pane: src/lib/x-kit/tut/arithmetic-game/diver-pane.pkg #
# Compiled by:
# src/lib/x-kit/tut/arithmetic-game/arithmetic-game-app.libstipulate
package xc = xclient; # xclient is from src/lib/x-kit/xclient/xclient.pkg package xg = xgeometry; # xgeometry is from src/lib/std/2d/xgeometry.pkgherein
package diver_images {
stipulate
bv = byte::string_to_bytes;
herein
Image
=
{ origin: xg::Point,
data: xc::Ro_Pixmap
};
fun make_diver_image screen (pt, image)
=
{ origin => pt,
data => xc::make_readonly_pixmap_from_clientside_pixmap screen image
}
: Image;
fun set_diver_image
(draww, pen)
( { origin, data }, point)
=
{ my size as xg::SIZE { wide, high } # These values appear utterly unused. *blink*
=
xc::size_of_ro_pixmap data;
to_pos = xg::point::subtract (point, origin);
xc::texture_blt draww pen { from => data, to_pos };
};
fun clear_diver_image draww ( { origin, data }, point)
=
{ size = xc::size_of_ro_pixmap data;
to_pos = xg::point::subtract (point, origin);
xc::clear_box draww (xg::box::make (to_pos, size));
};
dive_index = 0;
stand_index = 1;
climb_index = 2;
top_index = 6;
dive =
( xg::POINT { col=>15, row=>31 },
xc::CS_PIXMAP
{
size => xg::SIZE { wide=>16, high=>32 },
data => [ [
bv "\000\000",
bv "\001\224",
bv "\001\224",
bv "\001\192",
bv "\001\192",
bv "\001\192",
bv "\001\192",
bv "\001\192",
bv "\001\192",
bv "\001\192",
bv "\001\192",
bv "\001\192",
bv "\001\192",
bv "\003\192",
bv "\007\192",
bv "\007\192",
bv "\004\064",
bv "\004\064",
bv "\052\064",
bv "\052\064",
bv "\052\064",
bv "\053\224",
bv "\052\016",
bv "\060\016",
bv "\063\144",
bv "\028\072",
bv "\028\072",
bv "\014\072",
bv "\007\168",
bv "\003\168",
bv "\000\040",
bv "\000\016"
] ]
}
);
stand =
( xg::POINT { col=>0, row=>31 },
xc::CS_PIXMAP
{
size => xg::SIZE { wide=>16, high=>32 },
data => [ [
bv "\000\000",
bv "\000\000",
bv "\000\000",
bv "\129\192",
bv "\193\224",
bv "\162\112",
bv "\082\056",
bv "\042\056",
bv "\021\252",
bv "\010\060",
bv "\004\044",
bv "\003\172",
bv "\002\044",
bv "\002\044",
bv "\002\044",
bv "\002\032",
bv "\002\032",
bv "\003\224",
bv "\003\224",
bv "\003\192",
bv "\003\192",
bv "\003\192",
bv "\003\192",
bv "\003\192",
bv "\003\192",
bv "\003\192",
bv "\003\192",
bv "\003\192",
bv "\003\192",
bv "\003\192",
bv "\007\192",
bv "\007\192"
] ]
}
);
climb1 =
( xg::POINT { col=>0, row=>25 },
xc::CS_PIXMAP
{
size => xg::SIZE { wide=>16, high=>26 },
data => [ [
bv "\129\192",
bv "\193\224",
bv "\162\112",
bv "\082\056",
bv "\042\056",
bv "\021\252",
bv "\010\060",
bv "\004\044",
bv "\003\172",
bv "\002\044",
bv "\002\044",
bv "\002\044",
bv "\002\032",
bv "\002\032",
bv "\007\224",
bv "\015\224",
bv "\031\192",
bv "\031\128",
bv "\060\000",
bv "\120\000",
bv "\120\000",
bv "\240\000",
bv "\240\000",
bv "\224\000",
bv "\224\000",
bv "\224\000"
] ]
}
);
climb2 =
( xg::POINT { col=>0, row=>25 },
xc::CS_PIXMAP
{
size => xg::SIZE { wide=>16, high=>26 },
data => [ [
bv "\129\192",
bv "\193\224",
bv "\162\112",
bv "\082\056",
bv "\042\056",
bv "\021\252",
bv "\010\060",
bv "\004\044",
bv "\003\172",
bv "\002\044",
bv "\002\044",
bv "\002\044",
bv "\050\032",
bv "\122\032",
bv "\255\224",
bv "\239\224",
bv "\223\192",
bv "\223\128",
bv "\060\000",
bv "\120\000",
bv "\120\000",
bv "\240\000",
bv "\240\000",
bv "\224\000",
bv "\224\000",
bv "\224\000"
] ]
}
);
climb3 =
( xg::POINT { col=>0, row=>25 },
xc::CS_PIXMAP
{
size => xg::SIZE { wide=>16, high=>26 },
data => [ [
bv "\001\192",
bv "\001\224",
bv "\002\112",
bv "\002\056",
bv "\002\056",
bv "\001\252",
bv "\030\060",
bv "\240\044",
bv "\007\172",
bv "\250\044",
bv "\002\044",
bv "\002\044",
bv "\002\032",
bv "\002\032",
bv "\007\224",
bv "\015\224",
bv "\031\192",
bv "\031\128",
bv "\060\000",
bv "\120\000",
bv "\120\000",
bv "\240\000",
bv "\240\000",
bv "\224\000",
bv "\224\000",
bv "\224\000"
] ]
}
);
climb4 =
( xg::POINT { col=>0, row=>25 },
xc::CS_PIXMAP
{
size => xg::SIZE { wide=>16, high=>26 },
data => [ [
bv "\129\192",
bv "\065\224",
bv "\178\112",
bv "\074\056",
bv "\054\056",
bv "\009\252",
bv "\006\060",
bv "\248\044",
bv "\007\172",
bv "\250\044",
bv "\002\044",
bv "\002\044",
bv "\002\032",
bv "\002\032",
bv "\007\224",
bv "\015\224",
bv "\031\192",
bv "\031\128",
bv "\060\000",
bv "\120\000",
bv "\120\000",
bv "\240\000",
bv "\240\000",
bv "\224\000",
bv "\224\000",
bv "\224\000"
] ]
}
);
top1 =
( xg::POINT { col=>8, row=>41 },
xc::CS_PIXMAP
{
size => xg::SIZE { wide=>16, high=>42 },
data => [ [
bv "\000\028",
bv "\000\100",
bv "\000\132",
bv "\001\004",
bv "\000\228",
bv "\000\028",
bv "\000\004",
bv "\000\004",
bv "\000\004",
bv "\016\004",
bv "\040\010",
bv "\040\010",
bv "\040\010",
bv "\041\202",
bv "\043\234",
bv "\038\050",
bv "\018\164",
bv "\010\040",
bv "\005\208",
bv "\004\016",
bv "\002\032",
bv "\002\032",
bv "\002\032",
bv "\002\032",
bv "\002\032",
bv "\002\032",
bv "\002\032",
bv "\003\224",
bv "\003\224",
bv "\003\224",
bv "\003\224",
bv "\003\224",
bv "\003\096",
bv "\003\096",
bv "\003\096",
bv "\003\096",
bv "\003\096",
bv "\003\096",
bv "\003\096",
bv "\003\096",
bv "\007\112",
bv "\007\112"
] ]
}
);
top2 =
( xg::POINT { col=>10, row=>35 },
xc::CS_PIXMAP
{
size => xg::SIZE { wide=>32, high=>36 },
data => [ [
bv "\000\000\000\016",
bv "\000\000\000\040",
bv "\000\000\000\068",
bv "\000\000\000\132",
bv "\000\000\001\194",
bv "\000\000\002\057",
bv "\000\000\002\007",
bv "\000\112\004\000",
bv "\224\248\056\000",
bv "\144\136\072\000",
bv "\204\169\152\000",
bv "\035\142\032\000",
bv "\024\112\192\000",
bv "\006\003\000\000",
bv "\003\142\000\000",
bv "\000\136\000\000",
bv "\000\136\000\000",
bv "\000\136\000\000",
bv "\000\136\000\000",
bv "\000\136\000\000",
bv "\000\136\000\000",
bv "\000\248\000\000",
bv "\000\248\000\000",
bv "\000\248\000\000",
bv "\000\248\000\000",
bv "\000\248\000\000",
bv "\000\216\000\000",
bv "\000\216\000\000",
bv "\000\216\000\000",
bv "\000\216\000\000",
bv "\000\216\000\000",
bv "\000\216\000\000",
bv "\000\216\000\000",
bv "\000\216\000\000",
bv "\001\220\000\000",
bv "\001\220\000\000"
] ]
}
);
top3 =
( xg::POINT { col=>10, row=>31 },
xc::CS_PIXMAP
{
size => xg::SIZE { wide=>32, high=>32 },
data => [ [
bv "\000\000\000\000",
bv "\000\000\000\000",
bv "\000\000\000\000",
bv "\000\112\000\000",
bv "\000\248\000\000",
bv "\000\136\000\000",
bv "\000\168\000\000",
bv "\000\136\000\000",
bv "\001\116\000\000",
bv "\003\006\000\000",
bv "\006\139\000\000",
bv "\024\136\192\000",
bv "\035\142\032\000",
bv "\204\137\152\000",
bv "\144\136\072\000",
bv "\224\136\062\000",
bv "\000\136\001\128",
bv "\000\248\000\096",
bv "\000\248\000\088",
bv "\000\248\000\068",
bv "\000\248\000\068",
bv "\000\248\000\036",
bv "\000\216\000\036",
bv "\000\216\000\036",
bv "\000\216\000\024",
bv "\000\216\000\016",
bv "\000\216\000\000",
bv "\000\216\000\000",
bv "\000\216\000\000",
bv "\000\216\000\000",
bv "\001\220\000\000",
bv "\001\220\000\000"
] ]
}
);
top4 =
( xg::POINT { col=>8, row=>31 },
xc::CS_PIXMAP
{
size => xg::SIZE { wide=>20, high=>32 },
data => [ [
bv "\000\000\000",
bv "\000\000\000",
bv "\000\000\000",
bv "\001\192\000",
bv "\003\224\000",
bv "\002\032\000",
bv "\002\160\000",
bv "\002\032\000",
bv "\005\208\000",
bv "\004\016\000",
bv "\010\040\000",
bv "\018\036\000",
bv "\038\050\000",
bv "\042\042\000",
bv "\042\042\000",
bv "\042\042\000",
bv "\042\042\000",
bv "\043\234\000",
bv "\019\228\000",
bv "\003\228\000",
bv "\003\228\000",
bv "\003\228\000",
bv "\003\102\000",
bv "\003\101\000",
bv "\003\100\128",
bv "\003\100\128",
bv "\003\100\064",
bv "\003\103\064",
bv "\003\097\064",
bv "\003\097\064",
bv "\007\112\128",
bv "\007\112\000"
] ]
}
);
images = [ dive, stand, climb1, climb2, climb3, climb4, top1, top2, top3, top4];
end; # stipulate
};
end;


