| 174 | } |
| 175 | |
| 176 | void RenderWireFrame(grViewport *my_viewport) { |
| 177 | int nv = 4; |
| 178 | g3s_point phold[10], dhold[10]; |
| 179 | g3s_point *plist = phold, *dlist = dhold; |
| 180 | static float sx = 0, sy = 0, sz = 20; |
| 181 | static float xdir = .4; |
| 182 | static float ydir = .3; |
| 183 | static float zdir = .6; |
| 184 | |
| 185 | if (Square == NULL) |
| 186 | if ((Square = AllocateObject()) == NULL) |
| 187 | return; |
| 188 | |
| 189 | PositionObject(Square, sx, sy, sz); |
| 190 | sx = sx + xdir; |
| 191 | sy = sy + ydir; |
| 192 | sz = sz + zdir; |
| 193 | if (sx > 10 || sx < -10) |
| 194 | xdir = -xdir; |
| 195 | if (sy > 10 || sy < -10) |
| 196 | ydir = -ydir; |
| 197 | if (sz > 50 || sz < 5) |
| 198 | zdir = -zdir; |
| 199 | |
| 200 | g3_BeginFrame(); |
| 201 | g3_TransVertsToCamera(plist, square_data, Square, 4); |
| 202 | nv = g3_CheckToClip(&plist, &dlist, 4); |
| 203 | |
| 204 | Square->cur_pos.orientation_angles.heading += GAME_ANGLE * 2; |
| 205 | Square->cur_pos.orientation_angles.pitch += GAME_ANGLE * 2; |
| 206 | |
| 207 | if (nv > 0) { |
| 208 | g3_ProjectPointListToCanvas(dlist, nv); |
| 209 | Current_surface = my_viewport->lock(); |
| 210 | DrawWireframeList(my_viewport, dlist, nv, GR_RGB(255, 0, 255)); |
| 211 | my_viewport->unlock(); |
| 212 | } |
| 213 | } |
nothing calls this directly
no test coverage detected