CorsixTH icon indicating copy to clipboard operation
CorsixTH copied to clipboard

[META] Mood icons misalignment with humanoid (staff / patient )

Open lewri opened this issue 1 year ago • 8 comments

In CorsixTH there are several states where a mood icon doesn't align properly. Reported issues below should be used for reference of the issue, Any new mood inconsistencies should be added here instead (old issues will be closed and merged in)

  • [x] Patient mood icon misaligned in General Diagnosis ( #2018 ) Image

  • [x] Pay rise icon not above handyman when sweeping ( #2017 ) Image

  • [x] Mood icons do not transition smoothly through doors ( #1759 ) Image

  • [x] Patient mood icon misaligned on Cast Remover ( #1758 ) Image

There had been initial chatter about finding a new method to target where the mood sprite should be drawn. Generally, once that exists then these mood issues should disappear.

lewri avatar Mar 11 '25 20:03 lewri

I believe some of these happen because mood displays over the object, in common cases they are patients/staff, but i suppose that on situation similar to #1758 next happens: patient walks into the machine, they become one whole object and now mood displays over the machine and not the patient.

~* 2660 this is also related to this issue~ mentioned it by mistake

Matroftt avatar Mar 11 '25 20:03 Matroftt

I believe some of these happen because mood displays over the object

That's likely indeed.

Alberth289346 avatar Mar 14 '25 19:03 Alberth289346

I have dusted my java data-file loader code a bit, created sprite sheets of the VSPR file, and dumped the first frame of animations 34 and 184, and linked the listed sprite numbers with the sprite sheets to get a description.

That resulted in

Animation 34, Doctor walk east.
Frame 0
  if layers[0] == 0 then draw sprite 2503 at (-30, -30) // Shadow ?
  if layers[0] == 0 then draw sprite 162 at (-30, -79)  // Body + legs
  if layers[5] == 2 then draw sprite 285 at (-23, -79)  // ** Head **
  if layers[5] == 4 then draw sprite 281 at (-23, -79)  // ** Head **
  if layers[5] == 4 then draw sprite 977 at (-18, -48)  // Hand
  if layers[5] == 6 then draw sprite 283 at (-24, -80)  // ** Head **
  if layers[5] == 8 then draw sprite 4106 at (-24, -80) // ** Head **
  if layers[5] == 8 then draw sprite 977 at (-18, -48)  // Hand

and

Animation 184, walk through door.
Frame 0
  if layers[4] == 0 then draw sprite 911 at (-72, -106)   // Body + legs
  if layers[0] == 0 then draw sprite 2392 at (-40, -111)  // Door part?
  if layers[0] == 2 then draw sprite 936 at (-63, -113)   // ** Head **
  if layers[1] == 2 then draw sprite 915 at (-72, -106)   // Coat
  if layers[0] == 4 then draw sprite 933 at (-63, -113)   // ** Head **
  if layers[0] == 6 then draw sprite 942 at (-63, -113)   // ** Head **
  if layers[1] == 4 then draw sprite 916 at (-72, -106)   // Coat
  if layers[1] == 6 then draw sprite 917 at (-72, -106)   // Coat
  if layers[0] == 12 then draw sprite 1231 at (-67, -120) // ** Head **
  if layers[0] == 14 then draw sprite 1231 at (-67, -120) // ** Head **
  if layers[0] == 14 then draw sprite 1271 at (-66, -120) // Hat?
  if layers[0] == 16 then draw sprite 1231 at (-67, -120) // ** Head **
  if layers[0] == 8 then draw sprite 930 at (-64, -116)   // ** Head **
  if layers[0] == 16 then draw sprite 1286 at (-66, -120) // Bandage??
  if layers[0] == 8 then draw sprite 979 at (-72, -76)    // Hand
  if layers[0] == 10 then draw sprite 945 at (-63, -113)  // ** Head **
  if layers[0] == 10 then draw sprite 978 at (-72, -76)   // Hand
  if layers[0] == 0 then draw sprite 1428 at (-67, -63)   // Feet?
  if layers[0] == 0 then draw sprite 551 at (-69, -110)   // Door
  if layers[2] == 4 then draw sprite 2028 at (-65, -115)  // Hat

Each line is an element. It checks a layer for a number and if they match the indicated sprite is painted. I wrote what the sprite showed behind the line.

As you can see, several head sprites are drawn, the position is likely the top-left corner of the sprite.

I am not sure where to go from here, but at least in theory it should be possible to recognize head sprites in an animation, and compute a position for a mood icon.

Alberth289346 avatar Mar 16 '25 15:03 Alberth289346

#2818 aligned to this.

lewri avatar Apr 08 '25 18:04 lewri

Image

  • [x] Comfy chair needs some focus

Image

  • [ ] As well as being dead. (I don't think the grim reaper is involved here, the mood was stuck there for some time already.)

Alberth289346 avatar May 16 '25 19:05 Alberth289346

  • [ ] Оn using drink machine mood icon misaligned

v0.68.0.app and trunk master 9165870 too.

drink_machine_mood_misaligned.sav.zip

Image

ARGAMX avatar May 29 '25 14:05 ARGAMX

  • [ ] Оn using bench mood icon misaligned

v0.69.0-beta1

mood_misaligned_on_becnh.sav.zip

Image

ARGAMX avatar Jun 08 '25 15:06 ARGAMX

Edited the various reports to have a check-mark, so we can mark them as fixed.

Alberth289346 avatar Jun 09 '25 07:06 Alberth289346