Code: Select all
local front_door_noclick=3
function front_door_click(x, y, b)
if (b == 1) then
if (x > 488 and x < 512) then
if (y > 114 and y < 138) then
dsb_sound(snd.click)
-- dont start a new game unless we really mean it
if (gt_savegames == 0 or front_door_noclick < 1) then
gt_doorstate = 0.1
return 999
end
front_door_noclick=front_door_noclick-1
end
if (y > 178 and y < 202) then
if (gt_savegames > 0) then
dsb_sound(snd.click)
return 1
end
end
if (y > 242 and y < 266) then
return 2
end
end
end
return nil
end