Tutorial 2. Marmalade SDK главный игровой цикл (комментарии)
Это сообщение сгенерировано автоматически.
Тема s3eDeviceYield не расскрыта!
GLoom
> Тема s3eDeviceYield не расскрыта!
в смысле?
В смысле не написано что делает s3eDeviceYield и что за параметр у этой функции.
GLoom
> В смысле не написано что делает s3eDeviceYield и что за параметр у этой
> функции.
>
ну документацию слабо почитать ;-)
что то типа Sleep в масдае.
S3E_API int64 s3eDeviceYield ( int32 ms = 0 )
Yield to the OS for a specified period of time.
Parameters:
ms Maximum number of milliseconds to yield. If this is zero, s3eDeviceYield() performs a minimal yield to the OS and fires any events generated from the OS devices. If this is S3E_DEVICE_YIELD_FOREVER, s3eDeviceYield() will not return until either a quit request is received or s3eDeviceUnYield() is called (e.g. from a callback). If this is S3E_DEVICE_YIELD_NO_CALLBACKS, a minimal yield to the OS is done, but no callbacks will be dispatched.
Remarks:
This also allows the OS to do any required processing for this application, for example processing Device or UI messages. It may also permit the CPU to enter a low-power state. If ms is zero, S3E will yield for the minimum amount of time required by the underlying OS to perform essential processing. Therefore the S3E Application should call s3eDeviceYield(0) frequently to enable the underlying OS to respond in a timely manner to external events. S3E ensures that s3eDeviceYield(0) can be called very frequently (more that once a millisecond) with very little overhead. If ms is non-zero S3E will allow the OS to perform necessary processing and return control to the caller after ms milliseconds.
Required Header Files
s3eDevice.h
progman
Мне не слабо, я с мармеладкой с версии 4.0 ;-) Вот то-же самое почти писал почти три года назад: http://www.gamedev.ru/community/airplay/articles/airplay-quick-start
Я понимаю что статья по сути - перевод, но было бы полезно новичкам чтобы сразу были пояснения.
От Sleep отличается тем что тут управление передаётся железке и она может делать свои дела, а sleep просто тормозит выполнение потока. Не на всех ОС мобильных настоящая многозадачность. Правда, слава яйцам, они умирают.
GLoom
ну то что это перевод я и не скрываю :-)
GLoom
> но было бы полезно новичкам чтобы сразу были пояснения.
наверное вы правы. опять же новичкам если что непонятно всегда велкам спросить на форуме :-)
Тема в архиве.