Gamestudio Links
Zorro Links
Newest Posts
loading historical data 1st time
by AndrewAMD. 04/14/23 12:54
Trade at bar open
by juanex. 04/13/23 19:43
Bug in Highpass2 filter
by rki. 04/13/23 09:54
Adding Limit Orders For IB
by scatters. 04/11/23 16:16
FisherN
by rki. 04/11/23 08:38
AUM Magazine
Latest Screens
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Hecknex World
Who's Online Now
2 registered members (juanex, AndrewAMD), 988 guests, and 8 spiders.
Key: Admin, Global Mod, Mod
Newest Members
rki, FranzIII, indonesiae, The_Judge, storrealba
18919 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 3 1 2 3
Re: Console Output? [Re: WretchedSid] #345261
10/24/10 15:38
10/24/10 15:38
Joined: Oct 2009
Posts: 149
Germany
M
muffel Offline
Member
muffel  Offline
Member
M

Joined: Oct 2009
Posts: 149
Germany
Perhaps CreateConsoleScreenBuffer can help.

Otherwise what did you know about working with consoles?
Maybe this or this can help you better than us here at the forum, but maybe you already now them.

muffel

Re: Console Output? [Re: muffel] #345263
10/24/10 16:01
10/24/10 16:01
Joined: Feb 2010
Posts: 886
Random Offline
User
Random  Offline
User

Joined: Feb 2010
Posts: 886
What this is passable with 3dgs???
For Console outputs like ps3 or xbox 360 I use Unity 3D.



Re: Console Output? [Re: Random] #345265
10/24/10 16:17
10/24/10 16:17
Joined: Apr 2007
Posts: 3,751
Canada
WretchedSid Offline
Expert
WretchedSid  Offline
Expert

Joined: Apr 2007
Posts: 3,751
Canada
Originally Posted By: Random
What this is passable with 3dgs???
For Console outputs like ps3 or xbox 360 I use Unity 3D.

We are talking about a console that outputs text to the screen, not about an gaming console.


Shitlord by trade and passion. Graphics programmer at Laminar Research.
I write blog posts at feresignum.com
Re: Console Output? [Re: Random] #345266
10/24/10 16:18
10/24/10 16:18
Joined: Apr 2005
Posts: 3,815
Finland
Inestical Offline
Rabbit Developer
Inestical  Offline
Rabbit Developer

Joined: Apr 2005
Posts: 3,815
Finland
Originally Posted By: Random
What this is passable with 3dgs???
For Console outputs like ps3 or xbox 360 I use Unity 3D.


Before a storm comes, let me straighten you. It means console outputs as in textual (debugging) representation into windows command line, or other console window.


"Yesterday was once today's tomorrow."
Re: Console Output? [Re: Inestical] #345270
10/24/10 17:02
10/24/10 17:02
Joined: Feb 2010
Posts: 886
Random Offline
User
Random  Offline
User

Joined: Feb 2010
Posts: 886
oh, ok.



Re: Console Output? [Re: Random] #345271
10/24/10 17:05
10/24/10 17:05
Joined: Jun 2006
Posts: 2,640
Earth
Germanunkol Offline OP
Expert
Germanunkol  Offline OP
Expert

Joined: Jun 2006
Posts: 2,640
Earth
Yay!



For anyone interested, here's a quick 'n dirty example of how to create a console and print info to it:
Code:
#include <acknex.h>
#include <default.c>
#include <litec.h>
#include <windows.h>
#include <stdio.h>

DWORD consoleOutput;

void logToConsole(STRING* logStr)
{
	
	var out, out2;
	WriteFile(consoleOutput, logStr, str_len(logStr), &out, &out2);
//line break:
	WriteFile(consoleOutput, "\n", 1, &out, &out2);
	
	
}

void main()
{
	video_screen = 0;
	AllocConsole();
	SetConsoleTitle("CSiS Dedicated Server");
	
	consoleOutput = GetStdHandle(STD_OUTPUT_HANDLE);
	
	logToConsole("Hello World");
	
	wait(3);
}




It's interesting how "WriteFile" works to write into a console - which isn't really a file. I must admit I don't fully understand what I did above. But it works...

Last edited by Germanunkol; 10/24/10 17:08.

~"I never let school interfere with my education"~
-Mark Twain
Re: Console Output? [Re: Germanunkol] #345272
10/24/10 17:13
10/24/10 17:13
Joined: Apr 2007
Posts: 3,751
Canada
WretchedSid Offline
Expert
WretchedSid  Offline
Expert

Joined: Apr 2007
Posts: 3,751
Canada
In fact, stdout _is_ a file.
But not a file in your normal file system on the hard disk, but one in the virtual file system. So its no wonder that you can write into the console like into a file.


Shitlord by trade and passion. Graphics programmer at Laminar Research.
I write blog posts at feresignum.com
Re: Console Output? [Re: WretchedSid] #345275
10/24/10 17:39
10/24/10 17:39
Joined: Sep 2003
Posts: 9,859
F
FBL Offline
Senior Expert
FBL  Offline
Senior Expert
F

Joined: Sep 2003
Posts: 9,859
more interesting is that it seems to be able to handle Acknex STRINGs...

edit: ah it's not. By directly passing a parameter in "" isntead of a sTRING pointer, A8 uses a char array instead of a STRING.
And this way your code works. Confusing, isn't it?

Last edited by Firoball; 10/24/10 17:40.
Re: Console Output? [Re: FBL] #345277
10/24/10 18:05
10/24/10 18:05
Joined: Jun 2006
Posts: 2,640
Earth
Germanunkol Offline OP
Expert
Germanunkol  Offline OP
Expert

Joined: Jun 2006
Posts: 2,640
Earth
Yes, guess why I couldn't get it to work? grin

STRINGS seem to mess up, but that makes sense I guess, since they're acknex-structs...

Oh well. It works now. I guess I'll have to make input work as well somehow, that'll be harder...


~"I never let school interfere with my education"~
-Mark Twain
Re: Console Output? [Re: Germanunkol] #345280
10/24/10 18:11
10/24/10 18:11
Joined: Jan 2003
Posts: 4,615
Cambridge
Joey Offline
Expert
Joey  Offline
Expert

Joined: Jan 2003
Posts: 4,615
Cambridge
streams (pipes, better) work like files.

edit: yay, three new posts. i'd better refresh pages before posting.

Last edited by Joey; 10/24/10 18:12.
Page 2 of 3 1 2 3

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1