Advertisement Jump to content
  • Advertisement

Feidias

Member
  • Content Count

    232
  • Joined

  • Last visited

Community Reputation

92 Neutral

About Feidias

  • Rank
    Member
  1. Some key features still missing, but it's getting better. This project was formerly called "Stile", but since that name was taken I changed it. Windows only. http://koti.mbnet.fi/paulkp/brick/brick.htm
  2. Feidias

    Teemu v1.11 (roguelike)

    In case you don't know yet, there is a new improved version of Teemu. C++ source code is also available, it's quite portable too. http://koti.mbnet.fi/paulkp/teemu/teemu.htm
  3. When you use some common functions like fread there is no need to include the header (stdio.h in this case) which is bad when you try to write compatible source code. Is there any way to turn off these "automatic headers" in VC?
  4. Feidias

    why is C++ still being over-used?

    A great philosopher once said: If there were a better language than C++ we would be all using it.
  5. Feidias

    How to reset SDL events?

    Quote:Original post by Kylotan I'd advise checking for mouse up events It works the same way, I just tried. It's probably that SDL and native Windows were not meant to be used at the same time. I should probably make a custom file loading dialog.
  6. Feidias

    How to reset SDL events?

    Quote:Original post by Kylotan But are you actually receiving repeated SDL_MOUSEBUTTONDOWN events? No. The problem is mo.state which tells the mouse button state during the mouse movement event. It's telling that mouse button is pressed when it actually isn't. And windows file dialog is somehow changing (reversing?) the state, which should be impossible..
  7. Feidias

    How to reset SDL events?

    Quote:Original post by Kylotan How do you know that the button 'seems' to be pressed? It's a tile editor. When I load tiles and move the mouse over the edit window it's magically drawing pixels even the mouse button is not pressed. When I press it again it stops and returns to normal. Edit: Just noticed that I don't need to call Mouse_Command in SDL_MOUSEMOTION, but the bug is still there. I changed that part to show the tooltips when mo.state==0, but when I load tiles the dialog somehow changes mo.state without the mouse button being pressed. It will again return to normal when you press mouse button and the only problem now is that tooltips don't show after loading tiles. It's less dangerous than drawing over tiles. Still would be nice to know what causes this bug. [Edited by - Feidias on September 29, 2007 9:37:59 AM]
  8. Feidias

    How to reset SDL events?

    Quote:Original post by Kylotan Where's your code to check if the mouse button has been released? I don't have that.
  9. Feidias

    How to reset SDL events?

    SDL_Delay doesn't do anything. Maybe it didn't become clear in my first post, but the mouse button seems to be pressed (after returning from windows file dialog) even when I'm not actually pressing any of mouse buttons. That's a bit of mystery. The event loop is still happily getting mouse button down event inside the mouse motion event. To make it more complicated the bug appears only when I load new set of tiles (in my tile editor where the bug is). When I edit tiles and then load new tiles (it's asking y/n confirmation) the bug doesn't appear. Here's the source from that part I'm handling the mouse: if (event.type==SDL_MOUSEBUTTONDOWN) { mb=event.button; b=mb.button; if (b>0) { if (b>2) b=2; //if it's bigger than second button, turn it to second one id=Mouse_Command(mb.x,mb.y,b); if (id==2) done=1; //2=quit returned } } if (event.type==SDL_MOUSEMOTION) { mo=event.motion; omx=mo.x; omy=mo.y; if (g_edit->Hit(omx,omy)==1) //inside edit area { mx=g_edit->EditX(omx); my=g_edit->EditY(omy); if (tool->Get_Precise_Brush_Update()==1) { dm=tool->Get_Mode(); //current drawing tool //show selector or precise brush if (dm==dmSELECTOR_BRUSH) g_edit->Draw_Selector_Brush(mx,my); else if (ds_options->Get(optPRECISE_BRUSH)>0) { g_edit->Draw_Precise_Brush(dm,omx,omy); } } } else { //change brush to mouse cursor when outside editor window g_edit->Check_Update(); } if (mo.state>0) Mouse_Command(mo.x,mo.y,mo.state); else //show tooltips { id=g_tool1->Icon_ID(mo.x,mo.y); if (id==-1) id=g_tool2->Icon_ID(mo.x,mo.y); if (id!=-1) Show_Command_Help(id); } } [Edited by - Feidias on September 27, 2007 4:53:30 AM]
  10. Feidias

    How to reset SDL events?

    Quote:Original post by NQ You monitor only when the mousebutton changes state and not when it is actually pushed? I'm checking the button with SDL_MOUSEBUTTONDOWN. I don't know what you mean by "actually" pushed.
  11. Feidias

    My First SDL Problem...

    const char window_title[]="Title."; [] for array which plain string is in C/C++.
  12. I've probably asked this before (don't remember) but I'm using Windows file dialog in SDL program. It works, but when you return to SDL it's acting like left mouse button being pressed down. When you press it again it returns to normal. I was wondering how to reset SDL events after returning from the dialog and why it's acting like that in the first place?
  13. Feidias

    SDL isn't updating some variables.

    Quote:Original post by KylotanDev-C++ is not a very good IDE to be using anyway, and may be contributing to your problem by making it hard to see what's compiled properly. Create a directory for .o files and check their time. If some module is not up to date, clean & rebuild the project. Or just clean and rebuild.
  14. Feidias

    Killing the EXP system

    Exp and "traditional" skills are related to character development. Usually the player becomes more or less a demigod that wipes out dragons and other big monsters. How about a game that has no character development at all?
  15. I think there is no other mythology than that Moon is feminine.
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!