4 pagesV  « < 2 3 4 »  
 
REPLY
> Some sources.
-QwertY-
Message#1
17.10.05, 21:33
Social network? No, have not heard!
*********
[offline]

Group: Admins
Messages 4970
Check in: 12.08.06

Reputation:-  0  +

����� ����� ����������� �������� ���� ����� ��������, ������� � �.�.
�� ��� ������ ����-�����...
download

Digit_ALL
Message#62
19.04.10, 14:33
Local
*****
[offline]

Group: Friendssavagemessiahzine.com
Messages 345
Check in: 14.09.09
Xiaomi Redmi 4 Prime

Reputation:-  34  +

I also found an inaccuracy:
To stop the service is suitable such code:
...
HANDLE svc = GetServiceHandle (L "XXX", NULL, 0);


It worked like this for me: HANDLE svc = GetServiceHandle (L "XXX0:", NULL, 0);

As I understand it, simply “three X's” do not work here.
You need to use something like this: "XXX0:"
Where:
XXX- this is our three-character prefix;
then comes the number (usually0), which means and why is needed, frankly, did not understand, but it seems that this is either the zero that is passed in the second parameter when you call RegisterService, or this is the zero that is in the "Index" parameter that we entered into the registry during service registration
RegSetValueExW (rk, L "Index", 0, REG_DWORD, (const BYTE *) & v, 4) ;;

and at the end of the symbol ":"(colon)

There was a question about the startup service.
Signed certificates with some downloaded from this forum (in the title the words "TEST ONLY" are skipped),
signed homemade,
and everywhere the result is the same - it does not start after a reboot on a real device,
although on the emulator everything is problem free

Post has been editedDigit_ALL - 19.04.10, 15:20


--------------------
motorola MPx220Samsung SGH-i740LG P970 Optimus Black→ Xiaomi Redmi 4 Pro
This message will be automatically deleted.
Sviat
Message#63
13.06.10, 19:45
Novice
***
[offline]

Group: Active users
Messages 39
Check in: 30.06.07
Sony Xperia Z5 Compact

Reputation:-  4  +

A long time ago I wrote my sapper, and now I decided to write it in pure Winapi for the PDA, taking into account the acquired skills.
If necessary, I can put it on c #.

Attached files

Attached fileSaper ___ Mobile.rar(2.35 MB)
Attached fileSaper ___ Mobile.exe(52.5 KB)
Sviat
Message#64
09.09.10, 18:29
Novice
***
[offline]

Group: Active users
Messages 39
Check in: 30.06.07
Sony Xperia Z5 Compact

Reputation:-  4  +

I finally decided to learn English. Began to look for chtonit
learning words, but did not find a suitable program. I had to write myself.
+ for the interest made a label with the text alignment vertically / horizontally.
Maybe someone will come in handy.
Attached Image
Attached fileSlovar.rar(103.51 KB)
-QwertY-
Message#65
25.04.11, 23:49
Social network? No, have not heard!
*********
[offline]

Group: Admins
Messages 4970
Check in: 12.08.06

Reputation:-  0  +

M
Cleaned up the topic


--------------------
People like me here, people like you here. They don’t go around here, they don’t hide their eyes.Compromise is not for us!
© Alice - Compromise
Winner of the First Prizesavagemessiahzine.comin the nomination of the Hero of the Forum!
Prize winnersavagemessiahzine.comin the nomination "Master'07"
Discorezzz
Message#66
06.06.11, 17:50
Freelancer
******
[offline]

Group: Developers
Messages 653
Check in: 06.03.06
Xiaomi Redmi Note 5 3/32

Reputation:-  297  +

It turned up here ...
C-Sharpovoy class implementation for reading and writing ini-files.
A couple of lines to change and you can use for the device ...
Download:Attached fileIniFile.zip(123.41 KB)
Cd_spb
Message#67
08.06.11, 15:59
Old resident
*******
[offline]

Group: Friendssavagemessiahzine.com
Messages 711
Check in: 26.12.06
Sony Ericsson Xperia arc S

Reputation:-  62  +

Attention! In order for your service to start automatically when the operating system starts, you must sign it with a certificate! Certificates are shipped with Visual Studio (unfortunately, already expired in 2008), or you can generate them yourself using the makecert console program, which is located at C: \ Program Files \ Microsoft SDKs \ Windows \ v6.0A \ bin.

