Commit Graph

4125 Commits

Author SHA1 Message Date
wrenczes@gmail.com 6d8e7edcbf Improvements against http://code.google.com/p/wagic/issues/detail?id=50, Mana animation slows PSP down.
Two things: 1) there was an extremely inefficient implementation in the particle system of a queue where, when particles expired, each expired element would be copied over(replaced) by one at the rear of the container. Depending on the performance of the update, this could range anywhere from 100 to 500 (the max particle count) memcpy operations per update loop.  I replaced the flat array with a std::list, and simply pop the unneeded elements when they expire now.  This seems to shave ~30% off the time spent in the Update() call.

2) Hardcoded the number of emitters for the mana particles to 60 (the default in the psi file seems to be around 114).  This reduces the amount of iterations per tapped mana by just over half, which also helps the performance, and it's not really noticeable - the glow effect is a *tiny* bit more muted, but chances are, if you didn't read this comment, you probably wouldn't have noticed.

I've gone from having my psp start lagging noticeably at 8 tapped mana to about 12 - at this point, I think the bigger remaining lag is the fact that when there's a cache miss for a card image, we're doing synchronous i/o on the main thread - the framerate drop this causes is far more noticable than the mana particle lag.
2010-11-08 07:27:19 +00:00
techdragon.nguyen@gmail.com 61cc3692a5 promoted StatsWrapper struct into class
altered deck editor information display for statistics
2010-11-07 18:28:54 +00:00
wrenczes@gmail.com 2d31cbdaf5 Some tweaks to the fonts in the game deck selection screen - the 'wagic' green cursive font was a bit of an eyesore, and wasn't consistent color-wise with the other main font used for the stats & description. 2010-11-07 14:21:21 +00:00
wrenczes@gmail.com a90d2ed2e7 Fixed two double->float conversion warnings. 2010-11-07 13:49:17 +00:00
wrenczes@gmail.com 7818277e3a Fixed a bug in the text scroller that caused it to display only the first item. 2010-11-07 13:03:36 +00:00
wrenczes@gmail.com 471cbd6ba4 More type conversion warning cleanup. 2010-11-07 12:09:04 +00:00
wrenczes@gmail.com e717b2f260 Line endings -> Unix. 2010-11-07 12:02:55 +00:00
wrenczes@gmail.com a053c0d59e More type conversion warning cleanup. 2010-11-07 12:00:23 +00:00
wagic.the.homebrew@gmail.com 5d907f5abe Erwan
- Added a possibility to put a file "Res.txt" instead of the folder "Res". The file Res.txt is a simple 1 line text file, telling where to find the Res folder, terminated by "/". For example: "../../wagic_res".
This addresses issue 428 . This could also help us in the future, to develop mods.
2010-11-07 09:26:29 +00:00
wrenczes@gmail.com b14e3808db Minor code cleanup - pass by reference instead of value; instead of creating temp char arrays on each deck loop while building deck metadata, use an ostringstream when needed. 2010-11-07 03:55:56 +00:00
wagic.the.homebrew@gmail.com 416617fc0d Erwan
- fixed memory leak in AEquip/ATeach 
- Test suite now trims strings correctly (allows to have space between comma-separated card names)
- Added Paradise Mantle (for ATeach test)
- removed a missing wallpaper from wallpapers list
2010-11-07 02:27:54 +00:00
wrenczes@gmail.com b2ee9c0f41 More VS 2010 solution files. The props file is required; the filter is a nice to have (ie, the solution file organization is broken out into a separate file now in 2010, whereas it used to be embedded in each vcproj file). 2010-11-07 02:12:50 +00:00
wrenczes@gmail.com 3c19533a4c Added the notion of a 'cancel' button, and unified all the 'cancel' menu IDs to be kCancelMenuID (ie -1). I've slaved the Menu button (ie Esc on win, 'Start' button on PSP) to this - the idea being, if you hit the Menu button to bring up a menu, hitting it again will dismiss it without doing anything, which is pretty standard behavior for most console/computer games. 2010-11-07 02:08:17 +00:00
techdragon.nguyen@gmail.com b0c61049da tweaked menus a bit.
fixed possible NPE with background image retrieval
2010-11-06 10:05:54 +00:00
omegablast2002@yahoo.com f5d7f03086 final fix for affinity, thanks mike for pointing it out. 2010-11-06 09:19:07 +00:00
omegablast2002@yahoo.com ce1a079646 fixed another boo boo with affinity. *facepalm* 2010-11-06 09:04:44 +00:00
omegablast2002@yahoo.com 21dabf94c1 Simulacrum coded now
Issue: 502
2010-11-06 08:09:37 +00:00
omegablast2002@yahoo.com 6c616f2741 added pdcount varible. playerdamagecount for the turn. this is for Simulacrum style cards.
Issue: 502
2010-11-06 08:07:48 +00:00
omegablast2002@yahoo.com ed03d2f3ef added optimizing of opponents hand if the opponent deck is listed as "easy". slight optimize if listed as "normal" none if listed as "hard" this provides slightly more challange from even poorly constructed Ai decks. taught Ai to pump creatures during combat, and more so if its heading directly at player, taught Ai that its better to use "becomes" and "transforms" during first main. this allow its to actually attack with the manlands ect.
new ability lord...teach(whatever[whatever]) ability.
teach is a targeted lord, it takes the cards current target and lords it the ability. im aware of a tiny memleak it contains, but the leak is happening on parser lvl, so i need more eyes to look at it. teach is ideally used for equipment, and was designed to fix issue 244 taught abilities are not given to the source cards.

