Image

May 14, 2011 at 6:57 PM

Hi everyone.

I've discovered Cosmos yesterday and I'm actually really amazed by it.

I watched a lot of discussions based on filsystem, as far as I know, it seems that there's no "filesystem" wroking, right? (Tell me if I'm wrong)

I was working today on loading images into my OS (test one). 

What I mean by loading images is:
(An example method)
public void LoadImage (string root)
//Load the image with a "loader"? I called one "ImageLoader" for the example
ImageLoader.Load(root);

(Project)

Root-

Images-

Image1.(Whatever Extension) 

 

I'm programming MMORPGs (games) for 2 years. So drawing images and working with them is really an ease for me.
If there's no working "image loading" methods atm,
I can try to create one when the filesystem will be working. 

Sorry for my bad english, but thanks tho to take time to read :P

 

Ben

 

 

 

Developer
May 14, 2011 at 7:37 PM
Edited May 14, 2011 at 7:37 PM

Well, currently to be able to to anything with the image (unless you want to transform it to ascii, which there is a program written in C# that can do that), you need a working VGA driver, Currently i am working on said driver, and am currently in the process of setting up an easy way to extend it to new graphics modes (the enum containing the possible resolutions (not color depth) currently has 52 different resolutions available), after i get a decent driver up and working, i'll create a nice graphics library for it (aka, DrawPoint, DrawLine, DrawSomeOtherShape, etc.)

May 14, 2011 at 9:10 PM

This is what I'm talking about.

In a way, what we're talking about is creating something like DIrectX.

Developer
May 14, 2011 at 10:02 PM
Edited May 14, 2011 at 11:08 PM

Well, I just finished modifying the current VGAScreen class, so that it's easily expandable to any number of new resolutions. Just need to figure out how to get Windows to let me create a patch for it (i managed to keep the outward interface for the most part, the only thing outwardly that has changed is that instead of directly calling the specific resolution's SetGrapicsMode method, it's a single method that accepts 2 arguments, 1 for the resolution, and 1 for the color depth) and I'll submit it to the main repository. I'm now off to search for the old VGA implementation, to see how it works.

 

EDIT:

Alright, got it to let me make a patch, it's now submitted.

Developer
May 18, 2011 at 7:50 PM
Edited May 19, 2011 at 5:01 PM

As another note, i'm currently working on the drawing functions, I have (both outlined and filled), Circles, Rectangles, and Triangles, I also have elliptical arcs, polygon outlines, and elipse outlines working. (not tested them in cosmos, but they work against a bitmap (setting it pixel by pixel), so there shouldn't be any trouble using them in Cosmos.) Currently have polygon filling somewhat working, but something's wrong somewhere in the code, because i shouldn't be trying to color a pixel at (141, 4542942), (that Y value is 4.5 million XD) , but once I get that issue worked out I'll post the code for them.

Now if i knew why the circles were the easiest to get working XD My line code was harder to get working than that XD

 

Edit:

Hopefully I just found a snippet of code that will do what I want. I'll report results back at the end of the day.

 

Another Edit:

I now have polygons working, via a clipping method, it appears that the issue was a bug in my triangle implementation. I'll post the code once i ensure it actually works in cosmos. I can post some screenshots of what it can do with a simple bitmap if anyone wants it.

Coordinator
May 19, 2011 at 8:30 PM
On 5/18/2011 2:50 PM, blah38621 wrote:
> As another note, i'm currently working on the drawing functions, I have
> (both outlined and filled), Circles, Rectangles, and Triangles, I also
> have elliptical arcs, polygon outlines, and elipse outlines working.
> (not tested them in cosmos, but they work against a bitmap (setting it
> pixel by pixel), so there shouldn't be any trouble using them in
> Cosmos.) Currently have polygon filling somewhat working, but
> something's wrong somewhere in the code, because i shouldn't be trying
> to color a pixel at (141, 4542942), (that Y value is 4.5 million XD)

Sounds great! Im currently trying to return to Cosmos now.