Click here to Skip to main content
15,885,216 members
Articles / Mobile Apps

Nerdkill game for PocketPC

Rate me:
Please Sign up or sign in to vote.
4.46/5 (29 votes)
28 Jun 2004CPOL13 min read 101.7K   1.2K   35  
A shoot'em up platform in C# for the .NET Compact Framework.
//*******************************************************************
/*

	Solution:	NerdkillPocket
	Project:	NerdkillPocket
	File:		RSprite.cs

	Copyright 2003, 2004, Raphael MOLL.

	This file is part of NerdkillPocket.

	NerdkillPocket is free software; you can redistribute it and/or modify
	it under the terms of the GNU General Public License as published by
	the Free Software Foundation; either version 2 of the License, or
	(at your option) any later version.

	NerdkillPocket is distributed in the hope that it will be useful,
	but WITHOUT ANY WARRANTY; without even the implied warranty of
	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
	GNU General Public License for more details.

	You should have received a copy of the GNU General Public License
	along with NerdkillPocket; if not, write to the Free Software
	Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

*/
//*******************************************************************


using System;
using System.Drawing;

//******************************
namespace Alfray.Nerdkill.Engine
{
	//*************************
	public sealed class RSprite
	{
		//-------------------------------------------
		//----------- Public Constants --------------
		//-------------------------------------------


		//-------------------------------------------
		//----------- Public Properties -------------
		//-------------------------------------------


		//***************************
		public RConstants.SpriteId Id
		{
			get
			{
				return mId;
			}
		}


		//**************
		public Size Size
		{
			get
			{
				return mSize;
			}
		}


		//*****************
		public Point Origin
		{
			get
			{
				return mOrigin;
			}
		}


		//***********************
		public bool IsTransparent
		{
			get
			{
				return mIsTransparent;
			}
		}


		//**********************
		public Object SpriteData
		{
			get
			{
				return mSpriteData;
			}
		}


		//-------------------------------------------
		//----------- Public Methods ----------------
		//-------------------------------------------

		
		//******************************************************************************
		public RSprite(RConstants.SpriteId id, Size size, bool transparent, Object data)
		{
			Set(id, new Point(0,0), size, transparent, data);
		}

		
		//********************************************************************************************
		public RSprite(RConstants.SpriteId id, Point origin, Size size, bool transparent, Object data)
		{
			Set(id, origin, size, transparent, data);
		}


		//*********************************************************************************************
		public void Set(RConstants.SpriteId id, Point origin, Size size, bool transparent, Object data)
		{
			mId = id;
			mOrigin = origin;
			mSize = size;
			mIsTransparent = transparent;
			mSpriteData = data;
		}


		//-------------------------------------------
		//----------- Private Methods ---------------
		//-------------------------------------------


		//-------------------------------------------
		//----------- Private Attributes ------------
		//-------------------------------------------

		private RConstants.SpriteId		mId;
		private Size					mSize;
		private Point					mOrigin;
		private Object					mSpriteData;
		private bool					mIsTransparent;

	} // class RSprite
} // namespace Alfray.Nerdkill.Engine


//---------------------------------------------------------------
//
//	$Log: RSprite.cs,v $
//	Revision 1.1.1.1  2004/05/24 14:21:57  ralf
//	Stable port to PockerPC/.Net Compact Framework.
//	Uses .Net/GDI+ for graghic. Uses WinCE's SoundPlay for sound.
//	
//---------------------------------------------------------------

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Web Developer
United States United States
Raphael is a senior software engineer with a background in electronics engineering.
He enjoys programming in C++ since 1994.
He developed professional software for the BeOS and now focuses on Windows, MacOS and Linux software development.
He uses C++, C#, Java,VB.Net, PHP, Bash and Perl on a regular basis. He is familiar with C, Objective-C, VB6, Python, ML, Haskell, Lisp, Scheme, some obsolete languages (Basic and Pascal) and x86/Motorola assembly languages.
Raphael is a big fan of the .Net platform.
A number of open source personal projects can be found on his web site.

Comments and Discussions