Thank you very much both of you.
in order to enlight the things, I should precise (because I have forgotten) that :
1) the file array was created via the PUT command of the SEDORIC
2) since the array is bidimensionnal (36 cols, 48 rows)
and since an integer itakes
two byte, the hires screen is too small (I am in TEXT mode, with a GRAB in order to have a maximum for the program ! )
3) the fact is that with the C of the OSDK, it is possible to call the SEDORIC commands, TAKE for example, it works, it loads the file but where does it go in memory ?
Moreover, there is a risk that the variables of my c program collide with this huge array (3290 bytes !).
And I can tell you, the space is really optimized since the 16 bits of each integer has its role to play in
my program (1 bit for this, 1 for that, 2 for this, 4 for that, 3 for this, and so forth)
4) I cannot permit to waste some space :
3 Ko in memory for the the array itself added to the 3 or 4 Ko corresponding to the lines of data. Shoold I precise that this array can be saved and loaded back since the data in it can change !
That is a cool challenge, isn't it ?
In fact I develop at this moment in BASIC, but if I could develop my thing in C, that would be a bit easier : the basic does not bring the ease a procedural langage like C can be....
If I solve that out, I will definetly leave aside the BASIC and keep concentrated on it in C.
If I don't, well, thats OK, I will do with what I have...
By the way, while I am answering, I finalize one utility (for Windows 9x/2000/XP) :
- A Text screen editor wich permit to create a TEXT page that you can save on a .tap or a .dsk file as a memory block, so that you can (C)LOAD it back when you need it. Very usefull for a text based adventure game with a lot of text !
And to come back in the subject and refering to some recent posts between DBUG and MYSELF about some evolution of the OSDK that inspired me just right now, I have the idea of a small BASIC preprocessor ... It just came to me right now
you write you basic program without numbering, but with a particular syntax like this :
Code: Select all
&start
PRINT "Are you a (b)oy or a (g)irl ?"
GET A$
IF A$="B" THEN GOSUB &boy ELSE GOSUB &girl
PRINT "Hello"
GOTO &start
&boy
B$="boy":RETURN
&girl
B$="girl":RETURN
Yes, you understood, a line that start with a
& is a label, and when you click on the magic button, the program supress the Labels and the calls to those labels, and do the numbering for you :
Code: Select all
10 PRINT "Are you a (b)oy or a (g)irl ?"
20 GET A$
30 IF A$="B" THEN GOSUB 60 ELSE GOSUB 70
40 PRINT "Hello"
50 GOTO 10
60 B$="boy":RETURN
70 B$="girl":RETURN
Not that difficult to do (it is a bunch of strings replace)