🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Include files ?

Started by
2 comments, last by LDenninger 20 years, 1 month ago
Any possibility of getting include-files in AS, or maybe just through a user(coder)-defined callback ? My code could have a callback-function for encountered include-files, performing the task of actually reading the file (the way I like it, just from disk or even from a zip-file or whatever), and passing back the text-buffer... For BeatHarness it would be great, I/people could just make include-files with different graphic effects to be used in all the scripts ! Just rambling here though.. [edited by - LDenninger on May 12, 2004 7:13:38 PM]
_-=[ "If there's anything more important than my ego around, I want it caught and shot now." ]=--=[ BeatHarness ]=-=[ Guerrilla Games ]=-=[ KillZone ]=-
Advertisement
Welcome to the forums Led. I've been wondering when you'd show up

Include files would be a task for a pre-processor, which would be a level above AngelScript. Thus I think the best solution is simply to scan the script files, line by line, for any #include directives. When they are encountered the first two characters could be exchanged for '//' making the line a comment. The included files could just be read and added as another script section because order isn't important for AngelScript.

I think this should be a matter of minutes to implement for someone with your skill. Perhaps you would be interesting in making it into a tutorial. That is if you liked the solution.





__________________________________________________________
www.AngelCode.com - game development and more...
AngelScript - free scripting library - Tower - free puzzle game

[edited by - WitchLord on May 12, 2004 10:11:53 PM]

AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

Yeah, I figured that much, it''s just that
a) I''m so lazy I hardly make the effort to breathe
b) I don''t have too much time lately

I''ll go for the preprocessor anyway,
''cause I want to get other metadata from my scriptfiles anyway.
(Author, ScriptName, Info)

Anyway, keep up the good work !
_-=[ "If there's anything more important than my ego around, I want it caught and shot now." ]=--=[ BeatHarness ]=-=[ Guerrilla Games ]=-=[ KillZone ]=-
Yeah, I know how it is. Time is precious.

I would write the pre-processor myself, but I don''t have the time either.

__________________________________________________________
www.AngelCode.com - game development and more...
AngelScript - free scripting library - Tower - free puzzle game

AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

This topic is closed to new replies.

Advertisement