Sign in to follow this  

Important peice of palm programming information that probably should be in the FAQ

This topic is 4235 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Well I'm seeing quite a few threads asking for palm programming resources. It seems to be hidden from mass knowledge but plua makes palm programming so easy it's funny. As an example here's a sample program(taken from here) that moves an image of a taxi across the screen:
-- Taxi.lua
-- Copyright (c) 2001 Marcio M. Andrade

-- Shows the Taxi easter egg.

width,height,depth,hasColor = pmode()

if hasColor == 1 then
  bg = prgb(0,255,0)
else
  bg = prgb(255,255,255)
end

pcolor(prgb(0,0,0),bg)
pclear()

taxi = popenres("Tbmp", 11000)
size, taxiWidth, taxiHeight = pgetsize(taxi)

y = (height-taxiHeight)/2

for x = width,-taxiWidth,-1 do
  pmoveto(x,y)
  pdrawbmp(taxi)
  pbox(x+taxiWidth-7, y, 7, taxiHeight, bg)
end

pcloseres(taxi)

don't see things getting much easier for free.

Share this post


Link to post
Share on other sites
This is useful. I'd put it into the FAQ but Sneftel might get mad at me, and when he gets mad, things start getting thrown.

Share this post


Link to post
Share on other sites
Sign in to follow this