Jump to content
  • Advertisement

storage

Member
  • Content Count

    157
  • Joined

  • Last visited

Community Reputation

175 Neutral

About storage

  • Rank
    Member
  1. I'm wondering if there is any way to add resources to an assembly on runtime. What I would like to do is write an image to an existing .NET assembly. Is this possible somehow? I haven't seen any examples on it. Any help is appreciated! Thanks in advance.
  2. Thank you for your reply Rob :). I've already tried that and it works, but my problem is that m_X must be non-static. Any ideas? Thanks once again!
  3. Thanks for your reply! It didn't work either, that was the code I meant to post at first. It throws this exception: The name 'X' does not exist in the current context But I think that's because the code is embedded in this: using System; class ScriptSource { public static System.Object Main() { // X = 13; goes here. return null; } } But if I move the class wrapping, it throws this instead: CS0116: A namespace does not directly contain members such as fields or methods Thanks!
  4. I'm trying to do something like this: public class ScriptedClassTest { private Script m_Script = new Script(); private int m_X = 0; public ScriptedClassTest() { m_Script.Code = "m_X = 13;"; } public void Update() { m_Script.Execute(); } public int X { get { return m_X; } set { m_X = value; } } } But it won't allow the script to access m_X. If I make m_X static, it will of course be able to manipulate it, but I need it to be non-static. I want to do this because I want to be able to script my particle effects (as well as NPCs etc). Is there some way to allow members to be accessed by the scripts? I'm using the CodeDom namespace, which I have wrapped in a similar way to Rob Loach's GakScript. Thanks in advance!
  5. Is it possible to somehow load a font from a stream to a Direct3D font? I've been trying, but I have not found any built-in way to do it. Could someone please shed some light on this, please? :)
  6. Hello! I have some problems with the drawing of sprites in Managed DirectX. This is how I currently draw the sprites, but it doesn't work. It throws "NullReferenceException". I think it's because _texture.ImageInformation.Width/Height doesn't return the size of the texture. System.Drawing.Rectangle rect = new System.Drawing.Rectangle( 0, 0, _texture.ImageInformation.Width, _texture.ImageInformation.Height ); System.Drawing.SizeF size = new System.Drawing.SizeF( ( float ) _texture.ImageInformation.Width, ( float ) _texture.ImageInformation.Height ); _sprite.Draw2D( _texture, rect, size, position, System.Drawing.Color.White ); To me, it doesn't look like this is how you are supposed to use the sprite class, so I'm asking for some help to solve this. Thanks in advance!
  7. Quick question, does anyone know a tutorial or something that deals with wrapping Managed DirecX (mainly Direct3D) in classes? I just can't seem to get it to work. My main problem is the Paint event, do I have to do all the rendering in there? Thanks in advance, storage.
  8. I've written a smaller assembly, that I compiled to a .DLL file, that I linked to my other project. My problem is that the XML comments are not showing up in the other project. Why is this? :o Thanks in advance!
  9. I've been waiting for the new MacBook for quite a while now, and I was a little disappointed (not much at all, just a little) by the Intel GMA950 integrated graphics. So I started thinking if there was any way to use the second core of it's Core Duo processor for some of the graphics calculations, sort of like how Havok and NVIDIA are going to use one of the graphics cards in SLI configurations for physics calculations (if I've understood it correct). The shaders should be left to the GMA950, since it supports (only) Pixel Shader 2.0, but they would probably still be really slow. One thing I thought about was "rewriting" some of the the OpenGL functions, so they are calculated on the CPU instead of the GPU. I might just be talking sh*t, but I thought it was worth a post. Intel GMA950 overview. Please discuss :). Thanks!
  10. I have run into real pain in the a** problem. I'm trying to list the contents of a directory, and all of its subdirectories, and all of the subdirectories contens, and so on. So far, I'm able to list the contents of one directory, but not every subdirectory in the directory. foreach (System.IO.FileInfo Info in DirInfo.GetFiles()) { System.Console.WriteLine(Info.Name); } How do I get the contents of all the subdirectories, and their subdirectories and so on to print to the console?
  11. I can't use a public getter, because I want ONLY the kernel class to be able to set the m_ProcessID field. I tried making m_ProcessID internal, but I can't seem to understand how it works. I can access Process.m_ProcessID from any class in the project. Thanks for your help! I will try the snippet you posted.
  12. I have a simple question, It it possible for class X (the kernel class) to access the private m_ProcessID field of class Y (the process class)? Something like friend classes of C++? Thanks in advance!
  13. I'm trying to decide what to name my classes and namespaces, and it's working well at the moment. The thing I'm wondering about is what to name my "graphics device" class and its interface. At the moment it looks like this: Engine.Graphics.IDevice Engine.Graphics.GLDevice Engine.Graphics.D3DDevice But I'm going to add a "sound device" class at a later stage, and I would like it to be called *Device as well. Like this: Engine.Sound.IDevice Engine.Sound.FMODDevice And so on. Will there be a problem with having two classed named the same? Should I name the classes IGraphicsDevice/ISoundDevice instead? If so, should I keep the Engine.Graphics/Engine.Sound namespaces? Thanks a lot in advance!
  14. Thank you a lot! :) I really appreciate it. Now I'm back to porting my engine to C#! Adios!
  15. I'm currently trying to learn C#, but I've run into a problem with the get/set functionality. public KernelState State() { get { return _state; } set { _state = value; } } Give me these errors, just after the get or set: Error 1 ; expected Error 2 ; expected I appreciate the help. Thanks, storage.
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!