Browse Source

Draft specs for sprites and animations

Add documentation for sprites and animation management.
feature/data-structs
TheoryOfNekomata 1 year ago
parent
commit
228755c708
7 changed files with 108 additions and 84 deletions
  1. +17
    -0
      assets/internal/default/weapon-servant/animation.json
  2. +1
    -0
      assets/internal/default/weapon-servant/definition.json
  3. +82
    -0
      assets/internal/default/weapon-servant/sprite.orig.svg
  4. +1
    -82
      assets/internal/default/weapon-servant/sprite.svg
  5. +4
    -0
      docs/sprites.md
  6. +2
    -1
      src/packages/game/output/video/IZ_video.c
  7. +1
    -1
      src/packages/game/output/video/IZ_video.h

+ 17
- 0
assets/internal/default/weapon-servant/animation.json View File

@@ -0,0 +1,17 @@
{
"deploy": {
"zeroInterpolation": "set",
"components": {
"SlideBack": {
0: { "translate": [0, 0] },
0.25: { "translate": [-1.5, 0] },
1: { "translate": [0, 0], "interpolation": "ease-in" }
},
"SlideFront": {
0: { "translate": [0, 0] },
0.25: { "translate": [-1.5, 0] },
1: { "translate": [0, 0], "interpolation": "ease-in" }
}
}
}
}

+ 1
- 0
assets/internal/default/weapon-servant/definition.json View File

@@ -0,0 +1 @@
{}

+ 82
- 0
assets/internal/default/weapon-servant/sprite.orig.svg View File