forced Ai to pay for sunburst correctly. it was choosing to pay with all of one type of mana. now it pays either max or 1 from max sunburst.

added a tiny double check for Ai to try and find something to use if it suddenly has mana in its pool. it is only a single check in a turn, but i notice it actually does slightly improve the usages of dark ritual and foreach mana producers. ideally i wanted it to check EVERYTIME. but i could not achieve it without putting the game in danger of looping. so once is better then none :/

fixed a bug with affinity where it was not counting duel lands, this is becuase of not setting it up correctly for lands with multiple types SORRY!
2010-11-06 06:59:43 +00:00
techdragon.nguyen@gmail.com 0c34d7a04f removed dead code
reformatted statements
removed unnecessary debug statements
fixed a few floating point warnings
2010-11-06 03:49:15 +00:00
techdragon.nguyen@gmail.com 8908e86857 removed some compiler warnings
changed variables to float where appropriate
2010-11-05 08:07:50 +00:00
Xawotihs 91cf0c8d37 Added missing files 2010-11-05 07:26:01 +00:00
techdragon.nguyen@gmail.com 842596d4fc fixed sun titan and primeval titan card definitions.
**  Sun Titan: missing exclusion of instants and sorceries for special ability
**  Primeval titan: fixed token placement so that tokens went into exile and not the graveyard
2010-11-04 09:37:25 +00:00
techdragon.nguyen@gmail.com 2d9c2b3341 removed extra "." from TextScroller text as reported in forums
following up on wrenczes cleanup,
   changing ints to floats
   fixing calculations such as ( 16.0 / <some float>) to ( 16.0f / <some float>) to remove compiler warnings.
2010-11-04 09:18:12 +00:00
wrenczes@gmail.com ab49a0c6e1 Added new files to the VS2010 sln; Fixed a bunch of int to float warnings.
Minor note to others:  if you're writing drawing code, the coordinate system in JGE uses floats, so don't bother with ints for x/y coords & the like.  You're forcing the processor to do float to long conversions for nothing.
2010-11-04 04:33:04 +00:00
techdragon.nguyen@gmail.com dd163c8807 ***Note***
please copy "DeckEditorMenuBackdrop.png" into your PSP folder.  Otherwise you will have a crash when you start up!

