Replies: 8Views: 3,177Started: Mar 29, 2004, 9:44 PM
TETRIS · Mar 29, 2004, 9:44 PM
#989
E ljudi ovde cu pisati o svojoj igri koju planiram od pocetka zavrsiti i u dx-u samo me muci jedna stvar.
Spustanje redova.
Pomocu apija sam to radio ovako sve slozene figure sam crta na teksturi i to prikazivao na formi kad se neki red slozi onda se preko njega nacrta linija grida tj izbrise se taj red i cela tekstura se spusti dole za 1 red ili koliko je slozeno i docrta se greed gore onolko redova koliko je spusteno tako sam ja uradio. E sad u dx-u nemogu crtati na texturu i onda nije probelm kad se slozi red da ga izbrisem ali kako posle texturu tj ono sto je nacrtano na formi da spustim za taj broj redova. Neznam da li me razumete. Znaci izbrisem red na formi ali nemogu spustiti ono sto je nacrtano na formi za 20 pixela koliko iznosi jedan red kad bih ovo znao celu igru bi zavrsio za 2 dana jer sve imam u glavi i delimicno na papiru pa mi ovo hitno treba da zavrsim igru.
Post #2 · Mar 29, 2004, 9:51 PM
#990
To nitko nezna uzas, veceras cu ja malo prekopati net za tim jer bi i mene ta opcija ne samo spasila nego i pruzila mi mnoge druge mogucnosti (ideje / efekte)...
Naci cu ja nesto! javit cu se do jutra.
Post #3 · Mar 30, 2004, 7:35 AM
#992
Evo ako se ne ljutis premjestio sam tvoj post ovdje jer ima neke veze sa programiranjem. Ako zelis vratit cu ga nazat u Area51? nije mi bad.
Cijelu noc sam dovrsavao Engine pa nisam stigao potraziti rjesenje na ovaj problem, idem sad jos one vase Ispite rjesiti pa cu onda rjesiti ovaj problem (if I can).
Post #4 · Mar 30, 2004, 6:52 PM
#1004
Iz dole navedenog ces skuziti otprilike kako crtati na drugu treksturu, trazim jednu stvar a nedjem potpuno drugu, hehe, ono sto nam najvise treba!
Procitaj usage dio: (ovo je funkcija za Load teksture) ___________________________________________ Microsoft DirectX 8.0 (Visual Basic): D3DX8.CreateTextureFromFileEx Creates a texture from a file. This is a more advanced method than D3DX8.CreateTextureFromFile.
object.CreateTextureFromFileEx( _ Device As Direct3DDevice8, _ SrcFile As String, _ Width As Long, _ Height As Long, _ MipLevels As Long, _ Usage As Long, _ Format As CONST_D3DFORMAT, _ Pool As CONST_D3DPOOL, _ Filter As Long, _ MipFilter As Long, _ ColorKey As Long, _ SrcInfo As Any _ Palette As Any) As Direct3DTexture8
Parts object Object expression that resolves to a D3DX8 object. Device Direct3DDevice8 object representing the device to be associated with the texture. SrcFile String that specifies the file from which to create the texture. Width Width in pixels. If this value is zero or D3DX_DEFAULT as defined by the D3DXENUM enumeration, the dimensions are taken from the file. Height Height, in pixels. If this value is zero or D3DX_DEFAULT as defined by the CONST_D3DXENUM enumeration, the dimensions are taken from the file. MipLevels Number of mip levels requested. If this value is zero or D3DX_DEFAULT as defined by the CONST_D3DXENUM enumeration, a complete mipmap chain is created. Usage 0 or the D3DUSAGE_RENDERTARGET member of the CONST_D3DUSAGEFLAGS enumeration. Specifying D3DUSAGE_RENDERTARGET indicates that the surface is to be used as a render target. The resource can be passed to the NewRenderTarget parameter of the SetRenderTarget method. If D3DUSAGE_RENDERTARGET is specified, the application should check that the device supports this operation by calling Direct3D8.CheckDeviceFormat. Format Member of the CONST_D3DFORMAT enumeration, describing the requested pixel format for the texture. The returned texture might have a format different from that specified by Format. Applications should check the format of the returned texture. If Format is D3DFMT_UNKNOWN, the format is taken from the file. Pool Member of the CONST_D3DPOOL enumeration, describing the memory class into which the texture should be placed. Filter A combination of one or more filter flags defined by the CONST_D3DXENUM enumeration, controlling how the image is filtered. Specifying D3DX_DEFAULT for this parameter is the equivalent of specifying D3DX_FILTER_DITHER Or D3DX_FILTER_TRIANGLE. MipFilter A combination of one or more mip filter flags defined by the CONST_D3DXENUM enumeration, controlling how the image is filtered. Specifying D3DX_DEFAULT for this parameter is the equivalent of specifying D3DX_FILTER_BOX. ColorKey Value to replace with transparent black, or 0 to disable the colorkey. This is always a 32-bit ARGB color, independent of the source image format. Alpha is significant and should usually be set to FF for opaque colorkeys. Thus, for opaque black, the value would be equal to &HFF000000. SrcInfo A D3DXIMAGE_INFO structure to be filled with a description of the data in the source image file, or ByVal 0. Palette The first element of an array of 256 PALETTEENTRY types to fill in, or ByVal 0. See Remarks. Return Values Direct3DTexture8 object representing the created texture.
Remarks Mipmapped textures will automatically have each level filled with the loaded texture.
When loading images into mipmapped textures, some video cards are unable to go to a 1x1 image and this function will fail. If this happens, then the images need to be loaded manually.
For more information on PALETTEENTRY see the Microsoft Platform Software Development Kit (SDK). Note that as of Microsoft DirectX? 8.0, the peFlags member of the PALETTEENTRY structure does not work the way it is documented in the Platform SDK. The peFlags member is now the alpha channel for 8-bit palletized formats.
Post #5 · Mar 31, 2004, 1:33 PM
#1019
E Edi razocaranje nije to to uspeo sam nacrtati jedan surface na drugom i zatim nacrtati sve na formi ali bedak je u tome sto uopste nemozes da ga koristis u mixu sa spriteom i nemoze da budu providni a i copyrect funkcija je extremno spora jebiga neznam aj ti pokusaj malo da izvalis ja vise nemam pojma sta raditi.
Post #6 · Apr 1, 2004, 1:25 PM
#1025
Probat cu obavezno, ali prvo idem vise zavrsiti Gink jer opet kasnim sa datumom izlaska!
Post #7 · Apr 3, 2004, 12:25 PM
#1038
Ja sam brate ekstremno glup poceo sam raditi igru bez planiranja i onda odjednom programirajuci dosao sam dotacke gde sve moram ispocetka jel sam se ekstremno zajebao. Od sad svaki put kad ne isplaniram igru ima da udarim glavom o zid jebote sad sve moram odpocetka ali cu prvo sve isplanirati i posle cu prebaciti u kode.
Post #8 · Apr 3, 2004, 5:25 PM
#1040
Eee, dobro znam taj filing, meni se to puno puta dogodilo, cak jednom i u ginku tj. dva puta....ovu jednu stvar sam skroz prepravio ispocetka (random map generator) ali druga stvar je bila prevelika da idem sve ispocetka pa sam samo nastavio dalje raditi i to sranje usporava moje programiranje jer je teze a i usporava FPS...joj Ali je tesko sve smisliti unaprijed, jer ti uvjek tokom programiranja nesto novo ili bolje padne na pamet.
Post #9 · Apr 3, 2004, 9:04 PM
#1041
He he a mene uvek mrzi da isplaniram unapred i da se smaram sa dokumentaciojom jer sam uvek nestrpljiv da sto pre pocnem da radim an projektu ali to je uvek wrong way. Mora se nesto malo i unapred osmisliti jebiga upravu si da nemoze sve jer se dosta toga izmeni neplanirano ali jedan deo se mora isplanirati pa kad se odradi onda sledeci i.t.d. sta ja uopste neradim pa se uvek zajebem.
Sign in to reply
Replies are available for existing members only! For now 😅