@@ -0,0 +1,82 @@
<svg id="Root" xmlns="http://www.w3.org/2000/svg" width="223px" height="144px" version="1.1" shape-rendering="geometricPrecision" text-rendering="geometricPrecision" image-rendering="optimizeQuality" fill-rule="evenodd" clip-rule="evenodd" viewBox="0 0 218.123 141.191">
<g id="MagazineBack">
<polygon fill="#B3B3B3" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="22.9256" points="78.806,27.638 79.504,30.798 70.261,26.786 70.034,26.253 72.594,26.024 "/>
</g>
<g id="Cartridge">
<polygon fill="#CC9933" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="22.9256" points="52.97,22.599 52.97,32.34 52.969,32.34 52.677,32.047 52.677,22.892 "/>
<rect fill="#CC9933" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="22.9256" x="52.97" y="22.599" width="0.949" height="9.742"/>
<rect fill="#CC9933" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="22.9256" x="53.919" y="23.171" width="0.88" height="8.597"/>
<polygon fill="#CC9933" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="22.9256" points="55.597,22.613 55.68,22.613 55.68,32.326 55.597,32.326 54.799,31.768 54.799,23.171 "/>
<path fill="#CC9933" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="22.9256" d="M71.456 31.872l-3.777 -0.222 0 -8.36 3.777 -0.222c13.684,-0.804 13.683,9.607 0,8.804z"/>
<polygon fill="#CC9933" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="22.9256" points="55.68,22.613 71.409,22.75 71.409,32.189 55.68,32.326 "/>
</g>
<g id="MagazineFront">
<polygon fill="#B3B3B3" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="22.9256" points="22.363,133.735 64.015,133.735 63.955,140.702 22.363,139.204 "/>
<polygon fill="#B3B3B3" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="22.9256" points="27.207,118.823 52.521,22.651 68.498,22.651 70.261,26.786 81.777,31.785 71.827,71.691 64.052,69.933 63.578,72.033 71.306,73.779 56.424,133.462 23.271,133.774 25.815,124.112 52.521,22.651 "/>
<polygon fill="#4D4D4D" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="22.9256" points="71.827,71.691 71.306,73.779 63.578,72.033 64.052,69.933 "/>
<path fill="#4D4D4D" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="22.9256" d="M25.736 124.41l1.471 -5.587 6.248 1.412c0.72,0.163 1.176,0.885 1.013,1.606l-0.681 3.012c-0.163,0.721 -0.885,1.176 -1.605,1.013l-6.446 -1.456z"/>
<path fill="#B3B3B3" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="22.9256" d="M45.543 109.993l0 0c1.286,0.291 2.1,1.581 1.809,2.867l-3.536 15.647c-0.29,1.286 -1.58,2.1 -2.866,1.809l0 0c-1.286,-0.29 -2.1,-1.58 -1.809,-2.866l3.536 -15.646c0.29,-1.286 1.58,-2.101 2.866,-1.811z"/>
</g>
<g id="Hammer">
<circle fill="none" cx="37.749" cy="40.173" r="37.749"/>
<path fill="#B3B3B3" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="22.9256" d="M7.791 35.587c-1.408,-0.473 -2.423,-1.803 -2.423,-3.372 0,-1.379 0.784,-2.574 1.929,-3.163 2.408,-1.238 3.634,-2.424 4.119,-5.308 0.39,-2.311 2.838,-2.287 4.764,-0.976l11.018 7.498c-1.128,1.974 -4.144,9.125 -5.522,10.209l-13.885 -4.888zm1.134 -5.241c1.033,0 1.869,0.836 1.869,1.869 0,1.032 -0.836,1.868 -1.869,1.868 -1.032,0 -1.868,-0.836 -1.868,-1.868 0,-1.033 0.836,-1.869 1.868,-1.869z"/>
</g>
<g id="Part">
<rect fill="#B3B3B3" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="22.9256" x="37.748" y="34.671" width="173.141" height="5.502"/>
</g>
<g id="SlideBack">
<rect fill="#B3B3B3" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="22.9256" x="194.585" y="31.367" width="16.306" height="11.158"/>
</g>
<g id="Barrel">
<rect fill="#B3B3B3" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="22.9256" x="99.366" y="9.752" width="118.267" height="13.505"/>
</g>
<g id="Trigger">
<circle fill="none" cx="98.071" cy="45.703" r="45.703"/>
<path fill="#B3B3B3" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="22.9256" d="M87.49 56.963l1.374 1.049c-0.51,1.736 -0.788,3.586 -0.788,5.506 0,5.721 2.451,10.822 6.275,14.135l1.613 -2.184c-2.672,-2.608 -4.353,-4.556 -4.353,-10.594 0,-6.039 5.883,-14.471 13.141,-14.471l-6.681 -4.701 -5.292 4.701c-1.823,1.619 -4.43,3.347 -5.289,6.559z"/>
</g>
<g id="Receiver">
<path fill="#B3B3B3" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="22.9256" d="M151.24 45.474l43.345 0 0 -14.107 -170.695 0 0.12 -1.968 0.925 0 1.446 -4.099 -1.487 0 -3.431 5.999 -1.736 3.257c-1.738,3.263 -4.88,5.839 -8.796,6.305l-0.02 0.014 -0.201 0.01 -0.007 0.001 -0.007 0 -0.008 0.001 -0.007 0.001c-1.586,0.152 -2.748,1.563 -2.595,3.149 0.153,1.585 1.555,2.648 3.147,2.594l1.955 -0.066c0.169,0.005 0.337,0.013 0.504,0.023 7.329,0.307 13.483,5.761 14.222,13.032 0.303,2.987 -0.709,5.692 -1.717,8.328l-17.71 46.286c-0.747,2.52 -1.199,5.669 -1.199,9.439 0,3.769 0.532,7.478 1.395,10.062l4.705 0c-0.862,-2.584 -1.394,-6.293 -1.394,-10.062 0,-3.77 0.452,-6.919 1.198,-9.439l18.161 -47.461c2,-5.227 1.744,-11.533 -1.745,-16.066l-5.922 -7.668 2.661 -9.542 50.914 0 1.528 0 0.763 0c0.421,0 0.864,0.356 0.763,0.764l-0.187 0.748 -3.445 13.574c-2.127,2.131 -4.307,5.663 -5.205,9.015l-2.643 9.864c0.756,-0.342 1.594,-0.531 2.477,-0.531 3.329,0 6.028,2.698 6.028,6.027 0,3.329 -2.699,6.028 -6.028,6.028 -2.015,0 -3.798,-0.989 -4.893,-2.508l-15.342 57.257 13.238 0c0,-7.215 -0.436,-12.715 1.331,-19.835l6.944 -27.978 0.001 0c0.987,-3.974 4.763,-6.934 9.272,-6.934 3.775,0 5.156,0.417 8.739,1.348 9.343,2.431 20.529,1.426 28.917,-2.015l10.361 -4.25c-0.655,-2.447 -0.559,-9.407 0.041,-12.178 0.073,-0.66 0.231,-1.287 0.503,-1.868 2.72,-8.423 11.009,-14.551 20.816,-14.551zm-24.3 17.95c0,-7.161 -5.859,-13.02 -13.02,-13.02l-23.41 0c-7.161,0 -13.02,5.859 -13.02,13.02 0,21.484 49.45,21.484 49.45,0z"/>
<path fill="#333333" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="22.9256" d="M79.552 33.497c0.421,0 0.865,0.356 0.763,0.764l-0.187 0.748 -3.445 13.574c-2.127,2.131 -4.307,5.663 -5.205,9.015l-2.643 9.864c-2.093,0.944 -3.55,3.05 -3.55,5.496 0,1.314 0.421,2.53 1.134,3.52l-15.342 57.257 -37.689 0c-0.862,-2.584 -1.394,-6.293 -1.394,-10.062 0,-3.77 0.452,-6.919 1.198,-9.439l18.161 -47.461c2,-5.227 1.744,-11.533 -1.745,-16.066l-5.922 -7.668 2.661 -9.542 52.442 0 0.763 0z"/>
<path fill="#1A1A1A" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="22.9256" d="M71.495 46.194l-0.348 0.545 -4.707 18.087c-3.516,0.702 -6.166,3.805 -6.166,7.527 0,2.335 1.043,4.426 2.687,5.834l-12.633 48.541 -35.132 0c-0.175,-0.934 -0.277,-2.017 -0.277,-3.446 0,-3.77 0.429,-5.478 1.175,-7.998l18.161 -47.461c1.118,-2.921 1.53,-6.18 1.069,-9.277l12.352 -12.352 23.819 0z"/>
<path fill="#B3B3B3" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="22.9256" d="M20.752 133.735c0.159,0.465 0.246,0.964 0.246,1.484 0,2.53 -2.052,4.582 -4.581,4.582 -2.53,0 -4.581,-2.052 -4.581,-4.582 0,-0.52 0.086,-1.019 0.245,-1.484l1.307 0 7.364 0zm-2.512 0c0.33,0.405 0.528,0.921 0.528,1.484 0,1.299 -1.053,2.351 -2.351,2.351 -1.299,0 -2.351,-1.052 -2.351,-2.351 0,-0.563 0.197,-1.079 0.527,-1.484l3.647 0z"/>
<circle fill="#4D4D4D" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="22.9256" cx="71.313" cy="72.958" r="6.028"/>
<path fill="#333333" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="22.9256" d="M53.118 54.61c2.175,0 3.939,1.764 3.939,3.938 0,2.175 -1.764,3.939 -3.939,3.939 -2.174,0 -3.938,-1.764 -3.938,-3.939 0,-2.174 1.764,-3.938 3.938,-3.938zm0.745 3.194c-0.187,-0.185 -0.451,-0.3 -0.745,-0.3 -0.293,0 -0.557,0.115 -0.744,0.3 -0.185,0.188 -0.3,0.451 -0.3,0.744 0,0.293 0.115,0.557 0.3,0.745 0.187,0.185 0.451,0.3 0.744,0.3 0.294,0 0.558,-0.115 0.745,-0.3 0.185,-0.188 0.3,-0.452 0.3,-0.745 0,-0.293 -0.115,-0.556 -0.3,-0.744z"/>
<path fill="#333333" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="22.9256" d="M37.185 112.661c2.175,0 3.938,1.763 3.938,3.938 0,2.174 -1.763,3.938 -3.938,3.938 -2.175,0 -3.938,-1.764 -3.938,-3.938 0,-2.175 1.763,-3.938 3.938,-3.938zm0.744 3.193c-0.187,-0.185 -0.451,-0.3 -0.744,-0.3 -0.293,0 -0.557,0.115 -0.744,0.3 -0.186,0.188 -0.301,0.452 -0.301,0.745 0,0.293 0.115,0.557 0.301,0.744 0.187,0.185 0.451,0.3 0.744,0.3 0.293,0 0.557,-0.115 0.744,-0.3 0.185,-0.187 0.301,-0.451 0.301,-0.744 0,-0.293 -0.116,-0.557 -0.301,-0.745z"/>
<circle fill="#333333" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="22.9256" cx="46.61" cy="78.604" r="10.046"/>
<circle fill="#B3B3B3" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="22.9256" cx="122.255" cy="36.405" r="4.018"/>
<rect fill="#B3B3B3" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="22.9256" x="122.637" y="41.991" width="10.006" height="4.903" rx="2.452" ry="2.452"/>
<path fill="none" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="22.9256" d="M94.682 42.05l10.569 0c2.355,0 4.28,-1.926 4.28,-4.279l0 0c0,-2.355 -1.925,-4.28 -4.28,-4.28l-10.569 0c-1.933,0 -3.577,1.298 -4.103,3.066 -0.483,1.713 -1.265,3.164 -3.321,3.164l-8.326 0 -0.591 2.329 16.341 0"/>
<path fill="#B3B3B3" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="22.9256" d="M99.517 42.05c-2.731,0 -5,0.967 -6.822,2.731l-0.185 0.178c-1.293,1.253 -3.326,1.513 -5.252,1.513l-10.039 0 1.122 -4.422 21.176 0z"/>
<circle fill="#B3B3B3" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="22.9256" cx="98.071" cy="45.703" r="1.194"/>
</g>
<g id="SlideFront">
<path fill="#B3B3B3" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="22.9256" d="M67.401 14.252l31.966 0 0 -4.099 -31.966 0c-1.127,0 -2.048,0.922 -2.048,2.049l0 0.001c0,1.127 0.921,2.049 2.048,2.049z"/>
<path fill="#B3B3B3" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="22.9256" d="M210.89 31.367l-187 0 0.12 -1.968 0.925 0 1.446 -4.099 -1.487 0c3.283,-5.597 6.52,-11.381 11.851,-15.184l0.001 0.001c-3.32,3.075 -7.089,8.69 -3.547,8.69l7.878 0c0,1.878 1.537,3.415 3.416,3.415l10.609 0c1.879,0 3.416,-1.537 3.416,-3.415l128.807 0 3.233 0c6.561,0 11.171,-4.822 20.332,-4.822l0 17.382z"/>
<path fill="#B3B3B3" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="22.9256" d="M39.893 8.158l4.578 0 -0.559 1.716 8.037 0 -0.689 -1.716 48.107 0 0 1.366 0 0.629 -31.965 0c-1.128,0 -2.049,0.922 -2.049,2.049l0 0c0,1.128 0.921,2.05 2.049,2.05l31.965 0 0 1.355c0,1.328 0.553,1.809 1.608,1.809l21.831 0 0 -1.608 67.189 0c3.858,0 6.929,-3.718 7.586,-6.284l0.421 -2.298 10.512 0 1.812 0 0.564 0 0 3.866 0 2.893c-9.161,0 -13.771,4.822 -20.332,4.822l-132.04 0 0 -0.001c0,-1.879 -1.537,-3.416 -3.416,-3.416l-10.61 0c-1.878,0 -3.415,1.537 -3.415,3.416l0 0.001 -7.878 0c-4.879,0 4.11,-10.649 6.694,-10.649z"/>
<path fill="#B3B3B3" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="22.9256" d="M43.912 9.874l8.037 0 -2.291 -5.706c-0.158,-0.397 -0.538,-0.852 -0.964,-0.844l-1.969 0.04c-0.462,0.009 -0.862,0.526 -1.005,0.965l-1.808 5.545z"/>
<path fill="#B3B3B3" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="22.9256" d="M201.639 3.606l-1.527 3.62 9.725 0c-1.44,-2.698 -4.144,-3.62 -8.198,-3.62z"/>
<path fill="#B3B3B3" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="22.9256" d="M42.766 10.923c2.174,0 3.938,1.764 3.938,3.938 0,0.18 -0.012,0.356 -0.035,0.529l-2.176 0c-1.752,0 -3.205,1.336 -3.395,3.04 -1.341,-0.628 -2.27,-1.99 -2.27,-3.569 0,-2.174 1.763,-3.938 3.938,-3.938z"/>
<rect fill="#B3B3B3" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="22.9256" x="41.077" y="15.39" width="17.44" height="6.832" rx="3.416" ry="3.416"/>
<circle fill="#B3B3B3" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="22.9256" cx="57.875" cy="10.322" r="1.126"/>
<circle fill="red" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="22.9256" cx="45.66" cy="27.562" r="2.21"/>
<polygon fill="#B3B3B3" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="22.9256" points="59.897,31.367 61.744,31.367 65.346,18.807 63.499,18.807 "/>
<polygon fill="#B3B3B3" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="22.9256" points="61.744,31.367 63.591,31.367 67.192,18.807 65.346,18.807 "/>
<polygon fill="#B3B3B3" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="22.9256" points="63.591,31.367 65.437,31.367 69.039,18.807 67.192,18.807 "/>
<polygon fill="#B3B3B3" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="22.9256" points="65.437,31.367 67.284,31.367 70.885,18.807 69.039,18.807 "/>
<polygon fill="#B3B3B3" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="22.9256" points="67.284,31.367 69.13,31.367 72.732,18.807 70.885,18.807 "/>
<polygon fill="#B3B3B3" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="22.9256" points="69.13,31.367 70.977,31.367 74.578,18.807 72.732,18.807 "/>
<polygon fill="#B3B3B3" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="22.9256" points="70.977,31.367 72.823,31.367 76.425,18.807 74.578,18.807 "/>
<polygon fill="#B3B3B3" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="22.9256" points="72.823,31.367 74.67,31.367 78.271,18.807 76.425,18.807 "/>
<polygon fill="#B3B3B3" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="22.9256" points="74.67,31.367 76.516,31.367 80.118,18.807 78.271,18.807 "/>
<polygon fill="#B3B3B3" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="22.9256" points="76.516,31.367 78.363,31.367 81.964,18.807 80.118,18.807 "/>
<polygon fill="#B3B3B3" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="22.9256" points="78.363,31.367 80.209,31.367 83.811,18.807 81.964,18.807 "/>
<polygon fill="#B3B3B3" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="22.9256" points="80.209,31.367 82.056,31.367 85.658,18.807 83.811,18.807 "/>
<polygon fill="#B3B3B3" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="22.9256" points="82.056,31.367 83.902,31.367 87.504,18.807 85.658,18.807 "/>
<polygon fill="#B3B3B3" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="22.9256" points="83.902,31.367 85.749,31.367 89.351,18.807 87.504,18.807 "/>
<polygon fill="#B3B3B3" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="22.9256" points="85.749,31.367 87.596,31.367 91.197,18.807 89.351,18.807 "/>
<polygon fill="#B3B3B3" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="22.9256" points="87.596,31.367 89.442,31.367 93.044,18.807 91.197,18.807 "/>
<polygon fill="#B3B3B3" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="22.9256" points="89.442,31.367 91.289,31.367 94.89,18.807 93.044,18.807 "/>
<polygon fill="#B3B3B3" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="22.9256" points="91.289,31.367 93.135,31.367 96.737,18.807 94.89,18.807 "/>
<polygon fill="#B3B3B3" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="22.9256" points="93.135,31.367 94.982,31.367 98.583,18.807 96.737,18.807 "/>
</g>
</svg>