ChangesLog:
minor refactoring of DeckMenu
added a new DeckEditorMenu which is derived from DeckMenu.  This customizes the deck editor menus with the exception of the confirmation screens (yes/no)
Still more work to be done to round out some font issues.  
TODO:
put more information text in bottom row of menu.
reorganize statistical data to allow more info to be shown.
2010-11-03 16:49:39 +00:00
techdragon.nguyen@gmail.com b7a2196878 fixed signed vs unsigned comparison that caused psp build to fail 2010-11-03 16:16:53 +00:00
techdragon.nguyen@gmail.com 4a3d7faf0a added Reward and Expiration to task list
moved text scroller into DeckMenu class since it is specific to DeckMenu and not GameStateDuel
added new util function "wordWrap"
2010-11-03 00:15:12 +00:00
wrenczes@gmail.com 685626128a Minor refactor of AACloner::resolve() - two code paths were complete duplicates except for the MTGCard*. 2010-11-02 09:26:37 +00:00
wrenczes@gmail.com eef54c259b Fixed a compile warning treated as an error on psp - switched an int loop var to size_t. 2010-11-02 07:05:04 +00:00
wrenczes@gmail.com 8cb0cf1dae Fixed a crash in the vertical text scroller. Mike, pls review. 2010-11-02 05:50:07 +00:00
wrenczes@gmail.com 4288e7c236 Normalizing line endings to Unix style, per coding guidelines. 2010-11-02 05:29:20 +00:00
wrenczes@gmail.com 2d30dece25 Sigh - revert out changes relating to my boost::shared_ptr experiments. (Did I mention I hate AnkhSvn? Why does it auto-select files in other changelists?? ) 2010-11-02 04:31:10 +00:00
wrenczes@gmail.com 1325fff26b Fixed the vs2010 solution - included newly added files to the project. 2010-11-02 04:28:32 +00:00
wrenczes 858950fb9d Incremental fix on my Navigator work - switched out global to JGE vars actualWidth/Height to be real accessible members of the JRenderer instance, so that we can actually access what the real display width is from within the MTG project. This makes the fix for enchantment zone targetting work when the window is resized on Win32. 2010-11-02 04:07:25 +00:00
techdragon.nguyen@gmail.com f472c48a8a fixed avatar image issue when selecting ai decks outside of the default 100 ai decks.
installed a horizontal text scroller for the deck selection screens in normal play
TODO:-> Need to make it smoother transition.  It currently just replaces the text with the new text.
2010-11-02 02:20:44 +00:00
Xawotihs afe52d883a Added recent new sources and headers 2010-11-01 23:18:55 +00:00
wagic.laurent a666b8cc14 Laurent - daily build
Just built this one to test new deck selection screen... very nice....
2010-11-01 21:41:16 +00:00
techdragon.nguyen@gmail.com a458da051d refactored how manaredux coding works
replaced literals with constants in some places.
migrated some abilities out of headers and into implementation files.
2010-11-01 13:04:06 +00:00
techdragon.nguyen@gmail.com f0d3072091 updated VS 2008 solution file with the latest DeckMenu classes 2010-11-01 11:32:37 +00:00
techdragon.nguyen@gmail.com 911189da3d added DeckMenu and DeckMenuItem to the object list. 2010-11-01 11:01:08 +00:00
techdragon.nguyen@gmail.com 149b9efd9f fixed rename bug. rename state was not initialized. 2010-11-01 10:56:20 +00:00
techdragon.nguyen@gmail.com 6c1497bbd5 Revamped Deck Selection Screen using abrasax's design as a template.
TODO:  
     change literals to use constants, 
     refactor the rendering code for the menu to have be leaner.
     add text scroller to list all the tasks. 
         * 1st implementation will list all the tasks.dat  
         * 2nd round will try to get the scroller to only display relevant tasks to ai

Special thanks to wololo and MootPoint for helping me hammer this out.  To abrasax, for the initial design of the layout.
2010-11-01 08:22:55 +00:00
omegablast2002@yahoo.com 63eca8ebfe fresh EBOOT.PBP 2010-10-31 19:02:33 +00:00
omegablast2002@yahoo.com 2640fc8280 fixed a bug where affinity was not counting when cards were being bounced back to your hand. 2010-10-31 17:24:49 +00:00
omegablast2002@yahoo.com e463be5ad0 updated level up creatures to remove level= and replace with auto=maxlevel:number 2010-10-31 17:22:37 +00:00
omegablast2002@yahoo.com 150c5f4c99 turned the "ai hint" for level up creatures into an MTGAbility.
this fixes a bug(?) that had high priority and maintains same effect as before. removed all traces of the "bugged(?) hint" from CardPrimitive.
Issue: 498
2010-10-31 17:19:20 +00:00
omegablast2002@yahoo.com 777098f763 fixed a bug where CHANGELING was not giving all creature subtypes. Changelings now set creature types in MTGCardInstance::initMTGCI
moved removed it from the setType function of cardprimitive.
Issue: 501
2010-10-31 16:55:05 +00:00
techdragon.nguyen@gmail.com 4cfb266d14 code cleanup: removed commented out code. 2010-10-31 10:12:20 +00:00
guzhenjie1@gmail.com d125c245b3 Fixed following cards reported in the bug section:
Chainer, Dementia Master, Corpsehatch, Golem Artisan, Imps' Taunt, Samurai of the Pale Curtain, Summoning Station
Add missing text of following duel land: 
Blackcleave Cliffs, Copperline Gorge, Darkslick Shores, Razorverge Thicket, Seachrome Coast
2010-10-31 10:11:33 +00:00