Skocz do zawartości

Crackkk-GM

Użytkownicy
  • Postów

    1 417
  • Dołączył

  • Ostatnia wizyta

Treść opublikowana przez Crackkk-GM

  1. A ja tego nie zrobiłem.... :P Nie jestem pewny na 100%, bo jestem jeszcze takim newbie :P
  2. d3d9.h jest potrzebny do funkcji D3D (tak myślę <_<) A chyba tego nie mam :/ @UP: Jest parę błędów... A jeśli chodzi o Winapi to trzeba na początku kodu dać: #include <windows.h> <_<
  3. Eee... #include <d3d9.h> Możliwe, że nie mam d3d9.h... (używam Dev-Cpp)
  4. Zaraz poprawię.... Dam w Edicie inne błędy... @Edit: 24 C:\Documents and Settings\Patryk\Pulpit\D3D4GM\dllmain.cpp `hWnd' undeclared (first use this function) Pffff jak to zdeklarować?
  5. Już poprawiam... Dzięki :P moja pomyłka xd Błędy: C:\Documents and Settings\Patryk\Pulpit\D3D4GM\dllmain.cpp In function `double _d3d_CreateRenderWindow(bool, bool, bool)': 23 C:\Documents and Settings\Patryk\Pulpit\D3D4GM\dllmain.cpp `g_pD3D' undeclared (first use this function) (Each undeclared identifier is reported only once for each function it appears in.) 23 C:\Documents and Settings\Patryk\Pulpit\D3D4GM\dllmain.cpp `hWnd' undeclared (first use this function) 23 C:\Documents and Settings\Patryk\Pulpit\D3D4GM\dllmain.cpp `g_pd3dDevice' undeclared (first use this function) C:\Documents and Settings\Patryk\Pulpit\D3D4GM\dllmain.cpp In function `double _d3d_RenderWindow(bool)': 28 C:\Documents and Settings\Patryk\Pulpit\D3D4GM\dllmain.cpp `g_pd3dDevice' undeclared (first use this function) C:\Documents and Settings\Patryk\Pulpit\D3D4GM\dllmain.cpp In function `double _d3d_end()': 36 C:\Documents and Settings\Patryk\Pulpit\D3D4GM\dllmain.cpp `g_pd3dDevice' undeclared (first use this function) 37 C:\Documents and Settings\Patryk\Pulpit\D3D4GM\dllmain.cpp `g_pD3D' undeclared (first use this function) C:\Documents and Settings\Patryk\Pulpit\D3D4GM\dllmain.cpp In function `double _d3d_PolygonsBuffor(double, double)': 49 C:\Documents and Settings\Patryk\Pulpit\D3D4GM\dllmain.cpp `g_pd3dDevice' undeclared (first use this function) C:\Documents and Settings\Patryk\Pulpit\D3D4GM\dllmain.cpp In function `double _d3d_DrawPolygons(bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool)': 56 C:\Documents and Settings\Patryk\Pulpit\D3D4GM\dllmain.cpp `CUSTOMVERTEX' undeclared (first use this function) 56 C:\Documents and Settings\Patryk\Pulpit\D3D4GM\dllmain.cpp expected `;' before "vertices" 64 C:\Documents and Settings\Patryk\Pulpit\D3D4GM\dllmain.cpp `g_pVB' undeclared (first use this function) 64 C:\Documents and Settings\Patryk\Pulpit\D3D4GM\dllmain.cpp `vertices' undeclared (first use this function) C:\Documents and Settings\Patryk\Pulpit\D3D4GM\Makefile.win [build Error] [dllmain.o] Error 1
  6. @Misztrzunio: Błędy podam za poł godziny (siorka na kompie :/) Dla kogoś, kto się zna to te kody nie sprawiają trudności... Może ty nie wiesz...... @Will: pp.Windowed = a1; // to jest "odpowiednik" true = okienko, false = fullscreen, a1 = argument zobacz troszkę wyżej to będziesz wiedzieć o co chodzi ^^
  7. Kurdę! Popatrz w Alarm[0] bohatera i podaj nam kod <_< a nie jakieś głupoty piszesz... Już widzę co tam masz źle.... Wymaż kod w stepie obj_control i daj to: GML /* ==================== */ /* -START- */ /* ==================== */ /* Receiving Messages */ /* ==================== */ //Create the variables to be used var messagesize, messageid; //Check for messages while(1) { //Receive the message using TCP messagesize = receivemessage(global.clienttcp); //If no message was received, break if (messagesize <= 0) break; //If a message was received, get the message ID... messageid = readbyte(); //Set the ping to 0 because we got a message ping = 0; //...and then use it to check what message it was switch(messageid) { //If the message ID is 1 case 1: //Store the message as our player ID global.myid = readbyte(); if end_game = true { clearbuffer(); writebyte(4); writestring(global.username+" can not join.",true); sendmessage(global.clienttcp); scr_online_gameend(); exit; } else { obj_player_self.alarm[0] = 1; } //And then break from the loop. If you forget this part then you might get errors. break; case 2: //Server is full message show_message("Sorry! The server is full."); if end_game = true { scr_online_gameend(); exit; } break; case 3: //New Player (create) var userid, name, user; userid = readbyte(); user = instance_create(obj_player_self.xstart,obj_player_self.ystart,obj_player_other); user.pid = userid; name = readstring(); user.username = name; players[userid] = user; script_addline(name + " has joined.",c_black); break; case 4: //New Player (chat message) var name, userid; userid = readbyte(); name = readstring(); user = players[userid]; user.username = name; script_addline(name + " has joined.",c_black); break; case 5: //Update other players' positions value = readbyte(); player = players[value]; player.x = readshort(); player.y = readshort(); player.sprite_index = readshort(); player.image_speed = readshort(); player.image_index = readshort(); player.image_angle = readshort(); //Tu masz blad... break; case 6: //Player left var playerid, username; playerid = readbyte(); username = readstring(); script_addline(username + " has left.",c_black); with(players[playerid]) { instance_destroy(); } players[playerid] = -1; break; case 7: //The server has shut down show_message("The server has shut down."); game_end(); break; case 8: //Chat message script_addline(readstring(),c_black); break; case 9: //Server message script_addline("Server: " + readstring(),c_red); break; } }
  8. Crackkk-GM

    Proszę o poprawkę

    Witajcie, Dziś wziąłem się za pisanie DLL'ki, dzięki której będzie można napisać grę z użyciem d3d w gm'ie... I mam parę błędów... (taki mały teścik chciałem zrobić czy mi to wyjdzie :P) I podczas kompilacji wyskoczyło parę błędów.... Mógłby je ktoś poprawić?? Będę bardzo wdzięczny :) Oto kod źródłowy: /* D3D4GM.Dll: Direct 3D For GM :) By Crackkk-GM */ #include <d3d9.h> #define D3DFVF_CUSTOMVERTEX (D3DFVF_XYZRHW|D3DFVF_DIFFUSE) #define export extern "C" __declspec(dllexport) export double _d3d_start(void) { LPDIRECT3D9 g_pD3D=NULL; LPDIRECT3DDEVICE9 g_pd3dDevice=NULL; if (NULL==(g_pD3D = Direct3DCreate9( D3D_SDK_VERSION ) ) ) return E_FAIL; }; export double _d3d_CreateRenderWindow (double a1,double a2,double a3) { D3DPRESENT_PARAMETERS pp; ZeroMemory(&pp,sizeof(pp)); pp.Windowed = a1; pp.BackBufferWidth = a2; pp.BackBufferHeight = a3; pp.BackBufferFormat = D3DFMT_A8R8G8B8; pp.SwapEffect = D3DSWAPEFFECT_FLIP; if( FAILED( g_pD3D->CreateDevice(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, hWnd, D3DCREATE_SOFTWARE_VERTEXPROCESSING, &pp, &g_pd3dDevice) ) ) return E_FAIL; }; export double _d3d_RenderWindow (double a1) { g_pd3dDevice->Clear( 0, NULL, D3DCLEAR_TARGET, a1, 1.0f, 0L ); g_pd3dDevice->BeginScene(); g_pd3dDevice->EndScene(); g_pd3dDevice->Present( NULL, NULL, NULL, NULL ); }; export double _d3d_end(void) { if(g_pd3dDevice!= NULL) g_pd3dDevice->Release(); if(g_pD3D!= NULL) g_pD3D->Release(); }; export double _d3d_PolygonsBuffor(double a1,double a2) { LPDIRECT3DVERTEXBUFFER9 g_pVB = NULL; struct CUSTOMVERTEX { FLOAT x, y, z, rhw; //pozycja wierzchołka DWORD color; //kolor wierzchołka }; if(FAILED(g_pd3dDevice->CreateVertexBuffer(a1*sizeof(CUSTOMVERTEX), a2, D3DFVF_CUSTOMVERTEX, D3DPOOL_DEFAULT, &g_pVB, NULL))) { return E_FAIL; } }; export double _d3d_DrawPolygons(double c1,double a1,double a2,double a3,double a4,double a5,double a6,double a7,double a8,double a9,double a10,double a11,double a12) { CUSTOMVERTEX vertices[] = { { a1, a2, a3, a4, c1, }, { a5, a6, a7, a8, c1, }, { a9, a10, a11, a12, c1, }, }; VOID* pVertices; if( FAILED( g_pVB->Lock(0, sizeof(vertices),(void**)&pVertices,0))) return E_FAIL; memcpy( pVertices, vertices, sizeof(vertices) ); g_pVB->Unlock(); } Wiecie, nie śmiejcie się :P
  9. @UP: A z kąd wiesz kiedy zginiesz?? Lepiej wiedzieć, że śmierć dopadnie cię w każdej chwili... (np. teraz może ci wybuchnąć ekran od monitora, i co?)
  10. Ja uważam (ofkors) tak jak ksiądz mówił "Z prochu powstałeś i w proch się obrócisz..." Więc wiadomo, że śmierć to choroba na którą choruję 100% ludzi... i ta choroba jest nieunikniona... Możesz se teraz wyjść z psem na spacerek i jakiś psychopata cię zastrzeli... Albo wpadniesz do rzeki i utoniesz... @Edit: Tutaj są nieszczęśliwe wypadki... i ludzie nie wiedzą kiedy zginą: http://wiadomosci.onet.pl/1715948,11,item.html @Edit2: Bóg dał człowiekowi życie z miłości... i z miłości je odbiera kiedy przychodzi czas...
  11. Crackkk-GM

    Potwory...

    Nie chce mi się :P To se sam rysuj! :foch: xD
  12. Crackkk-GM

    Potwory...

    Co ty pier****sz?? Chciał 20*20 to ma.. Mi bardziej wychodzi 32*32 lub 64*64 (powyżej 32*32) :P To w takim razie ty coś narysuj Driger...
  13. Crackkk-GM

    Potwory...

    Wąż... Jeszcze coś narysuję :P Dam w edicie :] Robal Żuczek Duch??
  14. Crackkk-GM

    Potwory...

    @UP: Pisałem, że to moje pierwsze bohomazy :P Dlatego takie dziwne =] Zaraz ci coś jeszcze narysuję...
  15. Crackkk-GM

    Potwory...

    @UP: Też tak myślę :P Przyznaj, że jak na pierwszą naukę/ćwiczenia dobrze mi wyszło :P
  16. Crackkk-GM

    Potwory...

    Orc: I parę broni (robiłem wcześniej :P) + 1 hełm :P Dziś się bawiłem (uczyłem się rysować w paint) :] I takie bohomazy mi powychodziły xd Big Axe: Sapphire Sabre: Red Helmet: Speary (3 rodzaje): Miecz z Wiedźmina(nie wyszedł :/) :
  17. @UP: Da se rade :P Przecież mamy mistrza Dll'ki :P A konkretnie ciebie... wystarczy, że przeczyta twój kurs i będzie git ^^
  18. I ta kolizja playera1 z playerem2 i na odwrót: GML speed=0 To jest takie proste <_<
  19. Tymon robił przykład <_< wystarczy poszukać :)
  20. @UP: Właśnie tego szukałem chwilę temu :]
  21. Napisałem wyżej :) (w tym moim poście wyżej: ja tak robiłem z 39dll :P nie wiem czy ci to zadziała ale powinno xD)
  22. 39Dll to jest DLL'ka napisana c++ do łączenia się 2,3,4,6,100000 komputerów do jednej gry <_< Polecam ci ją;p Łatwej ją pojąć xd A z tymi punktami to postaw jakieś objekty na mapce (np. start1,start2 itd...)i w każdej w create global.start_1=0 itd... I przy łączeniu: if global.start1=0 then instance_create(player,start1.x,start1.y) global.start_1=1 itd... Albo tablice...
  23. Daj to w bohatera GML //CREATE: alarm[0]=1 //Alarm[0]: mplay_message_send(0,1,x); mplay_message_send(0,1,y); alarm[0]=1 A to w controller zamiast tego co tam masz u siebie... GML messid = mplay_message_id(); val = mplay_message_value(); // Check for bat changes if (messid == 1) o_Gracz_1.x = val; if (messid == 1) o_Gracz_1.y = val; I potem wysyłaj też z drugiego playera... Ale ja się nie znam(używałem TYLKO 39DLL)... Lepiej używaj 39dll ;p
  24. Co to ma być? nie kapuję :P
×
×
  • Dodaj nową pozycję...