Changeset 2118 for 2011/23


Ignore:
Timestamp:
2011-06-17 17:31:24 (12 years ago)
Author:
sijoseha
Message:

Some modifications. Nothing is really happening yet.

Location:
2011/23/sijoseha
Files:
9 added
28 edited

Legend:

Unmodified
Added
Removed
  • 2011/23/sijoseha/Fera Proelia/Fera Proelia/Fera Proelia/Fera Proelia.csproj

    r2079 r2118  
    8787  <ItemGroup> 
    8888    <Compile Include="Beast.cs" /> 
     89    <Compile Include="GameScreen.cs" /> 
     90    <Compile Include="HUD.cs" /> 
    8991    <Compile Include="Properties\AssemblyInfo.cs" /> 
    9092    <None Include="Properties\AppManifest.xml"> 
  • 2011/23/sijoseha/Fera Proelia/Fera Proelia/Fera Proelia/obj/Windows Phone/Debug/XapCacheFile.xml

    r2079 r2118  
    1 <xapCache source="D:\Temp\sijoseha\Fera Proelia\Fera Proelia\Fera Proelia\bin\Windows Phone\Debug\Fera Proelia.xap" wasSigned="False" certificateThumbprint="" TimeStampUrl="" lastWriteTime="16.6.2011 23:15:54"> 
    2   <file source="D:\Temp\sijoseha\Fera Proelia\Fera Proelia\Fera Proelia\Background.png" archivePath="Background.png" lastWriteTime="16.6.2011 22:26:33" /> 
    3   <file source="D:\Temp\sijoseha\Fera Proelia\Fera Proelia\Fera Proelia\GameThumbnail.png" archivePath="GameThumbnail.png" lastWriteTime="16.6.2011 22:26:33" /> 
    4   <file source="D:\Temp\sijoseha\Fera Proelia\Fera Proelia\Fera Proelia\bin\Windows Phone\Debug\AppManifest.xaml" archivePath="AppManifest.xaml" lastWriteTime="16.6.2011 22:27:26" /> 
    5   <file source="D:\Temp\sijoseha\Fera Proelia\Fera Proelia\Fera Proelia\obj\Windows Phone\Debug\WMAppManifest.xml" archivePath="WMAppManifest.xml" lastWriteTime="16.6.2011 22:27:26" /> 
    6   <file source="D:\Temp\sijoseha\Fera Proelia\Fera Proelia\Fera Proelia\bin\Windows Phone\Debug\Fera Proelia.dll" archivePath="Fera Proelia.dll" lastWriteTime="16.6.2011 23:15:54" /> 
    7   <file source="D:\Temp\sijoseha\Fera Proelia\Fera Proelia\Fera Proelia\bin\Windows Phone\Debug\Content\debugImage.xnb" archivePath="Content\debugImage.xnb" lastWriteTime="16.6.2011 22:42:25" /> 
     1<xapCache source="D:\Temp\sijoseha\Fera Proelia\Fera Proelia\Fera Proelia\bin\Windows Phone\Debug\Fera Proelia.xap" wasSigned="False" certificateThumbprint="" TimeStampUrl="" lastWriteTime="17.6.2011 9:42:42"> 
     2  <file source="D:\Temp\sijoseha\Fera Proelia\Fera Proelia\Fera Proelia\Background.png" archivePath="Background.png" lastWriteTime="17.6.2011 8:19:55" /> 
     3  <file source="D:\Temp\sijoseha\Fera Proelia\Fera Proelia\Fera Proelia\GameThumbnail.png" archivePath="GameThumbnail.png" lastWriteTime="17.6.2011 8:19:55" /> 
     4  <file source="D:\Temp\sijoseha\Fera Proelia\Fera Proelia\Fera Proelia\bin\Windows Phone\Debug\AppManifest.xaml" archivePath="AppManifest.xaml" lastWriteTime="17.6.2011 9:42:42" /> 
     5  <file source="D:\Temp\sijoseha\Fera Proelia\Fera Proelia\Fera Proelia\obj\Windows Phone\Debug\WMAppManifest.xml" archivePath="WMAppManifest.xml" lastWriteTime="17.6.2011 8:19:55" /> 
     6  <file source="D:\Temp\sijoseha\Fera Proelia\Fera Proelia\Fera Proelia\bin\Windows Phone\Debug\Fera Proelia.dll" archivePath="Fera Proelia.dll" lastWriteTime="17.6.2011 9:42:41" /> 
     7  <file source="D:\Temp\sijoseha\Fera Proelia\Fera Proelia\Fera Proelia\bin\Windows Phone\Debug\Content\debugImage.xnb" archivePath="Content\debugImage.xnb" lastWriteTime="17.6.2011 8:26:01" /> 
    88</xapCache> 
  • 2011/23/sijoseha/Fera Proelia/Fera Proelia/Fera ProeliaContent/obj/Windows Phone/Debug/ContentPipeline.xml

    r2079 r2118  
    99      <Options>None</Options> 
    1010      <Output>D:\Temp\sijoseha\Fera Proelia\Fera Proelia\Fera Proelia\bin\Windows Phone\Debug\Content\debugImage.xnb</Output> 
    11       <Time>2011-06-16T22:37:48.8337831+03:00</Time> 
     11      <Time>2011-06-17T08:19:54.7030248+03:00</Time> 
    1212    </Item> 
    1313    <BuildSuccessful>true</BuildSuccessful> 
     
    2525      <Assembly> 
    2626        <Key>C:\Program Files (x86)\Microsoft XNA\XNA Game Studio\v4.0\References\Windows\x86\Microsoft.Xna.Framework.Content.Pipeline.XImporter.dll</Key> 
    27         <Value>2010-08-23T12:41:18+03:00</Value> 
     27        <Value>2010-08-23T13:41:18+03:00</Value> 
    2828      </Assembly> 
    2929      <Assembly> 
    3030        <Key>C:\Program Files (x86)\Microsoft XNA\XNA Game Studio\v4.0\References\Windows\x86\Microsoft.Xna.Framework.Content.Pipeline.VideoImporters.dll</Key> 
    31         <Value>2010-08-23T12:41:18+03:00</Value> 
     31        <Value>2010-08-23T13:41:18+03:00</Value> 
    3232      </Assembly> 
    3333      <Assembly> 
    3434        <Key>C:\Program Files (x86)\Microsoft XNA\XNA Game Studio\v4.0\References\Windows\x86\Microsoft.Xna.Framework.Content.Pipeline.TextureImporter.dll</Key> 
    35         <Value>2010-08-23T12:41:18+03:00</Value> 
     35        <Value>2010-08-23T13:41:18+03:00</Value> 
    3636      </Assembly> 
    3737      <Assembly> 
    3838        <Key>C:\Program Files (x86)\Microsoft XNA\XNA Game Studio\v4.0\References\Windows\x86\Microsoft.Xna.Framework.Content.Pipeline.FBXImporter.dll</Key> 
    39         <Value>2010-08-23T12:41:18+03:00</Value> 
     39        <Value>2010-08-23T13:41:18+03:00</Value> 
    4040      </Assembly> 
    4141      <Assembly> 
    4242        <Key>C:\Program Files (x86)\Microsoft XNA\XNA Game Studio\v4.0\References\Windows\x86\Microsoft.Xna.Framework.Content.Pipeline.EffectImporter.dll</Key> 
    43         <Value>2010-08-23T12:41:18+03:00</Value> 
     43        <Value>2010-08-23T13:41:18+03:00</Value> 
    4444      </Assembly> 
    4545      <Assembly> 
    4646        <Key>C:\Program Files (x86)\Microsoft XNA\XNA Game Studio\v4.0\References\Windows\x86\Microsoft.Xna.Framework.Content.Pipeline.AudioImporters.dll</Key> 
    47         <Value>2010-08-23T12:41:18+03:00</Value> 
     47        <Value>2010-08-23T13:41:18+03:00</Value> 
    4848      </Assembly> 
    4949      <Assembly> 
    5050        <Key>C:\Windows\Microsoft.Net\assembly\GAC_32\Microsoft.Xna.Framework.Content.Pipeline\v4.0_4.0.0.0__842cf8be1de50553\Microsoft.Xna.Framework.Content.Pipeline.dll</Key> 
    51         <Value>2010-10-04T19:11:18.5288743+03:00</Value> 
     51        <Value>2011-01-07T11:35:54.8184098+02:00</Value> 
    5252      </Assembly> 
    5353    </Assemblies> 
  • 2011/23/sijoseha/SpaceWorld/SpaceWorld/SpaceWorld/Game1.cs

    r2044 r2118  
    1515    /// This is the main type for your game 
    1616    /// </summary> 
    17     public class Game1 : Microsoft.Xna.Framework.Game 
     17    public class SpaceWorld : Microsoft.Xna.Framework.Game 
    1818    { 
    1919        GraphicsDeviceManager graphics; 
     
    2222 
    2323        List<WorldPoint> points; 
     24        Shield shield; 
     25        Texture2D shieldKuva; 
    2426        //WorldPoint point, point2, point3, point4; 
    2527        BasicEffect effect; 
     
    2729        Matrix viewMatrix, projectionMatrix; 
    2830 
    29         public Game1() 
     31        public SpaceWorld() 
    3032        { 
    3133            graphics = new GraphicsDeviceManager(this); 
     
    4143        protected override void Initialize() 
    4244        { 
    43             // TODO: Add your initialization logic here 
    4445            IsMouseVisible = true; 
    4546            base.Initialize(); 
     
    5960 
    6061            points = new List<WorldPoint>(); 
     62            shieldKuva = Content.Load<Texture2D>("shieldImage"); 
     63            shield = new Shield(); 
     64            shield.shieldTexture = shieldKuva; 
     65             
    6166 
    6267            Random r = new Random(); 
     
    7580            //projectionMatrix = Matrix.CreateOrthographic(device.Viewport.Width, device.Viewport.Height, 0.1f, 100); 
    7681            viewMatrix = Matrix.CreateLookAt(new Vector3(0, 0, 20), Vector3.Zero, Vector3.Up); 
     82            /*viewMatrix = Matrix.CreateTranslation(new Vector3(0, 0, 0)) * 
     83                Matrix.CreateScale(1) * 
     84                Matrix.CreateTranslation(new Vector3( 
     85                    device.Viewport.Width * 0.5f, 
     86                    device.Viewport.Height * 0.5f, 
     87                    0));*/ 
    7788            // TODO: use this.Content to load your game content here 
    7889        } 
     
    98109                this.Exit(); 
    99110 
     111            MouseState ms = Mouse.GetState(); 
     112             
     113            Vector2 mPos = new Vector2( 
     114                (float)(ms.X - device.Viewport.Width/2)/(20*device.Viewport.AspectRatio), 
     115                -(float)(ms.Y - device.Viewport.Height / 2) / (20 * device.Viewport.AspectRatio)); 
     116             
     117            /*if (Vector2.Distance(mPos, shield.Position) < 3.0f) 
     118                for (int i = 0; i < shield.vertices.Length; i++) 
     119                { 
     120                    if (Vector2.Distance(Vector3to2(shield.vertices[i].Position), mPos) < 0.1f) 
     121                         
     122                }*/ 
    100123            // TODO: Add your update logic here 
    101124 
     
    112135            RasterizerState rs = new RasterizerState(); 
    113136            rs.FillMode = FillMode.WireFrame; 
     137            SamplerState ss = new SamplerState(); 
     138            ss.AddressW = TextureAddressMode.Clamp; 
     139            ss.AddressU = TextureAddressMode.Clamp; 
     140            ss.AddressV = TextureAddressMode.Clamp; 
     141            device.SamplerStates[0] = ss; 
     142            //device.RasterizerState = rs; 
     143            effect.LightingEnabled = false; 
    114144             
    115             //device.RasterizerState = rs; 
     145            effect.TextureEnabled = false; 
     146            //effect.Texture = shieldKuva; 
    116147            effect.Projection = projectionMatrix; 
    117148            effect.VertexColorEnabled = true; 
     
    125156                    point.Draw(device); 
    126157                } 
     158                 
    127159            } 
     160            effect.TextureEnabled = true; 
     161            effect.VertexColorEnabled = false; 
     162            effect.EnableDefaultLighting(); 
     163            foreach (EffectPass pass in effect.CurrentTechnique.Passes) 
     164            { 
     165                pass.Apply(); 
     166                shield.Draw(device); 
     167            } 
     168            base.Draw(gameTime); 
     169        } 
    128170 
    129              
    130  
    131             base.Draw(gameTime); 
     171        private Vector2 Vector3to2(Vector3 from) 
     172        { 
     173            return new Vector2(from.X, from.Y); 
    132174        } 
    133175    } 
  • 2011/23/sijoseha/SpaceWorld/SpaceWorld/SpaceWorld/Program.cs

    r2044 r2118  
    1111        static void Main(string[] args) 
    1212        { 
    13             using (Game1 game = new Game1()) 
     13            using (SpaceWorld game = new SpaceWorld()) 
    1414            { 
    1515                game.Run(); 
  • 2011/23/sijoseha/SpaceWorld/SpaceWorld/SpaceWorld/SpaceWorld.csproj

    r2044 r2118  
    1414    <XnaFrameworkVersion>v4.0</XnaFrameworkVersion> 
    1515    <XnaPlatform>Windows</XnaPlatform> 
    16     <XnaProfile>HiDef</XnaProfile> 
     16    <XnaProfile>Reach</XnaProfile> 
    1717    <XnaCrossPlatformGroupID>ce0ffb83-5980-44f2-88de-06de9b3ac0ff</XnaCrossPlatformGroupID> 
    1818    <XnaOutputType>Game</XnaOutputType> 
     
    111111    <Compile Include="Program.cs" /> 
    112112    <Compile Include="Game1.cs" /> 
     113    <Compile Include="Shield.cs" /> 
    113114    <Compile Include="WorldPoint.cs" /> 
    114115  </ItemGroup> 
  • 2011/23/sijoseha/SpaceWorld/SpaceWorld/SpaceWorld/WorldPoint.cs

    r2044 r2118  
    1515        private int radius = 1; 
    1616        private int numberOfPoints = 24; 
     17         
     18        //public Game Game { get; set; } 
    1719 
    1820        private VertexPositionColor[] vertices; 
    1921        private int[] indices; 
     22        private short[] shortIndices; 
    2023 
    2124        public WorldPoint(Vector2 position) 
    2225        { 
     26             
    2327            Position = position; 
    2428            CollisionBoundaries = new Rectangle((int)Position.X - 5, (int)Position.Y - 5, radius*2, radius*2); 
     
    4549        { 
    4650            //double radii = 2 * Math.PI / numberOfPoints; 
    47             indices = new int[(numberOfPoints+1) * 3]; 
     51            //indices = new int[(numberOfPoints+1) * 3]; 
     52            shortIndices = new short[(numberOfPoints + 1) * 3]; 
    4853            int counter = 0; 
    49             for (int i = 0; i < numberOfPoints+1; i++) 
     54            for (short i = 0; i < numberOfPoints+1; i++) 
    5055            { 
    51                 int center = 0; 
    52                 int first = i; 
    53                 int second = i + 1; 
     56                //int center = 0; 
     57                //int first = i; 
     58                //int second = i + 1; 
     59                short center = 0; 
     60                short first = i; 
     61                short second = (short)(i + 1); 
    5462                if (second >= numberOfPoints+1) 
    5563                    second = 1; 
    5664 
    57                 indices[counter++] = center; 
    58                 indices[counter++] = first; 
    59                 indices[counter++] = second; 
     65                shortIndices[counter++] = center; 
     66                shortIndices[counter++] = first; 
     67                shortIndices[counter++] = second; 
     68                //indices[counter++] = center; 
     69                //indices[counter++] = first; 
     70                //indices[counter++] = second; 
    6071            } 
    6172        } 
     
    6374        public void Draw(GraphicsDevice device) 
    6475        { 
    65             device.DrawUserIndexedPrimitives(PrimitiveType.TriangleList, vertices, 0, vertices.Length, indices, 0, vertices.Length); 
     76            device.DrawUserIndexedPrimitives(PrimitiveType.TriangleList, vertices, 0, vertices.Length, shortIndices, 0, vertices.Length); 
    6677            //device.DrawUserPrimitives(PrimitiveType.TriangleStrip, vertices, 0, numberOfPoints/3); 
    6778        } 
  • 2011/23/sijoseha/SpaceWorld/SpaceWorld/SpaceWorld/obj/x86/Debug/Microsoft.Xna.Framework.RuntimeProfile.txt

    r2044 r2118  
    1 Windows.v4.0.HiDef 
     1Windows.v4.0.Reach 
  • 2011/23/sijoseha/SpaceWorld/SpaceWorld/SpaceWorld/obj/x86/Debug/SpaceWorld.csproj.FileListAbsolute.txt

    r2044 r2118  
    55D:\Projects\doubleUland\SpaceWorld\SpaceWorld\SpaceWorld\obj\x86\Debug\SpaceWorld.exe 
    66D:\Projects\doubleUland\SpaceWorld\SpaceWorld\SpaceWorld\obj\x86\Debug\SpaceWorld.pdb 
     7D:\Temp\sijoseha\SpaceWorld\SpaceWorld\SpaceWorld\bin\x86\Debug\SpaceWorld.exe 
     8D:\Temp\sijoseha\SpaceWorld\SpaceWorld\SpaceWorld\bin\x86\Debug\SpaceWorld.pdb 
     9D:\Temp\sijoseha\SpaceWorld\SpaceWorld\SpaceWorld\obj\x86\Debug\ResolveAssemblyReference.cache 
     10D:\Temp\sijoseha\SpaceWorld\SpaceWorld\SpaceWorld\obj\x86\Debug\Microsoft.Xna.Framework.RuntimeProfile.txt 
     11D:\Temp\sijoseha\SpaceWorld\SpaceWorld\SpaceWorld\obj\x86\Debug\SpaceWorld.exe 
     12D:\Temp\sijoseha\SpaceWorld\SpaceWorld\SpaceWorld\obj\x86\Debug\SpaceWorld.pdb 
     13D:\Temp\sijoseha\SpaceWorld\SpaceWorld\SpaceWorld\bin\x86\Debug\Content\shieldImage.xnb 
  • 2011/23/sijoseha/SpaceWorld/SpaceWorld/SpaceWorldContent/SpaceWorldContent.contentproj

    r2044 r2118  
    4242    </Reference> 
    4343  </ItemGroup> 
     44  <ItemGroup> 
     45    <Compile Include="shieldImage.png"> 
     46      <Name>shieldImage</Name> 
     47      <Importer>TextureImporter</Importer> 
     48      <Processor>TextureProcessor</Processor> 
     49    </Compile> 
     50  </ItemGroup> 
    4451  <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 
    4552  <!--  To modify your build process, add your task inside one of the targets below and uncomment it.  
  • 2011/23/sijoseha/SpaceWorld/SpaceWorld/SpaceWorldContent/obj/x86/Debug/ContentPipeline.xml

    r2044 r2118  
    22<XnaContent xmlns:Pipeline="Microsoft.Xna.Framework.Content.Pipeline"> 
    33  <Asset Type="Pipeline:BuildItemCollection"> 
     4    <Item> 
     5      <Source>shieldImage.png</Source> 
     6      <Name>shieldImage</Name> 
     7      <Importer>TextureImporter</Importer> 
     8      <Processor>TextureProcessor</Processor> 
     9      <Options>None</Options> 
     10      <Output>D:\Temp\sijoseha\SpaceWorld\SpaceWorld\SpaceWorld\bin\x86\Debug\Content\shieldImage.xnb</Output> 
     11      <Time>2011-06-16T13:10:16.6931009+03:00</Time> 
     12    </Item> 
    413    <BuildSuccessful>true</BuildSuccessful> 
    514    <Settings> 
    615      <TargetPlatform>Windows</TargetPlatform> 
    7       <TargetProfile>HiDef</TargetProfile> 
     16      <TargetProfile>Reach</TargetProfile> 
    817      <BuildConfiguration>Debug</BuildConfiguration> 
    918      <CompressContent>false</CompressContent> 
    10       <RootDirectory>D:\Projects\doubleUland\SpaceWorld\SpaceWorld\SpaceWorldContent\</RootDirectory> 
    11       <LoggerRootDirectory>D:\Projects\doubleUland\SpaceWorld\SpaceWorld\SpaceWorld\</LoggerRootDirectory> 
    12       <IntermediateDirectory>D:\Projects\doubleUland\SpaceWorld\SpaceWorld\SpaceWorldContent\obj\x86\Debug\</IntermediateDirectory> 
    13       <OutputDirectory>D:\Projects\doubleUland\SpaceWorld\SpaceWorld\SpaceWorld\bin\x86\Debug\Content\</OutputDirectory> 
     19      <RootDirectory>D:\Temp\sijoseha\SpaceWorld\SpaceWorld\SpaceWorldContent\</RootDirectory> 
     20      <LoggerRootDirectory>D:\Temp\sijoseha\SpaceWorld\SpaceWorld\SpaceWorld\</LoggerRootDirectory> 
     21      <IntermediateDirectory>D:\Temp\sijoseha\SpaceWorld\SpaceWorld\SpaceWorldContent\obj\x86\Debug\</IntermediateDirectory> 
     22      <OutputDirectory>D:\Temp\sijoseha\SpaceWorld\SpaceWorld\SpaceWorld\bin\x86\Debug\Content\</OutputDirectory> 
    1423    </Settings> 
    1524    <Assemblies> 
    1625      <Assembly> 
     26        <Key>C:\Program Files (x86)\Microsoft XNA\XNA Game Studio\v4.0\References\Windows\x86\Microsoft.Xna.Framework.Content.Pipeline.XImporter.dll</Key> 
     27        <Value>2010-08-23T13:41:18+03:00</Value> 
     28      </Assembly> 
     29      <Assembly> 
     30        <Key>C:\Program Files (x86)\Microsoft XNA\XNA Game Studio\v4.0\References\Windows\x86\Microsoft.Xna.Framework.Content.Pipeline.VideoImporters.dll</Key> 
     31        <Value>2010-08-23T13:41:18+03:00</Value> 
     32      </Assembly> 
     33      <Assembly> 
     34        <Key>C:\Program Files (x86)\Microsoft XNA\XNA Game Studio\v4.0\References\Windows\x86\Microsoft.Xna.Framework.Content.Pipeline.TextureImporter.dll</Key> 
     35        <Value>2010-08-23T13:41:18+03:00</Value> 
     36      </Assembly> 
     37      <Assembly> 
     38        <Key>C:\Program Files (x86)\Microsoft XNA\XNA Game Studio\v4.0\References\Windows\x86\Microsoft.Xna.Framework.Content.Pipeline.FBXImporter.dll</Key> 
     39        <Value>2010-08-23T13:41:18+03:00</Value> 
     40      </Assembly> 
     41      <Assembly> 
     42        <Key>C:\Program Files (x86)\Microsoft XNA\XNA Game Studio\v4.0\References\Windows\x86\Microsoft.Xna.Framework.Content.Pipeline.EffectImporter.dll</Key> 
     43        <Value>2010-08-23T13:41:18+03:00</Value> 
     44      </Assembly> 
     45      <Assembly> 
     46        <Key>C:\Program Files (x86)\Microsoft XNA\XNA Game Studio\v4.0\References\Windows\x86\Microsoft.Xna.Framework.Content.Pipeline.AudioImporters.dll</Key> 
     47        <Value>2010-08-23T13:41:18+03:00</Value> 
     48      </Assembly> 
     49      <Assembly> 
    1750        <Key>C:\Windows\Microsoft.Net\assembly\GAC_32\Microsoft.Xna.Framework.Content.Pipeline\v4.0_4.0.0.0__842cf8be1de50553\Microsoft.Xna.Framework.Content.Pipeline.dll</Key> 
    18         <Value>2010-10-04T19:11:18.5288743+03:00</Value> 
     51        <Value>2011-01-07T11:35:54.8184098+02:00</Value> 
    1952      </Assembly> 
    2053    </Assemblies> 
  • 2011/23/sijoseha/SpaceWorld/SpaceWorld/SpaceWorldContent/obj/x86/Debug/SpaceWorldContent.contentproj.FileListAbsolute.txt

    r2044 r2118  
    11D:\Projects\doubleUland\SpaceWorld\SpaceWorld\SpaceWorldContent\obj\x86\Debug\ResolveAssemblyReference.cache 
     2D:\Temp\sijoseha\SpaceWorld\SpaceWorld\SpaceWorldContent\obj\x86\Debug\ResolveAssemblyReference.cache 
Note: See TracChangeset for help on using the changeset viewer.