389 Posted Topics
I have a really wierd problem using OpenGL. I've verified all my code passes the correct mesh, correct texture, to the correct shader. When I use the same texture with multiple instances of the same mesh and the same shader located at different locations on the screen it shows up … | |
Re: This posting is similar to one posted a day or two ago related to a 4x4 Bingo. My recommendations are the same to you! You are doing a 3x3, so use a bit array! [CODE] 0 1 2 0x001 0x002 0x004 3 4 5 so 0x008 0x010 0x020 6 7 … | |
Re: Are you preserving ebx, esi, edi ? These three registers are to be protected in function calls. Your two code snippets do load the same value from memory though! In Win32 The Stack Selector SS:, Data Selector DS: and Extra Selector ES: are typically set the same from the application … | |
Re: What CSurfer said! You do need to assign Monday to the value of zero. ENUM specification doesn't specify zero or one for the first enum, and it becomes the call of the compiler manufacturer. So as insurance always assign the first one as zero if being used as math! BTW … | |
Re: Ahem, 350 is divisable by 7 with no remainder. 360 is not! ![]() | |
Re: bValidLoop is never set to false so your bean placement is only tried once! Use else if's and use an else where you set the bValidLoop to false to try again. I'm assuming this is more like Magic square not bingo as there aren't 75 balls (5 columns 15 balls … | |
Re: Would have been nice if you had posted the file open function with the properties you used! | |
Re: You aren't copying a string, merely a single character, so use the following... a.insert(a.length(), 1, a[0] ); // error line ...to append the character! | |
Re: Everything you need to know should have been taught in class already. You mention 16-bit count, thus it has the implication that it this is older 16-bit code. 1) Work the DOS interrupt 21h to open a file, read byte by byte, then close the file. 2) Add compares looking … | |
Re: Install an older DirectX SDK. Rev. 7 or 8 should do nicely. Direct Draw was still supported then. Plenty of samples get shipped with them. Also watch your version of Visual Studio. There are incompatibilities between SDK's and releases of Visual Studio. Microsoft apparently wants everyone to use the latest … | |
Re: You'r entering goals as strings but you aren't comparing the integer values of those strings. | |
Re: One step at a time. Build your RNG and write the ASCII strings to your text file. Once that works, Then load them one at a time. then finally organizing, and resave to files. | |
Re: There are several problems but first of all your source strings are how long? And you're stuffing them into a buffer how long? 5 + 1 chars in 4 char buffer. What about the last character and the terminator? Do you mean to intentioning destroying the 1st digt of the … | |
Re: double *a,*b,*c,*d,*Fc,*Fd,I; They're all pointers, so to get the contents of a pointer float f = *a; F_Ite( *a, *b, *c, *d, *Fc, *Fd ); | |
Re: Easy, arrays are 0 based. average = (score[0] + score[1] + score[2] + score[3] + score[4])/5; | |
Re: The slot determination is easy, below range, range, over range. [CODE] int counter[ 9 ]; i = counter[ n ] ; is the value so... int *pCnt = &counter[ n ]; Gives you a pointer to the integer located at cell [n]. Or try this. int *pCnt = counter; while( … | |
Re: I'm not exactly sure what you're asking for as in reference to static vs dynamic hop, but in your assembly you don't need the compare instruction as the and operation will result in the zero flag set! You only show the code snippet but you can combine your code even … | |
Re: AVI is a file architecture that has codec plug-ins. Just because a file is an AVI does not mean that it will decode on your computer. You also have to have the codec that the media file was compressed with! | |
Re: Windows use code pages as a default. DOS used be 437 but its typically 850. These are full character sets. Linux as far as I know still use 7-bit ASCII not 8-bit! | |
Re: If you're referring to Win32. Direct Sound Windows Multimedia both do it for PCM waves. | |
Re: Stick this into all header files you create ever! Note THISFILE_H should be a unique name such as the file's name. [CODE] #ifndef __THISFILE_H #define __THISFILE_H #ifdef __cplusplus extern "C" { #endif // Insert your H definitions here #ifdef __cplusplus }; #endif #endif // __THISFILE_H [/CODE] | |
Re: You can open and close one file for each name in the list sequentially, but not simultaneously. There is a limit as to how many file handles you have open! It is unclear to me what the function really is. Are you merely validating the name in the list exists … | |
Re: I'm surprized at how much game code I see has weak RNG source code. The first rule of RNG is that you need a true random stream of bits as source data. This stream must at the very least pass the FIPS 140-1 testing, Marsaglia Die-Hard test, and th Berlekamp-Massey … | |
Re: (ignore this response, accidental post) | |
Re: hint: One function and use multiple times for double reverse. Reverse entire string. Parse whitespace, mark 1st and last character per word, then reverse that data, skip whitespace repeat! have fun! | |
Re: Each nesting has to be self contained. It should pass (fall out) of the nesting with an error. bool DoMyTask( .... ) { ... if (!DoMyTask( ... )) return false; .... return true; } | |
Re: #include <crtdbg.h> // Add this to the termination code! #ifndef NDEBUG _CrtDumpMemoryLeaks( ); #endif | |
Re: Your first problem is mismatched data. Your forcing signed into unsigned as well as reducing the bits, therefore contaminating your data! int arr[] but assigning it to an unsigned char a = arr[i]; should be #defne MAX_ARR 10 unsigned char arr[ MAX_ARR ]; | |
Re: Based upon your post, may I suggest you start with something similar out of a book such as the "Hello World" program! [code=c] #include <file.h> void create_project_go() { FILE *fp; // Open an existing text file for reading! fp = fopen( "/usr//lib/htmlexamples//default.html", "rt"); if (NULL != fp) { fclose(fp); } … | |
Re: Pretty straight forward. Without giving you the answer, her is a leg up! Don't forget index can also contain a general purpose register offset. Also, you can use di as a general purpose counter and free up cx for offset tracking. So scan forward with something like xor dx,dx PreScan: … | |
Re: There's no need to call the unicode mapping by calling CreateFile and having to go through the conversion. Instead call CreateFileA( ) for the ANSI version. Also use INVALID_HANDLE_VALUE for the return value check! You can also gointo the project settings and turn off UNICODE and set to Single Byte … | |
Re: There is no integer modulo instruction so one method to calculate a modulo is y = F( a mod c ) ------- d = a / c y = a - (c * d) ------- if ( a < c ) then d = 0 y = a - (c … | |
Re: First of all, get those #includes out of inside those #ifndef's Your problem is your C file includes the opponent.h file first, which in turn includes player, before the opponent class is even defined. As a work around include class opponent; Above the class player declaration. This is typically used … | |
Re: Without delving in you have several problems. first #define MAX_CAR 100 Then Carlist[ MAX_CAR ] Also you need an overurn check on your data entry! no more then MAX_CAR's entered. Also your Total function should be exclusive of the number of entered cars (il) not inclusive! Meaning don't use (i … | |
Re: This is merely an overview, but with only 25% I'm assuming you're using single threaded code on a quad core machine? You'll need to spawn worker threads and use semaphore mechanisms to keep them apart when accessing the master number pool. They should carve up the pool into Processors x … | |
Re: I believe you still have a problem with the math? Circumference = 2 .0 * PI * Radius; Area = PI * Radius * Radius; To borrow a very old math joke, "Pie aren't square, Pie are Round!" | |
Re: Not to over simplify it, the various combinations of multiple processors, dual core, quad core, etc. are essentially additional processors in your system. Unless you are a kernel developer you really don't have access to the supervisor instructions, so for your purposes they are several multimedia instruction set (SIMD) Single … | |
Re: I'm a tad rusty, but your first your instruction should have been... You're pushing the contents of memory addressed by esi, not trying to push a 32-bit register onto a 64-bit MMX register. So now you need to use a byte oriented addition instruction. movq mm0, [esi] ; Move quadword … |
The End.