Article View: alt.comp.lang.learn.c-c++
Article #616Re: Problems with variables//problemas con variables
From: Andy
Date: Fri, 30 Jun 2000 00:00
Date: Fri, 30 Jun 2000 00:00
72 lines
4265 bytes
4265 bytes
I think we would need the code for the class constructors at the very least. Plus any functions callled from with the constructors. maapirua <maapirua@bi.ehu.es> wrote in message news:8jijha$3811@eui1nw.euskaltel.es... > PARDON ME BUT THE OTHER EMAIL ADDRESS DOESN'T WORK PROPERLY > > I am trying to make a computer game. I am using DirectX and Borland C++ > Builder. > I have made some directdraw and directsound classes to simplify the directx > programming. > With this classes I have made another class to control the Warriors in my > game. > Now I'm making the classes and some small examples to prove them , then i > will try to make a big game. > > When I declare the variables depending the order I use to do it my program > works properly, > works but some items don't appear or justly don't works. > > For example: > > if I declare the variables in this way the program crashes > ////////////////////////////////////////////////////////////////////// > TObjeto Pocima; // Tobjeto is a class which has an array of > TSDIRECTDRAWSURFACE and counter variables > int VELOCIDAD; > int legolaspunt; > int gandalfpunt; > int primero; > TSDIRECTDRAW direct1; file://TSDIRECTDRAW is a class i have made to > make > idirectdraw easier > TSDIRECTDRAWSURFACE Temporal,logo,fondo2,fondo; // idem but with > idirectdrawsurface > TPersonaje Legolas,Gandalf; // TPersonaje is a class to control the > warriors in the game (it has a great array of TSDIRECTDRAWSURFACE to keep > the // different > movements of the warriors. > RPersonaje DatosLego,DatosGan,datosmago; > RegFoto REGFOTO; > ////////////////////////////////////////////////////////////////////// > > But if I declare the variables in this order the program works properly > ////////////////////////////////////////////////////////////////////// > TObjeto Pocima; > int VELOCIDAD; > int legolaspunt; > int gandalfpunt; > int primero; > TSDIRECTDRAW direct1; > TSDIRECTDRAWSURFACE Temporal; > TPersonaje Legolas; > RPersonaje DatosLego; > TSDIRECTDRAWSURFACE logo; > RPersonaje datosmago; > TSDIRECTDRAWSURFACE fondo2; > RPersonaje DatosGan; > TPersonaje Gandalf; > TSDIRECTDRAWSURFACE fondo; > RegFoto REGFOTO; > ////////////////////////////////////////////////////////////////////// > > If I change the order the program may draw only some of the items in the > screen > f.e. In some cases I can only see one of the two warriors in the game. > I think than the pointers are the problem, but I'm not able to solve it. > > > >
Technical Details
Message-ID:
<962502867.3826.0.nnrp-06.d4e45f8f@news.demon.co.uk>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<8jijha$3811@eui1nw.euskaltel.es>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103077,d2157333467379ac X-Google-Attributes: gid103077,public X-Google-Thread: 10c163,d2157333467379ac X-Google-Attributes: gid10c163,public X-Google-Thread: 105367,d2157333467379ac X-Google-Attributes: gid105367,public X-Google-Thread: 114592,d2157333467379ac X-Google-Attributes: gid114592,public X-Google-Thread: faaa2,d2157333467379ac X-Google-Attributes: gidfaaa2,public X-Google-Thread: 1060e9,c1fd47a81fbedef8 X-Google-Attributes: gid1060e9,public X-Google-Thread: fd3cd,d2157333467379ac X-Google-Attributes: gidfd3cd,public X-Google-Thread: 1145b7,d2157333467379ac X-Google-Attributes: gid1145b7,public From: "Andy" <andy@mouseclick.demon.co.uk> Subject: Re: Problems with variables//problemas con variables Date: 2000/06/30 Message-ID: <962502867.3826.0.nnrp-06.d4e45f8f@news.demon.co.uk> X-Deja-AN: 641635082 X-NNTP-Posting-Host: mouseclick.demon.co.uk:212.228.95.143 References: <8jijha$3811@eui1nw.euskaltel.es> X-Priority: 3 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200 X-Complaints-To: abuse@demon.net X-Trace: news.demon.co.uk 962502867 nnrp-06:3826 NO-IDENT mouseclick.demon.co.uk:212.228.95.143 X-MSMail-Priority: Normal Newsgroups: alt.comp.lang.learn.c-c++,alt.games.builder,alt.games.builder.dcgames,cern.c++,comp.games.development.design,comp.games.development.programming,comp.games.development.programming.algorithms,comp.games.development.programming.misc,comp.lang.c++.mod