Two quick questions:
- Why is the src argument in void * sq_cpy(void *dest, void *src, int n) not const? Can sq_cpy change src?
- Why does void pvr_scene_begin_txr(pvr_ptr_t txr, uint32 *rx, uint32 *ry) take pointers as arguments? Is something written back to them? I assumed by value passing at first.
sq_cpy and pvr_scene_begin_txr
- bogglez
- Moderator
- Posts: 578
- https://www.artistsworkshop.eu/meble-kuchenne-na-wymiar-warszawa-gdzie-zamowic/
- Joined: Sun Apr 20, 2014 9:45 am
- Has thanked: 0
- Been thanked: 0
sq_cpy and pvr_scene_begin_txr
Wiki & tutorials: http://dcemulation.org/?title=Development
Wiki feedback: viewtopic.php?f=29&t=103940
My libgl playground (not for production): https://bitbucket.org/bogglez/libgl15
My lxdream fork (with small fixes): https://bitbucket.org/bogglez/lxdream
Wiki feedback: viewtopic.php?f=29&t=103940
My libgl playground (not for production): https://bitbucket.org/bogglez/libgl15
My lxdream fork (with small fixes): https://bitbucket.org/bogglez/lxdream
- BlueCrab
- The Crabby Overlord
- Posts: 5658
- Joined: Mon May 27, 2002 11:31 am
- Location: Sailing the Skies of Arcadia
- Has thanked: 9 times
- Been thanked: 69 times
- Contact:
Re: sq_cpy and pvr_scene_begin_txr
No, it can not. It should be const, but it was traditionally not so. I'll probably change that at some point (as well as making n a size_t instead of an int, since it should never be negative), but as I said, that is not how it was originally written for whatever reason.bogglez wrote:Two quick questions:
- Why is the src argument in void * sq_cpy(void *dest, void *src, int n) not const? Can sq_cpy change src?
At the moment, no, nothing is written back to them. They should contain the values of the width and height of the texture passed in (and pretty much currently must be 1024 and at least 512 respectively).- Why does void pvr_scene_begin_txr(pvr_ptr_t txr, uint32 *rx, uint32 *ry) take pointers as arguments? Is something written back to them? I assumed by value passing at first.
- PH3NOM
- DC Developer
- Posts: 576
- Joined: Fri Jun 18, 2010 9:29 pm
- Has thanked: 0
- Been thanked: 5 times
Re: sq_cpy and pvr_scene_begin_txr
As it really should be a cont pointer, I went ahead and made that change in the repo today when adding some kgl stuff.BlueCrab wrote:No, it can not. It should be const, but it was traditionally not so. I'll probably change that at some point (as well as making n a size_t instead of an int, since it should never be negative), but as I said, that is not how it was originally written for whatever reason.bogglez wrote:Two quick questions:
- Why is the src argument in void * sq_cpy(void *dest, void *src, int n) not const? Can sq_cpy change src?
Git the latest commit to check things out.