e-mail
--------------44D519872D1A
I might not be able to post here for a while, so bear with me. My brother
forgot to send in the money for our e-mail account, so now it is obsolete.
Right now I am temporarily using someone elses account. But as promised I am
going to send the program. Feel free to change it and enhance it. Even add
stuff to it. I might not be able to answer any messages for anywhere from a
couple days to a couple weeks. I'll try to be back as soon as possible.
William
P.S. I am sending the images in .gif form to save space and you'll need to
change the format to bitmap.
--------------44D519872D1A
Content-Disposition: inline; filename="House2.ex"
without type_check
without warning
include image.e
include mouse.e
include machine.e
include wildcard.e
atom keys, oldscreen, newscreen, mode, check
object event
sequence Palette, ab, bitmap_name, bitmap
constant video = #A0000, --video memory
screen = 64000, --size of screen
A=65, H=72, N=78, O=79, Y=89 --letter keys
function inbox(sequence L, sequence R)
sequence where
where = {event[2]/2,event[3]}
if where[1] >= L[1] and where[1] <= R[1] then
if where[2] >= L[2] and where[2] <= R[2] then
return 1
end if --makes it easier to check the mouse
end if
return 0
end function
procedure next_image()
bitmap_name = "d2atr.bmp"
mouse_pointer(0)
mem_copy(video,newscreen,screen) --shows next picture
mouse_pointer(1)
end procedure
procedure old_image()
bitmap_name="d2house.bmp"
mouse_pointer(0)
mem_copy(video,oldscreen,screen)
mouse_pointer(1)
end procedure
procedure try_user()
mouse_pointer(1)
while 1 do
event = get_mouse()
keys = get_key()
if keys = 27 then --check for escape key
check=1
exit
end if
if sequence(event) then
if event[1] = LEFT_DOWN then
if not compare(bitmap_name, "d2house.bmp") then
if inbox({22,56},{100,114}) or inbox({27,132},{95,143}) then
next_image()
exit
elsif inbox({119,56},{197,114}) or inbox({124,132},{193,143}) or
inbox({217,56},{294,114}) or inbox({220,132},{291,143}) then
check=1
exit --cleaner version
end if
elsif not compare(bitmap_name, "d2atr.bmp") then
if inbox({169,169},{198,189}) then
check=1
exit
elsif inbox({241,169},{270,190}) then
old_image()
exit
end if
end if
end if
end if
if keys > -1 then
if not compare(bitmap_name, "d2house.bmp") then
if upper(keys) = A then
next_image() --key checker!
exit
elsif upper(keys) = O or upper(keys) = H then
check = 1
exit
end if
elsif not compare(bitmap_name, "d2atr.bmp") then
if upper(keys) = Y then
check=1
exit
elsif upper(keys) = N then
old_image()
exit
end if
end if
end if
end while
end procedure
mode = 19
keys = -1
newscreen=allocate(screen) --make two "virtual" screens
oldscreen=allocate(screen)
bitmap = read_bitmap("d2atr.bmp")
for i = 1 to 200 do
poke(newscreen+(i-1)*320,bitmap[2][i]) --read in bmp
end for
bitmap = read_bitmap("d2house.bmp")
for i = 1 to 200 do
poke(oldscreen+(i-1)*320,bitmap[2][i]) --again!
end for
bitmap_name = "d2house.bmp"
if graphics_mode(mode) then
end if
Palette = bitmap[1]
all_palette(Palette/4)
ab=palette(16,{0,0,0})
mouse_pointer(0)
mem_copy(video,oldscreen,screen) -- loads house from virtual
check=0
while check != 1 do --good way of doing loops
try_user()
end while
if graphics_mode(-1) then
end if
--------------44D519872D1A--
|
Not Categorized, Please Help
|
|