>
shop.seibertron.com amazon.seibertron.com Facebook Twitter X YouTube Pinterest Instagram Myspace LinkedIn Patreon Podcast RSS
This page runs on affiliate links — your clicks may earn us a few Shanix. Want the full transmission? Roll out to our Affiliate Disclosure.

Wow, those Firefox bar / palette glitches are annoying

Discuss the Heavy Metal War game, report bugs, challenge opponents, and talk some smack! Play the Heavy Metal War game here.

Wow, those Firefox bar / palette glitches are annoying

Postby Glyph » Mon Dec 01, 2008 8:30 am

So here's a couple of freebies.

Health & win/loss bars
In the function game_spacer_image - in game_shared_display.php, if it hasn't been rearranged - replace /images/layout/spacer.gif (which no longer exists) with /images/spacer.gif (which still does).
Code: Select all
function game_spacer_image($w = 1, $h = 1, $alt = '')
{
    $w = max(intval($w), 1);
    $h = max(intval($h), 1);
    $alt = htmlentities($alt);
    return sprintf(
        '<img src="/images/spacer.gif" width="%d" height="%d" border="0" alt="%s" />',
        $w,
        $h,
        $alt
    
);
}
  

There may be other broken links to /images/layout/spacer.gif scattered around - I think I caught most of the hardcoded ones and replaced them with the game_spacer_image function, but I may not have got them all.

Colour picker palette
To make the palette show up correctly in the first place:
In character_edit.php, find the printf() call which draws the palette boxes. The template begins with:
Code: Select all
<td style="padding-top: 10px; background-color: %s"
and the first argument is:
Code: Select all
color_rgb2html($rgb)

Change 'background-color: %s' in the template to 'background-color: #%s'.

To fix the dynamic palette:
In the Javascript embedded in character_edit.php, add the following function:
Code: Select all
function hexstring (rgb)
{
    return '#' + int2base(rgb[0] * 255, 16) + int2base(rgb[1] * 255, 16) + int2base(rgb[2] * 255, 16);
}

Then, in the update_sat amd update_val functions:
Code: Select all
function update_sat (hue)
{
   curr_hue = hue;

   failsafe = 50;

   for (var i = 0; i < SAT_NUM_STEPS; i++) {
      failsafe--;
      if (failsafe <= 0) {
         alert ('Failsafe kicked in at i=' + i + ', its=' + its + '!');
         break;
      }

      rgb = hsv2rgb(hue, SAT_MIN + (i * SAT_STEP), VAL_MAX);
      cell = document.getElementById('cp_sat' + i);
      cell.style.backgroundColor = hex_string(rgb);
   }

   update_val (curr_sat);
}


function update_val (sat, new_val)
{
   hue = curr_hue;
   curr_sat = sat;

   failsafe = 50;

   for (var i = 0; i < VAL_NUM_STEPS; i++) {
      failsafe--;
      if (failsafe <= 0) {
         alert ('Failsafe kicked in at i=' + i + ', its=' + its + '!');
         break;
      }

      cell = document.getElementById('cp_val' + i);
      rgb = hsv2rgb(hue, sat, VAL_MIN + (i * VAL_STEP));
      cell.style.backgroundColor = hex_string(rgb);
   }
}
(That is, move the calls to int2base into a new function which also - this is the important bugfix - prepends '#' to the hex string.)

Also, the 'failsafe' loop is junk debug code that should be safe to remove.

Also also, you may want to call update_sat and update_val on page load, to ensure they take account of any pre-selection in the hue row.


HTH 8)
Psychout wrote:Im not scared of a gender confused minibot! :P
User avatar
Glyph
Posts: 880
News Credits: 33
Joined: Thu Mar 25, 2004 2:15 pm
Location: Manchester, UK

Re: Wow, those Firefox bar / palette glitches are annoying

Postby Redimus » Mon Dec 01, 2008 8:42 am

Motto: "Better than Michael Bay..."
Weapon: Null-Ray Rifle
It really is annoying, it really is.

Here's hoping someone listens...
Image
Duly Appointed Representative in Chief of the Decpeticon Coprophage Accord.
Second class scavenger.
Better RED than DEAD!
Better still
RDD!
User avatar
Redimus
Guardian Of Seibertron
Posts: 5729
News Credits: 1
Joined: Mon Apr 25, 2005 6:44 am
Location: Neo Kaon, planing the domination of HMW:GD.
Strength: 6
Intelligence: 10
Speed: 6
Endurance: 7
Rank: 7
Courage: 8
Firepower: 6
Skill: 10

Re: Wow, those Firefox bar / palette glitches are annoying

Postby Tammuz » Mon Dec 01, 2008 8:58 am

i've missed you glyph.

