That looks really neat. Seems like a great start to your GLB development. :)
Do you have plans to add new features?
Interface looks really great, quite clean.A undo function would be realy nice, at the moment i dont have any idea how to manage this.
Some features would be nice, like a 1 level undo, anim preview, sprite get/put to move things around and a 1 level light table/onion skin thing.
Keep it up!
For starting it's very nice...
Das ist kulcklich gute programmieren (my mother some words In Deutsch are awesoming complex to write :D, at least for a Spanish..)
Wordcount:23512 commands
compiling:
linking:
erfolgreich
_______________________________________
*** Fertig ***
Dauer: 99.1 sek. Zeit: 02:41
Erstellen: 1 erfolgreich.
GLOBAL box%[]
DIM box[10]
box[0]=100
box[1]=57
box[2]=36
box[3]=58
GLOBAL word$[]
DIM word$[10]
word$[0]="Hello"
word$[1]="To be or not to be"
word$[2]="I'm going to win the lottery this week"
PRINT box[3],10,10
FOR n=0 TO 9
PRINT box[n],100,n*10
PRINT word$[n],200,n*10
NEXT
GLOBAL map%[]
DIM map[100][100]
FOR Y=0 TO 99
FOR X=0 TO 99
map[x][y]=57
NEXT
NEXT
ops, can´t understand the german debug, better wait for someone else on that.
// ------------------------------------------------------------- //
// --- PENCIL ---
// ------------------------------------------------------------- //
FUNCTION PENCIL: numwor$
// Diese Variablen sind als LOCAL definiert:
// numwor$
// tempruen1,tempgruen2 ..... are the 10x10 editable pixels in the edit section
// tool = 3 is the pencil tool
// curcol is just the current color
IF mx>70 AND mx<80 AND my>60 AND my<70 AND mbl = (1) AND tool = 3 THEN tempgruen1 = curcol
IF mx>90 AND mx<100 AND my>60 AND my<70 AND mbl = (1) AND tool = 3 THEN tempgruen2 = curcol
IF mx>110 AND mx<120 AND my>60 AND my<70 AND mbl = (1) AND tool = 3 THEN tempgruen3 = curcol
IF mx>130 AND mx<140 AND my>60 AND my<70 AND mbl = (1) AND tool = 3 THEN tempgruen4 = curcol
IF mx>150 AND mx<160 AND my>60 AND my<70 AND mbl = (1) AND tool = 3 THEN tempgruen5 = curcol
IF mx>170 AND mx<180 AND my>60 AND my<70 AND mbl = (1) AND tool = 3 THEN tempgruen6 = curcol
IF mx>190 AND mx<200 AND my>60 AND my<70 AND mbl = (1) AND tool = 3 THEN tempgruen7 = curcol
IF mx>210 AND mx<220 AND my>60 AND my<70 AND mbl = (1) AND tool = 3 THEN tempgruen8 = curcol
IF mx>230 AND mx<240 AND my>60 AND my<70 AND mbl = (1) AND tool = 3 THEN tempgruen9 = curcol
IF mx>250 AND mx<260 AND my>60 AND my<70 AND mbl = (1) AND tool = 3 THEN tempgruen10 = curcol
IF mx>270 AND mx<280 AND my>60 AND my<70 AND mbl = (1) AND tool = 3 THEN tempgruen11 = curcol
IF mx>290 AND mx<300 AND my>60 AND my<70 AND mbl = (1) AND tool = 3 THEN tempgruen12 = curcol
IF mx>310 AND mx<320 AND my>60 AND my<70 AND mbl = (1) AND tool = 3 THEN tempgruen13 = curcol
IF mx>330 AND mx<340 AND my>60 AND my<70 AND mbl = (1) AND tool = 3 THEN tempgruen14 = curcol
IF mx>350 AND mx<360 AND my>60 AND my<70 AND mbl = (1) AND tool = 3 THEN tempgruen15 = curcol
IF mx>370 AND mx<380 AND my>60 AND my<70 AND mbl = (1) AND tool = 3 THEN tempgruen16 = curcol
IF mx>60 AND mx<70 AND my>60 AND my<70 AND mbl = (1) AND tool = 3 THEN tempgruen1r = curcol
IF mx>80 AND mx<90 AND my>60 AND my<70 AND mbl = (1) AND tool = 3 THEN tempgruen2r = curcol
IF mx>100 AND mx<110 AND my>60 AND my<70 AND mbl = (1) AND tool = 3 THEN tempgruen3r = curcol
IF mx>120 AND mx<130 AND my>60 AND my<70 AND mbl = (1) AND tool = 3 THEN tempgruen4r = curcol
IF mx>140 AND mx<150 AND my>60 AND my<70 AND mbl = (1) AND tool = 3 THEN tempgruen5r = curcol
IF mx>160 AND mx<170 AND my>60 AND my<70 AND mbl = (1) AND tool = 3 THEN tempgruen6r = curcol
IF mx>180 AND mx<190 AND my>60 AND my<70 AND mbl = (1) AND tool = 3 THEN tempgruen7r = curcol
IF mx>200 AND mx<210 AND my>60 AND my<70 AND mbl = (1) AND tool = 3 THEN tempgruen8r = curcol
IF mx>220 AND mx<230 AND my>60 AND my<70 AND mbl = (1) AND tool = 3 THEN tempgruen9r = curcol
IF mx>240 AND mx<250 AND my>60 AND my<70 AND mbl = (1) AND tool = 3 THEN tempgruen10r =curcol
IF mx>260 AND mx<270 AND my>60 AND my<70 AND mbl = (1) AND tool = 3 THEN tempgruen11r =curcol
IF mx>280 AND mx<290 AND my>60 AND my<70 AND mbl = (1) AND tool = 3 THEN tempgruen12r =curcol
IF mx>300 AND mx<310 AND my>60 AND my<70 AND mbl = (1) AND tool = 3 THEN tempgruen13r =curcol
IF mx>320 AND mx<330 AND my>60 AND my<70 AND mbl = (1) AND tool = 3 THEN tempgruen14r =curcol
IF mx>340 AND mx<350 AND my>60 AND my<70 AND mbl = (1) AND tool = 3 THEN tempgruen15r =curcol
IF mx>360 AND mx<370 AND my>60 AND my<70 AND mbl = (1) AND tool = 3 THEN tempgruen16r =curcol
IF mx>60 AND mx<70 AND my>70 AND my<80 AND mbl = (1) AND tool = 3 THEN tempgruen17 = curcol
IF mx>80 AND mx<90 AND my>70 AND my<80 AND mbl = (1) AND tool = 3 THEN tempgruen18 = curcol
IF mx>100 AND mx<110 AND my>70 AND my<80 AND mbl = (1) AND tool = 3 THEN tempgruen19 = curcol
IF mx>120 AND mx<130 AND my>70 AND my<80 AND mbl = (1) AND tool = 3 THEN tempgruen20 = curcol
IF mx>140 AND mx<150 AND my>70 AND my<80 AND mbl = (1) AND tool = 3 THEN tempgruen21 = curcol
IF mx>160 AND mx<170 AND my>70 AND my<80 AND mbl = (1) AND tool = 3 THEN tempgruen22 = curcol
IF mx>180 AND mx<190 AND my>70 AND my<80 AND mbl = (1) AND tool = 3 THEN tempgruen23 = curcol
IF mx>200 AND mx<210 AND my>70 AND my<80 AND mbl = (1) AND tool = 3 THEN tempgruen24 = curcol
IF mx>220 AND mx<230 AND my>70 AND my<80 AND mbl = (1) AND tool = 3 THEN tempgruen25 = curcol
IF mx>240 AND mx<250 AND my>70 AND my<80 AND mbl = (1) AND tool = 3 THEN tempgruen26 = curcol
IF mx>260 AND mx<270 AND my>70 AND my<80 AND mbl = (1) AND tool = 3 THEN tempgruen27 = curcol
IF mx>280 AND mx<290 AND my>70 AND my<80 AND mbl = (1) AND tool = 3 THEN tempgruen28 = curcol
IF mx>300 AND mx<310 AND my>70 AND my<80 AND mbl = (1) AND tool = 3 THEN tempgruen29 = curcol
IF mx>320 AND mx<330 AND my>70 AND my<80 AND mbl = (1) AND tool = 3 THEN tempgruen30 = curcol
IF mx>340 AND mx<350 AND my>70 AND my<80 AND mbl = (1) AND tool = 3 THEN tempgruen31 = curcol
IF mx>360 AND mx<370 AND my>70 AND my<80 AND mbl = (1) AND tool = 3 THEN tempgruen32 = curcol
IF mx>70 AND mx<80 AND my>70 AND my<80 AND mbl = (1) AND tool = 3 THEN tempgruen17r = curcol
IF mx>90 AND mx<100 AND my>70 AND my<80 AND mbl = (1) AND tool = 3 THEN tempgruen18r = curcol
IF mx>110 AND mx<120 AND my>70 AND my<80 AND mbl = (1) AND tool = 3 THEN tempgruen19r =curcol
IF mx>130 AND mx<140 AND my>70 AND my<80 AND mbl = (1) AND tool = 3 THEN tempgruen20r =curcol
IF mx>150 AND mx<160 AND my>70 AND my<80 AND mbl = (1) AND tool = 3 THEN tempgruen21r =curcol
IF mx>170 AND mx<180 AND my>70 AND my<80 AND mbl = (1) AND tool = 3 THEN tempgruen22r =curcol
IF mx>190 AND mx<200 AND my>70 AND my<80 AND mbl = (1) AND tool = 3 THEN tempgruen23r =curcol
IF mx>210 AND mx<220 AND my>70 AND my<80 AND mbl = (1) AND tool = 3 THEN tempgruen24r =curcol
IF mx>230 AND mx<240 AND my>70 AND my<80 AND mbl = (1) AND tool = 3 THEN tempgruen25r =curcol
IF mx>250 AND mx<260 AND my>70 AND my<80 AND mbl = (1) AND tool = 3 THEN tempgruen26r =curcol
IF mx>270 AND mx<280 AND my>70 AND my<80 AND mbl = (1) AND tool = 3 THEN tempgruen27r =curcol
IF mx>290 AND mx<300 AND my>70 AND my<80 AND mbl = (1) AND tool = 3 THEN tempgruen28r =curcol
IF mx>310 AND mx<320 AND my>70 AND my<80 AND mbl = (1) AND tool = 3 THEN tempgruen29r =curcol
IF mx>330 AND mx<340 AND my>70 AND my<80 AND mbl = (1) AND tool = 3 THEN tempgruen30r =curcol
IF mx>350 AND mx<360 AND my>70 AND my<80 AND mbl = (1) AND tool = 3 THEN tempgruen31r =curcol
IF mx>370 AND mx<380 AND my>70 AND my<80 AND mbl = (1) AND tool = 3 THEN tempgruen32r =curcol
IF mx>70 AND mx<80 AND my>80 AND my<90 AND mbl = (1) AND tool = 3 THEN tempgruen33 = curcol
IF mx>90 AND mx<100 AND my>80 AND my<90 AND mbl = (1) AND tool = 3 THEN tempgruen34 = curcol
IF mx>110 AND mx<120 AND my>80 AND my<90 AND mbl = (1) AND tool = 3 THEN tempgruen35 = curcol
IF mx>130 AND mx<140 AND my>80 AND my<90 AND mbl = (1) AND tool = 3 THEN tempgruen36 = curcol
IF mx>150 AND mx<160 AND my>80 AND my<90 AND mbl = (1) AND tool = 3 THEN tempgruen37 = curcol
IF mx>170 AND mx<180 AND my>80 AND my<90 AND mbl = (1) AND tool = 3 THEN tempgruen38 = curcol
IF mx>190 AND mx<200 AND my>80 AND my<90 AND mbl = (1) AND tool = 3 THEN tempgruen39 = curcol
IF mx>210 AND mx<220 AND my>80 AND my<90 AND mbl = (1) AND tool = 3 THEN tempgruen40 = curcol
IF mx>230 AND mx<240 AND my>80 AND my<90 AND mbl = (1) AND tool = 3 THEN tempgruen41 = curcol
IF mx>250 AND mx<260 AND my>80 AND my<90 AND mbl = (1) AND tool = 3 THEN tempgruen42 = curcol
IF mx>270 AND mx<280 AND my>80 AND my<90 AND mbl = (1) AND tool = 3 THEN tempgruen43 = curcol
IF mx>290 AND mx<300 AND my>80 AND my<90 AND mbl = (1) AND tool = 3 THEN tempgruen44 = curcol
IF mx>310 AND mx<320 AND my>80 AND my<90 AND mbl = (1) AND tool = 3 THEN tempgruen45 = curcol
IF mx>330 AND mx<340 AND my>80 AND my<90 AND mbl = (1) AND tool = 3 THEN tempgruen46 = curcol
IF mx>350 AND mx<360 AND my>80 AND my<90 AND mbl = (1) AND tool = 3 THEN tempgruen47 = curcol
IF mx>370 AND mx<380 AND my>80 AND my<90 AND mbl = (1) AND tool = 3 THEN tempgruen48 = curcol
IF mx>60 AND mx<70 AND my>80 AND my<90 AND mbl = (1) AND tool = 3 THEN tempgruen33r = curcol
IF mx>80 AND mx<90 AND my>80 AND my<90 AND mbl = (1) AND tool = 3 THEN tempgruen34r = curcol
IF mx>100 AND mx<110 AND my>80 AND my<90 AND mbl = (1) AND tool = 3 THEN tempgruen35r =curcol
IF mx>120 AND mx<130 AND my>80 AND my<90 AND mbl = (1) AND tool = 3 THEN tempgruen36r =curcol
IF mx>140 AND mx<150 AND my>80 AND my<90 AND mbl = (1) AND tool = 3 THEN tempgruen37r =curcol
IF mx>160 AND mx<170 AND my>80 AND my<90 AND mbl = (1) AND tool = 3 THEN tempgruen38r =curcol
IF mx>180 AND mx<190 AND my>80 AND my<90 AND mbl = (1) AND tool = 3 THEN tempgruen39r =curcol
IF mx>200 AND mx<210 AND my>80 AND my<90 AND mbl = (1) AND tool = 3 THEN tempgruen40r =curcol
IF mx>220 AND mx<230 AND my>80 AND my<90 AND mbl = (1) AND tool = 3 THEN tempgruen41r =curcol
IF mx>240 AND mx<250 AND my>80 AND my<90 AND mbl = (1) AND tool = 3 THEN tempgruen42r =curcol
IF mx>260 AND mx<270 AND my>80 AND my<90 AND mbl = (1) AND tool = 3 THEN tempgruen43r =curcol
IF mx>280 AND mx<290 AND my>80 AND my<90 AND mbl = (1) AND tool = 3 THEN tempgruen44r =curcol
IF mx>300 AND mx<310 AND my>80 AND my<90 AND mbl = (1) AND tool = 3 THEN tempgruen45r =curcol
IF mx>320 AND mx<330 AND my>80 AND my<90 AND mbl = (1) AND tool = 3 THEN tempgruen46r =curcol
IF mx>340 AND mx<350 AND my>80 AND my<90 AND mbl = (1) AND tool = 3 THEN tempgruen47r =curcol
IF mx>360 AND mx<370 AND my>80 AND my<90 AND mbl = (1) AND tool = 3 THEN tempgruen48r =curcol
IF mx>60 AND mx<70 AND my>90 AND my<100 AND mbl = (1) AND tool = 3 THEN tempgruen49 = curcol
IF mx>80 AND mx<90 AND my>90 AND my<100 AND mbl = (1) AND tool = 3 THEN tempgruen50 = curcol
IF mx>100 AND mx<110 AND my>90 AND my<100 AND mbl = (1) AND tool = 3 THEN tempgruen51=curcol
IF mx>120 AND mx<130 AND my>90 AND my<100 AND mbl = (1) AND tool = 3 THEN tempgruen52=curcol
IF mx>140 AND mx<150 AND my>90 AND my<100 AND mbl = (1) AND tool = 3 THEN tempgruen53=curcol
IF mx>160 AND mx<170 AND my>90 AND my<100 AND mbl = (1) AND tool = 3 THEN tempgruen54=curcol
IF mx>180 AND mx<190 AND my>90 AND my<100 AND mbl = (1) AND tool = 3 THEN tempgruen55=curcol
IF mx>200 AND mx<210 AND my>90 AND my<100 AND mbl = (1) AND tool = 3 THEN tempgruen56=curcol
IF mx>220 AND mx<230 AND my>90 AND my<100 AND mbl = (1) AND tool = 3 THEN tempgruen57=curcol
IF mx>240 AND mx<250 AND my>90 AND my<100 AND mbl = (1) AND tool = 3 THEN tempgruen58=curcol
IF mx>260 AND mx<270 AND my>90 AND my<100 AND mbl = (1) AND tool = 3 THEN tempgruen59=curcol
IF mx>280 AND mx<290 AND my>90 AND my<100 AND mbl = (1) AND tool = 3 THEN tempgruen60=curcol
IF mx>300 AND mx<310 AND my>90 AND my<100 AND mbl = (1) AND tool = 3 THEN tempgruen61=curcol
IF mx>320 AND mx<330 AND my>90 AND my<100 AND mbl = (1) AND tool = 3 THEN tempgruen62=curcol
IF mx>340 AND mx<350 AND my>90 AND my<100 AND mbl = (1) AND tool = 3 THEN tempgruen63=curcol
IF mx>360 AND mx<370 AND my>90 AND my<100 AND mbl = (1) AND tool = 3 THEN tempgruen64=curcol
// and so on...... until
IF mx>370 AND mx<380 AND my>370 AND my<380 AND mbl = (1) AND tool = 3 THEN tempgruen512r=curcol
ENDFUNCTION // PENCIL
But don´t worry, I took me literally ages to understand DIM and how to use it.Sounds god! I dont have the time to spend 45 ages to understand how DIM work. :D
Not that I can perfectly handle it nowadays, but I can use it in a simple way. :good:
About the UNDO, if it is just a 1 level undo. Would be cool, so we can quickly see something with or without the last change. :)
I kind of don´t know how an UNDO would work, but it has been discussed, I guess, a few times before.
One is here:
http://www.glbasic.com/forum/index.php?topic=7744.msg64296#msg64296
Cheers, lovely application going so far! You keep it up and I may have to learn german...verstanden? :P
DIM just DIMensions an array (basically tells the computer how big the box is to store all those nice variables you'll need in your app). If you try to overfill the box, the content won't fit (the computer throws a fit).
I like to think of arrays as little boxes - each one holds just one item of a specific form - either words or numbers.
GLOBAL editwindow
GLOBAL white = RGB(255,255,255)
LOCAL y, x
DIM editwindow[31] [31] // 32x10 pixels on the y-axe and 32x10 pixels on the x-axe
FOR y = 0 TO 31 and x = 0 TO 31
editwindow[x][y] = white
NEXT
.....
.....
It is realy confusing with 20 subs and functions.
Just the Penciltool took me 2 hours of writting....
I dont have the time to spend 45 ages to understand how DIM work. :D
It is realy confusing with 20 subs and functions.
Just the Penciltool took me 2 hours of writting....
I dont have the time to spend 45 ages to understand how DIM work. :D
As a programmer, you are developing bad habits, so why expect the right help?