talemon

SetGammaRamp Lite-c

Jan 21st, 2013
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.77 KB | None | 0 0
  1. ////////////////////////////////////////////////////////////////////////////
  2. // small.c - small lite-C example
  3. ////////////////////////////////////////////////////////////////////////////
  4. #include <acknex.h>
  5. #include <default.c>
  6. #include <d3d9.h>
  7.  
  8. function main()
  9. {
  10.     video_set(1280,1024,32,1);
  11.     // Load the terrain named "small.hmp"
  12.     level_load("small.hmp");
  13.     // Now create the "earth.mdl" model at x = 10, y = 20, z = 30 in our 3D world
  14.     ent_create("earth.mdl", vector(10, 20, 30), NULL);
  15.     // NULL tells the engine that the model doesn't have to do anything
  16.  
  17.     var i;
  18.     D3DGAMMARAMP gamma_ramp;
  19.     LPDIRECT3DDEVICE9 pd3dDev;
  20.     pd3dDev = (LPDIRECT3DDEVICE9)draw_begin();
  21.     memset(&gamma_ramp, 128, sizeof(D3DGAMMARAMP));a
  22.    
  23.     pd3dDev->SetGammaRamp(0, 0, &gamma_ramp);
  24. }
Add Comment
Please, Sign In to add comment