Jump to content

Holloweye

Members
  • Posts

    34
  • Joined

  • Last visited

Everything posted by Holloweye

  1. Solved it on another way but thanks anyway.
  2. Yeah I know but i'am using assembly (Intel). And it get really messy when I do that so I figured if there was another solution.
  3. Is it possible to change order of a int ex: 523 to 325. with only mathematical operations? And if yes, how? (Possible for you to use XOR,OR,AND) Thanks
  4. What is the Normal of a Vertex? (Sorry for sounding stupid) Thanks for answers.
  5. 1. I have been working with making my own little LandscapeEditor. But I had some problem to find information about SetVertexNormal(TSurface,0,Vec3) (I have been looking at the wiki). So Basicly the question is if anyone can explain how it works? 2. I thought about to make it possible to load a heightmap to my editor but then I thought there might be a missing function for me to get it work. Is there a function to get the color of a pixel on screen something like this: int:GetColorRed(int x, int y); int:GetColorGreen(int x, int y); int:GetColorBlue(int x, int y);. I know there is on Blitz Max but what about for the Engine? 3. Is it possible to paint a part of a mesh? Like I want to paint vertex 0-3 with grass and then 4-7 with brick. Thanks
  6. It worked! Thank you very much!
  7. Error: main.c:81: warning: implicit declaration of function 'itoa' I have #stdlib.h and string.h included. I guess there is no such function in C.
  8. But if I try to do this: int x = 5; char a[9]; strcpy(a,"SCORE "); strcat(a,(char*)x); I dont get any errors but after a while the program crash. I guess the error is when trying copy the x variable to a. Anyone know what could fix this?
  9. In C not C++. 1. How can I add a int with a char? Like: int x = 5; char a; a = x; 2. How can I add 2 char's to one char? Like: char a[]; a = "HELLO "; char b[]; b = "WORLD"; a += b; Thanks
  10. Wow very nice. Thanks! I will try it
  11. Hum... Could you show in some kind of simple code example?
  12. Well I want a object to move first fast and then slower when it comes closer to its destination. I dont want to use like: Destination/10 and loop that all the time beacause first its ugly and second I would need a if statement because it would take forever to come to the end. So I was think about useing Cos(x)+1. But I can't figure out how I should do it. I guess the integral would be the total movement so the destination. Hum easyer to show with a image: How would I do this? Help, Thanks
  13. I just made a cube from scratch. But thanks anyway. Problem solved!
  14. So I have to create my own cube like in one of the tutorials right?
  15. How can I paint just one surface of a model. Lets say that I just created a cube and I want to paint the front surface Texture1 and the top surface Texture2. How would I do that?
  16. The program crash when I try to load the image. The image is 512x512 and its .dds.
  17. I have already tried with all parameters. And it should work without them because in the example on leadwerks.wiki he dont use any parameters. link: http://leadwerks.com/wiki/index.php?title=DrawImage
  18. I try this: TTexture texture = LoadTexture("abstract::board.dds"); main... { DrawImage(texture); } and it crash. Anyone see a problem? (I have tried with and without abstract:
  19. I found the problem. It was that the Piece array need be a array with pointers to Piece's. So like this: Piece ***Pieces; (Its a matrix with Pieces) Thanks for the help
  20. so if it would be like this: Knight AKnight(); AKnight.move(); it would work?
  21. its virtual is should automaticly call knight::move() ... Pieces[0] = Knight(); Pieces[0].move(); // it will call the Piece move()
  22. I have a problem with virutal function. Board.h #include "Knight.h" class Board { //Board hava a array with Pieces }; Piece.h class Piece { virtual void move() { blablabla }; }; Knight.h #include "Piece.h" Knight: public Piece { void move() { blablabla }; }: ... So when I try this inside a function or whatever in board.cpp: Pieces[0].move(); it will use the Piece move() not the Knight's move(). Anyone understand why? :S
  23. When I use camera picking is it possible to get the cordinats where I picked on the mesh? I guess its NZ,NX and NY iam right? Thanks
×
×
  • Create New...