Search found 51 matches

by Black Knight
Sat Jan 05, 2008 8:29 am
Forum: Programming
Topic: [RETIRED] Subversion Commit Log
Replies: 1650
Views: 504411

Hmm then the video engine should switch between rendering contexts am i right?When we open the tileset editor its rendering context should be made current.When its closed its should return back to the previous rendering context.
by Black Knight
Fri Jan 04, 2008 9:19 pm
Forum: Programming
Topic: [RETIRED] Subversion Commit Log
Replies: 1650
Views: 504411

Yeah I think so, it would be like changing the resolution when you switch between the tileset editor and the map editor. Uhm i still think its not possible as we have 2 different QGLWidgets one is the Grid class and the other is the OverlayGrid inside the tileset editor. They have different renderi...
by Black Knight
Fri Jan 04, 2008 8:20 am
Forum: Programming
Topic: [RETIRED] Subversion Commit Log
Replies: 1650
Views: 504411

Yes but would that be possible with one global videoengine class which also holds all textures etc?
by Black Knight
Thu Jan 03, 2008 11:03 pm
Forum: Programming
Topic: [RETIRED] Subversion Commit Log
Replies: 1650
Views: 504411

Well if we had only one OpenGL window like in the game then it is no problem as all the textures would belong to that rendering context. But in the editor the map and the tileset editor should live independent of each other so I don't see another way around it. But I would like to hear what others h...
by Black Knight
Thu Jan 03, 2008 10:36 pm
Forum: Programming
Topic: [RETIRED] Subversion Commit Log
Replies: 1650
Views: 504411

Committed Revision 1259. **************************************************** Files Modified Modified: D:\Allacrost\trunk\demo\src\editor\editor.cpp Modified: D:\Allacrost\trunk\demo\src\editor\grid.cpp Modified: D:\Allacrost\trunk\demo\src\editor\tileset_editor.cpp Modified: D:\Allacrost\trunk\dem...
by Black Knight
Thu Jan 03, 2008 10:06 pm
Forum: Programming
Topic: [editor] On TDF editing
Replies: 73
Views: 11684