For 2008 studios this is not enough. Requires a pxf file.
Solution: PFX file (PKCS # 12) can be used:

makecert -r -n "CN = Your Name" -b 01/01/2000 -e 01/01/2099 -eku 1.3.6.1.5.5.7.3.3 -sv selfcert.pvk selfcert.cer
cert2spc selfcert.cer selfcert.spc
pvkimprt -pfx selfcert.spc selfcert.pvk

http://office.microsoft.com/downloads/2000/pvkimprt.aspx


--------------------
Palm T | T5 (with wife) + HP 214 (near :-) + BT-Q1000XT (GPS) + Nokia 3720 + SE Arc S 4.0.4 (PDA)
vlad072
Message#68
17.06.11, 08:32
Old resident
*******
[offline]

Group: Friendssavagemessiahzine.com
Messages 1159
Check in: 17.04.09
Lenovo S820

Reputation:-  106  +

There is such a problem on all devices starting in wm6.1, as a spontaneous rally of a call melody in "vibro" or "silence", as well as a meeting of melodies on the first one in the list (default). Especially often appears after rebut. As it turned out, ossvcs.dll is to blame for this, the imported apishki of which do not work out correctly. Here is the solution.
fixthread.h
#include

#define INVALID_CHEKED -1
#define CHEKED_SOUND 0
#define CHEKED_VIBRO 1
#define CHEKED_MUTE 2

#define STREQU (a, b) (_wcsicmp (a, b) == 0)

DWORD InitFix ();
DWORD DeinitFix ();


service.cpp
#include
#include
#include "fixthread.h"

BOOL RFX_IOControl (DWORD AData, DWORD ACode, void * ABufIn, DWORD ASzIn, void * ABufOut, DWORD ASzOut, DWORD * ARealSzOut)
{
if ((ACode == IOCTL_SERVICE_START) || (ACode == IOCTL_SERVICE_STARTED))
{
return TRUE;
}
else if (ACode == IOCTL_SERVICE_INSTALL)
{
HKEY rk;
DWORD v = 0;

if (RegCreateKeyExW (HKEY_LOCAL_MACHINE, L "Services \\ ringerfix", 0, NULL, 0, 0, NULL, & rk, & v)) return FALSE;

RegSetValueExW (rk, L "Dll", 0, REG_SZ, (LPBYTE) L "ringerfix.dll", sizeof (L "ringerfix.dll"));

RegSetValueExW (rk, L "Prefix", 0, REG_SZ, (LPBYTE) L "RFX", sizeof (L "RFX"));

RegSetValueExW (rk, L "Flags", 0, REG_DWORD, (LPBYTE) & v, sizeof (v));
RegSetValueExW (rk, L "Index", 0, REG_DWORD, (LPBYTE) & v, sizeof (v));
RegSetValueExW (rk, L "Context", 0, REG_DWORD, (LPBYTE) & v, sizeof (v));

v = 1;
RegSetValueExW (rk, L "Keep", 0, REG_DWORD, (LPBYTE) & v, sizeof (v));

v = 99;
RegSetValueExW (rk, L "Order", 0, REG_DWORD, (LPBYTE) & v, sizeof (v));

RegFlushKey (rk);
RegCloseKey (rk);
return TRUE;
}
else if (ACode == IOCTL_SERVICE_UNINSTALL)
{
HKEY rk;
if (RegOpenKeyExW (HKEY_LOCAL_MACHINE, L "Services", 0, NULL, & rk)) return FALSE;
RegDeleteKeyW (rk, L "RingerFix");
RegFlushKey (rk);
RegCloseKey (rk);
return TRUE;
}
else if (ACode == IOCTL_SERVICE_QUERY_CAN_DEINIT)
{
memset (ABufOut, 1, ASzOut);
return TRUE;
}
else
{
return FALSE;
}
return TRUE;
}


DWORD RFX_Init (DWORD)
{
return InitFix ();
}


DWORD RFX_Deinit (DWORD)
{
return DeinitFix ();
}


BOOL WINAPI DllMain (HANDLE AModule, DWORD AReason, void *)
{
if (AReason == DLL_PROCESS_ATTACH) DisableThreadLibraryCalls ((HMODULE) AModule);
return TRUE;
}


fixthread.cpp
#include
#include "fixthread.h"

LPCTSTR szRFXWndClass = L "rfxwnd";
HWND hRFXWnd = NULL;
HKEY hKey = NULL;
HANDLE hStopEvt = NULL;

BOOL ButtonCheked (HWND hButton)
{
return (SendMessage (hButton, BM_GETCHECK, 0, 0) == BST_CHECKED);
}

DWORD GetButtonCase (HWND hButton)
{
wchar_t buttname [32];
if (GetWindowText (hButton, ButtName, 32))
{
if (STREQU (ButtName, L "On") || STREQU (ButtName, L "On")) return CHEKED_SOUND;
else if (STREQU (ButtName, L "Vibrate") || STREQU (ButtName, L "Vibrate")) return CHEKED_VIBRO;
else if (STREQU (ButtName, L "Off") || STREQU (ButtName, L "Off")) return CHEKED_MUTE;
}
return INVALID_CHEKED;
}

DWORD GetRingerStatus ()
{
HWND hWnd1 = FindWindow (L "Dialog", L "Volume");
if (! hWnd1) hWnd1 = FindWindow (L "Dialog", L "Volume");
if (hWnd1)
{
HWND hWnd2 = GetWindow (hWnd1, GW_CHILD);
if (hWnd2)
{
hWnd1 = GetWindow (hWnd2, GW_CHILD);
if (hWnd1)
{
hWnd2 = GetWindow (hWnd1, GW_HWNDNEXT);
if (hWnd2)
{
BOOL bFirstCtrl = TRUE;
DWORD dwButtonCase = INVALID_CHEKED;
while (hWnd2)
{
hWnd1 = GetWindow (hWnd2, bFirstCtrl? GW_CHILD: GW_HWNDNEXT);
if (hWnd1)
{
dwButtonCase = GetButtonCase (hWnd1);
if (dwButtonCase! = INVALID_CHEKED)
if (ButtonCheked (hWnd1))
return dwButtonCase;
bFirstCtrl = FALSE;
}
hWnd2 = hWnd1;
}
}
}
}
}
return INVALID_CHEKED;
}

LRESULT CALLBACK WndProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
if (message == WM_WININICHANGE)
{
wchar_t snd [MAX_PATH];
DWORD size = MAX_PATH;
DWORD status = GetRingerStatus ();
if (status! = INVALID_CHEKED)
{
Sleep (100);
if (status == CHEKED_SOUND)
{
RegQueryValueEx (hkey, L "SavedSound", NULL, NULL, (LPBYTE) & snd, & size);
// MessageBox (0, L "sound", L "1", 0);
}
else if (status == CHEKED_VIBRO)
{
wcscpy (snd, L "* vibrate *");
size = sizeof (L "* vibrate *");
// MessageBox (0, L "vibro", L "1", 0);
}
else if (status == CHEKED_MUTE)
{
wcscpy (snd, L "* none *");
size = sizeof (L "* none *");
// MessageBox (0, L "mute", L "1", 0);
}
RegSetValueEx (hKey, L "Sound", 0, REG_SZ, (LPBYTE) & snd, size);
RegFlushKey (hKey);
}
return 1;
}
else if (message == WM_QUIT)
{
PostQuitMessage (0);
return 1;
}
else
{
Return DefWindowProc (hWnd, message, wParam, lParam);
}
}


