Custom Query

Filters
 
Or
 
  
 
Columns

Show under each result:


Results (28 - 30 of 3866)

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
Ticket Resolution Summary Owner Reporter
#29 Rejected Game Engine Incorperatrion Gary keen@…
Description

There should be a game engine feature that allows users to make games a lot easyer. The system could use OpenGL or DirectX and could look something like this:

#include <gameengine.au3>

;Creates the game window. The first item is the game name. The second is the size. Full = Fullscreen, Half = Half of the screen. Gamecreate ("Game Name" , Full)

;Creates a charator. The first item is the name of it/him/her. The second is the type of charactor. Main = Main Charactor (All cameras parented to him), Second = Any other charactor. Charactorcreate ("Main Charactors Name", Main)

;Creates a camera. The value is the name of the camera. You can use Cameraset () to set it up. Cameracreate ("Main")

;Sets the camera properties. 1 = First Person, 3 = Third Person. Cameraset (1)

;Creates a enemy. The enemy has 3 systems pre-programed AI systems. 1 = Crazy, 2 = Normal, 3 = Coward. Enemycreate ("Baddy one", 3)

;Creates the level. The first value is the width, the second is the lengh. Each value is a cube that is 100x100 (give or take). Levelcreate (3, 3)

;Sets the properties for the level. You program it cube by cube. 1 = solid bock, 2 = empty, 3 = wall left, 4 = wall right, 5 = Wall top, 6 = wall bottom. Levelset (1, 3, 2, 2, 1, 5, 2, 1, 2)

You could add many other features. Just an idea.

#32 Fixed _GUICtrlTreeView_GetNext does not return 0 for last item Gary DarkTurok
Description

The following code shows a bug in _GUICtrlTreeView_GetNext.

The bug also affects _GUICtrlTreeView_FindItem; this routine will enter a infinite loop when the searched text is not found in the tree-view, because it relies on _GUICtrlTreeView_GetNext to return zero when called for the last item. (Thus prio Major)

#include <GuiConstantsEx.au3>
#include <GuiTreeView.au3>
#include <GuiImageList.au3>

Opt('MustDeclareVars', 1)

Example_External()

Func Example_External()

    Local $GUI, $hItem[10], $hTreeView
    Local $iStyle = BitOR($TVS_EDITLABELS, $TVS_HASBUTTONS, $TVS_HASLINES, $TVS_LINESATROOT, $TVS_DISABLEDRAGDROP, $TVS_SHOWSELALWAYS )

    $GUI = GUICreate("(External) TreeView Get Next", 400, 300)

    $hTreeView = _GUICtrlTreeView_Create ($GUI, 2, 2, 396, 268, $iStyle, $WS_EX_CLIENTEDGE)
    GUISetState()

    _GUICtrlTreeView_BeginUpdate ($hTreeView)
    For $x = 0 To 5
        $hItem[$x] = _GUICtrlTreeView_Add ($hTreeView, 0, StringFormat("[%02d] New Item", $x + 1), $iImage, $iImage)
    Next
    _GUICtrlTreeView_EndUpdate ($hTreeView)

	If _GUICtrlTreeView_GetNext( $hTreeView, $hItem[5] ) <> 0 Then
    	MsgBox(4160, "Information", "_GUICtrlTreeView_GetNext does not return 0 when called with last item" )
    EndIf

    ; Loop until user exits
    Do
    Until GUIGetMsg() = $GUI_EVENT_CLOSE
    GUIDelete()
EndFunc   ;==>Example_External
#42 Fixed _FileWriteFromArray outputs too many CRLF (File.au3) Gary mlowery <matin@…>
Description

Lines output from the _FileWriteFromArray function in the standard File.au3 include are prefixed by a @CRLF, resulting in an initial blank line in the file. Repeated use of this function and its complement _FileReadToArray on the same file can result in file bloating.

A suggested fix is to change the current file writing loop:

 	Local $ErrorSav = 0
 	For $x = $i_Base To $i_UBound
 		If FileWrite($hFile, @CRLF & $a_Array[$x]) = 0 Then
			$ErrorSav = 3
			ExitLoop
		EndIf
	Next

With something such as below that outputs the CRLF after the data, and does not write a final CRLF (code could undoubtedly be improved):

	Local $ErrorSav = 0
 	For $x = $i_Base To $i_UBound -1
		If FileWriteLine($hFile, $a_Array[$x]) = 0 Then
			$ErrorSav = 3
			ExitLoop
		EndIf
	Next
	If FileWrite($hFile, $a_Array[$i_UBound]) = 0 Then $ErrorSav = 3

As an additional suggestion, modify the function call to take the array by reference:

_FileWriteFromArray($File, ByRef $a_Array, $i_Base = 0, $i_UBound = 0)

Thanks!

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
Note: See TracQuery for help on using queries.