User Tools

Site Tools


notes:comporg:spring2024:projects:def0

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
notes:comporg:spring2024:projects:def0 [2024/02/15 01:09] – [Comparisons] jwielandnotes:comporg:spring2024:projects:def0 [2024/02/15 04:58] (current) – [Drawing Regions] rspringe
Line 45: Line 45:
  
 =====Drawing Regions===== =====Drawing Regions=====
 +Before a region can be drawn, its borders have to be defined within the texture file.
 +
 +This is done similarly to the define_region functions in C:
 +<code C>
 +define_region(minX, minY, maxX, maxY, hotspotX, hotspotY);
 +</code>
 +
 +Except that here, you have to input each coordinate value individually, including the hotspots.
 +
 +Getting only the necessary lines from the compiled code, defining a region would look like so:
 +<code asm>
 +out GPU_RegionMinX, R?
 +out GPU_RegionMinY, R?
 +. . .
 +out GPU_RegionHotSpotY, R?
 +</code>
 +
 +Where "R?" refers to the register that stores that specific coordinate.
 +
 To display your regions you have to say where you want to display the region. That is done by putting in values for X and Y into 2 different registers. Here is what that looks like: To display your regions you have to say where you want to display the region. That is done by putting in values for X and Y into 2 different registers. Here is what that looks like:
  
notes/comporg/spring2024/projects/def0.1707959352.txt.gz · Last modified: 2024/02/15 01:09 by jwieland