:huh: I added these back to the initializeGL : void OverlayGrid::initializeGL() { VideoManager->SetTarget(VIDEO_TARGET_QT_WIDGET); VideoManager->SingletonInitialize(); // changed because allacrost had to delay some video loading code VideoManager->ApplySettings()...
by Black Knight
Thu Jan 03, 2008 9:40 pm
Forum: Programming
Topic: [editor] On TDF editing
Replies: 73
Views: 11684

I already tried to load them as still images with the load method of the still image. Here is the code that loads the image in tileset editor . // Load the tileset image. _walkability_grid->tileset->tiles.clear(); _walkability_grid->tileset->tiles.resize(1); _walkability_grid->tilese...
by Black Knight
Thu Jan 03, 2008 8:48 pm
Forum: Programming
Topic: [editor] On TDF editing
Replies: 73
Views: 11684

The map mode uses if (ImageDescriptor::LoadMultiImageFromElementGrid(tileset_images[i], image_filename, 16, 16) == false) { I use : if (ImageDescriptor::LoadMultiImageFromElementGrid(_walkability_grid->tileset->tiles, std::string(img_filename.toAscii()), 1, 1) == false) I load it as one big tile and...
by Black Knight
Thu Jan 03, 2008 7:01 pm
Forum: Programming
Topic: [editor] On TDF editing
Replies: 73
Views: 11684

After debugging into the texture_controller.cpp while loading the images I found out that when the image is loaded for the first time a new texture sheet is created for it but on the next loadings it tries to add it into an existing texture sheet maybe its the cause of the textures dissappearing on ...
by Black Knight
Thu Jan 03, 2008 6:50 pm
Forum: Programming
Topic: [editor] On TDF editing
Replies: 73
Views: 11684

Well I made it so the videoengine is only create in the constructor of the editor so it only inits once. But still the problem remains. And I observed that it happens with textures loaded before.Let me explain. First I start the editor then i start the tileset editor,I load the mountain_landscape an...
by Black Knight
Thu Jan 03, 2008 5:58 pm
Forum: Programming
Topic: [editor] On TDF editing
Replies: 73
Views: 11684

I agree we should initialize the video engine as soon as the editor window starts up even though we don't display any map yet. So I could remove the videoengine initialization from my code and the problem will be solved. I guess at the moment the editor tries to init the video engine each time it tr...
by Black Knight
Thu Jan 03, 2008 5:29 pm
Forum: Programming
Topic: [editor] On TDF editing
Replies: 73
Views: 11684

That whole set of initialization code should only ever be called once like Roots said. So if the tileset editor is loaded before any map then when a map is opened the init code should not be called. Will somethig like this work to prevent the init code to be called twice? void OverlayGrid::initiali...
by Black Knight
Wed Jan 02, 2008 8:55 pm
Forum: Programming
Topic: [editor] On TDF editing
Replies: 73
Views: 11684

bool GameVideo::SingletonInitialize() { // check to see if the singleton is already initialized if (_initialized) return true; if (SDL_InitSubSystem(SDL_INIT_VIDEO) < 0) { PRINT_ERROR << "SDL video initialization failed" << endl; return false; } return true; } // bool GameVideo::SingletonI...
by Black Knight
Wed Jan 02, 2008 7:14 pm
Forum: Programming
Topic: [editor] On TDF editing
Replies: 73
Views: 11684

Could it be because any of these methods being called twice? VideoManager->SetTarget(VIDEO_TARGET_QT_WIDGET); VideoManager->SingletonInitialize(); // changed because allacrost had to delay some video loading code VideoManager->ApplySettings(); VideoManager->FinalizeInitialization(); VideoManager->To...
by Black Knight
Mon Dec 31, 2007 10:03 pm
Forum: Programming
Topic: [editor] On TDF editing
Replies: 73
Views: 11684

The function i use to load the image is this if (ImageDescriptor::LoadMultiImageFromElementGrid(_walkability_grid->tileset->tiles, std::string(img_filename.toAscii()), 1, 1) == false) It looks like it succeds but it shows up white. The issue on the wiki is this but i dont know if its the same thing:...
by Black Knight
Mon Dec 31, 2007 6:56 pm
Forum: Programming
Topic: [editor] On TDF editing
Replies: 73
Views: 11684

Guys I guess something that changed in the video engine has broken the loading of images in tileset editor. If I run the editor and enter the tileset editor everything works as it should. If I close the tileset editor and open it again and try to load images it doesnt load some of the tilesets. I co...
by Black Knight
Fri Nov 30, 2007 7:36 am
Forum: Programming
Topic: Programmer Roll Call
Replies: 209
Views: 35345

Sorry for not making a notice of my downtime but im really busy with work and more with school.My term projects at school are keeping me occupied the whole time I am at home. Pedestrian detection,Le-net5,Kohonen self organizing maps to name a few. Not to mention propability and statistics which I ha...
by Black Knight
Mon Oct 29, 2007 8:11 am
Forum: Design
Topic: Battle design proposal: A new approach
Replies: 66
Views: 33548

I vote for #2 too as it is more dynamic and i guess it will be less work than capturing 2d images of 3d animations.
Also it will be possible to run away from battle or add more enemies to battle use the map to your advantage with ranged weapons etc.
by Black Knight
Thu Oct 25, 2007 5:46 pm
Forum: Programming
Topic: [RETIRED] Subversion Commit Log
Replies: 1650
Views: 504411

Committed Revision 1072. **************************************************** Files Modified Modified: D:\Allacrost\trunk\demo\src\editor\tileset_editor.cpp Modified: D:\Allacrost\trunk\demo\src\editor\tileset_editor.h Primary Changes > Added a grid class to tileset_editor. > Removed the label to d...
by Black Knight
Thu Oct 25, 2007 3:53 pm
Forum: Programming
Topic: [editor] On TDF editing
Replies: 73
Views: 11684

Ok ill use the mouse events to get inputs if I can get to that :eyespin: At the moment Im trying to figure out how to draw the grid over the tileset.From what I understand I can use a QGLWidget and implement its paintGL method to use the VideoManager class and its DrawGrid method. But I dont know ho...

Go to advanced search