--------------- FIDO MESSAGE AREA==> TOPIC: 203 C++ Ref: ECF00003 Date: 08/02/97 From: PETER LESCHEV Time: 05:52pm \/To: EDWARD GOSSETT (Read 3 times) Subj: New game that needs help. -=> Quoting Edward Gossett to All <=- Hi! EG> I;m working on a game. I need some help. To find out more EG> contact me at: You should read GAMEDEV. If your system doesn't get it, pester your sysop! It's on the Zone 1 backbone so it's only pennies. [yes, that is a canned reply] CYA! Peter Leschev GameDev Archive Maintainer W!zard - Coder EMAIL: peter.leschev@senalink.com.au HTTP: web.senalink.com.au/homepage/leschev/index.htm ... Documentation: (n) The worst part of programming. --- FMail/Win32 1.22+ * Origin: Lateline BBS: Nocturnal Paradise. +61-2-9579-6564 (3:712/841) --------------- FIDO MESSAGE AREA==> TOPIC: 203 C++ Ref: ECF00004 Date: 08/08/97 From: PETER LESCHEV Time: 05:16pm \/To: JERRY VINOKUROV (Read 3 times) Subj: Programming -=> Quoting Jerry Vinokurov to All <=- Hi! JV> Is anyone out there a game programmer, or a graphics programmer? If JV> so, would you let me see some source code 'cause I'm learning how to JV> write games and I could sure use some help when it comes to graphics JV> manipulation and all that good stuff. You should read GAMEDEV. If your system doesn't get it, pester your sysop! It's on the Zone 1 backbone so it's only pennies. AND Try the GAMEDEV Archive for all your game programming needs. Shop till you drop at: FTP: ftp://intranet.ca/usr/synapsis/gamedev/gamedev_archive/ OR request a copy via email: EMAIL: peter.leschev@senalink.com.au SUBJECT: I want GDA! OR F'Req: GAMEDEV from 1:153/255 [yes, this is a canned reply] CYA! Peter Leschev GameDev Archive Maintainer W!zard - Coder EMAIL: peter.leschev@senalink.com.au HTTP: web.senalink.com.au/homepage/leschev/index.htm ... C program run, C program crash, C programmer cry. --- FMail/Win32 1.22+ * Origin: Lateline BBS: Nocturnal Paradise. +61-2-9579-6564 (3:712/841) --------------- FIDO MESSAGE AREA==> TOPIC: 203 C++ Ref: ECF00005 Date: 08/10/97 From: GERRY DANEN Time: 10:27pm \/To: DARIN MCBRIDE (Read 3 times) Subj: C++ or ASM? GD> I've never used volatile on any direct screen I/O. Perhaps that's GD> because under single-tasking DOS that's not a problem. In what way GD> would I see problems under multi-tasking OS like WinNT or OS/2? DM> Something tells me you just wanted the answer to the other question, DM> but had to keep it on topic. That's ok - I'm not the moderator, and DM> thus the moderator isn't so anal that he'd care. :-) [There's an DM> implication in there somewhere... ] I hope Tom isn't reading this... DM> Anyway, you would use volatile under DOS for global variables that are DM> modified by interrupts, or anything else modified by interrupts for DM> that matter. Or another process? DM> For example, if you had an interrupt that changed a global stack to DM> add each new character that came in from a modem, anything dealing with DM> the stack would have to be considered volatile (in OS/2 or NT, you DM> would use semaphores to guarantee the variable didn't change between DM> accesses). Another one would be, say a pointer to the incoming byte of DM> a serial port - this would be volatile as well. You're over my head here. If I am using the modem under NT, say in a bbs program, would I get down to the stack level? DM> OS/2 and WinNT have semaphores that render volatile mostly useless. DM> Only your own process threads can modify your variables, and all these DM> variables can be protected by semaphores. If they aren't so protected, DM> you run into race conditions that can make the system blow up. ;-) Wonderful! :( DM> Same for DOS, but you don't have as much power over it, so you use the DM> volatile. DM> (The screen isn't going to change, so having a volatile pointer to it DM> is useless... unless you have an interrupt handler also modifying it.) What about concurrent DOS windows?... Gerry Danen (gdanen@accessweb.com) C+Net BBS @ 403-477-9545 http://www.geocities.com/SiliconValley/Way/9823 2 years, 143 days, 1 hour, 43 minutes, and 58 seconds until January 1, 2000. ... Your message was passed on to those you give a sh!t... --- Maximus 3.01 * Origin: C+Net BBS. Programming & Networking. (1:342/1017) --------------- FIDO MESSAGE AREA==> TOPIC: 203 C++ Ref: ECF00006 Date: 08/10/97 From: NEIL HELLER Time: 07:54am \/To: DARIN MCBRIDE (Read 3 times) Subj: PRINTING POINTER VALUES NH> char aStr[10] = "abcdefgh"; NH> char * aPtr = &aStr[5]; NH> cout << aPtr << endl; DM> You want: DM> cout << (void*)aPtr << endl; Just an honest question: why, after aPtr was declared to be a pointer to char, would you need to cast it in order to print the address (contents of the pointer). Instead of a C-style cast, would it be preferred in that situation to do: cout << static_castaPtr << end; * KWQ/2 1.2i * --- TMail v1.31.5 * Origin: Diablo Valley PCUG-BBS, Walnut Creek, CA 510/943-6238 (1:161/55) --------------- FIDO MESSAGE AREA==> TOPIC: 203 C++ Ref: ECG00000 Date: 08/09/97 From: PETER HAYWOOD Time: 12:58pm \/To: KURT J. TISCHER (Read 3 times) Subj: Re: Signs of numbers Groovy hepcat Kurt J. Tischer jived with All on 08 Jul 97 01:06:00! Signs of numbers's a cool scene. Dig it! KJT> functions uses a function internal to VB called Sgn, which returns an KJT> integer (1, 0, or -1) corresponding to the sign of a number. (e.g. KJT> numSign = Sgn(numSign) ) KJT> Does Visual C++ have a similar function? If so, in what header Use the ?: operator, for example: int s, i; i = -647; /* set i to some value */ s = (i < 0 ? -1 : 1); /* set s to -1 if i<0 or 1 if i>=0 */ You could even define a simple macro to perform the same task as your VB function: #define Sgn(x) (x < 0 ? -1 : x > 0 ? 1 : 0) Then use the macro like this: int s, i; i = 8100 /* set i to some value */ s = Sgn(i); /* get the sign of i */ Wolvaen ... Basic programmers never die. They just GOSUB without RETURN! --- Blue Wave/RA v2.20 * Origin: The Gate, Melbourne Australia, +61-3-9809-5097 33.6k (3:633/159) --------------- FIDO MESSAGE AREA==> TOPIC: 203 C++ Ref: ECG00001 Date: 08/11/97 From: JERRY VINOKUROV Time: 12:51pm \/To: RAJESH DHAWAN (Read 3 times) Subj: Programming -> Hi Jerry: -> -> Jerry Vinokurov, -> In a message on 6 August, wrote : -> -> JV> Is anyone out there a game programmer, or a graphics programmer? -> If so, JV> would you let me see some source code 'cause I'm learning -> how to write JV> games and I could sure use some help when it comes -> to graphics JV> manipulation and all that good stuff. -> -> I have done a lot of graphics programs, especially on MS-DOG:) becaus -> it lets you talk directly to your video hardware. -> -> I could post you a lot of source code but I don't want my mailbox -> burnt down with *flames*. Instead let me know about any problems you -> are facing with graphics programming. -> -> For now just read as much as you can about direct video ports and -> video memory access methods. One good book is -> -> 'Zen of Graphics Programming - by Michael Abrash' -> -> All the best -> Rajesh -> ... -> * ATP/Linux 1.50 * "640K ought to be enough for anybody." - Bill -> Gates, 1981 -> --- Maximus/2 3.01 -> * Origin: Kalptaru Net India. http://www.kalptaru.com . (6:606/31) I'm new to graphics programming. I don't even really know what a pallette is. I was just wondering if you could upload some code to the board and I could download it later. --- WILDMAIL!/WC v4.10 * Origin: The Mystic Tower BBS Santee, CA (619) 596-0271 (1:202/330.0) --------------- FIDO MESSAGE AREA==> TOPIC: 203 C++ Ref: ECG00002 Date: 08/11/97 From: JERRY VINOKUROV Time: 12:52pm \/To: ANDERS JOHANSSON (Read 3 times) Subj: Programming -> JV> Is anyone out there a game programmer, or a graphics -> JV> programmer? If so, would you let me see some source code -> JV> 'cause I'm learning how to write games and I could sure use -> JV> some help when it comes to graphics manipulation and all that -> JV> good stuff. -> -> Load graphic mode no.13 (320x200x256): -> -> asm mov ax, 13h; -> asm int 10h; -> -> ********************************************************************* -> -> Change the color of one pixel of the screen: -> -> pokeb(0xA000,number,color); -> -> Where "color" is a number 0 to 255 and number is a pixel-number 0 to -> 64000. -> ******************************************************************** -> -> If you can be more specific i can give you some more code-examples. -> -> Good luck with your game-programming! -> -> //Anders -> -> --- -> * Origin: (2:203/512.1> litlle more specific... yeah, I wanted to know how to manipulate sprites and pallettes --- WILDMAIL!/WC v4.10 * Origin: The Mystic Tower BBS Santee, CA (619) 596-0271 (1:202/330.0) --------------- FIDO MESSAGE AREA==> TOPIC: 203 C++ Ref: ECG00003 Date: 08/09/97 From: MATHIEU BOUCHARD Time: 09:28pm \/To: ALAN LO (Read 3 times) Subj: linux and C++ AL> Well, I've decided to upgrade to Linux. I was just wondering, how AL> would AL> programming change under Linux? What are the big differences that could AL> confuse me into trying to take my mouse hostige until my programme AL> decides AL> to work? thanx in adv never use 'void' as the return type of 'main'. use -style code to read directories, not findfirst/findnext. use instead of (this one is a pain.) no environment. you'll have to find your own environment or use shellscripts (batchfiles). makefiles are of much more common use under Unix, for which there never was awkward things such as 'Project files' that are binary-gibberish and uncompatible between compilers. you'll have to use commandline switches to your compiler. no BGI's. :-) try svgalib or xwindows programming. the former is a little broken (security holes, as well as possible screen/keyboard crashes), but has full-screen, mode control, and hardware scrolling, which are important features for me, so i'm likely to write a front-end for socket-like connections, and an which functions would work exactly like (svgalib). But i lack sufficient experience in sockets... matju --- Terminate 4.00/Pro * Origin: The Lost Remains Of SatelliteSoft BBS (1:163/215.42) --------------- FIDO MESSAGE AREA==> TOPIC: 203 C++ Ref: ECG00004 Date: 08/09/97 From: MATHIEU BOUCHARD Time: 09:49pm \/To: KEVIN YOCHUM (Read 3 times) Subj: Conversion of pointer KY> This was taken out of context. It made a lot more sense in the KY> original post, however... KY>> void test( int i ) KY>> { KY>> i=5; KY>> return; KY>> } KY>> You're not getting a pointer back, CD>> You aren't getting anything back!! KY> Sure you are! You're getting the modified value of i. In the above, KY> i would be an "in/out" parameter. void test (int& i) { i=5; return; } /* C++: call is test(blah); */ and void test (int* i) { *i=5; return; } /* C: call is test(&blah); */ these two get the modified value of i. The above one doesn't. parameter passing in C is one-way, "by value", by passing only copies, not the original. matju --- Terminate 4.00/Pro * Origin: The Lost Remains Of SatelliteSoft BBS (1:163/215.42) --------------- FIDO MESSAGE AREA==> TOPIC: 203 C++ Ref: ECG00005 Date: 08/09/97 From: MATHIEU BOUCHARD Time: 09:59pm \/To: VIKTOR OSADCHUK (Read 3 times) Subj: RE: Reset VO> mov ax,1234h VO> mov di,0472h VO> mov es:di,ax /* Error: Memory reference expected */ VO> int 19h VO> Borland C++ 3.01. Error : Memory reference expected !!! Why ?! try mov es:[di],ax... or rewrite as: mov es:[0472h],1234h int 19h which is more concise. --- Terminate 4.00/Pro * Origin: The Lost Remains Of SatelliteSoft BBS (1:163/215.42)