Author Topic: Graphics and palettes  (Read 914 times)

0 Members and 1 Guest are viewing this topic.

Offline Kanchelskis

  • YSoccer team graphic
  • RES
  • *
  • Posts: 75
Graphics and palettes
« on: 08 January 2018, 16:08:38 »
Hi there,
I could manage to edit some sprites to have a Boca/Sampdoria shirt style using the hooped one.
Then, forcing with an HEX editor the team data files, I've found that going ahead the usual ten main colours, SWOS uses some transparencies and grays and skin colours.
Do you know in which file the pal information of the sprites are stored? It could be fine to add some colours (purple and pink) replacing gray and using the other gray..
Hope someone can help me  :P

Offline zlatko

  • TRIAL
  • Posts: 10
Re: Graphics and palettes
« Reply #1 on: 10 May 2018, 00:51:54 »
Palettes are contained within the executable. There are many tables all over the place, depending on what you wish to do.
Each player sprite undergoes color conversion before the game. They have 16 colors in total, of which 4 can be custom. Colors get changed in the following manner:
Code: [Select]

 0 - \
 1 - +- no change
 2 - |
 3 - /
 4 - skin color (dark shade)
 5 - skin color (middle shade)
 6 - skin color (light shade)
 7 - changed to zero
 8 - no change
 9 - hair color (middle shade)
10 - basic shirt color
11 - shirt stripes color (gets exchanged with 10 in case of vertical stripes)
12 - hair color (dark shade)
13 - hair color (light shade)
14 - shorts color
15 - socks color

(0 = transparent)
« Last Edit: 11 May 2018, 01:03:49 by zlatko »

Offline Kanchelskis

  • YSoccer team graphic
  • RES
  • *
  • Posts: 75
Re: Graphics and palettes
« Reply #2 on: 07 June 2018, 17:38:23 »
Thank you for the reply.
I was looking for the exact table of the colours to edit them (I don't know where the infos are stored for that)

Looking at the sprites, there are 3 grays (very similar) and the one used for the kits could be replaced with a purple or a dark blue.
Same for orange as there is orange for skins too. I could manage hex editing the team data files to replace the shirt colours with the skin ones (having a dark brown shirt i.e.).

Offline zlatko

  • TRIAL
  • Posts: 10
Re: Graphics and palettes
« Reply #3 on: 09 June 2018, 23:43:57 »
Palette used for the game is stored in the "pal.256" file, at offset 64000. It's a standard DOS palette, 768 bytes, 256 colors x 3 bytes (RGB, 6 bits per color).
Only first 128 colors are used, colors in the 2nd half of palette are generated as darkened versions of the colors in the first half. This is used to get the overlay effect when showing result and statistics.
When starting the game some colors will be overwritten by pitch colors. Those are 9 colors with indices 0, 7, 9, 78, 79, 80, 81, 106 and 107. Values depend on the pitch type, and are stored in the SWOS executable starting at offset 0x20288c (starting bytes should be 38 48 00 30 48 00 48 48 00 5A...). There are 27 bytes per pitch type (3 bytes x 9 colors), and 7 pitch types for total of 189 bytes. Pitch types are in the following order: normal, dry, wet, soft, hard, frozen, muddy.
Note that the game divides each RGB value by 2 before sending it to the VGA card.
Hope I didn't miss anything, let me know if you need any other info :)

Offline Kanchelskis

  • YSoccer team graphic
  • RES
  • *
  • Posts: 75
Re: Graphics and palettes
« Reply #4 on: 11 June 2018, 00:16:45 »
First of all thank you for this useful piece of info!!
I'll give a try, If I need other infos I post here!

Offline Kanchelskis

  • YSoccer team graphic
  • RES
  • *
  • Posts: 75
Re: Graphics and palettes
« Reply #5 on: 11 June 2018, 15:05:29 »
But even the shirt colours are stored in pal.256? Can't find them

Offline zlatko

  • TRIAL
  • Posts: 10
Re: Graphics and palettes
« Reply #6 on: 21 June 2018, 15:18:56 »
The RGB values are stored there too, but indices are filled based on team colors.