+ 1
- 82
assets/internal/default/weapon-servant/sprite.svg
File diff suppressed because it is too large
View File


+ 4
- 0
docs/sprites.md View File

@@ -0,0 +1,4 @@
* Sprites should only be in SVG format.
* Avoid using `transform` in sprites (does not work in nanosvg).
* Optimize SVG files as much as possible, but keep the IDs readable (for easy modding).
* Avoid CSS in styles (does not work in nanosvg).

+ 2
- 1
src/packages/game/output/video/IZ_video.c View File

@@ -103,7 +103,8 @@ void IZ_VideoTeardown(IZ_VideoState* state) {
SDL_DestroyWindow(state->window);
}

u16 IZ_VideoGetNextFreeSpriteSlot(IZ_VideoState* state) {
// we can use IZ_Pool for memory management. Do we want to use a single pool or multiple ones?
u16 IZ_VideoGetNextFreeSpriteSlot(IZ_VideoState* state, IZ_VideoSpritePriority priority) {
// TODO:
// 1. Run through all sprites in the active sprites array
// 2. Check each sprite's priority and requested_at (for eviction policy)


+ 1
- 1
src/packages/game/output/video/IZ_video.h View File

@@ -86,7 +86,7 @@ IZ_ProcedureResult IZ_VideoInitialize(IZ_VideoState*, void*, const char*, u8, co

IZ_ProcedureResult IZ_VideoSaveConfig(IZ_VideoState*, const char*);

u16 IZ_VideoGetNextFreeSpriteSlot(IZ_VideoState*);
u16 IZ_VideoGetNextFreeSpriteSlot(IZ_VideoState*, IZ_VideoSpritePriority);

void IZ_VideoLoadSprite(IZ_VideoState*, IZ_VideoLoadSpriteParams, IZ_SpriteSlot*);



Loading…
Cancel
Save