Page 7 of 16
Posted: Thu Jan 08, 2004 8:49 am
by Sylvia
My little wish: a Command like FreeID()
Result=FreeID() ;Result' contains the next free logical #ID
I manage me momentary with following routine:
Code: Select all
Global FreeID$
Procedure.l FreeID(Nr)
; Gives the next free (1-65536) logical ID (for Files etc.) back
; Managed become the ID's in the GLOBAL 'FreeID$' (!Important!)
;
; Nr = 0 deliver the next available logical ID
; Nr<> 0 again freely the ID "Nr"
;
; Result<0 no free ID available
; Result>0 contains a free logical ID
Protected Result
Nr=Abs(Nr)
Result=0
If Nr=0
; still NOTHING distribute ?
If Len(FreeID$)=0
; Each with "X" covered byte represents a distributed FreeID
FreeID$="X"
ProcedureReturn 1
Else
; all ID's distribute ?
If Len(FreeID$)=65536: ProcedureReturn -1: EndIf
; look for next free place
Result=FindString(FreeID$,"O",1)
If Result=0
; no free place found ?; String expand
FreeID$+"X": Result=Len(FreeID$)
Else
; ID newly distribute
FreeID$=Left(FreeID$,Result-1)+"X"+Right(FreeID$,Len(FreeID$)-Result)
EndIf
ProcedureReturn Result
EndIf
Else
If Nr>0 And Nr<=Len(FreeID$)
; release ID again
FreeID$=Left(FreeID$,Nr-1)+"O"+Right(FreeID$,Len(FreeID$)-Nr)
EndIf
EndIf
EndProcedure
More efficience would be use of a Bit-Plane (personaly me: shit on it;
it's sufficiently memory here

)
Posted: Thu Jan 08, 2004 9:48 am
by Kale
i think Fred is planning on introducing a new constant for dynamically giving you a free #ID used like this:
Code: Select all
StringGadget(#PB_Any, 0, 0, 100, 21, "Dynamic ID Number")
Posted: Thu Jan 08, 2004 10:11 am
by Edwin Knoppert
My wishes:
1) Make it possible to create a hook for each window to separate proc.
2) BSTR support
3) Null terminated strings (+pointers)
4) Option Explicit (Like VB)
5) Compile to dll "filename"
6) IDE, simple paste workaround which results in plain text pasting from help for example (easy to do).
7) Afaik, the debug is turned on when IDE is loaded, use last setting.

Help is fine but improve it with better examples and enumerated constant list or so.
9) Complexer examples
10) Fileversion info in PureBasic.exe
11) Native resource support for created exe / dll, also with functions.
12) I'm not a fan using the id's for each part in pb, like the openlibrary( #id) stuff.
Would like to see more support using the native handles, but not as workaround.
It's less dynamic thgis way, imagne i include a module from other users having #1 as fixed value...
I know, windows control id's is a contradiction since these behave the same way as pb does

Posted: Thu Jan 08, 2004 1:59 pm
by Psychophanta
Of course don't forget to elaborate PBHelp a little bit more.
I can't see there already existing functions like EventwParam(), EventlParam(), etc.

At least if there is not wished for PB to have some secrets, like best Konami games, Microsoft games (for example MSOffice, etc.), etc.
AL
Posted: Thu Jan 08, 2004 3:47 pm
by Kale
IIRC EventwParam(), EventlParam() are deprieciated and shouldnt be used!
Posted: Thu Jan 08, 2004 4:21 pm
by freedimension
Please, give every gadget an extra class, so when you're trying to colorize the background of one gadget, not all other gadgets of the same type will be colored too.
It could be a command like ChangeGadgetClasses() to dynamically create a new class, rather than doing it everytime, which would be pointless too.
Posted: Thu Jan 08, 2004 4:36 pm
by blueznl
unique but reusable id's in pb:
Code: Select all
Global x_nr_n.l
x_nr_n = 100 ; arbitrary value, first unique number given out
NewList x_nr_list.l() ; see x_nr() for more details
Procedure.l x_nr()
Global x_nr.l, x_nr_n.l
;
; *** generates a new unique number
;
; in: none
; retval: unused unique number
;
; pure sometimes uses 'numbers' to identify elements instead of windows handles
; these numbers are arbitrary and fully defined by the user, this can cause trouble
; when using multiple libraries or code from different people as they might be reusing
; these unique numbers, for this purpose, i've added a x_nr procedure that returns
; a new unique number on every call
;
; you decide yourself if you want to free them or not :-)
; i would suggest doing so if you don't 'recycle' them using x_freenr()...
;
If CountList(x_nr_list()) > 0 ; which means there's some stuff on the list
x_nr = x_nr_list() ; then use that number
DeleteElement(x_nr_list()) ; and take if from the list
Else
x_nr = x_nr_n
x_nr_n = x_nr_n+1
EndIf
ProcedureReturn x_nr
EndProcedure
Procedure x_freenr(n.l)
;
; *** recycles unique numbers
;
; put this number into the 'free numbers' list so it can be reused by x_nr()
;
AddElement(x_nr_list())
x_nr_list()=n
;
EndProcedure
Posted: Thu Jan 08, 2004 4:55 pm
by Dare2
So many requests - Maybe we need a poll so the dev team can prioritise! ) j/k
A new image gadget command that allows the image to be drawn onto any other gadget, eg:
Code: Select all
pasteImage(#imgID,#gadID,x,y,Wide,High[,flags])
which implies start/stop drawing and useImage.
And with a flag #PB_IMAGE_DIMENSIONS_AS_PERCENT
Also with drawing2D directly to a gadget. eg:
Code: Select all
startDrawingON(#gadID) : .. : stopDrawingON([#gadID])
And whilst we're at it
RealiseConcept(#userIDea, filename) which just reads your mind and writes the code. But that might be a bit hardware (with my head, anyway) specific.
Posted: Sun Apr 04, 2004 2:02 am
by Shannara
...and since there are no version 4 yet...
Sprite 3D for linux (and soon MacOSX). I know Fred said before that he will most likely not include Sprite3D commands for any other platform except windows. This neatly makes PureBasic worthless for linux/macOSX game progammers, however... one can wish

Posted: Thu Jun 23, 2005 1:23 pm
by decoder
1) True boolean variables
2) dim(2) -> 0,1 -not 0,1,2
3) ability to quote off blocks of text: %/ .. /% , not just line by line
4) automatic intidents on editor
thanks!

Posted: Thu Jun 23, 2005 8:10 pm
by fsw
This thread started Fri Oct 10, 2003 5:53 pm.
Is it been that long...

Posted: Fri Jun 24, 2005 12:28 am
by Kale
Is it been that long...
Yes,

Posted: Fri Jun 24, 2005 1:10 am
by freak
At that time there was the 3.80 release. PB has come a long way since then. (just look at the history)
Posted: Fri Jun 24, 2005 1:49 am
by Dare2
I'd bet that some of the things on this thread are already implemented.
Posted: Thu Sep 22, 2005 3:46 pm
by Joakim Christiansen
I want more graphix stuff, and a FlipBuffer() that don't use 100% CPU while it waits to flip the buffer.
And a SetFrameRate() that is accurate, I hate the way it's now... (it makes the game "laggy", I can give you an example if you want...)
And a HighRes timer.
Edit: And the help file could be more thecnically detailed,
for example how does actually the IF command work?
Does it stop testing if the first of all "Or <expression>" is true?
Yeah it does, but people might want to know stuff like that.
And that LoadSprite(9999,"file") reserve spritememory for all the 9998 sprites you don't use.
Maybe somebody allready suggested this, I didn't read all 7 pages...