HWND CreateRFXWindow ()
{
HWND hWnd = NULL;
WNDCLASS wc = {0, WndProc, 0, 0, NULL, NULL, 0, NULL, 0, szRFXWndClass};
if (RegisterClass (& wc))
{
hWnd = CreateWindow (szRFXWndClass, NULL, 0, 0, 0, 0, 0, NULL, NULL, NULL, NULL);
if (! hWnd) UnregisterClass (szRFXWndClass, NULL);
}
return hWnd;
}

DWORD DlgCheckThread (LPVOID)
{
hRFXWnd = CreateRFXWindow ();
if (! hRFXWnd) return 0;
LPMSG msg;
while (GetMessage (msg, NULL, 0, 0))
{
TranslateMessage (msg);
DispatchMessage (msg);
}
return 1;
}

DWORD RegCheckThread (LPVOID)
{
wchar_t snd [MAX_PATH];
DWORD size = MAX_PATH;
HANDLE haWait [2] = {NULL, hStopEvt};
while ("cycle")
{
haWait [0] = CeFindFirstRegChange (hKey, FALSE, REG_NOTIFY_CHANGE_LAST_SET);
if (haWait [0] == INVALID_HANDLE_VALUE) return 0;
DWORD dwResult = WaitForMultipleObjects (2, (PHANDLE) & haWait, FALSE, INFINITE);
CeFindCloseRegChange (haWait [0]);
if (dwResult == WAIT_OBJECT_0)
{
size = MAX_PATH;
Sleep (200);
RegQueryValueEx (hKey, L "Sound", NULL, NULL, (LPBYTE) & snd, & size);
if (! (STREQU (snd, L "* vibrate *") || STREQU (snd, L "* none *")))
{
RegSetValueEx (hKey, L "SavedSound", 0, REG_SZ, (LPBYTE) & snd, size);
RegFlushKey (hKey);
}
}
else if (dwResult == WAIT_OBJECT_0 + 1)
{
ResetEvent (haWait [dwResult]);
return 1;
}
}
return 0;
}

