I fixed it. It semms i wasn't initializeing certain objects.
Type: Posts; User: Blizzarddog
I fixed it. It semms i wasn't initializeing certain objects.
if ( SDL_Init(SDL_INIT_AUDIO|SDL_INIT_VIDEO) < 0 )
{
printf("Unable to init SDL: %s\n", SDL_GetError());
exit(1);
}
atexit(SDL_Quit);...
Okay, I traced it away from the csprite and that particular function. Since it no longer has to do with this subject, Ill make a new thread.
Update: Anything done with the x and y values after teh cout << x << y line segfaults it, including
drawString(screen, font, 0, 0, "X: %d, Y: %d", x, y);
I don't think it likes me.
I...
if (map->used[i][a] == 1)
{
cout << "Used tile!\n";
int x = (i * tile_width) - CamOffX;
int y = (a * tile_height) - CamOffY;
map->tile[i][a].set(x, y);
cout...
I did, the foo function was in the main source file, and I removed all other remmanants of the old program. Still got the same result. I think CodeForge may have a bug, but then, it's not the program...
Ah this program just went Foo-bar. Absolutely will not work. I madea new function,
void foo()
{
cout << "foo";
}
Just once. "Redefined here" on it. First function. Which is BS. C++...
Yea I know about the typedef being useless... habit from my Atari ST days.
I'm using namespace std in all other files.. I'm amazed that I forgot it in this one... lol.
Well, that got rid of...
Also check your spelling. I noticed a "conect" command, later used as "connect". I can't really do socket prorgamming myself, but I can still spot a typo in it. I'm assuming that most of your errors...
#ifndef CLASS_H_
#define CLASS_H_
#include <string>
#include "stat.h"
typedef struct
{
string name;
Stat_Set stats;
string desc;
1) planetsourcecode.com
2) cprogramming.com
3) dimensionalrift.tk/ (these guys give you person to person lessons)
Just for the record, what exactly is it supposed to be? (I might have forggoten to mention this, but I'm helping a friend out, and I know nothing about Win32 programming)
DialogBox(GetModuleHandle(NULL), MAKEINTRESOURCE(IDD_ABOUT), hwnd, AboutDlgProc);
when i compile i only get this error:
87 ...\Main.cpp `AboutDlgProc' undeclared (first use this function)
...
I am trying to compile something in OGL, but I get these errors:
c:\program files\microsoft visual studio\vc98\include\gl\gl.h(1152) : error C2144: syntax error : missing ';' before type 'void'...
I have everything working now except for the word frequencies. it says 0 for every word. the wrods.size() worked fine, and I fixed it all by making ToLower a gloabal function, that link just got me...
Here are my errors:
/usr/include/c++/3.3.2/bits/stl_algo.h: In function `_OutputIter std::transform(_InputIter, _InputIter, _OutputIter, _UnaryOperation) [with _InputIter =...
When i made my Space Shooter, i have the user set how many FPS he wants, then leave it all to SDL_Delay(TIMER);
How that worked is i'd wait for a set amount of milliseconds, and I could limit it...
Okay, I didn't really understand any of that... but i'll keep studying it!
This may seems a little noob of me (and can you believe I've been programming for almost 5 years now??) but what is texture quad? And also, how do i rotate one?
You COULD use a vector array of word and "puchback" tehm into the array, then map them out. That is how I believe chatterbots do it, and it allows for wordlist[i] to be used and all that.
I like SDL. Allegro is such a pin to set up. I also find SDL much easier to understand (as opposed to allegro's weaird transparency/screen slcearing methods that I never quite understood...)
Also,...
If you go via SDL, cone3d.gamedev.net has some realy good tutorials.
I've tried OGL, but failed miserably, 6 times... yea.. i know, thats pitiful...
Anyway, If you get abook for SDL, I suggest...
I know this is kinda on the side, but heres what I use when I do that.
#include <iostream>
#include <fstream>
#include <unistd.h>
using namespace std;
int main()
I know this is kinda on the side, but heres what I use when I do that.
[code]
#include <iostream>
#include <fstream>
using namespace std;
int main()
{
I spend lot of time making classes to use with FMOD, so that it's as easy as:
CSound s1;
s1.init("song.mp3", SAMPLE, LOOP_ON);
s1.play();
If you'rte interested, I could whip one up for...