>
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 "Transformers Legacy United Optimus Prime Deluxe Class G1 Hasbro 2024 New"
Transformers Legac ...
Visit shop.seibertron.com to buy "Transformers Legacy United Animated Bumblebee Deluxe Class Hasbro 2024 New"
Transformers Legac ...
Visit shop.seibertron.com to buy "Rescan OPTIMUS PRIME Transformers Rescue Bots Academy Playskool Racing Truck New"
Rescan OPTIMUS PRI ...
Visit shop.seibertron.com to buy "OPTIMUS PRIME Transformers Studio Series 112 Deluxe Transformers One Hasbro New"
OPTIMUS PRIME Tran ...
Visit shop.seibertron.com to buy "Transformers Studio Series 86-29 Bumblebee Animated Movie Deluxe Hasbro 2024 New"
Transformers Studi ...
Visit shop.seibertron.com to buy "B-127 / BUMBLEBEE Transformers Studio Series Deluxe Transformers One Hasbro New"
B-127 / BUMBLEBEE ...
Visit shop.seibertron.com to buy "Transformers Buzzworthy Bumblebee Legacy Silverstreak Deluxe Class 2022 New"
Transformers Buzzw ...
Visit shop.seibertron.com to buy "SHOCKWAVE Transformers Studio Series Core Class Bumblebee Hasbro 2022 New"
SHOCKWAVE Transfor ...
Visit shop.seibertron.com to buy "LASER OPTIMUS PRIME Transformers Legacy United Leader G2 Universe 2024 New"
LASER OPTIMUS PRIM ...
Visit shop.seibertron.com to buy "BUMBLEBEE Transformers Studio Series 116 Deluxe One VW Beetle Hasbro 2025 New"
BUMBLEBEE Transfor ...
Visit shop.seibertron.com to buy "Transformers The Last Knight Optimus Prime Titan Changer 4 Step Hasbro 250203A"
Transformers The L ...
Visit shop.seibertron.com to buy "LASERBEAK Transformers Studio Series Core Class Pink Bumblebee Hasbro 2022 New"
LASERBEAK Transfor ...
Visit shop.seibertron.com to buy "World's Smallest Transformers BUMBLEBEE 1.25" Micro Action Figure Authentic New"
World's Smallest T ...
Visit shop.seibertron.com to buy "Transformers Metal Earth Last Knight OPTIMUS PRIME Color Steel Model Kit New"
Transformers Metal ...
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 MPM-03 Movie 10th Anniversary Figure Bumblebee" on AMAZON
Buy "Transformers: Generations Power of The Primes Deluxe Class Dinobot Slug" on AMAZON
Buy "Transformers: Generations Power of The Primes Legends Class Autobot Outback" on AMAZON
Buy "Transformers Titans Return Repugnus, Dastard, and Solus Prime Prime Master" on AMAZON
Buy "Transformers Generations Power of The Primes Deluxe Class Sinnertwin" on AMAZON
Buy "Transformers Deluxe Stryker 1 Action Figure" on AMAZON
Buy "Transformers Studio Series 08 Leader Class Movie 1 Decepticon Blackout" on AMAZON
Buy "Transformers Generations Power of The Primes Deluxe Class Dinobot Snarl" on AMAZON
Buy "Transformers Generations Titans Return Deluxe Sergeant Kup and Flintlock" on AMAZON
Buy "Transformers: Generations Chaos on Velocitron 5-Figure Pack" on AMAZON
Buy "Transformers Generations Combiner Wars Deluxe Class Ironhide Figure" on AMAZON
Buy "Transformers Generations Legends Class Thundercracker Figure" on AMAZON
These are affiliate links. We may earn a commission.
Details subject to change. See listing for latest price and availability.