19:41
09 Sep 2010

News

Latest Updates
Recent Comments
Most Popular Downloads

Projects

Blob Wars : Blob And Conquer
Blob Wars : Metal Blob Solid
JGameLaunch
The Legend of Edgar
Project: Starfighter
Random Name Generator
Random Shooter
TANX Squadron
Virus Killer
XMAME GUI

Older Files

List of Older Downloads

Medals

Main & Signup
Recently Awarded
Player List

Games
Blob Wars : Metal Blob Solid
Legend of Edgar
Virus Killer

Online Manuals

Blob Wars : Blob And Conquer
Blob Wars : Metal Blob Solid
Project: Starfighter
The Legend of Edgar
Virus Killer

LBP Beta Code!

Beta Code Giveaway!

Game Tutorials

Overview and Comments

Basic Series
1.01 - Opening a Window
1.02 - Graphics
1.03 - Sound
1.04 - Input and Movement
1.05 - Simple Shooter Pt. 1
1.06 - Simple Shooter Pt. 2
1.07 - Simple Shooter Pt. 3
1.08 - Sprites and Animation
1.09 - Starfields
1.10 - A Basic Game

Intermediate Series
2.01 - Displaying a Tile Based Map
2.02 - Scrolling a Tile Based Map
2.03 - A Tile Based Map Editor
2.04 - Tile Based Map Collision Detection
2.05 - Advanced Animation

Articles

Making of TANX Squadron
Making of Starfighter
Making of Metal Blob Solid
Making of Blob And Conquer

Blob Wars Review #1
Blob Wars Review #2
Blob Wars Review #3

Blob And Conquer Review #1

Interview with Stephen J Sweeney

Gallery

3D Renders

Help and FAQs

Installation and Licensing Help

About

Contact Information

THE HONOUR OF THE KNIGHTS
The new Creative Commons Licensed
novel from Stephen J Sweeney

Visit the official website,
www.battleforthesolarsystem.com
to start reading online!

Buy Now! from Amazon.co.uk

Buy Now! from Book Depository

 Comments for SDL Tutorial 2 (1)

happyMax
December 9th, 2009 at 15:20

I'm afraid you don't really need to assign width/height parameters to the "dest" SDL_Rect, in function "drawImage" (only position is used). According to
http://sdl.beuc.net/sdl.wiki/SDL_BlitSurface

"Only the position is used in the dstrect (the width and height are ignored). Blits with negative dstrect coordinates will be clipped properly. "
Here "dstrect" means the fourth parameter of function SDL_BlitSurface (the SDL_Rect).
I tried recompiling it with the
dest.w = image->w;
dest.h = image->h;
part commented out and works fine.

Great tutorial!

 
Name
Homepage
Email
Comments
-- Homepage must start with http://
-- Javascript and Cookies must be enabled to use this form
 

2,006,374 pages served

Copyright © 1996 - 2010 Parallel Realities :: About :: License