DWORD InitFix ()
{
HANDLE haThreads [2] = {NULL, NULL};

if (RegOpenKeyEx (HKEY_CURRENT_USER, L "ControlPanel \\ Sounds \\ RingTone0", 0, (REGSAM) NULL, & hKey)! = ERROR_SUCCESS) return 0;

hStopEvt = CreateEvent (NULL, TRUE, FALSE, NULL);
if (! hStopEvt) return 0;

haThreads [0] = CreateThread (NULL, 0, DlgCheckThread, NULL, 0, NULL);
haThreads [1] = CreateThread (NULL, 0, RegCheckThread, NULL, 0, NULL);
if (haThreads [0] && haThreads [1])
{
CloseHandle (haThreads [0]);
CloseHandle (haThreads [1]);
return 1;
}

return 0;
}

DWORD DeinitFix ()
{
PulseEvent (hStopEvt);
CloseHandle (hStopEvt);

SendMessage (hRFXWnd, WM_QUIT, 0, 0);

if (hRFXWnd) DestroyWindow (hRFXWnd);
UnregisterClass (szRFXWndClass, NULL);

RegCloseKey (hKey);

return 1;
}


ringerfix.def
LIBRARY "ringerfix"
Exports
RFX_Init
RFX_Deinit
RFX_IOControl


Post has been editedvlad072 - 17.06.11, 13:35
ultrashot
Message#69
08.09.11, 15:49
Guru
*********
[offline]

Group: Developers
Messages 2207
Check in: 25.05.09
Asus MeMO Pad 7 ME572CL

Reputation:-  938  +

Exclusive?

Update the start menu cache in WM6.5:
#define WM_STARTMENU_RELOADINFO (WM_USER + 200)
PostMessage (HWND_BROADCAST, WM_STARTMENU_RELOADINFO, NULL, NULL);


Overloading WM6.5 theme images:
typedef void (* UPDATETHEMEIMAGES) ();

void UpdateThemeImages ()
{
static HMODULE hCoreDll = LoadLibrary (L "coredll.dll");
static UPDATETHEMEIMAGES updateThemeImages = NULL;
if (updateThemeImages == NULL && hCoreDll)
updateThemeImages = (UPDATETHEMEIMAGES) GetProcAddress (hCoreDll, MAKEINTRESOURCE (2720));

if (updateThemeImages)
updateThemeImages ();
}


Change the subject:
#include "regext.h"
#define SPI_TODAY 242

void ChangeTheme (wchar_t * themeName)
{
SHELLEXECUTEINFO sei = {0};
sei.cbSize = sizeof (sei);
sei.lpFile = themeName;
sei.lpParameters = NULL;
sei.lpClass = L "tdyskin";
sei.nShow = SW_SHOWNORMAL;
sei.fMask = SEE_MASK_NOCLOSEPROCESS | SEE_MASK_CLASSNAME;
if (ShellExecuteEx (& sei))
{
if (sei.hProcess)
{
WaitForSingleObject (sei.hProcess, 30000);
}
}
RegistrySetString (HKEY_CURRENT_USER, L "Software \\ Microsoft \\ Today", L "Skin", themeName);
}

ChangeTheme (L "\\ Windows \\ Dynamics.tsk");
UpdateThemeImages ();
PostMessage (HWND_BROADCAST, WM_SETTINGCHANGE, SPI_TODAY, 0);


