Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Small but handy tool

Author
Message
Ravey
Retired TGC Developer
21
Years of Service
User Offline
Joined: 2nd Nov 2002
Location: Southern TGC Nerve Centre
Posted: 30th Jan 2013 11:53 Edited at: 30th Jan 2013 11:55
Hi guys,

I just thought I would share a small utility I used when developing with AGK.

With a large project you can end up with many files and some of those files can get quite large.

I wanted a way to see all the functions at once and ideally see which line each function resided at.

The attached little tool runs in the projects folder and scans through each file producing a header at the top listing all functions and line numbers.

You get something like this:

//----------- Function List -----------//
/*

98 : function Network_Connect ( )
123 : function Network_SetupErrorDialog ( )
153 : function Network_ClearErrorDialog ( )
163 : function Network_Close ( )
167 : function Network_ResetState ( )
172 : function Network_RegisterUser ( name$, password$, email$ )
178 : function Network_ForgottenDetails ( name$, email$ )
184 : function Network_LoginUser ( name$, password$ )

*/
//-------------------------------------//

You can then copy the line number, do CTRL+G and jump straight to the function.

>> If you need to refresh the info you will have to remove the header code first and re run the tool. <<

Might not be any use to you, but I thought I would share it none the less.

PS - Back up your source code before use, better safe than sorry

Dave Milton
TGC Team

Attachments

Login to view attachments
MarcoBruti
12
Years of Service
User Offline
Joined: 20th Nov 2011
Location: Caput Mundi
Posted: 30th Jan 2013 12:17
interesting, but it would be far more useful to have such a tool embedded into the IDE, as it currently happens with DBPro. For each source file, DBPro displays functions, variables, etc.
Van B
Moderator
21
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 30th Jan 2013 12:17
Nice - It kinda annoys me that I don't have all the functions listed, like with DBPro's IDE - this should proove very handy with larger projects.

I got a fever, and the only prescription, is more memes.
AgentSam
12
Years of Service
User Offline
Joined: 14th Mar 2012
Location: Virtual Space
Posted: 30th Jan 2013 13:26 Edited at: 30th Jan 2013 13:30
Ravey, it would be nice of you to include the source code to your utility.

Not many are keen to run unknown executables on their development machines (despite having antivirus, etc).

Also, the EditPlus programmer's editor works as a great replacement for the AppGameKit Tier 1 CodeBlocks based editor.. (but not without some significant customization. After that -- it beats the default IDE hands down.)

Below is a screenshot of EP with the function-list open. (I just placed the editor and the function list side-by-side for the screenshot, and it's just showing example code from the SantasBadElf game.)

Cheers,
AgentSam

Attachments

Login to view attachments
Ravey
Retired TGC Developer
21
Years of Service
User Offline
Joined: 2nd Nov 2002
Location: Southern TGC Nerve Centre
Posted: 30th Jan 2013 19:34
Quote: "Ravey, it would be nice of you to include the source code to your utility. "


Sure thing

Dave Milton
TGC Team

Attachments

Login to view attachments
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 31st Jan 2013 17:31
Very useful, I tried to work out how to add function listing in CodeBlocks, but I couldn't find any information on this essential functionality.

Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 31st Jan 2013 19:47 Edited at: 31st Jan 2013 20:04
@Ravey
you inspired me to do this in AGK.
i don't have direct access to the directorys
and i use choosefile in a loop.

@All
Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 16th Feb 2013 10:22
i read a little bit about codeblock and found
it have scripting

it have a start script here:
\AGK\IDE\Editor\share\CodeBlocks\scripts\startup.script

and they have a wiki about script
http://wiki.codeblocks.org/index.php?title=Scripting_commands

Login to post a reply

Server time is: 2024-05-07 11:20:54
Your offset time is: 2024-05-07 11:20:54