but don't get you hopes up, OS doesn't seem inclined to work on HMW.
Image
User avatar
Tammuz
Faction Commander
Posts: 4354
Joined: Fri Aug 01, 2003 5:49 pm

Re: Wow, those Firefox bar / palette glitches are annoying

Postby Psychout » Mon Dec 01, 2008 9:02 am

Motto: "This post clearly was meant to offend, and if you are affected by it in any way please close your browser and discuss it with someone who knows not to take the internet seriously."
Weapon: Black Magic
Ill leave it where he cant help but trip over it...
Psychout
HMW Moderator
Posts: 9702
News Credits: 42
Joined: Tue Aug 17, 2004 8:04 am
Location: Vatican City
Alt Mode: Cassette. The 80s ROCKED
Strength: 1
Intelligence: 1
Speed: 1
Endurance: 1
Rank: 10
Courage: 1
Firepower: 1
Skill: 10

Re: Wow, those Firefox bar / palette glitches are annoying

Postby Omega Sentinel » Mon Dec 01, 2008 10:39 am

Tammuz wrote:but don't get you hopes up, OS doesn't seem inclined to work on HMW.
Indeed
Omega Sentinel
Godmaster
Posts: 1971
News Credits: 5
Joined: Tue Aug 17, 2004 1:33 pm

Re: Wow, those Firefox bar / palette glitches are annoying

Postby Redimus » Mon Dec 01, 2008 10:51 am

Motto: "Better than Michael Bay..."
Weapon: Null-Ray Rifle
*Sigh*
Image
Duly Appointed Representative in Chief of the Decpeticon Coprophage Accord.
Second class scavenger.
Better RED than DEAD!
Better still
RDD!
User avatar
Redimus
Guardian Of Seibertron
Posts: 5729
News Credits: 1
Joined: Mon Apr 25, 2005 6:44 am
Location: Neo Kaon, planing the domination of HMW:GD.
Strength: 6
Intelligence: 10
Speed: 6
Endurance: 7
Rank: 7
Courage: 8
Firepower: 6
Skill: 10

Re: Wow, those Firefox bar / palette glitches are annoying

Postby Absolute Zero » Mon Dec 01, 2008 3:10 pm

Weapon: Corrosive Slime Shooter
Maybe Glyph should come back and fix some of the problems?
Image
Sig by BunBun
Dead in One-XBLive
Shinobiusagi-PSN
User avatar
Absolute Zero
Faction Commander
Posts: 4574
News Credits: 1
Joined: Wed Jul 16, 2003 10:47 pm
Location: On the corner earning money for a crippling plastic addiction
Alt Mode: Meloncholy Savior of Fascist Autobots
Strength: 2
Intelligence: 4
Endurance: Infinity
Rank: 2
Courage: 10
Firepower: 5
Skill: 6

Re: Wow, those Firefox bar / palette glitches are annoying

Postby Sharpwing » Mon Dec 01, 2008 3:20 pm

Maybe some people need to be patient.
Image
Sharpwing
Vehicon
Posts: 363
Joined: Mon Jun 30, 2003 11:40 am

Re: Wow, those Firefox bar / palette glitches are annoying

Postby Wingspan » Mon Dec 01, 2008 3:25 pm

Motto: "Death is not the end."
Maybe I can finally get my cookie?

I came to the darkside; I want my cookie!!

Image

All will come in due time - or after sever nut-kickery - moderators choice.
Omnis enim, qui mala agit, odit lucem et non venit ad lucem, ut non arguantur opera eius; qui autem facit veritatem, venit ad lucem, ut manifestentur eius opera, quia in Deo sunt facta. Translation

XBox 360: BrandedByFlame
User avatar
Wingspan
Gestalt Team Leader
Posts: 983
News Credits: 2
Joined: Wed Mar 16, 2005 1:12 am
Location: Empyrean

Re: Wow, those Firefox bar / palette glitches are annoying

Postby Tammuz » Mon Dec 01, 2008 3:49 pm

Sharpwing wrote:Maybe some people need to be patient.



there's patience, and there's infinite patience; OS pretty much inferred he wants to wash his hands of V1, so why not let someone else look after it while OS is doing what ever OS is doing?
Image
User avatar
Tammuz
Faction Commander
Posts: 4354
Joined: Fri Aug 01, 2003 5:49 pm

Re: Wow, those Firefox bar / palette glitches are annoying

Postby Absolute Zero » Mon Dec 01, 2008 4:03 pm

Weapon: Corrosive Slime Shooter
Tammuz wrote:
Sharpwing wrote:Maybe some people need to be patient.



there's patience, and there's infinite patience; OS pretty much inferred he wants to wash his hands of V1, so why not let someone else look after it while OS is doing what ever OS is doing?


