eWallRim::Bound

What do you want to see in Armagetron soon? Any new feature ideas? Let's ponder these ground breaking ideas...
User avatar
Lucifer
Project Developer
Posts: 8641
Joined: Sun Aug 15, 2004 3:32 pm
Location: Republic of Texas
Contact:

Post by Lucifer »

Or he could just do the search in gCycle.cpp, that's where the headlight code is.
Image

Be the devil's own, Lucifer's my name.
- Iron Maiden
User avatar
~|DS|~|Patch|
On Lightcycle Grid
Posts: 40
Joined: Wed Jan 18, 2006 4:47 am
Location: The Woodlands, Texas

Post by ~|DS|~|Patch| »

Where do you find the c++ files (and other ones of that nature)
User avatar
Lucifer
Project Developer
Posts: 8641
Joined: Sun Aug 15, 2004 3:32 pm
Location: Republic of Texas
Contact:

Post by Lucifer »

Ahhh, you need to download a source tarball from the releases page. This is in 0.2.8, it's just disabled.

So, to build it, you need to go into gCycle.cpp near the top (it might be in gCycle.h), find the line that says "#define USEHEADLIGHT" and uncomment it, i.e. delete the "//" that's in front of it. Then compile the program and run it and you should have a new option in your HUD preferences to turn on the headlight.

This assumes you have a compiler all setup and ready to go with this. If you're in Linux, you're fine. If in Windows or Mac OS X, I don't know what you need to do, just that it's a bit trickier than in Linux.
Image

Be the devil's own, Lucifer's my name.
- Iron Maiden
Word
Reverse Adjust Outside Corner Grinder
Posts: 4258
Joined: Wed Jan 07, 2009 6:13 pm

Re: eWallRim::Bound

Post by Word »

wow this is amazing :P
could you add this code to the next version and make it possible to turn off the headlights with a simple key (or console command?)
User avatar
Jonathan
A Brave Victim
Posts: 3391
Joined: Thu Feb 03, 2005 12:50 am
Location: Not really lurking anymore

Re: eWallRim::Bound

Post by Jonathan »

Wow, somebody still wants this piece of novelty hack? Really, it's too hacky to make it into a release without being reworked. It can do anything from just looking wrong to … anything? (like crash if you're unlucky)
ˌɑrməˈɡɛˌtrɑn
Word
Reverse Adjust Outside Corner Grinder
Posts: 4258
Joined: Wed Jan 07, 2009 6:13 pm

Re: eWallRim::Bound

Post by Word »

ok that's sad :P
User avatar
compguygene
Adjust Outside Corner Grinder
Posts: 2346
Joined: Thu Aug 21, 2008 12:09 pm
Location: Cleveland, Ohio
Contact:

Re: eWallRim::Bound

Post by compguygene »

@Word, since I don't think that you have ever written any code, let me explain. In general there are to ways to add a function to an application.

Way#1 make a quick hack that could cause the entire code to crash, or other weird effect.

Way#2 Spend a lot of time writing code that can safely be added to the code for future releases.
Armagetron: It's a video game that people should just play and enjoy :)
https://bit.ly/2KBGYjvCheck out the simple site about TheServerPharm
User avatar
Jip
Round Winner
Posts: 397
Joined: Sat Sep 26, 2009 5:32 pm

Re: eWallRim::Bound

Post by Jip »

Sorry to bump this old thread.
I saw that the code is still is in the source and I tried to activate it. I uncommented #define USE_HEADLIGHT in gCycle.h and I got the option to activate/deactivate headlights. But it changes nothing.
Is there more code I need to add or activate?
User avatar
delinquent
Match Winner
Posts: 761
Joined: Sat Jul 07, 2012 3:07 am

Re: eWallRim::Bound

Post by delinquent »

Trying it it code:blocks

Where you see #ifdef USE_HEADLIGHT, below that block there is another function "#endif // USE_HEADLIGHT". Currently, I'm going to try unquoting that, since use_headlight is already unquoted? You may have more success than me.

Edit: There appears to be no "#define USE_HEADLIGHT", but "#ifdef USE_HEADLIGHT" is credited to Jonathan.
User avatar
Jip
Round Winner
Posts: 397
Joined: Sat Sep 26, 2009 5:32 pm

Re: eWallRim::Bound

Post by Jip »

delinquent wrote:[...] there is another function "#endif // USE_HEADLIGHT".
It's not a function, it closes the #ifdef USE_HEADLIGHT statement.
User avatar
Jonathan
A Brave Victim
Posts: 3391
Joined: Thu Feb 03, 2005 12:50 am
Location: Not really lurking anymore

Re: eWallRim::Bound

Post by Jonathan »

I suspect the problem is that it resets the modelview matrix. Until recently that only undid the slightly unpredictable cycle transform, but now it undoes the camera as well, causing it to be misplaced. If you are using a recent version, try downgrading because I'm not fixing this thing.
ˌɑrməˈɡɛˌtrɑn
User avatar
delinquent
Match Winner
Posts: 761
Joined: Sat Jul 07, 2012 3:07 am

Re: eWallRim::Bound

Post by delinquent »

Jip wrote:
delinquent wrote:[...] there is another function "#endif // USE_HEADLIGHT".
It's not a function, it closes the #ifdef USE_HEADLIGHT statement.
Pff, I'm nab at this stuff. I thought that might be the case, but then why is there a block of code seemingly related to the headlights underneath the closing parameter?
User avatar
Jonathan
A Brave Victim
Posts: 3391
Joined: Thu Feb 03, 2005 12:50 am
Location: Not really lurking anymore

Re: eWallRim::Bound

Post by Jonathan »

Underneath the #endif there is no headlight code. There's the name tag, the cycle's shadow, and the lag-o-meter.
ˌɑrməˈɡɛˌtrɑn
Post Reply