1. changing langwars graphics
Ive been working on the langWars Demo, in the file vars.e where it shows
the graphics of the ships:
FORTRAN_L = <-**=
I am trying to replace the current graphics with bmp file graphics.
Im trying to do it with this one first, and when i figgure out how to do
that, then ill do the others. Can ANYBODY help me do this?
Daniel W. Garrett
DeathWarrior at Juno.Com
2. Re: changing langwars graphics
You'll need to first convert the lines and column positions to pixel
x and y locations. Once you do that, the rest is easy thanks to
Euphoria.
Here is an example code of loading a bitmap, in case you are new at
doing this:
================================================
include image.e
include graphics.e
object bitmap_input
sequence palette_data
sequence bitmap_data
if graphics_mode(18) then
puts(1, "Graphics Set Error\n")
abort(1)
end if
bitmap_input = read_bitmap("c:\\windows\\argyle.bmp")
if atom(bitmap_input) then
puts(1, "Bitmap Read Failure\n")
else
palette_data = bitmap_input[1]/4
bitmap_data = bitmap_input[2]
all_palette(palette_data)
display_image({0,0},bitmap_data)
end if
while get_key()= -1 do
end while
if graphics_mode(-1) then
puts(1, "Graphics Set Error\n")
abort(1)
end if
===============================================