This page contains affiliate links. We may earn commissions when readers interact with or purchase items through these links. For more information, see our affiliate disclosures here.

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 7: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: 546
News Credits: 25
Joined: Thu Mar 25, 2004 1:15 pm
Location: Manchester, UK

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

Postby Redimus » Mon Dec 01, 2008 7: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 5: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 7: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 4:49 pm

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

Postby Psychout » Mon Dec 01, 2008 8: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...
Image
“I like to think that my arrogance, impetuosity,
impatience, selfishness and greed are the qualities
that make me the lovable chap I am.”
Psychout
HMW Moderator
Posts: 9687
News Credits: 42
Joined: Tue Aug 17, 2004 7: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 9: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 12:33 pm

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

Postby Redimus » Mon Dec 01, 2008 9: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 5: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 2: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 9: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 2:20 pm

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

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

Postby Wingspan » Mon Dec 01, 2008 2: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 12:12 am
Location: Empyrean

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

Postby Tammuz » Mon Dec 01, 2008 2: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 4:49 pm

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

Postby Absolute Zero » Mon Dec 01, 2008 3: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 9: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 6: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 5: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 7: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 9: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 9: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 7:06 pm

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

Postby Omega Sentinel » Mon Dec 01, 2008 11:12 pm

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 12:33 pm


Return to Heavy Metal War Forum

Transformers and More @ The Seibertron Store

Visit our store on eBay
These are affiliate links. We may earn commissions when you purchase items or services through these links.
Visit shop.seibertron.com to buy "Transformers TCG BUMBLEBEE VS. MEGATRON Set 2-Player Starter Set (44 Cards) New"
Transformers TCG B ...
Visit shop.seibertron.com to buy "MP-44S OPTIMUS PRIME Transformers Masterpiece G1 Takara Tomy Hasbro 2024 New"
NEW!
MP-44S OPTIMUS PRI ...
Visit shop.seibertron.com to buy "1 Step Changer BUMBLEBEE Transformers Cyberverse Hasbro 2018 NEW Ages 6+"
1 Step Changer BUM ...
Visit shop.seibertron.com to buy "OPTIMUS PRIME Transformers Age Extinction One-Step complete AOE Hasbro 2014"
OPTIMUS PRIME Tran ...
Visit shop.seibertron.com to buy "NITRO BUMBLEBEE Transformers Dark of the Moon Deluxe complete DOTM 2011 230427A"
NITRO BUMBLEBEE Tr ...
Visit shop.seibertron.com to buy "RATCHET Transformers Studio Series 82 Deluxe Bumblebee Hasbro 2022 New"
RATCHET Transforme ...
Visit shop.seibertron.com to buy "Energize OPTIMUS PRIME Transformers Rescue Bots PVC figure 2013 Playskool"
Energize OPTIMUS P ...
Visit shop.seibertron.com to buy "BUMBLEBEE Transformers Studio Series Core Class Dark of the Moon DOTM 2023 New"
BUMBLEBEE Transfor ...
Visit shop.seibertron.com to buy "BLACK CONVOY PEN Transformers Sentinel Optimus Prime Japan Takara Tomy 2014 New"
BLACK CONVOY PEN T ...
Visit shop.seibertron.com to buy "Heroes of Cybertron POWERMASTER OPTIMUS PRIME SPARK ATTACK Transformers HOC New"
Heroes of Cybertro ...
Visit shop.seibertron.com to buy "Rescan BUMBLEBEE Transformers Rescue Bots 2015 yellow muscle car 201217a"
Rescan BUMBLEBEE T ...
Visit shop.seibertron.com to buy "DEAD OPTIMUS PRIME Transformers Super7 Ultimates 7" action figure WV4 2024 New"
DEAD OPTIMUS PRIME ...
Visit shop.seibertron.com to buy "OPTIMUS PRIME Transformers Prime Arms Micron Gacha Arms Microns Takara Tomy 2012"
OPTIMUS PRIME Tran ...
Visit shop.seibertron.com to buy "OPTIMUS PRIME Transformers Authentics Bravo 5" Action Figure Hasbro 2018 New"
OPTIMUS PRIME Tran ...
* Price and quantities subject to change. Shipping costs, taxes and other fees not included in cost shown. Refer to listing for current price and availability.
Find the items above and thousands more at the Seibertron Store on eBay
Transformers Podcast: Twincast / Podcast #352 - Revenge of Buzzsaw
Twincast / Podcast #352:
"Revenge of Buzzsaw"
MP3 · iTunes · RSS · View · Discuss · Ask
Posted: Saturday, June 15th, 2024

Featured Products on Amazon.com

These are affiliate links. We may earn commissions when you purchase items or services through these links.
Buy "Transformers Authentics Bumblebee" on AMAZON
Buy "Transformers: Generations Power of The Primes Leader Evolution Rodimus Prime" on AMAZON
Buy "Transformers Generations Power of The Primes Evolution Nemesis Prime (Amazon Exclusive)" on AMAZON
Buy "Transformers Combiner Wars Blast Off Megatronus Prime Master" on AMAZON
Buy "Transformers: Generations Power of The Primes Megatronus Prime Master" on AMAZON
Buy "Transformers Deluxe 20 Mercenary Action Figure" on AMAZON
Buy "Transformers: Generations Power of The Primes Solus Prime Prime Master" on AMAZON
Buy "Cyberverse Warrior Class Acid Storm" on AMAZON
Buy "Transformers: Bumblebee – Energon Igniters Power Plus Series Bumblebee" on AMAZON
Buy "Transformers Generations Leader Skywarp Action Figure" on AMAZON
Buy "Transformers Masterpiece MP-21 Bumble Figure" on AMAZON
Buy "Transformers Generations Titans Return Autobot Sovereign and Alpha Trion" on AMAZON