Zebediah Figura (@zfigura) commented about dlls/ddraw/ddraw_private.h:
void *ddraw_free_handle(struct ddraw_handle_table *t, DWORD handle, enum ddraw_handle_type type) DECLSPEC_HIDDEN; void *ddraw_get_object(struct ddraw_handle_table *t, DWORD handle, enum ddraw_handle_type type) DECLSPEC_HIDDEN;
+struct d3d_device_buffer {
- D3DPRIMITIVETYPE primitive_type;
- DWORD fvf;
- UINT stride;
- DWORD buffer_indice_count;
- DWORD buffer_vertex_count;
- WORD *buffer_indices;
- char *buffer_vertices;
- unsigned int idx_buffer_pos;
- unsigned int vertex_buffer_pos;
+};
The naming here isn't great, although it is difficult to uniquely describe what we're doing ("vertex buffer" already having a meaning, and so on.) Perhaps "vertex_batch"? And we can drop the "d3d" and "ddraw" prefixes. Similarly for the struct members themselves, no need to prepend a redundant "buffer".
We shouldn't need the "buffer_indices" or "buffer_vertices" members; it should be possible to just make them into local variables.
"buffer_indice_count" should be "index_count".
Let's also avoid DWORD, and use standard C types like unsigned int here.
And, finally, please try to match the surrounding code with respect to things like spacing and brace placement. E.g. braces should go on a new line.