# shz_xmtrx_init_screen

Source: https://sh4zam.com/api/xmtrx/shz_xmtrx_init_screen/

```c
SHZ_INLINE void shz_xmtrx_init_screen(float width, float height) SHZ_NOEXCEPT;
```

Initializes XMTRX to the viewport matrix with the given dimensions.

## Parameters

| Name | Type | Description |
| --- | --- | --- |
| `width` | `float` |  |
| `height` | `float` |  |

## Returns

Nothing (`void`).

## Details

| fr\[n + 0\] | fr\[n + 4\] | fr\[n + 8\] | fr\[n + 12\] |
| --- | --- | --- | --- |
| w\*0.5f | 0.0f | 0.0f | w\*0.5f |
| 0.0f | -h\*0.5f | 0.0f | h\*0.5f |
| 0.0f | 0.0f | 1.0f | 0.0f |
| 0.0f | 0.0f | 0.0f | 1.0f |

## Availability

- **C++ equivalent:** [`shz::xmtrx::init_screen`](https://sh4zam.com/api/cpp/xmtrx/#init_screen)
- **Type-generic form:** none
- **Back-ends:** SH4: dedicated SH4 implementation · SW: portable C · SPU: shared C implementation
- **Defined in:** [`sh4zam/shz_xmtrx.h:364`](https://github.com/gyrovorbis/sh4zam/blob/ba1e30c88d49df0311870b229e1dd860ef26c477/include/sh4zam/shz_xmtrx.h#L364)
- **Module:** [XMTRX](https://sh4zam.com/api/xmtrx/), section "Initialization"
