svlad

Check-in [d5c1e0dafa]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Added simply plotting tool.
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:d5c1e0dafa8b552f6bb879ba5f021f268d7d7131
User & Date: severak 2012-04-22 00:22:28
Context
2012-04-22
00:33
Added an example of using plotting tool together with jo.geometry . check-in: e2a2eb0dc2 user: severak tags: trunk
00:22
Added simply plotting tool. check-in: d5c1e0dafa user: severak tags: trunk
2012-04-21
22:38
Added color object to jo.geometry check-in: 8db91da57b user: severak tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Added plot.bas.



















































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
#include once "Lua/lua.bi"
#include once "Lua/lauxlib.bi"
#include once "Lua/lualib.bi"

function plotpoint cdecl (byval L as lua_State ptr) as integer
  dim x as integer
  dim y as integer
  x=lua_tointeger(L,1)
  y=lua_tointeger(L,2)
  pset (x,y)
  plotpoint=0  
end function

function plotcolor cdecl (byval L as lua_State ptr) as integer
  dim r as integer
  dim g as integer
  dim b as integer
  r=lua_tointeger(L,1)
  g=lua_tointeger(L,2)
  b=lua_tointeger(L,3)
  Color RGB(r,g,b)
  plotcolor=0
end function

function plotcls cdecl (byval L as lua_State ptr) as integer
  cls
  plotcls=0
end function

function plotpause cdecl (byval L as lua_State ptr) as integer
  sleep
  plotpause=0
end function

function plotprint cdecl (byval L as lua_State ptr) as integer
  dim as zstring ptr text
  text=lua_tostring(L,1)
  print *text
  plotprint=0
end function

function plotinput cdecl (byval L as lua_State ptr) as integer
  dim text as string
  Line Input text
  lua_pushlstring(L,text,Len(text))
  plotinput=1
end function

WindowTitle "Plot"
Screenres 640,480,32
dim L as lua_State ptr
dim f as string

print "Enter name of file:"
Line Input f
cls
' create a lua state
L = lua_open( )
' load the base lua library (needed for 'print')
luaL_openlibs( L )
' register the function to be called from lua as MinMax
lua_register( L, "point", @plotpoint )
lua_register( L, "color", @plotcolor )
lua_register( L, "cls", @plotcls )
lua_register( L, "pause", @plotpause )
lua_register( L, "write", @plotprint )
lua_register( L, "read", @plotinput )
' execute the lua script from a file
luaL_dofile( L, f )
' release the lua state
lua_close( L )
print "Ended"
sleep

Added plot.exe.

cannot compute difference between binary files