No limitation regarding the table of bitmaps?

I'm working on a game. Previously, I had 13 executives of sprite as separate files and used getBitmapResource to load into an array of bitmaps. It worked well.

I've upped the number of sprite images to 26 and make them in a single bitmap file with 2 rows of 13 (corresponding to the States of game). I'm trying to load them into an array of Bitmaps - either one or two dimensions. None worked. The last loaded image is one that is displayed, regardless of what I call for. I use Bitmap.scaleInto, in OS5.

My attempts at debugging continue to wonder if I'm violating a rule, with the berries of the Bitmap. Like, the berries can only work before because of the structure of the .png files? Bitmaps are already in an internal table format that blends in with my paintings?

I can also have incorrectly implemented the scaleInto, although I'm working with the code for a very good post on this forum. Here is that code, currently configured to use a single dimension table. There are a few more from the referenced post lines, to maintain transparency in the sprite frames.

class Thing extends OBJ
{
 static Bitmap[] _mySprite; 

 Thing(int passX, int passY)
   {
    super(passX, passY);

    // Set bitmaps

    Bitmap multi_sprite = Bitmap.getBitmapResource("sprite_64x29.png");
    _mySprite = new Bitmap[26];

    Bitmap image = new Bitmap(Bitmap.ROWWISE_16BIT_COLOR, 64, 29);
    image.createAlpha(Bitmap.ALPHA_BITDEPTH_8BPP);
    for (int y = 0; y < 2; y++) {
        for (int x = 0; x < 13; x++) {
            int[] transparentImage = new int[64 * 29];
            image.setARGB(transparentImage, 0, 64, 0, 0, 64, 29);            multi_sprite.scaleInto(x*64, y*29, 64, 29, image, 0, 0, 64, 29, Bitmap.FILTER_LANCZOS);           _mySprite[x+13*y] = image;
           }
       }...

Transparency works. And, if I shorten the loop values, the last loaded picture appears, regardless of what image I try to get out of the table.

I know that I could skip the drawBitmap preload and only when needed. But I have a lot of code in place that expects to be able to check the dimensions of several bitmaps, in addition to these. And it seems just cleaner to shorten them.

you re-use the image object, most likely, you end up with a table of the same objects (a table only refers to the object, it does not copy it).

Tags: BlackBerry Developers

Similar Questions

  • regarding the tables

    Hi friends,

    I use oracle 10.2.0.3

    I have a table partitioned, named cmp_event_history. On this table, I created rang partition on a weekly basis. The name of the default partition is event_others. This week, I forgot to create a new partition. If data todays has been inserted in the event_others partition.

    My question is if I use the sub query, it will cause no problems because the data is already present on this partition event_others.
    alter table CMP_EVENT_HISTORY split partition EVENT_OTHERS at (to_date('09/06/2013 00:00:00','dd/mm/yyyy hh24:mi:ss')) into (partition EVENT_June2013_01to08,partition EVENT_OTHERS) update global indexes;

    I use oracle 10.2.0.3

    I have a table partitioned, named cmp_event_history. On this table, I created rang partition on a weekly basis. The name of the default partition is event_others. This week, I forgot to create a new partition. If data todays has been inserted in the event_others partition.

    My question is if I use the sub query, it will cause no problems because the data is already present on this partition event_others.

    ALTER table CMP_EVENT_HISTORY split partition EVENT_OTHERS at (to_date (September 6, 2013 00:00:00 ',' dd/mm/yyyy hh24:mi:ss')) index global update (partition EVENT_June2013_01to08, partition EVENT_OTHERS);))

    What is the partition type you use?

    Please see the doc PDF attached to (database using partitioning with Oracle E-Business Suite [554539.1 ID]) for the alter command that you can use.

    Thank you
    Hussein

  • Complete the table of reference

    Hello

    What I want: complete a table that is inside a container and named function of input parameters.

    What I tried:

    I created an object reference, Locals.obj_temp, which stores the set I want to fill the inside of the container.  I seem to be able to get the number of items, define the limits of the table, insert items, etc., but I can't figure out how to put values in there actually.

    I learned today that I can use ' * ' for dereferencing the ref of the object, so I use

    InsertElements(*Locals.obj_temp,"[0]",1),

    to add an item correctly.

    But, I don't know how to make the value I want it to be, and not not not the default value zero as shown in the picture.

    for what it's worth, this is how I make the new table inside the container and obtain a reference to it.

    Parameters.UniqueFCs.NewSubProperty(Parameters.UniqueFullTable[0][Locals.m],PropValType_Number,True,"",0),
    Locals.obj_temp = Parameters.UniqueFCs.GetPropertyObject(Parameters.UniqueFullTable[0][Locals.m],0),

    I found a way to do it.

    I created a temporary table as Locals.Arr1 and clone to the container parameter I want.

    For all of you who found this thread, I have

    Locals.Arr1 //my table temp I empty at each iteration of my loop for external

    /*
    code that fills Arr1
    */
    Locals.obj_clone = Locals.Clone("Arr1",0), //create a clone of obj of Arr1
    Parameters.UniqueFCs.SetPropertyObject (Locals.name_temp, 1, Locals.obj_clone), //copy Arr1 table in my output tray (my container is called UniqueFCs)

  • reach a value of table regarding the APP_USER.

    Hello

    I want to extract the value of the Table regarding the APP_USER.

    I use
    SELECT ID,NAME,FILE_OBJ_ID,MIME_TYPE,DOC_SIZE,BLOB_CONTENT,DESCRIPTION,UPLOAD_DATE,'Download' FROM DUMY_FILE where CREATED_BY =:APP_USER;
    
    Show me error 
    
    failed to parse SQL query:
    ORA-00911: invalid character
    Thank you

    Published by: 805629 on January 13, 2011 02:09

    Hello

    Try to remove the semicolon from the query end

    Kind regards
    Jari

  • Problem regarding the display of the Table

    Hello

    I have a problem with a Table in OAF... According to the condition if we have no action on the Table we should display the same view in the table... (Because let's assume that we are in the fifth of the Table Page, even after the implementation of the action to submit we must stay on the same Page)... now when I play an action after the action is completed, we see the first view (Page) of the Table...


    Please suggest me what needs to be done on this issue... I saw that the page is refreshed after submit action


    Kind regards
    Doris

    Hello

    Capture the event associated with the table column and returns the primary key of the row in the params of the event.

    If ("rowevent". Equals (PageContext.GetParameter ("Event"))
    {
    obtain the primary key of this line
    Chain of rowid = pageContext.getParameter ('primary key');
    get the existing lines of the range
    OAViewObject vo = (OAViewObject) am.findViewObject ("vo name");
    Rank [] rows = vo.getAllRowsinRange ();
    for (i = 0; i<>
    {
    Corresponds to the primary key that is captured with all the lines to find the corresponding row
    If ("rowid".equals (lines.getAttribute("rowid").toString (()))
    {
    you get the line on which event has been triggered just out of the loop

    break;
    }

    }

    This way navigation will be won on the same range, as the event is triggered.

    Thank you
    Gerard

  • Regarding the dependencies on the tables

    Hi all

    We have 2 different databases, of which one is in oracle 11 G and the other is in oracle 9i.
    Now, the company plans to remove the oracle 9i database and move only the necessary imp of the tables in the database 11G.


    So we have here a set of tables that should be moved... I'm told to find all dependencies at this table... like in that all objects are referring to this table...


    as I have A table which is referenced by other tables, triggers, and indexes... I need the full info... How can I get for that?

    PL/SQL Developer installed on my machine, I have...


    There is an option that says "referenced by" when I expand the table...

    who did?

    -Karan

    ALL_DEPENDENCIES and ALL_CONSTRAINTS queries for tables under question.

  • How to convert an array into a cluster of the same type as the one used to build the table previously?

    I have a group of 6 items I need to change in a table for the part of the VI process.  What I can do, but then I need to change in a cluster of the same type to be used elsewhere.  When I change the table in a cluster, I find myself with a cluster of 9 elements, which of course is not compatible!

    I am attaching snapshots of context-sensitive help in the initial cluster, the intermediate table and the final cluster (bad).  Regarding the photos, the length of the 1 d tables and values in their midst are the only subject to change things.

    Please could someone help by suggesting ways to work around this problem.  Thank you

    Please do not post bitmaps by chaning simply .jpg file name extension. Do not change the file type. There is a good reason why the forums software does not bitmaps, and this is because the file sizes are huge.

    To your question: right click on the table of the Cluster service and select 'Size of Cluster' in the context menu to set the size of the cluster of output.

  • Animate CC/Createjs properties of the clips/instances/bitmaps are null

    Hey!

    I was wondering how I can set/get properties (including the name property) of my items, on my scene. Whenever I get a null value on my properties. I have a passage of the mouse and you want to get the name of via stage.getObjectsUnderPoint(stage.mouseX,stage.mouseY).  And here, I get a null / undefined / whatever...

    I already tried exportRoot.myMovieClip.name, event.target.name or stage.getChildByName... Now I'm out of ideas, why I still can't set/get properties.

    To clarify:

    I have a Movieclip(called: mc_myMovieClip) and the instance is named ins_myInstance, already placed on the stage. Inside the MovieClip, I have a Bitmap with the instance of ins_myInstance. Although I put all the names in animate CC, after having exported them its not directly accessible. The images are exported in their own folder. No Spritesheet. When I try with stage.getObjectsUnderPoint(stage.mouseX,stage.mouseY) my console says:

    Bildschirmfoto 2016-02-23 um 12.06.17.png

    My final goal is to have 2 objects, where I check whether or not the names match. If it is not possible in this way, I have to do with hitareas... Something like that: Connections Drag - JSFiddle

    There is another topic of 2013 Toolkit for CreateJS after that export instance names are not available in .name property of objects , but it was not a solution for me, or I do not see this right now

    I hope it's a bit understandable. Thanks for asking! I hope that there is a way, or maybe it's a limitation of createjs?

    Thank you for the advice

    What? It is true that intellectual .name for movieclips by default to null, but has no bearing on the possibility of the objects named address. If you have a clip on the stage that you named "bob" and then something like (this.bob.x); console.log works very well.

    If for any reason, you need to extract an object is called when executing, then first name all your objects: this.bob.name = "bob"; works perfectly well. Change the JavaScript code that is published is a terrible solution, because then you must manually update each time something changes.

    Now, if you don't know advance which objects should be named, it is possible to do it automatically, thanks to the way in which CreateJS implements its data structures:

    First, each element (including the level of the root timeline) has a raw list of members/properties you can browse with a for... loop. This gets you the key names, but it gets you everything in the video. Dozens of irrelevant properties. Even if filter you by type - movieclips are represented internally in the form of a container of CreateJS object instances - not every container object is guaranteed to be a real child of the clip.

    Second, there is a range of children for each movieclip that stores a list of the children of all the clips, but it stores all by reference. No names.

    So, for complete names for children of all of the clip, we scanned raw properties from the clamp, then for each one found is a container object, analyze the table of children to see if it is also in this list. If this is the case, assign the value of the key as the name of the element. As follows:

    var i, key;
    var clip = this; // movieclip content to be processed
    var clipch = clip.children; // movieclip's children
    // iterate over every property name in the clip
    for (key in clip) {
        // is this a CreateJS container object?
        if (clip[key] instanceof createjs.Container) {
            // scan the clip's list of children
            for (i = 0; i < clipch.length; i++) {
                // are they both pointing to the same object?
                if (clip[key] === clipch[i]) {
                    // assign key value to "name" property
                    clip[key].name = key;
                    break;
                }
            }
        }
    }
    

    Voila.

  • How we can print the page numbers for the shape of the TABLE OF CONTENTS when her excluded from the form page count?

    Hi Experts,

    We have the TABLE OF CONTENTS, followed by 100 forms totally 215 pages.

    We checked in the exclusion of the option of number of form page SUMMARY form at the level of the group.

    Followed forms of TABLE OF CONTENTS forms all use FORMSETPAGENUM rule at the bottom of page.

    the first form followed by TABLE OF CONTENTS form the number starts page 1 of 215 and the last form closes at 215 215.

    Now, I want to print the Page number of SUMMARY form only.

    How can do us?  Any thoughts?

    Kind regards

    RAMAN C

    Hello Raman,

    I guess that you included "Exclude the number of pages" option in the form of table of content (TOC).

    There is a limitation in the studio. The functions of page number (PAGE NUM OF FORM / FORMSET PAGE OF NUM) will be ineffective when we choose the option "Exclude the number of pages" in the form of table of contents. Therefore, you was not able to print many pages of form as a table of contents.

    The only way to print the number of pages is to deselect the option "exclude the number of pages. Then you can print the number of pages in the table of contents in the form of table of contents normally. However, this number of pages in the table of contents will add to the Total number of pages form set. The number of pages all forms can be controlled by Postransdal using the script [FORMSET PAGE NUM = TotalPages() - 1]

    Kind regards

    Mahesh

  • Regarding the use of the Index

    Hello

    I have some doubts about the index:

    1. What is the difference between the 2 index usage scenarios below:
    / * + index (an index_name) parallel (a, 4) * /.
    / * + parallel_index(a,index_name,4) * /.

    Are the same two these?

    2. What is scan limited index complete and full scan index?

    3. I have a table in the database and there a few indexes on some columns. How can I check if the index is Bitmap or B-Tree?


    Thank you
    AB

    1. What is the difference between the 2 index usage scenarios below:
    / * + index (an index_name) parallel (a, 4) * /.
    / * + parallel_index(a,index_name,4) * /.
    Are the same two these?

    No,
    First of all the two boards, use the index and the other to indicate to the optimizer to use 4 simultaneous servers to a parallel operation are

    The second is just an indication. He tells the optimizer to use 4 concurrent servers on partitioned indexes.

    2. What is scan limited index complete and full scan index?

    The full index scan simple block reads.
    Full Fast scan do multi block reads.

    3. I have a table in the database and there a few indexes on some columns. How can I check if the index is Bitmap or B-Tree?

    In user_ | all_dba_indexes. Index_type will be BITMAP or NORMAL

    Concerning
    Peter

    PS: Speaking of tips. This favorite, can answer most of these questions, much better that I can:
    http://www.Oracle.com/pls/db112/homepage

    Published by: Peter on March 26, 2013 13:47

  • My cursor locks the table inserts

    I have a function that copies of the new lines of Database_A, Table_A to Database_B, Table_A via a database link. This happens on a regular basis and there may be around 100 k new records accumulated between these periods.

    I understand the folders that need to be copied by filtering a field "copied" on the table. In the loop, I update field copied from the line so it will not be copied during the next pass. Here's the function:
    FUNCTION copy_records RETURN INTEGER IS
    
         pCount INTEGER := 0;        
            CURSOR recs IS
                SELECT * FROM TABLE_A
                WHERE FLG_COPIED = 'N' OR FLG_COPIED IS NULL
                ORDER BY MYKEY;    -- do the oldest first (only important if we commit during iterations)              
        BEGIN
    
            pCount := 0;
        
            FOR rec IN recs LOOP
            
                -- first copy to backup db
                INSERT INTO TABLE_A@BACKUP_DB
                    (FIELD_1, FIELD_2, FIELD_3)
                VALUES 
                    (rec.FIELD_1, rec.FIELD_2, rec.FIELD_3);
            
                -- now flag as copied
                UPDATE TABLE_A
                SET FLG_COPIED = 'Y'
                WHERE MYKEY = rec.MYKEY;
                            
                -- counter sent back for logging
                pCount := pCount + 1;               
                
            END LOOP;
            
            RETURN pCount;
            
        EXCEPTION
            WHEN OTHERS THEN
                RETURN SQLCODE;
        END;
    END;
    My problem is that it is stuck on the table, while this process takes place. I'd wait a few blocking at the level of the lines, which is fine (this painting is especially INSERT only). But I do not know why it blocks such that she allow me to INSERT into the table. -This can someone explain that to me?

    If I do a VALIDATION during each iteration, I can at least perform an insert, but this seems to slow things down significantly when used through a DBLink, so I'd avoid it (more I want to run a transaction all or nothing). I'm not as sure as if the effect of the VALIDATION must achieve the online-only block, or simply reduce the window of the table locking.

    Published by: xaeryan on October 14, 2011 15:51

    xaeryan wrote:

    mtefft wrote:
    1. it is a bad programming practice to perform updates (or inserts, etc.) in a function. You must use a procedure.

    More tests to make sure that, but it appears after a PROCEDURE and nothing more, changed my blocking condition no longer exists...

    This would make sense?

    That makes no sense to me. There is no fundamental difference between a procedure and a function with regard to the processing of SQL statements mode. My guess is that your problem is:

    There is also a BITMAP index on the field FLG_COPIED

    Bitmap index and updated several unique, as you do not play well together. A single block in a bitmap index can cover a very large number of rows in the table. In addition, the index bitmap, in contrast to the B-tree index, index null values. Every time you update a row in tablea, Oracle must briefly lock two index blocks. One on the value null/N in line and the other covering the value Y of the line. This would tend to block other transactions that want to access all the lines to cover (or potentially covered) of the index blocks.

    John

  • Question about compression of the table

    I manage several databases 10g and have been invited to compress tables in several storage spaces. I am familiar with the use of compression. I read Oracle documentation on the statement ALTER TABLE... MOVE the COMPRESSION control, but have many questions. Can anyone recommend a good white paper, or other documents on the best way to compress tables with existing data? Thanks in advance for your advice!

    Hello

    Please find enclosed a few whitepapers on Compression:

    [http://www.oracle.com/technology/products/bi/db/10g/pdf/twp_data_compression_10gr2_0505.pdf]

    [http://www.trivadis.com/uploads/tx_cabagdownloadarea/table_compression2_0411EN_01.pdf]

    Of course, you can also check out the documentation, Oracle (the Guide of Directors of the chapter on Tables).

    Don't forget that there are some limitations on the Compression.

    Hope this can help.
    Best regards
    Jean Valentine

  • The tables stored in memory but can be viewed from other sessions

    Dear Oracle experts,

    It's maybe a stupid question, but I'm looking for the best opportunity to create a kind of temporary table that can be accessed from other sessions.

    Could you give some advice / keywords to speed up my research.

    Thank you very much

    Daniel

    danielwetzler wrote:
    danielwetzler wrote:
    I'm afraid that caching is not appropriate for my case due to the machines of reasons cited in my other ads...

    First of all I don't think you need to worry about the effectiveness of caching in your particular case. In addition, Oracle is very skillful when actually writing the Sales blocks from the buffer on the disk cache, so if your amount of data written to the array of result is quite small and no other activity is happening on your system it will not get written to disk immediately anyway but remain in memory until a condition is met that trigger the writer of the database in order to eliminate the blocks on the disk.

    But there are options that you might consider if you want to avoid as much overhead as possible and write the result of your calculation in the table of results as soon as possible.

    You can use the path direct inserts (INSERT / * + APPEND * /) and set the table of results for "NOLOGGING". In this way, no cancellation and minimum never do again is generated.

    Note, however, that there are certain reservations and restrictions to consider when using this approach, for example your result table will be not recoverable (what you say is OK), that a single direct-path insert access is allowed at the same time (it blocks the table exclusively, no other possible DML until you commit the transaction / rollback), and the direct-path insert access has some restrictions. If any of them apply that prevent the direct path operation, then it silently returns to the 'classic' insertion mode that generates the undo and redo. One of the most annoying restrictions is that you can not read a table that was written for in the direct-path access mode in the same transaction, you must first validate the transaction, otherwise you get "ORA-12838: cannot read/change an object after edit it in parallel." In other words, adding simply the indicator APPEND you might break the existing logic.

    Finally the direct path insert never reuses the space in the blocks below the current high waters, which means that if you make a direct path insert and then remove rows from the table and repeat once again a direct path operation will increase your insertion and empty in the blocks already used space segment won't get reused. Best way would be to truncate the table rather than deletion of lines of it.

    There are of the available workarounds to overcome some of these direct-path insert limits (exclusive lock, truncated rather than remove etc.), as the use of a table partitioned (if you have an appropriate edition/license), because direct-path inserts of access may be limited to the partitions. In this case you can do simultaneous direct-path inserts if you use different partitions, but then you sort of logic that determines which partition to use.

    Kind regards
    Randolf

    Oracle related blog stuff:
    http://Oracle-Randolf.blogspot.com/

    SQLTools ++ for Oracle (Open source Oracle GUI for Windows):
    http://www.sqltools-plusplus.org:7676 /.
    http://sourceforge.NET/projects/SQLT-pp/

  • stop the email addresses in the table in the spreadsheet to launch mail

    I am compiling of data in a worksheet Numbers and many cells in the table into them from the e-mail addresses.

    Whenever I tap on the cell that contains an e-mail address, he jumps to my Mail application and launches a new mail with the email address. It's so irritating cos I have to type on any address in the table and I DON'T WANT my Mail App to launch. How can I stop this madness? Help, please!

    Hi helix.

    Drag the column wide (or Panel Format > table > column)

    Click on the white space to the right of the link to select this cell without activating the link

    Now, edit

    Tested on a MacBook Pro with numbers under Mac OS X El Capitan 10.11.5 3.6.2

    Kind regards

    Ian.

  • 'Lines' of the table does not automatically extend as added content?

    This is a table of Storyboard, built with a simple table.  Three columns: one for the images, one as a spacer, a text.

    I did the storyboard to the origin in the Pages, and then converted in Word to work with a partner, now converted to Pages yet.  It seems to be OK except for one thing:

    Before, when I would write in the text of the text column... the line would extend automatically as the text was written, at least in the size of a page.

    Now, I think lines are somehow "locked" and does not (at least one page), extend this text and images, are "hiding" because the line is not normally develop as she would have.

    Is there some click preferably a place that keeps my lines to a constant size, any content is in every cell?

    Or maybe it's a corruption caused by going to Word and back?

    All ears,

    Ben

    V4.3 Pages ' 09, or permit Pages v5.6.2 splitting a line beyond the limits of the page, so limit the content of text in a cell a to a single page. I just copy and paste a page full of text and he dropped in the first row, cell 3. It is automatically extended to the bottom of the page and not details. There is no hidden settings in Pages that will be substituted for this limitation.

Maybe you are looking for

  • don't remember the password for remote desktop

    I had to reinstall all my software after a major system failure, now when I use DRC he asks me a password which I don't remember, it gives me the ability to reset the password, but the box were you can click to to select wre password don't appear as

  • Planning of computer of Windows 7 to turn off completely every night then turn the next morning

    How to plan my computer Windows 7 completely extinguished each night, then turn on the next day morning

  • PhoneCall questin

    Hello I have the following code: PhoneArguments phoneArgs = new PhoneArguments(PhoneArguments.ARG_CALL, "1234567890"); Invoke.invokeApplication(Invoke.APP_TYPE_PHONE, phoneArgs); Now, in the next line, I want to get the instance of the object the ini

  • Is it possible to get the query Details of the old run from oracle?

    Is it possible to get the query Details of the old run from oracle? I mean, I wanted to know the details of a request executed work, I know the time taken by the query to run? Is it possible to know?

  • verification of site in Muse with

    I'm working on several Web sites at the same time. I need to get them submitted to the search engines. I take advantage of the html tag that was provided by the search engine and paste it into the correct area in the page below metadata properties in