Post has been editedultrashot - 08.09.11, 20:15


--------------------
Good bye.
AlkexeyP
Message#70
20.01.12, 16:15
User
****
[offline]

Group: Friendssavagemessiahzine.com
Messages 62
Check in: 14.01.12
Glofiish (E-Ten) X800

Reputation:-  2  +

Code search and connect to Bluetooth devices (taken from the network).

WSAQUERYSET querySet;
HANDLE hLookup;
char buffer [1000];
DWORD bufferlength;
WSAQUERYSET * results;
SOCKADDR_BTH * btaddr;


if (WSAStartup (MAKEWORD (2, 2), & wsaData) == SOCKET_ERROR)
return false;

memset (& querySet, 0, sizeof (querySet));
querySet.dwSize = sizeof (querySet);
querySet.dwNameSpace = NS_BTH;

BluetoothQuery_DeviceCount = 0;

if (WSALookupServiceBegin (& querySet, LUP_CONTAINERS, & hLookup) == SOCKET_ERROR)
return false;

while (BluetoothQuery_DeviceCount {
bufferlength = sizeof (buffer);
memset (buffer, 0, sizeof (buffer));
results = (WSAQUERYSET *) & buffer;

if (WSALookupServiceNext (hLookup, LUP_RETURN_NAME | LUP_RETURN_ADDR, & bufferlength, results) == SOCKET_ERROR)
{
int result = WSAGetLastError ();
break;
}

btaddr = (SOCKADDR_BTH *) results-> lpcsaBuffer-> RemoteAddr.lpSockaddr;
BluetoothQuery_DeviceAddrList [BluetoothQuery_DeviceCount] = btaddr-> btAddr;

if (results-> lpszServiceInstanceName! = NULL)
wcscpy ((TCHAR *) BluetoothQuery_DeviceNameList [BluetoothQuery_DeviceCount], results-> lpszServiceInstanceName);
else
wcscpy ((TCHAR *) BluetoothQuery_DeviceNameList [BluetoothQuery_DeviceCount], L "");

BluetoothQuery_DeviceCount ++;
}

WSALookupServiceEnd (hLookup);

BluetoothClient_Socket = socket (AF_BT, SOCK_STREAM, BTHPROTO_RFCOMM);

if (BluetoothClient_Socket == INVALID_SOCKET)
return false;

SOCKADDR_BTH sa;
memset (& sa, 0, sizeof (sa));
sa.addressFamily = AF_BT;
sa.btAddr = * btaddr;

for (i = 0; i <30; i ++)
{
sa.port = i; // channel & 0xff;
if (connect (BluetoothClient_Socket, (SOCKADDR *) & sa, sizeof (sa)) == 0)
break;
}

if (i> = 30)
{
closesocket (BluetoothClient_Socket);
return false;
}


Post has been editedAlkexeyP - 20.01.12, 16:17
AlkexeyP
Message#71
19.05.12, 15:58
User
****
[offline]

Group: Friendssavagemessiahzine.com
Messages 62
Check in: 14.01.12
Glofiish (E-Ten) X800

Reputation:-  2  +

Unfortunately, OpenGL ES in Windows Mobile is a rather truncated version of OpenGL.

In OpenGL ES, there are no glBegin, glVertex3f, glTexCoord2f and others that we are used to, since it works only with data arrays.

To facilitate the transition from PC to WM and for porting software, I wrote code that makes it easy to draw triangle players.

#define MAX_VERTS 10240

int vertcount = 0;
GLfloat vertsbuff [MAX_VERTS] [3];


int ReglVertex3f (float x, float y, float z)
{
vertsbuff [vertcount] [0] = x;
vertsbuff [vertcount] [1] = y;
vertsbuff [vertcount] [2] = z;

vertcount ++;

return 1;
}

int ReglBegin (int mode)
{
if (mode == GL_TRIANGLES)
{
glVertexPointer (3, GL_FLOAT, 0, vertsbuff);
glEnableClientState (GL_VERTEX_ARRAY);

glDrawArrays (GL_TRIANGLES, 0, vertcount + 1);
}

return 1;
}

int ReglEnd ()
{
glDisableClientState (GL_VERTEX_ARRAY);

return 1;
}


Thus, the final code can be brought to a more or less normal form.

ReglVertex3f (0.3, 1.0, 0.5);
ReglVertex3f (2.7, 0.85, 0.0);
ReglVertex3f (2.7, 1.15, 0.0);

ReglVertex3f (2.53, 0.71, 0.5);
ReglVertex3f (1.46, 2.86, 0.0);
ReglVertex3f (1.2, 2.71, 0.0);

ReglVertex3f (1.667, 2.79, 0.5);
ReglVertex3f (0.337, 0.786, 0.0);
ReglVertex3f (0.597, 0.636, 0.0);

ReglBegin (GL_TRIANGLES);

ReglEnd ();
SAMP-Master-Rally
Message#72
03.06.12, 17:39
Local
*****
[offline]

Group: Friendssavagemessiahzine.com
Messages 254
Check in: 10.01.12
Sony Ericsson Xperia X2

Reputation:-  78  +

Has anyone seen the source Doom'a? They say id published them somewhere


--------------------
I lead the development of applications and games for Windows and Windows Mobile.
Hangman WM | Pocket guns | WM Quake 2 | WM Doom Legacy
AlkexeyP
Message#73
04.06.12, 11:08
User
****
[offline]

Group: Friendssavagemessiahzine.com
Messages 62
Check in: 14.01.12
Glofiish (E-Ten) X800

Reputation:-  2  +

The devil knows why I can't edit my previous message. but here is the update for OpenGL ES Wraper:

#define MAX_VERTS 10240

#define TRIVERTS 3
#define TWOVERTS 2
#define ONEVERTS 1

bool g_IsUseTriangles = false;
GLfloat trivertbuff [MAX_VERTS] [TRIVERTS];
int trivertcount = 0;


bool g_IsUseTriangleStrips = false;
GLfloat tristripvertbuff [MAX_VERTS] [TRIVERTS];
int tristripvertcount = 0;


bool g_IsUseTriangleFans = false;
GLfloat trifanvertbuff [MAX_VERTS] [TRIVERTS];
int trifanvertcount = 0;


bool g_IsUsePolygons = false;
GLfloat polygonsvertbuff [MAX_VERTS] [TWOVERTS];
int polygonsvertcount = 0;

bool g_IsUseLineLoops = false;
GLfloat lineloopsvertbuff [MAX_VERTS] [TWOVERTS];
int lineloopsvertcount = 0;

bool g_IsUseTextureCoord = false;
GLfloat texturecoordbuff [MAX_VERTS] [TWOVERTS];
int texturecoordcount = 0;


int glVertex3f (float x, float y, float z)
{
if (g_IsUseTriangles)
{
trivertbuff [trivertcount] [0] = x;
trivertbuff [trivertcount] [1] = y;
trivertbuff [trivertcount] [2] = z;
trivertcount ++;
}
else if (g_IsUseTriangleStrips)
{
tristripvertbuff [tristripvertcount] [0] = x;
tristripvertbuff [tristripvertcount] [1] = y;
tristripvertbuff [tristripvertcount] [2] = z;
tristripvertcount ++;
}
else if (g_IsUseTriangleFans)
{
trifanvertbuff [trifanvertcount] [0] = x;
trifanvertbuff [trifanvertcount] [1] = y;
trifanvertbuff [trifanvertcount] [2] = z;
tristripvertcount ++;
}

return 1;
}

void glVertex3fv (const GLfloat * v)
{
glVertex3f (v [0], v [1], v [2]);
}

void glVertex2f (GLfloat x, GLfloat y)
{
if (g_IsUsePolygons)
{
polygonsvertbuff [polygonsvertcount] [0] = x;
polygonsvertbuff [polygonsvertcount] [1] = y;
polygonsvertcount ++;
}
else if (g_IsUseLineLoops)
{
lineloopsvertbuff [lineloopsvertcount] [0] = x;
lineloopsvertbuff [lineloopsvertcount] [1] = y;
lineloopsvertcount ++;
}
}

void glTexCoord2f (GLfloat u, GLfloat v)
{
g_IsUseTextureCoord = true;

texturecoordbuff [texturecoordcount] [0] = u;
texturecoordbuff [texturecoordcount] [1] = v;
texturecoordcount ++;
}

#define GL_POLYGON 0x0009 // Bad hack, only for draw

int glBegin (int mode)
{
if (mode == GL_TRIANGLES)
{
g_IsUseTriangles = true;
trivertcount = 0;
}
else if (mode == GL_TRIANGLE_STRIP)
{
g_IsUseTriangleStrips = true;
tristripvertcount = 0;
}
else if (mode == GL_TRIANGLE_FAN)
{
g_IsUseTriangleFans = true;
trifanvertcount = 0;
}
else if (mode == GL_LINE_LOOP)
{
g_IsUseLineLoops = true;
lineloopsvertcount = 0;
}
else if (mode == GL_POLYGON)
{
g_IsUsePolygons = true;
polygonsvertcount = 0;
}


return 1;
}

int glEnd ()
{
if (g_IsUseTriangles)
{
glVertexPointer (TRIVERTS, GL_FLOAT, 0, trivertbuff);
glEnableClientState (GL_VERTEX_ARRAY);

if (g_IsUseTextureCoord)
{
glTexCoordPointer (TWOVERTS, GL_FLOAT, 0, texturecoordbuff);
glEnableClientState (GL_TEXTURE_COORD_ARRAY);

texturecoordcount = 0;
}

glDrawArrays (GL_TRIANGLES, 0, trivertcount + 1);

glDisableClientState (GL_VERTEX_ARRAY);

g_IsUseTriangles = false;
}
else if (g_IsUseTriangleStrips)
{
glVertexPointer (TRIVERTS, GL_FLOAT, 0, tristripvertbuff);
glEnableClientState (GL_VERTEX_ARRAY);

if (g_IsUseTextureCoord)
{
glTexCoordPointer (TWOVERTS, GL_FLOAT, 0, texturecoordbuff);
glEnableClientState (GL_TEXTURE_COORD_ARRAY);

texturecoordcount = 0;
}

glDrawArrays (GL_TRIANGLE_STRIP, 0, tristripvertcount + 1);

glDisableClientState (GL_VERTEX_ARRAY);

g_IsUseTriangleStrips = false;
}
else if (g_IsUseTriangleFans)
{
glVertexPointer (TRIVERTS, GL_FLOAT, 0, trifanvertbuff);
glEnableClientState (GL_VERTEX_ARRAY);

if (g_IsUseTextureCoord)
{
glTexCoordPointer (TWOVERTS, GL_FLOAT, 0, texturecoordbuff);
glEnableClientState (GL_TEXTURE_COORD_ARRAY);

texturecoordcount = 0;
}

glDrawArrays (GL_TRIANGLE_FAN, 0, trifanvertcount + 1);

glDisableClientState (GL_VERTEX_ARRAY);

g_IsUseTriangleFans = false;
}
else if (g_IsUsePolygons)
{
glVertexPointer (TWOVERTS, GL_FLOAT, 0, polygonsvertbuff);
glEnableClientState (GL_VERTEX_ARRAY);

if (g_IsUseTextureCoord)
{
glTexCoordPointer (TWOVERTS, GL_FLOAT, 0, texturecoordbuff);
glEnableClientState (GL_TEXTURE_COORD_ARRAY);

texturecoordcount = 0;
}

glDrawArrays (GL_LINE_LOOP, 0, polygonsvertcount + 1);

glDisableClientState (GL_VERTEX_ARRAY);

g_IsUsePolygons = false;
}
else if (g_IsUseLineLoops)
{
glVertexPointer (TWOVERTS, GL_FLOAT, 0, lineloopsvertbuff);
glEnableClientState (GL_VERTEX_ARRAY);

if (g_IsUseTextureCoord)
{
glTexCoordPointer (TWOVERTS, GL_FLOAT, 0, texturecoordbuff);
glEnableClientState (GL_TEXTURE_COORD_ARRAY);

texturecoordcount = 0;
}

glDrawArrays (GL_LINE_LOOP, 0, lineloopsvertcount + 1);

glDisableClientState (GL_VERTEX_ARRAY);

g_IsUseLineLoops = false;
}

return 1;
}
ASUS P535_kadans2
Message#74
28.11.15, 11:18
Novice
***
[offline]

Group: Active users
Messages 35
Check in: 10.03.12
Samsung Galaxy Ace 2 GT-I8160

Reputation:-  2  +

Is this the source code of Windows Mobile?
https: //code.google.co...LOADER/EBOOT/startup.s

4 pagesV  « < 2 3 4 » 


 mobile version    Now: 05/01/19 10:28