-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathimage.prg
More file actions
54 lines (42 loc) · 937 Bytes
/
image.prg
File metadata and controls
54 lines (42 loc) · 937 Bytes
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
#include "common.ch"
#include "hbclass.ch"
CREATE CLASS Image
VAR Buffer
VAR X
VAR Y
VAR X2
VAR Y2
METHOD SETRGBA(x,y,z)
METHOD NEW(x,y,x2,y2)
ENDCLASS
METHOD NEW(y,x,y2,x2) CLASS Image
::Buffer=_create_bitmap(y2,x2)
::Y=y
::X=x
gr_clear_to_color(::Buffer,makecol(0,0,0))
Return Self
METHOD SETRGBA(x,y,cor) CLASS Image
//cor=makecol(z[1],z[2],z[3])
//if z>1
// x=x+100
// alert("100")
//end if
// TV Aspect
//if x % 2 = 1
// if y % 2 = 1
// PutPixel(::Buffer,x,y,cor)
// end if
//end if
// Vertical scanline
//if x % 2 = 1
// PutPixel(::Buffer,x,y,cor)
//end if
//Horizontal scanline
//if y % 2 = 1
// PutPixel(::Buffer,x,y,cor)
//end if
//if GetPixel(::Buffer,x,y)#cor
// PutPixel(::Buffer,x,y,cor)
//end if
//_draw_sprite(_get_buffer(),::Buffer,::Y,::X)
PutPixel(::Buffer,x,y,cor)