Tutukun

Members
  • Content count

    125
  • Joined

  • Last visited

Community Reputation

105 Neutral

About Tutukun

  • Rank
    Member
  1. Nanoha's solution seems very nice and not too hard to implement. NOw I have to see if I make my pet sleep in daytime n stay up and night :D Im gonna try to submit some pics soon tothe gamedev gallery. so look forward to that Thanks for the suggestion guys.
  2. Hi, So im trying to come up with a sleeping algorithm for my pet game. Basically i'd like it to be as close as human sleeping behavior. Pets start off with their normal sleeping hour. But during the duration of a game, if the players keep their pets stay up too late, or make them go to bed too early then their sleeping patterns will change accordingly. For example: a pet's initial sleeping time is from 12am - 8am. but for a duration of days, if a player keeps them stay up til 3am, then eventually they wont go to sleep by themselves earlier than 3 in the morning. SOrry for my bad english, and thank for reading.
  3. Quote:Original post by gpu_fem You have to do a typedef on char*. This way the compiler knows that you want to have passed a const reference to a char* (whose data can be modified), as opposed to something else. lol i just wake up, try ur suggestion n it works so simple, why didnt I think of that thx u :D
  4. Quote:Original post by Nitage Try: static bool TowerInfoInterface::_CompareIteratorValue(const char const* c1 , const char* const c2) { return (strcmp(c1, c2) == 0)? true:false; } (Note that strcmp takes two char*s, not two chars so you'll also need to correct your function's body). Quote: cannot convert parameter 2 from 'bool (__cdecl *)(const char *const ,const char *const )' to 'bool (__cdecl *)(const T &,const T &)' 1> with 1> [ 1> T=char * 1> ] 1> None of the functions with this name in scope match the target type no luck :( i might just add an extra function find(T, (bool*)(T,T)) but i really want to know the solution for this
  5. you mean bool TowerInfoInterface::_CompareIteratorValue(const char const* c1 , const char const* c2) or bool TowerInfoInterface::_CompareIteratorValue(const char* const c1 , const char* const c2)??
  6. Quote:Original post by Red Ant Oops, sorry. I suppose you can't change your find() function to have this signature? *** Source Snippet Removed *** well if i changed the lib then it would work, i just think there should be a way since the function was declared like that for a reason. @Nitage: i tried n still doesnt work const char *,const char *const )' to 'bool (__cdecl *)(const T &,const T &) im using standard C strcmp i just forgot to change it back after trying different type of parameters
  7. Quote:Original post by Red Ant Well, if your template type T is char* then const T& evaluates to char*& const, i.e. the char pointer itself is constant, not the pointee (i.e. what it points to). Your T should be const char* IMO. hmm thx, i've tried that same err msg :( cannot convert parameter 2 from 'bool (__cdecl *)(const char *,const char *)' to 'bool (__cdecl *)(const T &,const T &)' 1> with 1> [ 1> T=const char * 1> ] 1> None of the functions with this name in scope match the target type
  8. i have this function static bool TowerInfoInterface::_CompareIteratorValue(const char* c1 , const char* c2) { return (strcmp(*c1, *c2) == 0)? true:false; } im trying to past it into this func iterator find(const T &inT, bool (*obj)(const T&, const T&)) const but it keep giving me this err cannot convert parameter 2 from 'bool (__cdecl *)(const char *,const char *)' to 'bool (__cdecl *)(const T &,const T &)' with [ T=char * ] None of the functions with this name in scope match the target type i even tried to change _CompareIteratorValue to _CompareIteratorValue (const char*& c1 , const char*& c2) same err msg: cannot convert parameter 2 from 'bool (__cdecl *)(const char *&,const char *&)' to 'bool (__cdecl *)(const T &,const T &)' 1> with 1> [ 1> T=char * 1> ] 1> None of the functions with this name in scope match the target type any one have any suggestion? cheers :)
  9. Quote:Original post by the-hero thank you for your kind reply but do you think i have less chance to get job by doing BEng Game programming? cz alredy i am in 2nd year so i dont think i can change my course to Computer science. i really concern about what you have said but plz give me some tips which help me to success to be a Game programmer if i continue doing the course what i am doing? (BEng Game Programming @ http://www.staffs.ac.uk/courses/undergrad/computingandit/tcm11012664.php) I don't see the reason why you're asking that question. The course called Game programming for a reason. That is to help building your portfolio so you can have better chance breaking into the game industry. A good knowledge of DX and OG alone is a huge advantage, that sets you apart from other normal CS students. Just work hard, get good results and you should able to get the job you want
  10. Quote:Original post by Vinniee Quote:Original post by Tutukun Quote:Original post by Vinniee Thanks for explaining that dude. So how should I implent this in my code? Also, I'm trying to rotate my object along the X and Y axis. But I only can rotate it along the X axis. This is the part of the code I'm talking about: *** Source Snippet Removed *** Does anyone know what I'm doing wrong? I can't seem to use the function SetTransform() multiple times. try this: *** Source Snippet Removed *** Thanks for the quick reply! It gives me this error: Quote:error C2664: 'D3DXMatrixMultiply' : cannot convert parameter 3 from 'D3DXMATRIX' to 'const D3DXMATRIX *' 1> No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called my bad, it was a typo. It's supposed to be '&matRotateY' not 'matRotateY' D3DXMATRIX matRotate; D3DXMatrixMultiply(&matRotate,&matRotateX, &matRotateY); d3ddev->SetTransform(D3DTS_WORLD, &(matRotate));
  11. Quote:Original post by Vinniee Thanks for explaining that dude. So how should I implent this in my code? Also, I'm trying to rotate my object along the X and Y axis. But I only can rotate it along the X axis. This is the part of the code I'm talking about: *** Source Snippet Removed *** Does anyone know what I'm doing wrong? I can't seem to use the function SetTransform() multiple times. try this: D3DXMATRIX matRotate; D3DXMatrixMultiply(&matRotate,&matRotateX, matRotateY); d3ddev->SetTransform(D3DTS_WORLD, &(matRotate));
  12. Thank you for the replies Quote:Original post by ravyne2001 For an internet resume such as yours, there's a little more lee-way since its a blanket resume for all interested parties to see. Just remember to trim and tailor it to the position if you send them out on paper. I'm going to try to tailor my resume to be as suitable for each particular job as possible. But as a graduate programmer, lack of real experience, it's very limited of what I could change in my cv
  13. CLICK I'm not great with web design, so I just keep everything clean and accessible. Game programmer jobs are hard to find for graduates like me. So please take a look. Every advices and tips will greatly improve my chances in getting a job [smile] Thank you Tu [Edited by - Tutukun on June 1, 2007 6:42:57 PM]
  14. Quote:Original post by Paulius Maruska For the fragment of XML you posted, the fragment of XSL would look something like this: <xsl:template match="para"> <p> <xsl:apply-templates match="*" /> </p> </xsl:template> <xsl:template match="url"> <i> <xsl:apply-templates match="*" /> </i> </xsl:template> <xsl:template match="text()"> <xsl:value-of select="." /> </xsl:template> Edit: err, the forum messes with the HTML tags! :) Thank for helping me out. Now, it gives me the "Attribute match is not allowed on this element" error @ all the apply-templates match any idea why?
  15. Hi, I'm trying some xml to html examples, and I'm kinda stuck. For example i have the following xml <para> Hi pls visit my website at <url>http://www.abc.com</url>. </para> Could anyone help me form it into something that look like: Quote: Hi pls visit my website at http://www.abc.com using XSLT? Sorry for my bad english. Thank you :)