[QUOTE=limitofinf;27240396]Hey,
I didn't think that "92 new posts" meant "90 worthless, content-less posts" :bang:[/QUOTE]
You have to read between the lines.
Trying to make a scripting language for the 18th time. This time I have a better idea of what I'm doing though.
[img]http://i.cubeupload.com/KFF91X.png[/img]
[QUOTE=Dr Magnusson;27240595]Trying to make a scripting language for the 18th time. This time I have a better idea of what I'm doing though.
[img_thumb]http://i.cubeupload.com/KFF91X.png[/img_thumb][/QUOTE]
That's awesome, I've always wanted to write a scripting language but I'm afraid I'll screw it up too badly. What language are you writing it in? If it's C++, I'll be impressed.
[QUOTE=yakahughes;27240867]That's awesome, I've always wanted to write a scripting language but I'm afraid I'll screw it up too badly. What language are you writing it in? If it's C++, I'll be impressed.[/QUOTE]
It is C++.
[QUOTE=Dr Magnusson;27240993]It is C++.[/QUOTE]
So awesome. Be sure to keep us updated. What do you intend on making the language like?
[QUOTE=yakahughes;27241039]So awesome. Be sure to keep us updated. What do you intend on making the language like?[/QUOTE]
I honestly don't really know. Right now I just want to get something basic and lua-like going.
The real answer to all your stupid os crap is to use OpenGL then you're only limited by the hardware level you choose. It's funny too, somebody mentioned throwing away 25% of the market share as being a bad thing, but you're using DirectX so you've just thrown away all your mac and linux users anyway so you obviously don't care about that at all. (pie graphs available [url]http://www.humblebundle.com/[/url])
[QUOTE=high;27237033]Personally I find AVs useless especially when you know a decent amount about computers. Just use something like Comodo Defense+ (properly configured, not their shit defaults). Haven't had a virus since I was like 11-12.[/QUOTE]
this, this, and this.
[editline]6th January 2011[/editline]
[QUOTE=Icedshot;27237709]The irony is, you are complaining about the lack of content by making contentless posts yourself..[/QUOTE]
if everything in this thread was content only it would be almost dead.
What do you mean it "doesn't work".
[QUOTE=yakahughes;27236602]I am writing a really simplistic GUI library for Win32. It's kindof annoying to have to write a WndProc and handmake a GUI for every application, so instead of having doing all that, you can just do stuff like
[cpp]
int btnclick(CGArticle* btn, CGEventHandlerArg arg) {
MessageBox(NULL, "hi", "hi", NULL);
return 0;
}
int CALLBACK WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) {
CGWindow wnd;
wnd.Show();
wnd.SetTitle("Hello WAYWO");
wnd.SetSize(400, 400);
wnd.Center();
CGListBox lb(&wnd, CGListBoxStyles::MultipleSelect);
lb.Center();
lb.AddItem("List");
lb.AddItem("Box");
CGRectangle rect = lb.GetDimensions();
CGButton btn(&wnd);
btn.Show();
btn.SetPos(rect.x, rect.y - 30);
btn.SetText("A button");
btn.OnClick = btnclick;
CGEdit ed(&wnd);
ed.SetPos(rect.x, rect.y + rect.height + 5);
ed.SetSize(rect.width, 20);
ed.Show();
while(CGULL::ProcessMessages());
return 0;
}
[/cpp]
Which would yield
[img_thumb]http://imgkk.com/i/5rvj.png[/img_thumb]
Working on ListView right now, which is kindof hard with all the stuff you can do with it. It's also hard to create satisfactory abstractions which take away enough complexity so that it's preferable to use rather than hand coding. Like for instance, for an Image class, should each instance have it's own ImageList, or should you have one big ImageList for all the objects and just store their offset, or what?[/QUOTE]
I wrote a simple Win32 wrapper a while back but I could NEVER get the editbox's styled outline to work. I tried so many ways to invoke to use it. If you had any idea why that would be awesome!
[quote=http://msdn.microsoft.com/en-us/library/da60x087(VS.80).aspx]This error can occur because the pow(int, int) was removed from math.h in the CRT.[/quote]
-snip-
[QUOTE=TehBigA;27242452]I wrote a simple Win32 wrapper a while back but I could NEVER get the editbox's styled outline to work. I tried so many ways to invoke to use it. If you had any idea why that would be awesome![/QUOTE]
What styled outline are you talking about, is the outline of the Edit in the picture the correct one?
[QUOTE=bootv2;27242608]then explain why the other one:[cpp]double amplitude = pow(p,a);//This decreases the amplitude with every loop of the octave.[/cpp]
does work(this one is one line under the not working one.[/QUOTE]
Because the first argument is not an integer (most likely a double as well). Try pow(2.0f,a) instead of pow(2,a).
[QUOTE=bootv2;27242123]-snip-[/QUOTE]
Try
[cpp]double frequency = pow(2.f,a);[/cpp]
Is there no faster function for powers of two in the standard math library anyway?
[QUOTE=Metroid48;27242731]Try
[cpp]double frequency = pow(2.f,a);[/cpp][/QUOTE]
It would be 2.0 not 2.f.
[editline]6th January 2011[/editline]
To avoid unnecessary implicit casting (assuming it does implicitly cast the float to a double)
If all you need is to do a power of two, isn't 1 << n faster than pow(2, n)?
I'm completely reassembling the 2D top-down shooter for my final project in my CS class. My partner is such a shitty coder, and I gave him free-reign at the head of the project.
-snip-
[QUOTE=limitofinf;27243152]Hey, it's 1 << n.[/QUOTE]
Woops, thanks for pointing that out.
Edited my post
[QUOTE=Chris220;27243170]Woops, thanks for pointing that out.
Edited my post[/QUOTE]
Hey,
No problem, just a typo probably :)
[QUOTE=limitofinf;27243230]Hey,
No problem, just a typo probably :)[/QUOTE]
Hey, at the top of every post == OCD
Driving me crazy, man.
[QUOTE=limitofinf;27243152]Hey,
-snip-[/QUOTE]
Fixed it for ya
[img]http://gyazo.com/e637a9b2bcf8ac40a31f5ab4833aaa80.png[/img]
[editline]6th January 2011[/editline]
Just trying out that drawing simple shapes thing.
[QUOTE=yakahughes;27242590]What styled outline are you talking about, is the outline of the Edit in the picture the correct one?[/QUOTE]
Yes it is, I either get a solid or no outline.
I think its that mythical time of the day that only few of us from the WAYWO have heard of.
Thats right its content time :D
[media]http://www.youtube.com/watch?v=f8Zyibm8Szg[/media]
I'm using C#'s Random class but it seems to be giving me the same integers multiple times within a short space of time, I've actually had to put in code to stop it using the same number twice in a row because it was giving me the same number (I can only guess that it was running so quickly that the same number was generated multiple times as the way I understand it to work is based on the time, although I don't know if this is right).
Has anyone got any suggestions on getting some slightly more random numbers?
[QUOTE=Wickedgenius;27244551]I'm using C#'s Random class but it seems to be giving me the same integers multiple times within a short space of time, I've actually had to put in code to stop it using the same number twice in a row because it was giving me the same number (I can only guess that it was running so quickly that the same number was generated multiple times as the way I understand it to work is based on the time, although I don't know if this is right).
Has anyone got any suggestions on getting some slightly more random numbers?[/QUOTE]
Can you show how you're actually initializing and using the Random class? You should initialize it once and then just call its Next method to get each new number.
[QUOTE=Wickedgenius;27244551]I'm using C#'s Random class but it seems to be giving me the same integers multiple times within a short space of time, I've actually had to put in code to stop it using the same number twice in a row because it was giving me the same number (I can only guess that it was running so quickly that the same number was generated multiple times as the way I understand it to work is based on the time, although I don't know if this is right).
Has anyone got any suggestions on getting some slightly more random numbers?[/QUOTE]
It basically generates a sequence of numbers, and each time you call the Next() function it gives you the next one in the sequence. The sequence is determined when you create the Random object, time has nothing to do with it after then.
Sorry, you need to Log In to post a reply to this thread.