Exactly.

Of course, it's easier to be patient when we know something's coming or being done and not being kept in the dark about some top secret black project like it's some governement military thing.

Don't let the yokles know nuttin. Who knows what they might do. They might get excited and spontaneously combust. :P
Image
Sig by BunBun
Dead in One-XBLive
Shinobiusagi-PSN
User avatar
Absolute Zero
Faction Commander
Posts: 4574
News Credits: 1
Joined: Wed Jul 16, 2003 10:47 pm
Location: On the corner earning money for a crippling plastic addiction
Alt Mode: Meloncholy Savior of Fascist Autobots
Strength: 2
Intelligence: 4
Endurance: Infinity
Rank: 2
Courage: 10
Firepower: 5
Skill: 6

Re: Wow, those Firefox bar / palette glitches are annoying

Postby Redimus » Mon Dec 01, 2008 7:51 pm

Motto: "Better than Michael Bay..."
Weapon: Null-Ray Rifle
Yeah, its been made pretty obvious that you are doing a 'V2' so why not admit it. At least then the general populace will see you are doing *something*, whereas right now it apears nothing is being done, and you are taking a damn long time in doing it.

We all dont mind waiting if we know something is being worked on.

We arnt asking for a final date, cuase most of us know that real life and programming problems will delay any date chosen.

All we want is for a little bit of honesty.
Image
Duly Appointed Representative in Chief of the Decpeticon Coprophage Accord.
Second class scavenger.
Better RED than DEAD!
Better still
RDD!
User avatar
Redimus
Guardian Of Seibertron
Posts: 5729
News Credits: 1
Joined: Mon Apr 25, 2005 6:44 am
Location: Neo Kaon, planing the domination of HMW:GD.
Strength: 6
Intelligence: 10
Speed: 6
Endurance: 7
Rank: 7
Courage: 8
Firepower: 6
Skill: 10

Re: Wow, those Firefox bar / palette glitches are annoying

Postby Absolute Zero » Mon Dec 01, 2008 8:27 pm

Weapon: Corrosive Slime Shooter
Not true. I'd like some cake.
Image
Sig by BunBun
Dead in One-XBLive
Shinobiusagi-PSN
User avatar
Absolute Zero
Faction Commander
Posts: 4574
News Credits: 1
Joined: Wed Jul 16, 2003 10:47 pm
Location: On the corner earning money for a crippling plastic addiction
Alt Mode: Meloncholy Savior of Fascist Autobots
Strength: 2
Intelligence: 4
Endurance: Infinity
Rank: 2
Courage: 10
Firepower: 5
Skill: 6

Re: Wow, those Firefox bar / palette glitches are annoying

Postby Loki God Of Mischief » Mon Dec 01, 2008 10:51 pm

Who is Glyph and why is he so awesome? If he has that level of programming skill to provide fixes for the game just like that he should totally be programming with OS. The game would only be better for it.

Absolute Zero wrote:Not true. I'd like some cake.


It is delicious cake. You must eat it.
Image

It's best to assume every link I post is NSFW, and every post I make is just me taking the piss.
User avatar
Loki God Of Mischief
Brainmaster
Posts: 1270
Joined: Thu Jul 24, 2008 8:06 pm

Re: Wow, those Firefox bar / palette glitches are annoying

Postby Omega Sentinel » Tue Dec 02, 2008 12:12 am

Fearless Echoes wrote:Yeah, its been made pretty obvious that you are doing a 'V2' so why not admit it. At least then the general populace will see you are doing *something*, whereas right now it apears nothing is being done, and you are taking a damn long time in doing it.
If I cared what you people thought of my performance or if you were my boss in any way, shape or form you would have an argument. Just know that I am doing nothing, I am worthless and do not have the ability to program my way out of a sack, let alone fix a status bar.

Fearless Echoes wrote:
We all dont mind waiting if we know something is being worked on.

We arnt asking for a final date, cuase most of us know that real life and programming problems will delay any date chosen.

All we want is for a little bit of honesty.
Honesty? Here's some honesty... You eagerly await any single word I might type in this forum to lynch mob it with a fury and then wonder why I never post anything. Its actually pretty funny. Its never really criticism but typically personal attacks. I get it. You don't like me. So now we have a little bit of honesty.

Merc With A Mouth wrote:Who is Glyph and why is he so awesome? If he has that level of programming skill to provide fixes for the game just like that he should totally be programming with OS. The game would only be better for it.
He was the former programmer whom I replaced. There were reasons for it which I am not at liberty to discuss here. What you are seeing here is the fact that he was liked by the mob and I am not. HMW is currently under a code freeze which is why you aren't seeing any enhancements/fixes right now.
Omega Sentinel
Godmaster
Posts: 1971
News Credits: 5
Joined: Tue Aug 17, 2004 1:33 pm


