Search found 16 matches

by Donutslayer7
Sun Aug 15, 2010 4:58 pm
Forum: Programming Discussion
Topic: Fstream + Enum's
Replies: 2
Views: 455

Re: Fstream + Enum's

Okay, thanks
by Donutslayer7
Sun Aug 15, 2010 4:07 pm
Forum: Programming Discussion
Topic: Fstream + Enum's
Replies: 2
Views: 455

Fstream + Enum's

Can you read in a word from a file with Fstream, but instead of it being read as a string, it's read as the number of an enumeration(if that made any sense). //somewhere in main.cpp enum Colors { red, blue, green }; Colors myColor; char[20] skip; void read_file() { myFile << skip; myFile << myColor;...
by Donutslayer7
Wed Jul 07, 2010 5:01 pm
Forum: Programming Discussion
Topic: just a quick, basic question about SDL
Replies: 3
Views: 401

just a quick, basic question about SDL

I just starting shifting from Allegro to SDL, and I know you can use the SDL_ttf lib to print true type fonts to the screen, but does SDL have any functions to render text natively, I mean without the extra libs? :|
by Donutslayer7
Sun Mar 21, 2010 8:07 pm
Forum: Programming Discussion
Topic: reading in maps
Replies: 4
Views: 421

Re: reading in maps

Ah, I've seen the tag type structure used in the Source engine, all the tags were inside of scripts, and I kind of understand the code, but I'm not very familiar with the eof function(it looks very useful though). I guess I'll have to look more into fstream or some scripting language and look back a...
by Donutslayer7
Sat Mar 20, 2010 11:32 pm
Forum: Programming Discussion
Topic: reading in maps
Replies: 4
Views: 421

reading in maps

Can you use fstream to read values into a 2D array? I have one tile array and one object array, and want to have my map values saved in text(or binary) files external to the application, then read them into the tile and object array when you reach a point on the current map. :| On a different train ...
by Donutslayer7
Fri Mar 05, 2010 11:49 pm
Forum: Programming Discussion
Topic: [SOLVED]file input/output
Replies: 8
Views: 553

Re: file input/output

Ah, that make perfect sense, using namespace std exactly as if you were using it for iostream. Thanks, the files are loading now. :)
by Donutslayer7
Fri Mar 05, 2010 10:57 pm
Forum: Programming Discussion
Topic: [SOLVED]file input/output
Replies: 8
Views: 553

Re: file input/output

alright, here's a snippet of some of my old code: #include <allegro.h> #include <fstream> BITMAP *buffer; BITMAP *bax; BITMAP *tile; BITMAP *start; BITMAP *character; ofstream data;//ofstream doesn't work int mode(0); int tilesize = 30; int y = 14 *tilesize; int x = 1 * tilesize; int xtile, ytile, x...
by Donutslayer7
Fri Mar 05, 2010 5:26 pm
Forum: Programming Discussion
Topic: [SOLVED]file input/output
Replies: 8
Views: 553

Re: file input/output

yeah, that's the strange thing, when I don't include my graphics lib, Fstream includes fine
by Donutslayer7
Fri Mar 05, 2010 5:18 pm
Forum: Programming Discussion
Topic: [SOLVED]file input/output
Replies: 8
Views: 553

[SOLVED]file input/output

Hey, I've been using a graphics API called Allegro(which I'm sure we've all heard of). I hear it's pretty old, but now I want to use some file i/o(for map loading, save files, etc) and I'm not sure if I can run some useful libraries like Fstream alongside Allegro(I'll try to include fstream, but it ...
by Donutslayer7
Sun Feb 28, 2010 12:04 am
Forum: Programming Discussion
Topic: [SOLVED]2D array assignment(C++)
Replies: 8
Views: 601

Re: 2D array assignment(C++)

ah, copying a previous array, great idea, thanks, I'll look into this memset function
by Donutslayer7
Sat Feb 27, 2010 1:27 pm
Forum: Programming Discussion
Topic: [SOLVED]2D array assignment(C++)
Replies: 8
Views: 601

[SOLVED]2D array assignment(C++)

A pretty basic question, I know: when I declare a 2D array... int map[5][5] = { {0,0,0,0,0}, {0,0,0,0,0}, {0,0,0,0,0}, {0,0,0,0,0}, {0,0,0,0,0} } the code is fine, when I assign part of an array... map[3][2] = 1; but I want to know if there is a way I can assign all of an arrays values at once much ...
by Donutslayer7
Thu Aug 27, 2009 8:24 pm
Forum: Game Development
Topic: Style of gameplay
Replies: 6
Views: 1030

Re: Style of gameplay

Fair enough, fair enough, what you say is true.
by Donutslayer7
Wed Aug 26, 2009 11:43 pm
Forum: Game Development
Topic: Style of gameplay
Replies: 6
Views: 1030

Re: Style of gameplay

okay, I get the picture, maybe I'm thinking of something else, but...
wearymemory wrote:I'm not going to use your engine if you don't make it versatile. Gosh.
...and you expect to use my engine...honestly?
by Donutslayer7
Wed Aug 26, 2009 8:11 pm
Forum: Game Development
Topic: Style of gameplay
Replies: 6
Views: 1030

Style of gameplay

Which do you prefer:
overview, side-scrolling, tactics/SRPG(grid-based), scrolling overview, first person?

I'm making an engine for overview style of gameplay and not sure if I want to implement scrolling, so I want to hear your opinions
by Donutslayer7
Wed Aug 19, 2009 12:09 am
Forum: Game Development
Topic: tiles and objects and such
Replies: 2
Views: 616

Re: tiles and objects and such

ah, I got how you did it, thanks =]