Jump to content
  • Advertisement

ramy

Member
  • Content Count

    224
  • Joined

  • Last visited

Everything posted by ramy

  1. To the best of my knowledge, there has never been a version of Windows that used 1 byte for newlines, and there has also never been a version of DOS that used 1 byte for newlines. If you want to know for sure what's in any given file, get yourself a hex editor and examine it properly. [/quote] Come to think about it, I never ever had to read a text file using fread until now, I always used std library and I didn't really consider doing what I am doing right now. mix in also some miss-conceptions from when I first started programming years and years ago. Im glad its all sorted now thanks for everybody!
  2. Hiya community, i am trying to read contents of a file in text but im facing some pretty weird problems. to make things simple the file is text i created in notepad and only has two lines, one with H and other with E. so theoretically it should be 3 bytes right??? windows states that it is 4 bytes! why?? when i read the file one byte at a time (until i hit EOF) using fread i get 3 bytes. this is what i expect because the file should have only 3 byts, but windows says its 4 bytes. also i decided to remove the newline from the text file, and modified the file to be HE, then windows says its 2 bytes! and fread has no problem reading and returns 2 bytes as expected! this implies that fread somewhere does not like newlines right?? Going back to H newline E, if i change the fread open mode to binary, then fread DOES in fact read 4 bytes not 3. but this is a text file, i can not possible read it in binary. so can i understand from this that, under text-ascii mode, fread doesn't like newlines and reads them as 1 byte instead of 2? im saying 2 bytes because judging from windows file properties it states the file is 4 bytes.. whilst i know windows uses 1 byte for newline.. oh, and before i forget.. i tried to get the filesize in my code using the seek and tell and that also returns 4 bytes as oppose to 3 bytes (same as what windows says). also the good old stat also says its 4 bytes!! damn it, where is that 4th BYTE???? and why isnt fread getting it? it only reads 3 bytes and then says EOF! im using windows 7 btw 64 bit, if that at all helps..
  3. hmmm, i under under which versions of windows is that from? is it from XP and later? But ya, I guess I will have to deal with it
  4. thanks everyone for your replies! [/quote] my apologizes, i actually read the documentation but must have missed it! But since when did windows have newline as 2 bytes? it was always 1 byte if i remember correctly..
  5. ramy

    Bluetooth controllers, joysticks, gamepads

    well i just got mine MBP acouple of weeks ago. I would suggest getting one of these usb adapters. they can come in handy alot. I never tried them on the MBP thou, but i'm guessing they would work out fine, don't know why they don't work. You can tell me if they work out nicely or not :D enjoy
  6. ramy

    lua in c++

    just copy the lua dll to place it with your application, and it should run.
  7. char op; Console.WriteLine("1 - Create user"); Console.WriteLine("2 - Load user"); Console.Write("> "); op = (char)Console.Read(); if (op.Equals('1')) { string name Console.WriteLine(); Console.WriteLine("Name -> "); while ( (name = Console.ReadLine()) != null) { Console.WriteLine(name); } } :D
  8. ramy

    lua in c++

    What version of compiler are you using? I haven't used lua for quite some time thou. note: you supplied the directories for lua right?
  9. I personally debug in windows mode before testing on full screen, I usually end up restarting my computer when it hits a breakpoint when its in fullscreen. Or u can dump data to files when its running in fullscreen. However I have heard that it can be done, but I'm not sure if anybody did it or not, I would like to know myself.
  10. ramy

    Meshes are solid black

    Quote:Original post by Armadon 1) Check your lights, put on some debug light such as directional, as it's the easiest to test with. 2) Check if your light is enabled by the device. 3) Lights needs materials to know how to interact with the object. Check if you have materials assigned. 4) If you are using Shaders, make sure that the shader is compiling fine and that the matrices passed are correct. I hope this helps. Take care. Also to add to your list Armadon is the normals. If you are using directional lights make sure the mesh has normal, and they are correctly loaded and calculated. Hope it helps Ramy Gowigati
  11. I never worked with unions myself as well. I googled for some help and came up with something that might help out, u might have tried this. did u try giving the union and struct a name? union { Matrix m_world; struct { Vector3 m_right; float m_w1; Vector3 m_up; float m_w2; Vector3 m_facing; float m_w3; Vector3 m_position; float m_w4; } vectors; } mydata;
  12. Hi Sc0rp, I'm not sure what exactly do u mean by a single animation mesh. But I have tried personally adding several "Animation Sets" to the file, and it works just fine. Adding and removing that is. But the Animation file had one mesh but several animations. Hope thats helps.
  13. Hey guys, i was wondering how to calculate the look direction vector from a rotation x, y, z vales i have. i have looked to this thread http://www.gamedev.net/community/forums/topic.asp?topic_id=352932 and i am having problems. I understand that i should be using Spherical-to-Cartesian conversion as the member stated, but its not working with me. NVector3 vDiff = NVector3(view.x, view.y, view.z); float XRot = atan2(-vDiff.y, sqrt(vDiff.x*vDiff.x + vDiff.z*vDiff.z)); float YRot = atan2(vDiff.x, vDiff.z); float sx = sinf(XRot); float cx = cosf(XRot); float sy = sinf(YRot); float cy = cosf(YRot); float x = sy*cx; float y = -sx; float z = cy*cx; view.x = x; view.y = y; view.z = z; is there anything im doing wrong? But im wondering where does the rotation x y z values come in here? btw im using Direct3D. thanks [Edited by - ramy on October 2, 2007 4:26:24 PM]
  14. yup, thanks a million. it worked out for me. plus my visuals were miss leading, so its all ok now =D thanks Chimaira [Edited by - ramy on October 2, 2007 4:18:31 PM]
  15. what is the focus length? actually im implementing as what i wrote in the post, and its not working, maybe its my custom rotation control i implemented :S not sure how to check [Edited by - ramy on October 2, 2007 4:24:51 PM]
  16. Hello guys, I had an idea about creating a site that has an archieve of tutorials of all topics. Not game programming in specific nor computer and It related tutorials. but any topic that can come in mind. It is categorized by "Categories and Sub-Categories". free registration is a must to be able to post tutorials and rate other user posted tutorials. However non registered users will not be able to rate the tutorial. I am preparing the final touches on the site. Site url is www.tutorialsforme.com. Within a day or two maximum the site will be opened for users to try out. Thanks Ramy
  17. ramy

    TutorialsForMe.com for testing

    tutorialized is a site dedicated to technology as it seems. I maybe wrong, i only had a small look at it. What I was aiming at is something global, on Cars, IT, Crafts etc. not just IT topics.
  18. well i have other plans for the site, not just to be for games. but basically anything one can think of. any tutorial one wants to write out for some friends about a certain product, or game , or game development, etc. thats my plans...
  19. hey guys, i would like to take ur opinion on the making of a site that contains all of the game development tutorials that everybody has made in one site. a set of categorized links that will enable users to find everything they need on one site?? thanks
  20. yeah sorry "slowmike" thats what i meant, dont know what was in to me :S.
  21. btw, i forgot to mention i have posted the original post in the "your announcements" section (topic: http://www.gamedev.net/community/forums/topic.asp?topic_id=437417), but would liek to take peoples opnion here as well
  22. hello everybody, I have came across an idea, which runs somewhere on having a site which has all links to tutorials that are game development related. Instead of looking on Google or here or other places. Cause sometimes there r tutorials that posted online. What you guys think? I am about to put some money into this, but first I thought of asking you guys first? what you think?
  23. ramy

    a tutorial collection site

    any other ideas what people thing about it?
  24. ramy

    a tutorial collection site

    Yes thats what i meant. But instead of me going around all authors and taking their tutorials to link on my site, I thought of a free registration section in the site where the author can log in and post his/her tutorials. Cause there will be allot of authors having 'lots' of tutorials to post. I wouldn't cope at synchronizing all tutorials for all authors. I hope that explains the role of registration in the site. :S Basically the meaning of this site, initially is to have a HUGE list of tutorials for game development. Making it easy on users to find what they need in a short period of time free of charge.
  25. ramy

    a tutorial collection site

    well i thought of the site owners (who wrote the tutorials) to register and post their tutorials up on the site, not to mention search and stuff. EDIT: I thought of it as links and descriptions available per example (or tutorial), I didn't think of it as a wiki. You mean something like the blender wikibooks link you sent? Maybe there can be a wiki section for comments and further explanations on a tutorial?
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!