Return to Heavy Metal War Forum


[ Incoming message. Source unknown. ] No Signal - Please Stand By [ Click to attempt signal recovery... ]


Transformers and More @ The Seibertron Store

Visit shop.seibertron.com to buy "Ghost Rider Wolverine WEAPONS VENGEANCE #1 var Marvel Comics JUN230944 Texeira"
Ghost Rider Wolver ...
Visit shop.seibertron.com to buy "Ghost Rider Wolverine WEAPONS VENGEANCE #1 Marvel Comics MAY238596 (CA) Logo"
Ghost Rider Wolver ...
Visit shop.seibertron.com to buy "X-FORCE #27 var Promo Marvel Comics 2022 FEB220949 (W) Percy (CA) Weaver (A)Gill"
NEW!
X-FORCE #27 var Pr ...
Visit shop.seibertron.com to buy "NEW MUTANTS #98 3D Edition Marvel Comics 2024 0524PG820 Pan-Universal Galactic"
NEW MUTANTS #98 3D ...
Visit shop.seibertron.com to buy "Ghost Rider Wolverine WEAPONS VENGEANCE #1 Marvel Comics JUN230943 (CA) Stegman"
Ghost Rider Wolver ...
Visit shop.seibertron.com to buy "X-MEN AGE OF REVELATION #0 Shadow Drop Variant Marvel Comics 2025 (CA) Ramos"
NEW!
X-MEN AGE OF REVEL ...
Visit shop.seibertron.com to buy "Ghost Rider Wolverine WEAPONS VENGEANCE #1 Marvel Comics MAY238597 (CA) Logo"
Ghost Rider Wolver ...
Visit shop.seibertron.com to buy "WOLVERINE #28 Marvel Comics 2022 OCT220912 (CA) Yu (W) Percy (A) Ryp"
WOLVERINE #28 Marv ...
Visit shop.seibertron.com to buy "Ghost Rider Wolverine WEAPONS VENGEANCE #1 Marvel Comics JUN230947 (CA) Perez"
Ghost Rider Wolver ...
Visit shop.seibertron.com to buy "Deadpool Circle Chase #1 Facsimile 3D Marvel Comics 2024 ptg APR240892 Madureira"
Deadpool Circle Ch ...
Visit shop.seibertron.com to buy "DEADPOOL #1 Facsimile Foil Marvel Comics 2024 ptg APR240894 (CA) McGuinness"
NEW!
DEADPOOL #1 Facsim ...
Visit shop.seibertron.com to buy "Ghost Rider Wolverine WEAPONS VENGEANCE #1 Marvel Comics JUN230949 (CA) Kuder"
Ghost Rider Wolver ...
Visit shop.seibertron.com to buy "X-MEN #1 3D Edition Gatefold Marvel Comics 2025 0924PG802 Pan-Universal Galactic"
X-MEN #1 3D Editio ...
Visit shop.seibertron.com to buy "X-MEN LEGENDS #11 Marvel Comics 2022 NOV210886 (W) Simonson (A/CA) Simonson"
NEW!
X-MEN LEGENDS #11 ...
These are affiliate links. We may earn a commission.
Details subject to change. See listing for latest price and availability.

Featured Products on Amazon.com

Buy "Transformers: Generations Power of The Primes Megatronus Prime Master" on AMAZON
Buy "Transformers Generations Combiner Wars Computron Collection Pack" on AMAZON
Buy "Transformers Studio Series 11 Deluxe Class Movie 4 Lockdown" on AMAZON
Buy "Transformers Studio Series 10 Deluxe Class Movie 1 Autobot Jazz" on AMAZON
Buy "Transformers Generations Power of The Primes Deluxe Terrorcon Cutthroat" on AMAZON
Buy "Transformers Combiner Wars Blast Off Megatronus Prime Master" on AMAZON
Buy "Transformers Studio Series 07 Leader Class Movie 4 Grimlock" on AMAZON
Buy "Transformers: Generations Power of The Primes Deluxe Class Dinobot Slug" on AMAZON
Buy "Hasbro Transformers Generations Titans Return Soundwave and Soundblaster" on AMAZON
Buy "Transformers Generations Titans Return Deluxe Slugslinger and Caliburst" on AMAZON
Buy "Transformers Generations Leader Powermaster Optimus Prime Action Figure (Discontinued by manufacturer)" on AMAZON
Buy "Transformers Generations Combiner Wars Legends Class Protectobot Groove Figure" on AMAZON
These are affiliate links. We may earn a commission.
Details subject to change. See listing for latest price and availability.