C Board  

Go Back   C Board > General Programming Boards > C++ Programming

Reply
 
LinkBack Thread Tools Display Modes
Old 01-03-2005, 03:11 PM   #1
C/C++
 
homeyg's Avatar
 
Join Date: Nov 2004
Location: Louisiana, USA
Posts: 209
Image displaying

I need to learn a way, using a bitmap, to display an array of tiles (for a map) as colored squares. What is the easiest way this can be done and how can it be done?
homeyg is offline   Reply With Quote
Old 01-03-2005, 03:14 PM   #2
Sweet
 
Join Date: Aug 2002
Location: Tucson, Arizona
Posts: 1,698
Well your going to need to use a graphics libary, I myself am a big fan of allegro.
__________________
Woop?
prog-bman is offline   Reply With Quote
Old 01-03-2005, 03:16 PM   #3
C/C++
 
homeyg's Avatar
 
Join Date: Nov 2004
Location: Louisiana, USA
Posts: 209
Is there anything I need to install to use a graphics library?
homeyg is offline   Reply With Quote
Old 01-03-2005, 03:19 PM   #4
Sweet
 
Join Date: Aug 2002
Location: Tucson, Arizona
Posts: 1,698
Yes you are going to need to install the headers and lib files for a library. This depends on your compiler.
__________________
Woop?
prog-bman is offline   Reply With Quote
Old 01-03-2005, 03:28 PM   #5
C/C++
 
homeyg's Avatar
 
Join Date: Nov 2004
Location: Louisiana, USA
Posts: 209
My compiler is Dev-C++.
homeyg is offline   Reply With Quote
Old 01-03-2005, 03:32 PM   #6
Registered User
 
Frobozz's Avatar
 
Join Date: Dec 2002
Posts: 546
Check to see if your version of Dev-C++ has an update feature. It might be under help or tools. I know with the current version it not only lists updates put development packs as well. One of them should be Allegro.
Frobozz is offline   Reply With Quote
Old 01-03-2005, 04:38 PM   #7
Sweet
 
Join Date: Aug 2002
Location: Tucson, Arizona
Posts: 1,698
Allegro For Dev:
http://devpaks.org/show.php?devpak=2

Tutorial:
http://www.loomsoft.net/resources/al...ltut_index.htm

Good Resource
http://www.allegro.cc
__________________
Woop?
prog-bman is offline   Reply With Quote
Old 01-03-2005, 04:39 PM   #8
C/C++
 
homeyg's Avatar
 
Join Date: Nov 2004
Location: Louisiana, USA
Posts: 209
Alright, I downloaded and installed the Allegro Dev-pack. Should that be it before I can use it?
homeyg is offline   Reply With Quote
Old 01-03-2005, 04:48 PM   #9
Sweet
 
Join Date: Aug 2002
Location: Tucson, Arizona
Posts: 1,698
Everything should work fine start a new project. It will in multimedia
__________________
Woop?
prog-bman is offline   Reply With Quote
Old 01-03-2005, 04:53 PM   #10
C/C++
 
homeyg's Avatar
 
Join Date: Nov 2004
Location: Louisiana, USA
Posts: 209
Thanks.
homeyg is offline   Reply With Quote
Old 01-03-2005, 05:07 PM   #11
C/C++
 
homeyg's Avatar
 
Join Date: Nov 2004
Location: Louisiana, USA
Posts: 209
I'm getting some error messages when I try to compile the program in the first tutorial: It's not telling me that the file <allegro.h> is undefined but it is telling me that there are undefined references to all of the functions in the tutorial. They are all classified as linker errors.
homeyg is offline   Reply With Quote
Old 01-03-2005, 05:10 PM   #12
Slave
 
MadCow257's Avatar
 
Join Date: Jan 2005
Posts: 735
A random guess is that you aren't including all of the libs in project settings, the specific errors would help
MadCow257 is offline   Reply With Quote
Old 01-03-2005, 05:12 PM   #13
C/C++
 
homeyg's Avatar
 
Join Date: Nov 2004
Location: Louisiana, USA
Posts: 209
Actually, scratch that. I did what prog-bman said about the projects and now there is only one error: 'no new line at end of file'. What is that supposed to mean?
homeyg is offline   Reply With Quote
Old 01-03-2005, 05:15 PM   #14
C Programmer
 
Stack Overflow's Avatar
 
Join Date: Apr 2004
Posts: 477
Hello,

This seems to be a continous error. View this previous thread: No newline at end of file


- Stack Overflow
__________________
Segmentation Fault: I am an error in which a running program attempts to access memory not allocated to it and core dumps with a segmentation violation error. This is often caused by improper usage of pointers, attempts to access a non-existent or read-only physical memory address, re-use of memory if freed within the same scope, de-referencing a null pointer, or (in C) inadvertently using a non-pointer variable as a pointer.
Stack Overflow is offline   Reply With Quote
Old 01-03-2005, 05:22 PM   #15
Registered User
 
Frobozz's Avatar
 
Join Date: Dec 2002
Posts: 546
Quote:
Originally Posted by homeyg
Actually, scratch that. I did what prog-bman said about the projects and now there is only one error: 'no new line at end of file'. What is that supposed to mean?
Kind of a silly error and easily fixed. Make sure each of your code files (.c/.cpp and .h) has a blank line at the bottom.
Frobozz is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem reading tiff image files? compz C++ Programming 9 10-30-2009 04:17 AM
Loading & displaying an image csonx_p Windows Programming 1 06-19-2008 06:40 AM
Displaying an Image evanman C++ Programming 3 07-07-2006 01:04 PM
Button Displaying Image mrafcho001 Windows Programming 4 12-03-2005 02:14 PM
Displaying a PNG image grep Windows Programming 5 07-07-2005 08:27 PM


All times are GMT -6. The time now is 10:42 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22